Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: zeldaking on August 02, 2011, 01:49:43 pm

Title: Zeldaking's axe questions
Post 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? ???
Title: Re: Zeldking's axe questions
Post by: leafy on August 02, 2011, 01:50:19 pm
You can't. If you want to make smaller sprites just leave the other pixels blank and use the same byte-sized sprite.
Title: Re: Zeldking's axe questions
Post by: zeldaking on August 02, 2011, 01:52:55 pm
So how would you erase that 8x8 sprite without erasing background?
Title: Re: Zeldking's axe questions
Post by: Deep Toaster on August 02, 2011, 02:03:10 pm
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.
Title: Re: Zeldking's axe questions
Post by: zeldaking on August 02, 2011, 02:14:48 pm
So like this?
Code: [Select]
.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?


Title: Re: Zeldking's axe questions
Post by: yunhua98 on August 02, 2011, 02:23:50 pm
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.
Title: Re: Zeldking's axe questions
Post by: zeldaking on August 02, 2011, 02:24:37 pm
What about the erasing of it though?
Title: Re: Zeldking's axe questions
Post by: yunhua98 on August 02, 2011, 02:30:58 pm
pt-change(same x, same y, same sprite)
^should work
Title: Re: Zeldaking's axe questions
Post by: zeldaking on August 02, 2011, 02:35:35 pm
Yes, that works, sweet I can make some things I haven't been able to.
Title: Re: Zeldaking's axe questions
Post by: DJ Omnimaga on August 02, 2011, 02:40:18 pm
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.
Title: Re: Zeldaking's axe questions
Post by: zeldaking on August 02, 2011, 02:45:11 pm
True but the Point-Change( worked for what I need.