Prev: 52421 Up: Map Next: 52497
52434: 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 3 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 52434 CALL SettlePlayer_Update Settle the player, then set its frame.
52437 JP RunFrame_Land
SettlePlayer_Update 52440 LD HL,(46418) Remember the vertical speed.
52443 PUSH HL
52444 LD E,(IX+16) Remember the speed and the speed fraction.
52447 LD D,(IX+26)
52450 PUSH DE
52451 LD HL,(46432) Remember the drift.
52454 PUSH HL
52455 XOR A Clear the speed, the drift and the vertical speed, and stop moving.
52456 LD (46416),A
52459 LD HL,0
52462 LD (46432),HL
52465 LD (46418),HL
52468 RES 7,(IX+17)
52472 CALL MoveEntity Move the player.
52475 POP HL Put the drift back.
52476 LD (46432),HL
52479 POP DE Put the speed and the speed fraction back.
52480 LD (IX+16),E
52483 LD (IX+26),D
52486 POP HL Put the vertical speed back.
52487 LD (46418),HL
52490 RET Return.
This entry point is used by the routine at RunFrame.
SettlePlayer_Continue 52491 CALL SettlePlayer_Update Settle the player, then finish the update.
52494 JP RunFrame_Entities
Prev: 52421 Up: Map Next: 52497