Qbasicnews.com

Full Version: Format of GET/PUT arrays?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've tried GETting a green (color: 2) box into an array. It's 10x10. So then I dumped the contents of the array, expecting the first two bytes to contain the height and width of the image (in this case, 10 and 10), and then the rest to just be the colors of the pixels, in this case, all 2.
But instead, I see a lot of 0s and numbers in the 500s. What's going on? What's the format of GET/PUT arrays?
Sprite width in bits (int), sprite height in pixels (int), and then the sprite data. For screen 13, it's:

width*8 (2 byte int)
height (2 byte int)
pixels (1 byte each)

You're probably looking at the data as integers.
Quote:You're probably looking at the data as integers.

Yeah.

2 bytes: 02h and 02h. -> 1 integer = 0202h = 256*2+2 = 514. Is 514 the number you get?

You are getting 80 10 514 514 514 ...
That I am....heheh. :wink:
Thanks, y'all.