Prev: CFCF Up: Map Next: D026
D008: Get Script Pointer From Timetable
Used by the routines at ScriptInterpreter and GetScriptPointer.
Takes the script address from the timetable, or from the matching entry when one exists.
GetScriptPointerFromTimetable D008 LD L,(IY+$04) Call FindCharacterScriptEntry to find character script entry.
D00B LD H,(IY+$05)
D00E CALL FindCharacterScriptEntry
D011 LD A,(IY+$03) Load the byte at IY+03 and jump to GetScriptPointerFromTimetable_Next if FindCharacterScriptEntry found no script entry.
D014 JR Z,GetScriptPointerFromTimetable_Next
D016 LD L,(IX+$03) Read the action flags.
D019 LD H,(IX+$04)
D01C LD A,(IX+$06) Read the room at IX+06.
GetScriptPointerFromTimetable_Next D01F LD ($9FD6),A Record the current room.
D022 LD ($9FD7),HL Record the location value.
D025 RET Return.
Prev: CFCF Up: Map Next: D026