Prev: CC29 Up: Map Next: CC78
CC37: Routine at CC37
Used by the routine at GameEntryPoint.
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,$CC74 Jump to CC74 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 $B91F Call B91F.
CC52 LD A,$00 A=00.
CC54 JR NZ,$CC57 Jump to CC57 if A is not equal to 00.
CC56 INC A Increment A by one.
CC57 LD ($CC0D),A Write A to *CC0D.
This entry point is used by the routine at ScriptInterpreter.
CC5A CALL $CC29 Call CC29.
CC5D CALL $D045 Call D045.
CC60 SUB A A-=A.
CC61 LD ($5C3C),A Write A to *TV-FLAG.
CC64 LD A,($9860) A=*Table_Timetable.
CC67 CALL $C821 Call C821.
CC6A JR Z,$CC71 Jump to CC71 if A is equal to 00.
CC6C LD A,$01 Write 01 to *TV-FLAG.
CC6E LD ($5C3C),A
CC71 LD HL,$0000 HL=0000.
CC74 LD ($A01F),HL Write HL to *CharacterScriptCycles.
CC77 RET Return.
Prev: CC29 Up: Map Next: CC78