![]() |
Routines |
| Prev: 57015 | Up: Map | Next: 57139 |
| 57081 | LD HL,20551 | Screen address for the top left of the scroll | ||
| 57084 | LD C,5 | 5 character rows to clear | ||
| 57086 | LD D,18 | 18 columns wide | ||
| 57088 | LD B,8 | 8 pixels in each character square | ||
| 57090 | LD (HL),0 | Clear screen address byte | ||
| 57092 | INC H | Move down 1 pixel row | ||
| 57093 | DJNZ 57090 | Repeat x 8 pixel rows | ||
| 57095 | LD A,H | Return address pointer to top of block | ||
| 57096 | SUB 8 | |||
| 57098 | LD H,A | |||
| 57099 | INC L | ...and move right one character square | ||
| 57100 | DEC D | Repeat for 18 columns | ||
| 57101 | JR NZ,57088 | |||
| 57103 | LD A,L | |||
| 57104 | ADD A,14 | Increase low byte of screen address pointer to move to next row down | ||
| 57106 | LD L,A | |||
| 57107 | DEC C | Repeat until all 5 rows are clear | ||
| 57108 | JR NZ,57086 | |||
| 57110 | LD HL,20711 | |||
|
Finally, clear the bottom 4 pixels of the scroll, just under the dragon flame energy bar.
This space doesn't seem to get text or graphics on it - and it's slightly odd that the whole line isn't cleared (only 11 columns). Perhaps the scroll status display was set out differently to begin with.
|
||||
| 57113 | LD D,11 | 11 character columns to clear | ||
| 57115 | LD B,4 | Just 4 pixels (half a character square) needed to clear | ||
| 57117 | LD (HL),0 | Clear the screen byte | ||
| 57119 | INC H | Move to the next pixel line down | ||
| 57120 | DJNZ 57117 | ...and repeat for the 4 pixel rows | ||
| 57122 | DEC H | Return back up 4 pixels... | ||
| 57123 | DEC H | |||
| 57124 | DEC H | |||
| 57125 | DEC H | |||
| 57126 | INC L | ...and move right one square | ||
| 57127 | DEC D | Repeat x 11 columns | ||
| 57128 | JR NZ,57115 | |||
|
This sets two screen graphic bytes in the top left of the smaller overlapping scroll (in the bottom right of the screen).
It's unclear why this is needed - these bytes don't seem to get overwritten at any point. Again, perhaps it's from a previous clearing or graphic routine that affected them in some way.
|
||||
| 57130 | LD HL,22487 | Screen address for top left of overlapping scroll | ||
| 57133 | LD (HL),7 | First byte | ||
| 57135 | INC HL | |||
| 57136 | LD (HL),255 | Second byte | ||
| 57138 | RET | |||
| Prev: 57015 | Up: Map | Next: 57139 |