![]() |
Routines |
| Prev: 44236 | Up: Map | Next: 44375 |
|
Used by the routine at StartPictureModeScreenIdle.
When the command mode at 40996 is 2 and bit 6 of E is clear, copies six bytes from offset 8 of the clause record to offset 24 and returns to the scan at ReadObjectProcessingFlag. Once the game has started, any other case sets bit 3 of E and returns to that scan. Before the game has started it restores the saved word as class 176 unlinks the clause record, and falls into MatchWordAgainstEarlierClause.
|
||||
| ApplySavedClause | 44283 | LD A,(40996) | Jump to ApplySavedClause_GameStarted if the command mode at 40996 is not 2. | |
| 44286 | CP 2 | |||
| 44288 | JR NZ,ApplySavedClause_GameStarted | |||
| 44290 | BIT 6,E | Jump back to ReadObjectProcessingFlag while bit 6 is present. | ||
| 44292 | JP NZ,ReadObjectProcessingFlag | |||
| 44295 | SET 6,E | Set the mark on this character | ||
| 44297 | SET 3,E | |||
| 44299 | PUSH IY | |||
| 44301 | EXX | |||
| 44302 | POP HL | |||
| 44303 | LD DE,8 | Point HL at byte 8 of the record (IY+8), save it and take 0016. | ||
| 44306 | ADD HL,DE | |||
| 44307 | PUSH HL | |||
| 44308 | LD DE,16 | |||
| 44311 | ADD HL,DE | Add 0016, so HL points at byte 24 and copy 6 bytes from byte 8. | ||
| 44312 | POP DE | |||
| 44313 | EX DE,HL | |||
| 44314 | LD BC,6 | |||
| 44317 | LDIR | |||
| 44319 | EXX | Switch back to the saved registers and resume the object scan at ReadObjectProcessingFlag. | ||
| 44320 | JP ReadObjectProcessingFlag | |||
|
Once the game has started, sets bit 3 of E and returns to ReadObjectProcessingFlag.
|
||||
| ApplySavedClause_GameStarted | 44323 | LD A,(40987) | Jump to ApplySavedClause_RestoreWord if the initialised flag is zero. | |
| 44326 | AND A | |||
| 44327 | JR Z,ApplySavedClause_RestoreWord | |||
| 44329 | SET 3,E | Set bit 3 of the flag in E and resume the object scan at ReadObjectProcessingFlag. | ||
| 44331 | JP ReadObjectProcessingFlag | |||
|
Restores the saved word as class 176 unlinks the clause record, and falls into MatchWordAgainstEarlierClause.
|
||||
| ApplySavedClause_RestoreWord | 44334 | LD HL,(43681) | Copy the saved word to ActiveTextPointer and take class 176. | |
| 44337 | LD (41003),HL | |||
| 44340 | LD D,176 | |||
| 44342 | LD A,(43683) | Read the saved flag bytes at 43683 and 43686. | ||
| 44345 | LD E,A | |||
| 44346 | LD A,(43686) | |||
| 44349 | LD (40978),A | Put the saved flag back at 40978. | ||
| 44352 | LD IY,(43684) | Point IY at the saved clause record and read the low byte of its link. | ||
| 44356 | LD L,(IY-2) | |||
| 44359 | LD H,(IY-1) | Read the high byte of the link. | ||
| 44362 | PUSH HL | Call FollowRecordPointer to follow the record pointer. | ||
| 44363 | POP IX | |||
| 44365 | CALL FollowRecordPointer | |||
| 44368 | XOR A | Clear the clause record's link. | ||
| 44369 | LD (IY-2),A | |||
| 44372 | LD (IY-1),A | |||
| Prev: 44236 | Up: Map | Next: 44375 |