![]() |
Routines |
| Prev: 49717 | Up: Map | Next: 49758 |
|
Used by the routine at HandlePlayerLegs.
Makes the player jump if the jump control is pressed. The player cannot jump while entering a room, while already jumping, or while falling quickly.
|
||||||||||
|
Return unless a jump is allowed.
|
||||||||||
| HandleJump | 49725 | BIT 3,C | Return if the jump control is not pressed. | |||||||
| 49727 | RET Z | |||||||||
| 49728 | LD A,(IX+12) | Fetch the collision flags. | ||||||||
| 49731 | AND %11110000 | Keep only bits 4-7. | ||||||||
| 49733 | RET NZ | Return if the player is entering the room. | ||||||||
| 49734 | BIT 3,(IX+12) | Return if the player is already jumping. | ||||||||
| 49738 | RET NZ | |||||||||
| 49739 | LD A,(IX+11) | Fetch the speed along the z axis. | ||||||||
| 49742 | INC A | Increment A. | ||||||||
| 49743 | RET M | Return if the sign flag is set. | ||||||||
|
Start the jump.
|
||||||||||
| 49744 | SET 3,(IX+12) | Flag the player as jumping. | ||||||||
| 49748 | LD (IX+11),8 | Set the speed along the z axis to 8. | ||||||||
| 49752 | PUSH BC | Stash BC on the stack. | ||||||||
| 49753 | CALL PlayJumpSound | Call PlayJumpSound. | ||||||||
| 49756 | POP BC | Restore BC from the stack. | ||||||||
| 49757 | RET | Return. | ||||||||
|
View the equivalent code in;
|
||||||||||
| Prev: 49717 | Up: Map | Next: 49758 |