Prev: 49474 Up: Map Next: 49552
49482: Draw Decorative Line
Used by the routine at GameEntryPoint.
Draws a decorative horizontal pattern on screen as a separator.
decorative-line
Clear screen.
DrawDecorativeLine 49482 CALL ClearScreen Call ClearScreen to clear the screen.
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 Use 2 for the picture.
DrawDecorativeLine_Custom 49498 LD (49659),A Store the height value in *49659.
Reset screen display.
49501 CALL ResetScreenDisplay Call ResetScreenDisplay to reset the screen.
49504 LD HL,20800 Point HL at the screen address 20800 and DE at the decorative line data at Data_DecorativeLine.
49507 LD DE,49552
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 Count 4 saving count and the pointer.
49515 PUSH HL
DrawDecorativeLine_SegmentLoop 49516 LD B,4
49518 PUSH DE
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 Count the next attribute and repeat from DrawDecorativeLine_CopyPatternLoop.
49525 POP DE Restore the caller's registers 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 the screen address from the stack.
49534 POP BC
49535 INC H The count, and step to the next row.
49536 DJNZ DrawDecorativeLine_RowLoop Count the next attribute and repeat from DrawDecorativeLine_RowLoop.
Now colour the line BRIGHT WHITE.
49538 LD HL,23104 Take the attributes, take a length of 31 attributes and copy these bytes across.
49541 LD DE,23105
49544 LD BC,31
49547 LD (HL),120
49549 LDIR
49551 RET Return.
Prev: 49474 Up: Map Next: 49552