Prev: CE7B Up: Map Next: CF3D
CF0A: Draw a row of borders for the windows
Computes the pointer on display file and draw a row of borders for the windows
Input
IX Point to the address of the graphics data for the left border tile
IY point to the address of the graphics data for the middle border tile
HL Point to the addres into the display file look up table corresponding to the row of pixels to draw
CF0A LD B,$08 Set B=8
CF0C LD E,(HL) Set DE to point to the address on the display file to draw the corner
CF0D INC HL
CF0E LD D,(HL)
CF0F INC DE Increment the pointer by 2. All the windows has a margin of 2 bytes
CF10 INC DE
CF11 PUSH HL Save HL briefly
CF12 LD A,($A028) Set HL to the horizontal position of the windows
CF15 LD L,A
CF16 LD H,$00
CF18 ADD HL,DE Point HL to the address of this location in display file
CF19 EX DE,HL Exchange DE with HL
CF1A POP HL Restore HL
CF1B CALL $CF21 Draw one row of pixels for this border
CF1E DJNZ $CF0C Jump back while there are remaining pixels to draw
CF20 RET
This routine draws the corresponding pixels of the tiles borders into display file
CF21 PUSH BC Save BC
CF22 LD A,(IX+$00) Put the byte of the left border tile into display file
CF25 LD (DE),A
CF26 INC DE Increment the pointer to the display file
CF27 LD A,($A02A) Set B to the length of the longest line
CF2A LD B,A
CF2B LD A,(IY+$00) Put the byte of the middle border tile into display file
CF2E LD (DE),A
CF2F INC DE Increment the pointer to the display files
CF30 DJNZ $CF2B Jump back while there are middle borders to show
CF32 LD A,(IX+$08) Put the byte of the right border tile into display file
CF35 LD (DE),A
CF36 INC IY Point to the next byte of the middle border tile
CF38 INC IX Point to the next byte of the left border tile
CF3A INC HL Point to the next address into the display file lookup table
CF3B POP BC Recover BC
CF3C RET
Prev: CE7B Up: Map Next: CF3D