![]() |
Routines |
| Prev: 6EAC | Up: Map | Next: 6EF5 |
|
Used by the routine at MoveHitActor.
Part of MoveHitActor, used when the actor has reached the bottom of the play area (a vertical co-ordinate of A0 or more). The mixing bowl and the four dustbins are along the bottom of the screen, and the actor is tested against them with TestLandingPosition. This depends on the vertical co-ordinate of the actor:
|
||||||||||||||||||
| LandHitActor | 6EC0 | LD (IX+$02),A | Update the vertical co-ordinate. | |||||||||||||||
| 6EC3 | INC (IX+$07) | Increase the counter in byte 07 of the actor by one, to make up for it being decreased. | ||||||||||||||||
| 6EC6 | CP $C0 | Jump to TestFallenActor if the actor has gone as far as the bottom. | ||||||||||||||||
| 6EC8 | JR NC,TestFallenActor | |||||||||||||||||
| 6ECA | CP $B8 | Jump to LandHitActor_BottomRow if the actor is on the bottom row. | ||||||||||||||||
| 6ECC | JR NC,LandHitActor_BottomRow | |||||||||||||||||
| 6ECE | CALL TestLandingPosition | Test the position of the actor using TestLandingPosition. | ||||||||||||||||
| 6ED1 | RET NC | Return if the actor is over the bowl or a dustbin. | ||||||||||||||||
|
The actor is over a gap, so make it bounce.
|
||||||||||||||||||
| LandHitActor_Bounce | 6ED2 | LD A,(IX+$02) | Fetch the vertical co-ordinate. | |||||||||||||||
| 6ED5 | CP $A8 | Jump to LandHitActor_Rebound if the actor is A8 or lower. | ||||||||||||||||
| 6ED7 | JR NC,LandHitActor_Rebound | |||||||||||||||||
| 6ED9 | LD (IX+$05),$FC | Set the vertical speed to FC (-4, to bounce the actor upwards). | ||||||||||||||||
| 6EDD | JR MoveHitActor_TestHorizontalSpeed | Jump to MoveHitActor_TestHorizontalSpeed. | ||||||||||||||||
|
The actor is low down in the gap, so make it move the other way.
|
||||||||||||||||||
| LandHitActor_Rebound | 6EDF | LD A,(IX+$04) | Fetch the horizontal speed. | |||||||||||||||
| 6EE2 | NEG | Reverse the direction by negating the horizontal speed. | ||||||||||||||||
| 6EE4 | LD (IX+$04),A | Update the horizontal speed. | ||||||||||||||||
| 6EE7 | LD (IX+$05),$04 | Set the vertical speed to 04 (moving down). | ||||||||||||||||
| 6EEB | RET | Return. | ||||||||||||||||
|
The actor is on the bottom row.
|
||||||||||||||||||
| LandHitActor_BottomRow | 6EEC | CALL TestLandingPosition | Test the position of the actor using TestLandingPosition. | |||||||||||||||
| 6EEF | JR C,LandHitActor_Bounce | Jump to LandHitActor_Bounce if the actor is over a gap. | ||||||||||||||||
| 6EF1 | LD A,B | Fetch the result of the landing test (zero for the bowl). | ||||||||||||||||
| 6EF2 | AND A | Is the actor over the bowl? | ||||||||||||||||
| 6EF3 | JR NZ,RemoveFallenActor_Pillar | Jump to RemoveFallenActor_Pillar if it is over a dustbin. | ||||||||||||||||
| Prev: 6EAC | Up: Map | Next: 6EF5 |