Prev: F311 Up: Map Next: F3B7
F39E: 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 (FF) and copies the starting position from StartingPosition.
Input
HL Address of the state of the player
ResetPlayerState F39E LD B,$1C B=1C.
F3A0 PUSH HL Stash HL on the stack.
F3A1 CALL ClearBytes Call ClearBytes.
F3A4 DEC HL Step HL back.
F3A5 DEC HL Step HL back.
F3A6 LD (HL),$FF Store FF at the address in HL.
F3A8 POP HL Bring HL back off the stack.
F3A9 LD A,$13 A=13.
F3AB CALL AddAToHL Call AddAToHL.
F3AE LD DE,$F3B7 The starting position.
F3B1 LD C,$06 C=06.
F3B3 EX DE,HL Swap DE and HL.
F3B4 LDIR Copy BC bytes from HL to DE.
F3B6 RET Return.
Prev: F311 Up: Map Next: F3B7