![]() |
Routines |
| Prev: CFB9 | Up: Map | Next: D008 |
|
Used by the routine at DispatchCharacterScript.
Copies the next script address into the current step and into the timetable link.
|
||||
|
Find character script entry.
|
||||
| GetScriptPointer | CFCF | CALL FindCharacterScriptEntry | Call FindCharacterScriptEntry to find this character's script entry. | |
| CFD2 | LD E,(IX+$01) | Read the script address from the entry. | ||
| CFD5 | LD D,(IX+$02) | |||
| CFD8 | LD ($9FD9),DE | Record the current character command position. | ||
| CFDC | LD (IY+$01),E | Store DE at IY+01-02 and keep the record. | ||
| CFDF | LD (IY+$02),D | |||
| CFE2 | PUSH IX | |||
| CFE4 | POP DE | Call IncrementPointerAndCompare to step pointer and compare. | ||
| CFE5 | PUSH IY | |||
| CFE7 | LD IY,$9FE9 | |||
| CFEB | CALL IncrementPointerAndCompare | |||
| CFEE | LD L,(IX-$02) | Read the pointer saved ahead of this record. | ||
| CFF1 | LD H,(IX-$01) | |||
| CFF4 | LD (IY-$02),L | Store the low byte of the pointer in the previous record. | ||
| CFF7 | LD (IY-$01),H | Store it in the schedule entry and read the object attribute, then call ProcessMemoryEntry to run memory entry. | ||
| CFFA | LD A,(IX+$05) | |||
| CFFD | PUSH AF | |||
| CFFE | CALL ProcessMemoryEntry | |||
| D001 | CALL GetScriptPointerFromTimetable | Call GetScriptPointerFromTimetable to take the next script from the timetable. | ||
| D004 | POP AF | |||
| D005 | POP IY | |||
| D007 | RET | Return. | ||
| Prev: CFB9 | Up: Map | Next: D008 |