Prev: ADE9 Up: Map Next: AE0D
ADF9: Project Player Entity
Used by the routines at RunFrame and RunGame.
Projects the player entity with ProjectEntity, then works out how far the entity has moved on the screen since the last frame. The previous value is kept in PlayerScreenPosition and the change in 5CED.
Input
IX The player entity
ProjectPlayerEntity ADF9 CALL ProjectEntity Call ProjectEntity.
ADFC LD A,($5CEC) Read the byte at PlayerScreenPosition.
ADFF LD B,A A moves into B.
AE00 LD A,(IX+$0F) Fetch the row.
AE03 LD C,A A moves into C.
AE04 SUB B Subtract B.
AE05 LD ($5CED),A Write A at 5CED.
AE08 LD A,C C moves into A.
AE09 LD ($5CEC),A Write A at PlayerScreenPosition.
AE0C RET Return.
Prev: ADE9 Up: Map Next: AE0D