Routines |
Prev: DEB7 | Up: Map | Next: DF33 |
DEF9 | LD HL,$5047 | Screen address for the top left of the scroll | ||
DEFC | LD C,$05 | 5 character rows to clear | ||
DEFE | LD D,$12 | 18 columns wide | ||
DF00 | LD B,$08 | 8 pixels in each character square | ||
DF02 | LD (HL),$00 | Clear screen address byte | ||
DF04 | INC H | Move down 1 pixel row | ||
DF05 | DJNZ $DF02 | Repeat x 8 pixel rows | ||
DF07 | LD A,H | Return address pointer to top of block | ||
DF08 | SUB $08 | |||
DF0A | LD H,A | |||
DF0B | INC L | ...and move right one character square | ||
DF0C | DEC D | Repeat for 18 columns | ||
DF0D | JR NZ,$DF00 | |||
DF0F | LD A,L | |||
DF10 | ADD A,$0E | Increase low byte of screen address pointer to move to next row down | ||
DF12 | LD L,A | |||
DF13 | DEC C | Repeat until all 5 rows are clear | ||
DF14 | JR NZ,$DEFE | |||
DF16 | LD HL,$50E7 | |||
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.
|
||||
DF19 | LD D,$0B | 11 character columns to clear | ||
DF1B | LD B,$04 | Just 4 pixels (half a character square) needed to clear | ||
DF1D | LD (HL),$00 | Clear the screen byte | ||
DF1F | INC H | Move to the next pixel line down | ||
DF20 | DJNZ $DF1D | ...and repeat for the 4 pixel rows | ||
DF22 | DEC H | Return back up 4 pixels... | ||
DF23 | DEC H | |||
DF24 | DEC H | |||
DF25 | DEC H | |||
DF26 | INC L | ...and move right one square | ||
DF27 | DEC D | Repeat x 11 columns | ||
DF28 | JR NZ,$DF1B | |||
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.
|
||||
DF2A | LD HL,$57D7 | Screen address for top left of overlapping scroll | ||
DF2D | LD (HL),$07 | First byte | ||
DF2F | INC HL | |||
DF30 | LD (HL),$FF | Second byte | ||
DF32 | RET |
Prev: DEB7 | Up: Map | Next: DF33 |