Prev: 41821 Up: Map Next: 41853
41824: Check And Reset Character State
Used by the routines at ProcessObjectDisplay and DispatchTextControlHandler.
Clears 41822 if it holds the current character, then runs ProcessObject_Display with the current character set to zero, and restores the character.
Control code 24 in the table at JumpTable_ControlCharacters.
CheckAndResetCharacterState 41824 LD A,(41014) Read the character being processed and take the saved object field at 41822.
41827 PUSH AF
41828 LD HL,41822
41831 CP (HL) Clear A and jump ahead to CheckAndResetCharacterState_Next unless 41822 holds this character.
41832 LD A,0
41834 JR NZ,CheckAndResetCharacterState_Next
41836 LD (HL),A Store the cleared character state back in the record.
CheckAndResetCharacterState_Next 41837 LD (41014),A Set the current character to zero.
41840 PUSH IX Keep the character record, call ProcessObject_Display to print this object's tokens.
41842 CALL ProcessObject_Display
41845 POP IX Restore the saved character from the stack.
41847 POP AF
41848 LD (41014),A Store the character id at CurrentCharacter_ID.
41851 XOR A Clear A.
41852 RET Return.
Prev: 41821 Up: Map Next: 41853