Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: zeldaking on August 02, 2011, 01:49:43 pm
-
How do you use smaller than 8x8 sprites. Ex: 8x8 sprite=16 hex digits what would say 2x2 or 4x4, 3x3 or how would you figure it out. Also the point-on( command takes 8 bytes how do you raise or lower it? ???
-
You can't. If you want to make smaller sprites just leave the other pixels blank and use the same byte-sized sprite.
-
So how would you erase that 8x8 sprite without erasing background?
-
If you used Pt-Change( to draw the sprite, you can just use it again to erase. Otherwise, you can use a combination of Pt-On( and Pt-Change( to erase specific pixels. For example, say you want to erase the black pixels taken up by this sprite:
████████
██ ██
█ █ █ █
█ ██ █
█ ██ █
█ █ █ █
██ ██
████████
Just Pt-On( that, then Pt-Change( it at the same coordinates.
-
So like this?
.HELP
[FFFFC3C3C3C3FFFF->Pic1
10->x
10->y
Clrdraw
RectI(0,0,95,64
Pt-Change(x,y,Pic1
DispGraph
Repeat getkey(15)
If getkey(2)
Pt-Change(x,y,Pic1
x-1->x
Pt-Change(x,y,Pic1
End
If getkey(3)
Pt-Change(x,y,Pic1
x+1->x
Pt-Change(x,y,Pic1
End
End
Is that right?
-
If you wanted a sprite of smaller dimensions, just use the top left corner of the 8x8, and use Pt-On, the white is transparent.
-
What about the erasing of it though?
-
pt-change(same x, same y, same sprite)
^should work
-
Yes, that works, sweet I can make some things I haven't been able to.
-
For sprites smaller than 8 pixel of height (but a width of 8 ), can't someone display for example a 8x4 sprite by simply copying the necessary sprite data into L6 with the copy command? THe only limitation I recall was that the sprite had to be aligned horizontally.
-
True but the Point-Change( worked for what I need.