Prev: CC29 Up: Map Next: CC78
CC37: Process Character Action
Used by the routine at GameEntryPoint.
Input
A Character ID
ProcessCharacterAction CC37 PUSH AF Stash the character ID on the stack briefly.
CC38 XOR A Write 00 to *CC0B.
CC39 LD ($CC0B),A
CC3C POP AF Restore the character ID from the stack.
CC3D CALL FindCharacter Call FindCharacter.
CC40 CP $FF Was the character ID found?
CC42 LD HL,$0001 HL=0001.
CC45 JP Z,ProcessCharacterAction_3 Jump to ProcessCharacterAction_3 if the character ID wasn't found, and the termination character was returned instead.
The character is active in the timetable.
CC48 LD ($9FDB),IY Write the characters timetable pointer to *CurrentCharacter_TimetablePointer.
CC4C LD ($A036),A Write the character ID to *CurrentCharacter_ID.
CC4F CALL CheckObjectInA036 Call CheckObjectInA036.
CC52 LD A,$00 A=00.
CC54 JR NZ,ProcessCharacterAction_0 Jump to ProcessCharacterAction_0 if A is not equal to 00.
CC56 INC A Increment A by one.
ProcessCharacterAction_0 CC57 LD ($CC0D),A Write A to *CC0D.
This entry point is used by the routine at ScriptInterpreter.
ProcessCharacterAction_1 CC5A CALL SetCharacterPointerAndID Call SetCharacterPointerAndID.
CC5D CALL IsSherlockTheChinaMan Call IsSherlockTheChinaMan.
CC60 SUB A A-=A.
CC61 LD ($5C3C),A Write A to *TV-FLAG.
CC64 LD A,($9860) A=*Table_Timetable.
CC67 CALL CheckObjectLocationMatch Call CheckObjectLocationMatch.
CC6A JR Z,ProcessCharacterAction_2 Jump to ProcessCharacterAction_2 if A is equal to 00.
CC6C LD A,$01 Write 01 to *TV-FLAG.
CC6E LD ($5C3C),A
ProcessCharacterAction_2 CC71 LD HL,$0000 HL=0000.
ProcessCharacterAction_3 CC74 LD ($A01F),HL Write HL to *CharacterScriptCycles.
CC77 RET Return.
Prev: CC29 Up: Map Next: CC78