![]() |
Routines |
Prev: C142 | Up: Map | Next: C190 |
Used by the routine at GameEntryPoint.
Draws a decorative horizontal pattern on screen as a separator.
|
|||||
DrawDecorativeLine | C14A | CALL $C10F | Call C10F. | ||
C14D | LD A,$24 | Store the width value (24) at *DecorativeLine_Width. | |||
C14F | LD ($C1F4),A | ||||
C152 | LD HL,$50E0 | Initialise the screen buffer starting point (50E0) at *DecorativeLine_ScreenPosition. | |||
C155 | LD ($C1F6),HL | ||||
C158 | LD A,$02 | Load the height value (02) into A. | |||
DrawDecorativeLine_Custom | C15A | LD ($C1FB),A | Store the height value in *C1FB. | ||
C15D | CALL $C142 | Call C142. | |||
C160 | LD HL,$5140 | HL=5140 (screen buffer location). | |||
C163 | LD DE,$C190 | DE=Data_DecorativeLine. | |||
C166 | LD B,$06 | Set a counter in B for 06 rows. | |||
DrawDecorativeLine_RowLoop | C168 | LD C,$08 | Set a counter in C for 08 repetitions. | ||
C16A | PUSH BC | Stash the row counters and screen position on the stack. | |||
C16B | PUSH HL | ||||
DrawDecorativeLine_SegmentLoop | C16C | LD B,$04 | B=04. | ||
C16E | PUSH DE | Stash DE on the stack. | |||
DrawDecorativeLine_CopyPatternLoop | C16F | LD A,(DE) | Copy the pattern byte to the current screen position. | ||
C170 | LD (HL),A | ||||
C171 | INC DE | Increment the pattern pointer by one. | |||
C172 | INC L | Increment the screen position column by one. | |||
C173 | DJNZ DrawDecorativeLine_CopyPatternLoop | Decrease counter by one and loop back to DrawDecorativeLine_CopyPatternLoop until counter is zero. | |||
C175 | POP DE | Restore the pattern pointer from the stack. | |||
C176 | DEC C | Decrease the segment counter by one. | |||
C177 | JR NZ,DrawDecorativeLine_SegmentLoop | Jump back to DrawDecorativeLine_SegmentLoop until all segments have been drawn. | |||
Skip to the next pattern.
|
|||||
C179 | INC DE | Increment the pattern pointer by four. | |||
C17A | INC DE | ||||
C17B | INC DE | ||||
C17C | INC DE | ||||
C17D | POP HL | Restore HL and BC from the stack. | |||
C17E | POP BC | ||||
C17F | INC H | Increment H by one. | |||
C180 | DJNZ DrawDecorativeLine_RowLoop | Decrease counter by one and loop back to DrawDecorativeLine_RowLoop until counter is zero. | |||
Now colour the line BRIGHT WHITE.
|
|||||
C182 | LD HL,$5A40 | Write INK: BLACK, PAPER: WHITE (BRIGHT) to 0020 bytes starting from 5A40 (attribute buffer location). | |||
C185 | LD DE,$5A41 | ||||
C188 | LD BC,$001F | ||||
C18B | LD (HL),$78 | ||||
C18D | LDIR | ||||
C18F | RET | Return. |
Prev: C142 | Up: Map | Next: C190 |