Prev: 52265 Up: Map Next: 52344
52279: Routine at CC37
Used by the routine at GameEntryPoint.
52279 PUSH AF Stash the character ID on the stack briefly.
52280 XOR A Write 0 to *52235.
52281 LD (52235),A
52284 POP AF Restore the character ID from the stack.
52285 CALL FindCharacter Call FindCharacter.
52288 CP 255 Was the character ID found?
52290 LD HL,1 HL=0001.
52293 JP Z,52340 Jump to 52340 if the character ID wasn't found, and the termination character was returned instead.
The character is active in the timetable.
52296 LD (40923),IY Write the characters timetable pointer to *CurrentCharacter_TimetablePointer.
52300 LD (41014),A Write the character ID to *CurrentCharacter_ID.
52303 CALL 47391 Call 47391.
52306 LD A,0 A=0.
52308 JR NZ,52311 Jump to 52311 if A is not equal to 0.
52310 INC A Increment A by one.
52311 LD (52237),A Write A to *52237.
This entry point is used by the routine at ScriptInterpreter.
52314 CALL 52265 Call 52265.
52317 CALL 53317 Call 53317.
52320 SUB A A-=A.
52321 LD (23612),A Write A to *TV-FLAG.
52324 LD A,(39008) A=*Table_Timetable.
52327 CALL 51233 Call 51233.
52330 JR Z,52337 Jump to 52337 if A is equal to 0.
52332 LD A,1 Write 1 to *TV-FLAG.
52334 LD (23612),A
52337 LD HL,0 HL=0000.
52340 LD (40991),HL Write HL to *CharacterScriptCycles.
52343 RET Return.
Prev: 52265 Up: Map Next: 52344