Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mouse input/movement by numpad PROBLEMS
#21
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....
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#22
Look at:

HELP: GET (Graphics) Statement Details
stylin:
Reply
#23
well then would it be
DIM char% (256) or (128), im not really sur
Reply
#24
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...
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#25
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
Reply
#26
You can use...
Code:
NumSprites * ((Width*Height)/2 +1)

I believe that was it anyway. It's been a while since I used QB. Wink
Reply
#27
so if its 16x16, then (16*16)/2 + 1 = 129

therefore DIM char% (129)???
Reply
#28
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
Reply
#29
well i got it my way and its faster, not like ill have more then 1 plane or anything, thnx anyway
Reply
#30
bah I didn't know what I woz talking about. :-|
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)