![]() |
Routines |
| Prev: 55808 | Up: Map | Next: 55991 |
|
The routine for objects of type 16 to 21 and 24 to 29, the legs of the player. While the player is materialising, the timer at MaterialiseTimer is advanced by two each frame and the player just flickers into view. Once the player is solid, it reads the controls and moves the player.
|
||||
| UpdatePlayerLegs | 55930 | RES 0,(IX+7) | Clear the flag for a collision. | |
| 55934 | LD HL,48130 | Advance the timer for materialising by two. | ||
| 55937 | LD A,(HL) | |||
| 55938 | ADD A,2 | |||
| 55940 | LD (HL),A | |||
| 55941 | CP 76 | Jump to UpdatePlayerLegs_Materialising if the player is still materialising. | ||
| 55943 | JR C,UpdatePlayerLegs_Materialising | |||
| 55945 | LD (HL),112 | Set the timer to the value for a solid player (112). | ||
| 55947 | LD HL,48117 | Fetch the time that the speed bonus has left, and skip the next part if it is zero. | ||
| 55950 | LD A,(HL) | |||
| 55951 | AND A | |||
| 55952 | JR Z,UpdatePlayerLegs_Controls | |||
| 55954 | DEC (HL) | Count down the time, and skip the next part if there is some left. | ||
| 55955 | JR NZ,UpdatePlayerLegs_Controls | |||
| 55957 | LD A,10 | Set the maximum speed back to the normal 10. | ||
| 55959 | LD (48062),A | |||
| 55962 | LD (IX+5),8 | Set the speed of the player to 8. | ||
| UpdatePlayerLegs_Controls | 55966 | CALL ReadControls | Read the controls. | |
| 55969 | LD E,C | Keep the controls in E. | ||
| 55970 | CALL CheckRotateKey | Check whether the key to turn the view has been pressed. | ||
| 55973 | CALL ChooseDirection | Work out the direction that the player is facing. | ||
| 55976 | PUSH DE | Keep the controls. | ||
| 55977 | CALL MovePlayer | Move the player. | ||
| 55980 | POP DE | Restore the controls from the stack. | ||
| 55981 | CALL ThrowItem | Throw an item if the fire button was pressed. | ||
| 55984 | RET | Return. | ||
|
The player is materialising.
|
||||
| UpdatePlayerLegs_Materialising | 55985 | CALL SetFacingFlags | Set the sprite of the player. | |
| 55988 | JP PlayMaterialiseSound | Play the sound for materialising. | ||
| Prev: 55808 | Up: Map | Next: 55991 |