![]() |
Routines |
| Prev: C235 | Up: Map | Next: C25E |
|
Used by the routine at PLAYER_LEGS.
Called by the legs (PLAYER_LEGS) every turn. A jump needs the jump control held, the walk into a room over (the count in bits 4-7 of +$0C), no jump already under way (bit 3 of +$0C, cleared on landing by MOVE_PLAYER), and the robot not falling: a Z step of -2 or less says he is. That is Knight Lore's test, on the speed; Pentagram tests bit 2 of +$0C, standing, instead. The jump starts at 8 units up a turn, with a rising sound (JUMP_SOUND); gravity in MOVE_PLAYER takes it away again.
|
||||||||||
| HANDLE_JUMP | C23D | BIT 3,C | Jump not held | |||||||
| C23F | RET Z | |||||||||
| C240 | LD A,(IX+$0C) | Not during the walk into a room | ||||||||
| C243 | AND $F0 | |||||||||
| C245 | RET NZ | |||||||||
| C246 | BIT 3,(IX+$0C) | Already jumping | ||||||||
| C24A | RET NZ | |||||||||
| C24B | LD A,(IX+$0B) | A Z step of -2 or less: falling | ||||||||
| C24E | INC A | |||||||||
| C24F | RET M | |||||||||
| C250 | SET 3,(IX+$0C) | Jumping, 8 up | ||||||||
| C254 | LD (IX+$0B),$08 | |||||||||
| C258 | PUSH BC | The jump's sound, the controls kept | ||||||||
| C259 | CALL JUMP_SOUND | |||||||||
| C25C | POP BC | |||||||||
| C25D | RET | |||||||||
| Prev: C235 | Up: Map | Next: C25E |