Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - ThatTreeOverThere

Pages: [1]
1
Axe / Drawing from 2-byte positions
« on: March 23, 2013, 11:16:51 pm »
So I'm ThatTreeOverThere, new only in posting to the forums  :) , and I've been playing with Axe for a little while. I've run into an issue, though...
I'm making a top-down zombie shooter, and i'm having trouble drawing sprites exactly where I want them to go. I want to be able to store the positions of each zombie in 2 bytes per value (so, 4 bytes for X and Y together), but when I go to draw them on the screen, I suspect that Pt-On( converts my beautiful 16-bit numbers into 8-bit numbers and causes sprites to draw modulo 256, which is annoying!  >:(

The specific part in source looks like:

Code: [Select]
For(I,0,S
Pt-On({I*2*2+B}[sup]r[/sup]+X,{I*2*2+B+2}[sup]r[/sup]+Y,Pic1
End

Where S is the number of sprites-1, Pic1 is the sprite image pointer, B is a pointer to a list consisting of 2byte X and Y values (and I'll optimize out that last duplicate expression later :) )

So can anyone help me?

Pages: [1]