![]() |
Routines |
| Prev: 49820 | Up: Map | Next: 49926 |
|
Used by the routine at CheckTVFlagAndProcess.
On a new line, resets the parser row. Any other character is printed.
|
||||||||
| ProcessScreenCharacter | 49850 | PUSH HL | Read the storage decorative line screen position. | |||||
| 49851 | PUSH BC | |||||||
| 49852 | PUSH AF | |||||||
| 49853 | LD HL,(49656) | |||||||
| 49856 | LD A,(49658) | Read the decorative line into C. | ||||||
| 49859 | LD C,A | |||||||
| 49860 | POP AF | Restore the character from the stack. | ||||||
| 49861 | PUSH AF | Keep a copy of the character on the stack. | ||||||
| 49862 | CP 13 | Jump ahead to ProcessScreenCharacter_ScreenWidthCount if this character is not a new line (13). | ||||||
| 49864 | JR NZ,ProcessScreenCharacter_ScreenWidthCount | |||||||
| ProcessScreenCharacter_Loop | 49866 | LD A,(40985) | Jump to ProcessScreenCharacter_Next if the parser is not 15. | |||||
| 49869 | CP 15 | |||||||
| 49871 | JR NZ,ProcessScreenCharacter_Next | |||||||
|
Scroll screen and reset display.
|
||||||||
| 49873 | CALL ScrollScreenAndResetDisplay | Call ScrollScreenAndResetDisplay to scroll the screen and reset the display. | ||||||
| 49876 | LD A,255 | Start the count at 255 so the next step makes it zero. | ||||||
| ProcessScreenCharacter_Next | 49878 | INC A | Add one to the count at 40985 and point HL at 20512. | |||||
| 49879 | LD (40985),A | |||||||
| 49882 | LD HL,20512 | |||||||
| 49885 | LD C,2 | Use a length of 2. | ||||||
|
Update screen display.
|
||||||||
| 49887 | CALL UpdateScreenDisplay | Call UpdateScreenDisplay to update the screen. | ||||||
|
Screen flag selects the width.
|
||||||||
| 49890 | LD A,(49448) | Take 36 and go to ProcessScreenCharacter_RecordScreenWidth if the byte at 49448 is zero. | ||||||
| 49893 | AND A | |||||||
| 49894 | LD A,36 | |||||||
| 49896 | JR Z,ProcessScreenCharacter_RecordScreenWidth | |||||||
| 49898 | LD A,18 | Take a width of 18 and store it from ProcessScreenCharacter_RecordScreenWidth. | ||||||
| 49900 | JR ProcessScreenCharacter_RecordScreenWidth | |||||||
|
Print this character and leave the row once the width runs out.
Print character.
|
||||||||
| ProcessScreenCharacter_ScreenWidthCount | 49902 | CALL PrintCharacter | Call PrintCharacter to print this character. | |||||
| 49905 | LD A,(49653) | Jump back to ProcessScreenCharacter_Loop if the count is finished. | ||||||
| 49908 | DEC A | |||||||
| 49909 | JP Z,ProcessScreenCharacter_Loop | |||||||
| ProcessScreenCharacter_RecordScreenWidth | 49912 | LD (49653),A | Record the screen width and record the storage decorative line screen position. | |||||
| 49915 | LD (49656),HL | |||||||
| 49918 | LD A,C | |||||||
| 49919 | LD (49658),A | Record the decorative line. | ||||||
| 49922 | POP AF | Restore the saved result, the saved count and the saved pointer from the stack. | ||||||
| 49923 | POP BC | |||||||
| 49924 | POP HL | |||||||
| 49925 | RET | Return. | ||||||
| Prev: 49820 | Up: Map | Next: 49926 |