Prev: CCC5 Up: Map Next: CD11
CCD2: Settle Player
Used by the routine at RunFrame.
Updates the player entity with MoveEntity, with its speed set to zero and its heading flag cleared, and then restores the speed. The entry point at SettlePlayer goes on to set the player to frame 03 at RunFrame_Land, the entry point at SettlePlayer_Continue goes on to the end of the player update at RunFrame_Entities and the entry point at SettlePlayer_Update returns.
Input
IX The player entity
SettlePlayer CCD2 CALL SettlePlayer_Update Settle the player, then set its frame.
CCD5 JP RunFrame_Land
SettlePlayer_Update CCD8 LD HL,($B552) Remember the vertical speed.
CCDB PUSH HL
CCDC LD E,(IX+$10) Remember the speed and the speed fraction.
CCDF LD D,(IX+$1A)
CCE2 PUSH DE
CCE3 LD HL,($B560) Remember the drift.
CCE6 PUSH HL
CCE7 XOR A Clear the speed, the drift and the vertical speed, and stop moving.
CCE8 LD ($B550),A
CCEB LD HL,$0000
CCEE LD ($B560),HL
CCF1 LD ($B552),HL
CCF4 RES 7,(IX+$11)
CCF8 CALL MoveEntity Move the player.
CCFB POP HL Put the drift back.
CCFC LD ($B560),HL
CCFF POP DE Put the speed and the speed fraction back.
CD00 LD (IX+$10),E
CD03 LD (IX+$1A),D
CD06 POP HL Put the vertical speed back.
CD07 LD ($B552),HL
CD0A RET Return.
This entry point is used by the routine at RunFrame.
SettlePlayer_Continue CD0B CALL SettlePlayer_Update Settle the player, then finish the update.
CD0E JP RunFrame_Entities
Prev: CCC5 Up: Map Next: CD11