Whether they are blank or not doesn't matter. They are still there. So it's X times Y. If you're starting from 0 (and you are), then it's X times Y minus one.
And, you shouldn't use PSET....
Look at:
HELP: GET (Graphics) Statement Details
well then would it be
DIM char% (256) or (128), im not really sur
X*Y.....
You're using GET and PUT statements..... in screen 13. Each % variable in QB uses 16 bits... each one in the array gives the palette color numeric value...
meaning...
yes, i am usnig GET & PUT statements, in SCREEN 13, but that still doesn't tell me wat number to use for a 16x16 sprite, i can draw it fine, its just saving it into the memory using DIM, GET, and PUT
You can use...
Code:
NumSprites * ((Width*Height)/2 +1)
I believe that was it anyway. It's been a while since I used QB.
so if its 16x16, then (16*16)/2 + 1 = 129
therefore DIM char% (129)???
The amount of bytes needed for a 16x16 8-bit image with 1 plane is:
width * height * Bpp * numplanes
16 * 16 * 1 * 1 = 256
There is a 4-byte PUT memoryheader, so the total amount of bytes needed is:
256+4=260
Since each integer is made up of 2 bytes, you need a total of
260/2 = 130 integers
Since in an array the subscript 0 counts too, you should define it indeed as
Code:
Dim Something(129) As Integer
well i got it my way and its faster, not like ill have more then 1 plane or anything, thnx anyway
bah I didn't know what I woz talking about. :-|