![]() |
Routines |
| Prev: 43716 | Up: Map | Next: 43852 |
|
Used by the routines at 43716 and ProcessCharacterData.
When nothing is on screen, clears the picture buffer and selects picture mode.
|
||||
| StartPictureModeScreenIdle | 43729 | PUSH DE | Save DE and jump to StartPictureModeScreenIdle_CheckDisplayMode if the command mode at 40996 is set. | |
| 43730 | LD A,(40996) | |||
| 43733 | AND A | |||
| 43734 | JR NZ,StartPictureModeScreenIdle_CheckDisplayMode | |||
| 43736 | LD (43687),A | Clear the state byte at 43687. | ||
| 43739 | LD HL,(41003) | Read the word at ActiveTextPointer, save it and call ClearCoordinateBuffer to clear the co-ordinate buffer. | ||
| 43742 | PUSH HL | |||
| 43743 | CALL ClearCoordinateBuffer | |||
| 43746 | JR NZ,StartPictureModeScreenIdle_ClearBorrow | Go to StartPictureModeScreenIdle_ClearBorrow when ClearCoordinateBuffer returns non-zero. | ||
| 43748 | LD A,(43687) | Jump to StartPictureModeScreenIdle_ClearBorrow if the state byte at 43687 is set. | ||
| 43751 | AND A | |||
| 43752 | JR NZ,StartPictureModeScreenIdle_ClearBorrow | |||
| 43754 | LD A,2 | Write 2 to the command mode at 40996. | ||
| 43756 | LD (40996),A | |||
| 43759 | POP HL | Restore the saved pointer from the stack. | ||
| 43760 | PUSH IY | Copy the character record from IY into HL. | ||
| 43762 | POP HL | |||
| 43763 | LD DE,24 | Point HL at the co-ordinates 0024 bytes into the character record, and DE at the buffer at Buffer_CoordinateData. | ||
| 43766 | ADD HL,DE | |||
| 43767 | LD DE,43692 | |||
| 43770 | EX DE,HL | Swap the pointers, take 6 bytes and copy them. | ||
| 43771 | LD BC,6 | |||
| 43774 | LDIR | |||
| 43776 | LD HL,(41001) | Read the word at SavedTextPointer. | ||
| 43779 | LD (41003),HL | Store it in the word at ActiveTextPointer and jump ahead to StartPictureModeScreenIdle_CheckDisplayMode to check display mode. | ||
| 43782 | JR StartPictureModeScreenIdle_CheckDisplayMode | |||
| StartPictureModeScreenIdle_ClearBorrow | 43784 | LD A,1 | Write 1 to the command mode at 40996. | |
| 43786 | LD (40996),A | |||
| 43789 | POP HL | Restore the saved pointer from the stack. | ||
| 43790 | LD (41003),HL | Store the pointer in the word at ActiveTextPointer. | ||
| StartPictureModeScreenIdle_CheckDisplayMode | 43793 | POP DE | Restore the source from the stack. | |
| 43794 | XOR A | Clear the state byte at 43687 and call CheckDisplayMode to check display mode. | ||
| 43795 | LD (43687),A | |||
| 43798 | CALL CheckDisplayMode | |||
| 43801 | JR C,CopyDisplayIfNeeded_ReportDone | Jump ahead to CopyDisplayIfNeeded_ReportDone if CheckDisplayMode finds the marker bit already clear. | ||
| 43803 | JR Z,StartPictureModeScreenIdle_TestBitLowByte | Go to StartPictureModeScreenIdle_TestBitLowByte if bit 1 of the source is clear. | ||
| 43805 | CP 144 | Jump ahead to SearchCommandHandlerTable if it is 144. | ||
| 43807 | JP Z,SearchCommandHandlerTable | |||
| 43810 | CP 160 | Jump ahead to HandleClassAWord if it is 160. | ||
| 43812 | JP Z,HandleClassAWord | |||
| 43815 | BIT 3,E | Jump ahead to ReadObjectProcessingFlag if bit 3 is clear. | ||
| 43817 | JR Z,ReadObjectProcessingFlag | |||
| 43819 | LD A,(40978) | Jump to CopyDisplayIfNeeded_ReportDone if the pictures-enabled byte at 40978 is set. | ||
| 43822 | AND A | |||
| 43823 | JR NZ,CopyDisplayIfNeeded_ReportDone | |||
| 43825 | LD A,(40987) | Jump to ReadObjectProcessingFlag if the initialised flag is set. | ||
| 43828 | AND A | |||
| 43829 | JR NZ,ReadObjectProcessingFlag | |||
| 43831 | LD A,(41005) | Jump to CopyDisplayIfNeeded_ReportDone if the byte at SavedSourceByte is not 192. | ||
| 43834 | CP 192 | |||
| 43836 | JR NZ,CopyDisplayIfNeeded_ReportDone | |||
| 43838 | LD A,176 | Jump ahead to CopyDisplayIfNeeded_ReportDone if D is not 176. | ||
| 43840 | CP D | |||
| 43841 | JR NZ,CopyDisplayIfNeeded_ReportDone | |||
| 43843 | LD A,2 | Leave 2 as the result. | ||
| 43845 | AND A | Clear the borrow so the script reads the result as success. | ||
| 43846 | RET | Return. | ||
|
See whether bit 3 of the low byte of the source is set, then read the pointer at the object Processing Source Flag, then record the pointer in the object Processing Source Flag.
|
||||
| StartPictureModeScreenIdle_TestBitLowByte | 43847 | BIT 3,E | Go to ApplySavedClause if bit 3 of this byte is clear. | |
| 43849 | JP Z,ApplySavedClause | |||
| Prev: 43716 | Up: Map | Next: 43852 |