![]() |
Routines |
| Prev: 32528 | Up: Map | Next: 32608 |
|
Used by the routines at Turn_GateTheMessage and Event_ARandomHalf.
Saves the clause and scores the action for this character. When it is not the player's turn the saved registers are returned.
|
||||
| Inglish_SaveTheClauseAndAct | 32538 | PUSH IX | Save IX, IY, BC, DE and HL, and keep A in C. | |
| 32540 | PUSH IY | |||
| 32542 | PUSH BC | |||
| 32543 | PUSH DE | |||
| 32544 | PUSH HL | |||
| 32545 | LD C,A | |||
| 32546 | CALL Inglish_FindThisCharacterSlot | Call Inglish_FindThisCharacterSlot to find this character's slot. | ||
| 32549 | LD (HL),0 | Clear it. | ||
| 32551 | INC HL | Jump to Inglish_SaveTheClauseAndAct_PointAtTheSlot if the character whose turn it is is not zero. | ||
| 32552 | XOR A | |||
| 32553 | CP C | |||
| 32554 | JR NZ,Inglish_SaveTheClauseAndAct_PointAtTheSlot | |||
| 32556 | OR 1 | Clear the zero flag. | ||
| 32558 | EX (SP),HL | Swap HL with the address on the stack. | ||
| Inglish_SaveTheClauseAndAct_RestoreAndReturn | 32559 | POP HL | Restore HL, DE, BC, IY and IX from the stack. | |
| 32560 | POP DE | |||
| 32561 | POP BC | |||
| 32562 | POP IY | |||
| 32564 | POP IX | |||
| 32566 | RET | Return. | ||
| Inglish_SaveTheClauseAndAct_PointAtTheSlot | 32567 | PUSH HL | Point IY at byte 1 of this character's slot. | |
| 32568 | POP IY | |||
| 32570 | LD A,1 | Write 1 to *46875. | ||
| 32572 | LD (46875),A | |||
| 32575 | LD A,(46876) | Read *46876. | ||
| 32578 | PUSH AF | Call Inglish_ScoreTheCurrentAction to score the current action. | ||
| 32579 | CALL Inglish_ScoreTheCurrentAction | |||
| 32582 | EX AF,AF' | Switch AF with its shadow. | ||
| 32583 | XOR A | Clear *46875. | ||
| 32584 | LD (46875),A | |||
| 32587 | POP AF | Update *46876. | ||
| 32588 | LD (46876),A | |||
| 32591 | EX AF,AF' | Switch AF with its shadow. | ||
| 32592 | JR Z,Inglish_SaveTheClauseAndAct_ClearThisCharacter | Jump to Inglish_SaveTheClauseAndAct_ClearThisCharacter if Inglish_ScoreTheCurrentAction found no match. | ||
| 32594 | CALL Inglish_AskWhetherToSuppress | Call Inglish_AskWhetherToSuppress to run the action and see whether its message was held back. | ||
| 32597 | JR NZ,Inglish_SaveTheClauseAndAct_RestoreAndReturn | Jump back to Inglish_SaveTheClauseAndAct_RestoreAndReturn if Inglish_AskWhetherToSuppress held the message back. | ||
| Inglish_SaveTheClauseAndAct_ClearThisCharacter | 32599 | LD A,(46826) | Read *CurrentCharacter. | |
| 32602 | CALL Inglish_WalkTheCharacterSlots | Call Inglish_WalkTheCharacterSlots to walk the character slots. | ||
| 32605 | XOR A | Take the zero path back into the clause save. | ||
| 32606 | JR Inglish_SaveTheClauseAndAct_RestoreAndReturn | Jump back to Inglish_SaveTheClauseAndAct_RestoreAndReturn to return. | ||
| Prev: 32528 | Up: Map | Next: 32608 |