![]() |
Routines |
| Prev: 6F47 | Up: Map | Next: 6F78 |
|
Used by the routine at LandHitActor.
Tests whether the horizontal co-ordinate of an actor is over the mixing bowl, over one of the four dustbins or over one of the gaps between them. The screen is the same on both sides, so a co-ordinate in the right half is changed to the equivalent one in the left half first.
|
|||||||||||||||||||||||||||||
| TestLandingPosition | 6F57 | LD B,$03 | Set the position counter to 03. | ||||||||||||||||||||||||||
| 6F59 | LD A,(IX+$01) | Fetch the horizontal co-ordinate. | |||||||||||||||||||||||||||
| 6F5C | CP $C0 | Jump to TestLandingPosition_Gap if the actor is off to the right. | |||||||||||||||||||||||||||
| 6F5E | JR NC,TestLandingPosition_Gap | ||||||||||||||||||||||||||||
| 6F60 | AND A | Test the horizontal co-ordinate. | |||||||||||||||||||||||||||
| 6F61 | JP P,TestLandingPosition_Loop | Jump to TestLandingPosition_Loop if the actor is in the left half. | |||||||||||||||||||||||||||
| 6F64 | NEG | Negate A. | |||||||||||||||||||||||||||
| 6F66 | SUB $40 | Subtract 40. | |||||||||||||||||||||||||||
| 6F68 | AND %01111111 | Keep only bits 0-6. | |||||||||||||||||||||||||||
| TestLandingPosition_Loop | 6F6A | DEC B | Decrease the position counter by one. | ||||||||||||||||||||||||||
| 6F6B | JR Z,TestLandingPosition_Finish | Jump to TestLandingPosition_Finish if the position counter is zero. | |||||||||||||||||||||||||||
| 6F6D | SUB $20 | Subtract 20. | |||||||||||||||||||||||||||
| 6F6F | JR NC,TestLandingPosition_Loop | Jump to TestLandingPosition_Loop if there was no carry. | |||||||||||||||||||||||||||
| TestLandingPosition_Finish | 6F71 | NEG | Negate A. | ||||||||||||||||||||||||||
| 6F73 | CP $0F | Compare with 0F. | |||||||||||||||||||||||||||
| 6F75 | RET | Return. | |||||||||||||||||||||||||||
| TestLandingPosition_Gap | 6F76 | SCF | Set the carry flag. | ||||||||||||||||||||||||||
| 6F77 | RET | Return. | |||||||||||||||||||||||||||
| Prev: 6F47 | Up: Map | Next: 6F78 |