![]() |
Routines |
Prev: 49474 | Up: Map | Next: 49552 |
Used by the routine at GameEntryPoint.
Draws a decorative horizontal pattern on screen as a separator.
|
|||||
DrawDecorativeLine | 49482 | CALL 49423 | Call 49423. | ||
49485 | LD A,36 | Store the width value (36) at *DecorativeLine_Width. | |||
49487 | LD (49652),A | ||||
49490 | LD HL,20704 | Initialise the screen buffer starting point (20704) at *DecorativeLine_ScreenPosition. | |||
49493 | LD (49654),HL | ||||
49496 | LD A,2 | Load the height value (2) into A. | |||
DrawDecorativeLine_Custom | 49498 | LD (49659),A | Store the height value in *49659. | ||
49501 | CALL 49474 | Call 49474. | |||
49504 | LD HL,20800 | HL=20800 (screen buffer location). | |||
49507 | LD DE,49552 | DE=Data_DecorativeLine. | |||
49510 | LD B,6 | Set a counter in B for 6 rows. | |||
DrawDecorativeLine_RowLoop | 49512 | LD C,8 | Set a counter in C for 8 repetitions. | ||
49514 | PUSH BC | Stash the row counters and screen position on the stack. | |||
49515 | PUSH HL | ||||
DrawDecorativeLine_SegmentLoop | 49516 | LD B,4 | B=4. | ||
49518 | PUSH DE | Stash DE on the stack. | |||
DrawDecorativeLine_CopyPatternLoop | 49519 | LD A,(DE) | Copy the pattern byte to the current screen position. | ||
49520 | LD (HL),A | ||||
49521 | INC DE | Increment the pattern pointer by one. | |||
49522 | INC L | Increment the screen position column by one. | |||
49523 | DJNZ DrawDecorativeLine_CopyPatternLoop | Decrease counter by one and loop back to DrawDecorativeLine_CopyPatternLoop until counter is zero. | |||
49525 | POP DE | Restore the pattern pointer from the stack. | |||
49526 | DEC C | Decrease the segment counter by one. | |||
49527 | JR NZ,DrawDecorativeLine_SegmentLoop | Jump back to DrawDecorativeLine_SegmentLoop until all segments have been drawn. | |||
Skip to the next pattern.
|
|||||
49529 | INC DE | Increment the pattern pointer by four. | |||
49530 | INC DE | ||||
49531 | INC DE | ||||
49532 | INC DE | ||||
49533 | POP HL | Restore HL and BC from the stack. | |||
49534 | POP BC | ||||
49535 | INC H | Increment H by one. | |||
49536 | DJNZ DrawDecorativeLine_RowLoop | Decrease counter by one and loop back to DrawDecorativeLine_RowLoop until counter is zero. | |||
Now colour the line BRIGHT WHITE.
|
|||||
49538 | LD HL,23104 | Write INK: BLACK, PAPER: WHITE (BRIGHT) to 0032 bytes starting from 23104 (attribute buffer location). | |||
49541 | LD DE,23105 | ||||
49544 | LD BC,31 | ||||
49547 | LD (HL),120 | ||||
49549 | LDIR | ||||
49551 | RET | Return. |
Prev: 49474 | Up: Map | Next: 49552 |