Routines |
Prev: 53273 | Up: Map | Next: 53349 |
Check if a creature has collided with a room boundary or Maroc:
|
||||
53323 | LD A,(60572) | FREEZE spell timer counter (> 0 means the FREEZE spell is in effect) | ||
53326 | CP 0 | |||
53328 | JR NZ,53392 | Maroc doesn't lose energy if he touches stationary creatures when the FREEZE spell is in effect | ||
Check creature is within room wall boundary, adjusting if needed:
|
||||
53330 | LD A,(60234) | Creature's vertical pixel position in room | ||
53333 | ADD A,8 | Adjust the vertical point to check for collisions 8 pixels down, towards the middle of the creature, rather than the top | ||
53335 | LD E,A | Store in E register, which is what the room boundary is checked against | ||
53336 | CALL 57401 | Run room boundary checks for creature, adjusting position accordingly if needed | ||
Check collision detection with Maroc
|
||||
53339 | LD C,0 | Collision event type 0 = collision with Maroc | ||
53341 | CALL 57293 | Run collision check | ||
53344 | CP 0 | The A register is returned with 1 = collision, or 0 = no collision | ||
53346 | JP Z,53885 | If no collision, can jump out of the entire routine here | ||
The next routine follows if a creature has collided with Maroc
|
Prev: 53273 | Up: Map | Next: 53349 |