![]() |
Routines |
| Prev: 27092 | Up: Map | Next: 27206 |
|
Used by the routines at HandleTackWasherBolt and HandleChocolate.
Changes the speeds of the actor by one towards the direction in byte 6 of the actor (bit 0 is set for down, and bit 1 is set for right), but only every other frame. The speeds are limited to 2 in either direction. The actor is then moved by MoveBouncingActor.
|
||||||||
| ChangeActorSpeeds | 27141 | BIT 0,(IX+7) | Jump to ChangeActorSpeeds_Move if bit 0 of the frame counter is set. | |||||
| 27145 | JR NZ,ChangeActorSpeeds_Move | |||||||
| 27147 | BIT 0,(IX+6) | Jump to ChangeActorSpeeds_Up if the actor is not moving down. | ||||||
| 27151 | JR Z,ChangeActorSpeeds_Up | |||||||
| 27153 | LD A,(IX+5) | Fetch the vertical speed. | ||||||
| 27156 | CP 2 | Jump to ChangeActorSpeeds_Horizontal if it is already at the limit. | ||||||
| 27158 | JR Z,ChangeActorSpeeds_Horizontal | |||||||
| 27160 | INC (IX+5) | Increase the vertical speed by one. | ||||||
| ChangeActorSpeeds_Horizontal | 27163 | BIT 1,(IX+6) | Jump to ChangeActorSpeeds_Left if the actor is not moving right. | |||||
| 27167 | JR Z,ChangeActorSpeeds_Left | |||||||
| 27169 | LD A,(IX+4) | Fetch the horizontal speed. | ||||||
| 27172 | CP 2 | Jump to ChangeActorSpeeds_Move if it is already at the limit. | ||||||
| 27174 | JR Z,ChangeActorSpeeds_Move | |||||||
| 27176 | INC (IX+4) | Increase the horizontal speed by one. | ||||||
|
This entry point is used by the routine at HandleChocolate.
|
||||||||
| ChangeActorSpeeds_Move | 27179 | JP MoveBouncingActor | Move the actor using MoveBouncingActor. | |||||
| ChangeActorSpeeds_Up | 27182 | LD A,(IX+5) | Fetch the vertical speed. | |||||
| 27185 | CP 254 | Jump to ChangeActorSpeeds_Horizontal if it is already at the limit. | ||||||
| 27187 | JR Z,ChangeActorSpeeds_Horizontal | |||||||
| 27189 | DEC (IX+5) | Decrease the vertical speed by one. | ||||||
| 27192 | JR ChangeActorSpeeds_Horizontal | Jump to ChangeActorSpeeds_Horizontal. | ||||||
| ChangeActorSpeeds_Left | 27194 | LD A,(IX+4) | Fetch the horizontal speed. | |||||
| 27197 | CP 254 | Jump to ChangeActorSpeeds_Move if it is already at the limit. | ||||||
| 27199 | JR Z,ChangeActorSpeeds_Move | |||||||
| 27201 | DEC (IX+4) | Decrease the horizontal speed by one. | ||||||
| 27204 | JR ChangeActorSpeeds_Move | Jump to ChangeActorSpeeds_Move. | ||||||
| Prev: 27092 | Up: Map | Next: 27206 |