Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Format of GET/PUT arrays?
#1
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?
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#2
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.
Reply
#3
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 ...
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#4
That I am....heheh. :wink:
Thanks, y'all.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)