![]() |
Routines |
| Prev: C828 | Up: Map | Next: C86D |
|
Used by the routine at HandleHumanLegs.
Does all of the work for the player, as the top half of the player is only a copy of the bottom half placed above it (see HandleHumanTop). If the player has been killed this starts the death sparkles. Otherwise it reads the controls, lets the player pick up or drop an object, turn, jump and walk, and then moves the player.
|
||||||||
| HandlePlayerLegs | C82B | BIT 6,(IX+$0D) | Jump to HandlePlayerLegs_Alive if the player is alive. | |||||
| C82F | JR Z,HandlePlayerLegs_Alive | |||||||
| C831 | LD A,($5BC3) | Fetch the final animation flag from FinalAnimationFlag. | ||||||
| C834 | AND A | |||||||
| C835 | JR NZ,HandlePlayerLegs_Alive | Jump to HandlePlayerLegs_Alive if it is set, as the player is not killed during the final animation. | ||||||
| C837 | SET 6,(IX+$2D) | Flag the top half of the player as dead too. | ||||||
| C83B | JP StartDeathSparkles | Start the death sparkles. | ||||||
|
The player is alive. The controls are kept in C while they are handled.
|
||||||||
| HandlePlayerLegs_Alive | C83E | CALL StartTransformation | Start the transformation if it is due. If it does start, this does not return here but to the routine that called this one. | |||||
| C841 | CALL ReadControls | Read the controls. | ||||||
| C844 | CALL HandlePickupAndDrop | Handle picking up and dropping an object. | ||||||
| C847 | CALL HandleTurning | Handle turning. | ||||||
| C84A | CALL HandleJump | Handle jumping. | ||||||
| C84D | CALL HandleWalking | Handle walking. | ||||||
| C850 | CALL TestPlayerInRoom | Test whether the player is inside the room. | ||||||
| C853 | JR NC,HandlePlayerOutsideRoom | Jump to HandlePlayerOutsideRoom if the player is not. | ||||||
|
This entry point is used by the routine at HandlePlayerOutsideRoom.
The top half of the player is flagged to be ignored in the 3D calculations while the player moves, so that the two halves do not get in each other's way.
|
||||||||
| HandlePlayerLegs_Move | C855 | SET 1,(IX+$27) | Flag the top half of the player to be ignored. | |||||
| C859 | CALL MovePlayer | Move the player. | ||||||
| C85C | RES 1,(IX+$27) | Stop ignoring the top half of the player. | ||||||
| C860 | LD A,(IX+$0C) | Fetch the flags, which hold the counter of the player entering the room in the high nibble. | ||||||
| C863 | SUB $10 | Take one off the counter. | ||||||
| C865 | JR C,HandlePlayerLegs_Draw | Jump to HandlePlayerLegs_Draw if the counter was already zero. | ||||||
| C867 | LD (IX+$0C),A | Store the new counter. | ||||||
| HandlePlayerLegs_Draw | C86A | JP SetWipeAndDrawFlags | Jump to SetWipeAndDrawFlags. | |||||
| Prev: C828 | Up: Map | Next: C86D |