Prev: 53174 Up: Map Next: 53199
53177: Walk The Character Script Entries
Used by the routine at TestCharacterAgainstRoom.
Starts at the first character-script entry and follows each link until this character is found.
FindCharacterScriptEntry_StartSearch 53177 LD IX,40939 Use the character script entry list at CharacterScriptEntryList.
FindCharacterScriptEntry_Loop 53181 PUSH AF Keep the character being processed, then call FetchObjectPointerFromStack to fetch object pointer from stack.
53182 CALL FetchObjectPointerFromStack
53185 JR Z,FindCharacterScriptEntry_NotFound Go to FindCharacterScriptEntry_NotFound if the object pointer is zero.
53187 POP AF
53188 CP (IX+0) Go to FindCharacterScriptEntry_Loop if this entry is not the character being processed.
53191 JR NZ,FindCharacterScriptEntry_Loop
53193 OR %00000001 Mark that the entry was found.
53195 RET Return with the entry pointer.
No matching entry was found in the list.
FindCharacterScriptEntry_NotFound 53196 POP AF Restore the caller's registers from the stack.
53197 XOR A Set 0 (entry not found).
53198 RET Return.
Prev: 53174 Up: Map Next: 53199