@digitalmonkey: Johnicholas has made a "clear?" function (top of the code) which is used in the update function to check (mget) if the map has a specific sprite (ID 2) at the new position (after button processing). This is done 4 times for all 4 directions in the clear(x,y) function. In the update function the code first checks if the new position in x and y direction is clear (to walk). If not then it tests the new x and y positions separately and applies what is clear (walkable).
I hope that helped.
[Please log in to post a comment]