0 Members and 2 Guests are viewing this topic.
.Sprite data[FF80808080808080] .Left+Up[FF00000000000000] .Up[FF01010101010101] .Right+Up[8080808080808080] .Left[0000001818000000]→°DirNone[0101010101010101] .Right[80808080808080FF] .Left+Down[00000000000000FF] .Down[01010101010101FF] .Right+Down.Later in the program....To get a pointer to a directional spritegetKey(1)-getKey(4)*3+getKey(3)-getKey(2)*8+°DirNone
.Initialize some direction3→D .Down.Later in the program....If the current arrow key state is an actual direction (≠0)If getKey(1)-getKey(4)*3+getKey(3)-getKey(2).Store the new direction→DEnd.Somewhere later, the sprite is displayedPt-Something(some_x,some_y,D*8+°DirNone)
Thats a pretty good idea of refrencing them with another set of data, I'll have to try that later.I was wondering also why you use ° when you store the data, because ° returns the memory location of the variable apparently but I don't see why you would want to store it to that or something. Also Is a while loop with a conditional end more efficient than a repeat or are you just doing that so the code is executed before it checks if it exited.