Prev: 62225 Up: Map Next: 62391
62366: Reset Player State
Used by the routine at StartNewGame.
Clears the state of a player apart from the sites of the items, sets the item that is carried to none (255) and copies the starting position from StartingPosition.
Input
HL Address of the state of the player
ResetPlayerState 62366 LD B,28 B=28.
62368 PUSH HL Stash HL on the stack.
62369 CALL ClearBytes Call ClearBytes.
62372 DEC HL Step HL back.
62373 DEC HL Step HL back.
62374 LD (HL),255 Store 255 at the address in HL.
62376 POP HL Bring HL back off the stack.
62377 LD A,19 A=19.
62379 CALL AddAToHL Call AddAToHL.
62382 LD DE,62391 The starting position.
62385 LD C,6 C=6.
62387 EX DE,HL Swap DE and HL.
62388 LDIR Copy BC bytes from HL to DE.
62390 RET Return.
Prev: 62225 Up: Map Next: 62391