![]() |
Routines |
| Prev: 53177 | Up: Map | Next: 53256 |
|
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 | 53199 | CALL FindCharacterScriptEntry | Call FindCharacterScriptEntry to find this character's script entry. | |
| 53202 | LD E,(IX+1) | Read the script address from the entry. | ||
| 53205 | LD D,(IX+2) | |||
| 53208 | LD (40921),DE | Record the current character command position. | ||
| 53212 | LD (IY+1),E | Store DE at IY+1-2 and keep the record. | ||
| 53215 | LD (IY+2),D | |||
| 53218 | PUSH IX | |||
| 53220 | POP DE | Call IncrementPointerAndCompare to step pointer and compare. | ||
| 53221 | PUSH IY | |||
| 53223 | LD IY,40937 | |||
| 53227 | CALL IncrementPointerAndCompare | |||
| 53230 | LD L,(IX-2) | Read the pointer saved ahead of this record. | ||
| 53233 | LD H,(IX-1) | |||
| 53236 | LD (IY-2),L | Store the low byte of the pointer in the previous record. | ||
| 53239 | LD (IY-1),H | Store it in the schedule entry and read the object attribute, then call ProcessMemoryEntry to run memory entry. | ||
| 53242 | LD A,(IX+5) | |||
| 53245 | PUSH AF | |||
| 53246 | CALL ProcessMemoryEntry | |||
| 53249 | CALL GetScriptPointerFromTimetable | Call GetScriptPointerFromTimetable to take the next script from the timetable. | ||
| 53252 | POP AF | |||
| 53253 | POP IY | |||
| 53255 | RET | Return. | ||
| Prev: 53177 | Up: Map | Next: 53256 |