Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: epic7 on October 22, 2011, 06:00:06 pm

Title: Any way to do this easily?
Post by: epic7 on October 22, 2011, 06:00:06 pm
So, I'm making a game with multiple floors on the screen. I made the sprite for the floor, but it is only up to 8 pixels in length with the hexpic program. Therefore, I have to put over 40 Pt-Ons to make enough floors. Is there a way to do this easily?
Title: Re: Any way to do this easily?
Post by: Darl181 on October 22, 2011, 06:21:33 pm
You can do a For() loop:

[FFFF000000000000]→Pic1
##→Y
.Y is desired vertical position
For(A,0,11)
Pt-On(A*8,Y,Pic1)
End


Going through the loop once should draw a row of the sprite (in this case a 2-pixel thick line), going across the screen.

Btw if it's just a solid horizontal line, you can use Rect() to draw it in one command :)
Title: Re: Any way to do this easily?
Post by: epic7 on October 23, 2011, 08:29:02 pm
Thanks. Should have thought of that. Also probably just have put this in the Q&A thread. I nested the for in another one to make the multiple levels.