![]() |
Routines |
| Prev: C43F | Up: Map | Next: C4A2 |
|
The player's turn, in order: read the controls (READ_CONTROLS), turn (HANDLE_LEFT_RIGHT), step the legs' frame, with a footstep sound (HANDLE_FORWARD), start a jump (HANDLE_JUMP), pick up or put down (TAKE_OR_LEAVE). Then, if he stands in a doorway -- past the line of the room's walls -- he may not rise, only fall. The move is resolved and made (MOVE_PLAYER), with the body out of the way of the collision tests, and he may fire (FIRE).
If he has been killed (bit 6 of +$0D), the body is killed too and the legs become a puff.
|
||||||||
| PLAYER_LEGS | C440 | CALL DRAW_AT_L12_D6 | the legs' drawing nudge (-12, -6) | |||||
| C443 | BIT 6,(IX+$0D) | killed: the body too (+$0D of the next record), and a puff | ||||||
| C447 | JR Z,PLAYER_LEGS_0 | |||||||
| C449 | SET 6,(IX+$2D) | |||||||
| C44D | JP START_PUFF | |||||||
| PLAYER_LEGS_0 | C450 | CALL READ_CONTROLS | this turn's controls in A and C; no step in U or V yet | |||||
| C453 | XOR A | |||||||
| C454 | LD (IX+$09),A | |||||||
| C457 | LD (IX+$0A),A | |||||||
| C45A | CALL HANDLE_LEFT_RIGHT | turn, walk, jump, pick up or put down | ||||||
| C45D | CALL HANDLE_FORWARD | |||||||
| C460 | CALL HANDLE_JUMP | |||||||
| C463 | CALL TAKE_OR_LEAVE | |||||||
| C466 | CALL CHK_PLYR_OOB | in a doorway, beyond the walls? | ||||||
| C469 | JR NC,LEGS_IN_DOORWAY | |||||||
| LEGS_MOVE | C46B | SET 1,(IX+$27) | the body (+7 of the next record) out of the collision tests while the legs move | |||||
| C46F | LD A,(IX+$03) | no higher than Z 240 (this never ran in the build's sessions) | ||||||
| C472 | CP $F0 | |||||||
| C474 | JR C,PLAYER_LEGS_1 | |||||||
| C476 | LD (IX+$03),$F0 | |||||||
| PLAYER_LEGS_1 | C47A | CALL MOVE_PLAYER | make the move, and fire | |||||
| C47D | CALL FIRE | |||||||
| C480 | RES 1,(IX+$27) | the body back in the collision tests | ||||||
| C484 | RES 0,(IX+$07) | bit 0 of his flags, set at a doorway to let the move cross the line of the walls (HANDLE_EXIT_SCREEN), lasts one turn | ||||||
| C488 | LD A,(IX+$0C) | count down the top four bits of +$0C: the turns he walks on by himself after coming through a doorway (EXIT_LOW_U sets 3) | ||||||
| C48B | SUB $10 | |||||||
| C48D | JR C,PLAYER_LEGS_2 | |||||||
| C48F | LD (IX+$0C),A | |||||||
| PLAYER_LEGS_2 | C492 | JP SET_WIPE_AND_DRAW_FLAGS | mark him to be redrawn | |||||
| LEGS_IN_DOORWAY | C495 | LD A,(IX+$0B) | in a doorway: falling is allowed... | |||||
| C498 | AND A | |||||||
| C499 | JP M,LEGS_MOVE | |||||||
| C49C | XOR A | ...rising is not | ||||||
| C49D | LD (IX+$0B),A | |||||||
| C4A0 | JR LEGS_MOVE | |||||||
| Prev: C43F | Up: Map | Next: C4A2 |