![]() |
Routines |
| Prev: CE83 | Up: Map | Next: CEB8 |
|
Used by the routines at DispatchCharacterScript, PrintCommandMessage, ShowRoomDescription, CDBF, CE18, ReadCharactersRoom and RunSimpleAction.
Resumes the character script after a command returns, and follows the script pointer when the record flag says to.
|
||||
| ContinueScriptExecution | CE8F | CALL GetCurrentScriptState | Call GetCurrentScriptState to get current script state, then call AdvanceByCommandType to advance script pointer by command size. | |
| CE92 | CALL AdvanceByCommandType | |||
| CE95 | BIT 7,(IX+$00) | Jump to ContinueScriptExecution_Next if a marker on the record's flag byte is clear. | ||
| CE99 | JR Z,ContinueScriptExecution_Next | |||
| CE9B | LD E,(HL) | Read the word at HL and join the flag test at ContinueScriptExecution_TestClearScriptCommand. | ||
| CE9C | INC HL | |||
| CE9D | LD D,(HL) | |||
| CE9E | EX DE,HL | |||
| CE9F | JR ContinueScriptExecution_TestClearScriptCommand | |||
|
See whether bit 4 of the record flag is set, then see whether bit 5 of the record flag is set, then store that byte in the script position.
|
||||
| ContinueScriptExecution_Next | CEA1 | BIT 4,(IX+$00) | If bit 4 of the command byte is set, call StepNextByte to skip its two-byte address. | |
| CEA5 | CALL NZ,StepNextByte | |||
| ContinueScriptExecution_TestClearScriptCommand | CEA8 | BIT 5,(IX+$00) | Call ClearScriptCommandFlags to clear script command flags if a marker on the record's flag byte is set. | |
| CEAC | CALL NZ,ClearScriptCommandFlags | |||
| CEAF | LD (IY+$01),L | Store HL at IY+01 and jump back to CD91 to finish the character script. | ||
| CEB2 | LD (IY+$02),H | |||
| CEB5 | JP $CD91 | |||
| Prev: CE83 | Up: Map | Next: CEB8 |