![]() |
Routines |
Prev: BAC6 | Up: Map | Next: BB6B |
Used by the routine at A2E6.
|
||||||||||||||||||||
BADC | PUSH IX | Save IX | ||||||||||||||||||
BADE | LD ($A22C),A | Save color attribute for the windows border at A22C | ||||||||||||||||||
BAE1 | LD A,D | Save the length of the longest line at A1C3 | ||||||||||||||||||
BAE2 | LD ($A1C3),A | |||||||||||||||||||
BAE5 | LD A,E | Save number of lines at A1C4 | ||||||||||||||||||
BAE6 | LD ($A1C4),A | |||||||||||||||||||
BAE9 | LD A,H | Save horizontal position at A1C1 | ||||||||||||||||||
BAEA | LD ($A1C1),A | |||||||||||||||||||
BAED | LD A,L | Save vertical position at A1C2 | ||||||||||||||||||
BAEE | LD ($A1C2),A | |||||||||||||||||||
BAF1 | LD A,C | Save color attribute for the windows body at A238 | ||||||||||||||||||
BAF2 | LD ($A238),A | |||||||||||||||||||
BAF5 | LD A,($A1C2) | Set HL to the vertical position of the windows | ||||||||||||||||||
BAF8 | LD L,A | |||||||||||||||||||
BAF9 | LD H,$00 | |||||||||||||||||||
BAFB | ADD HL,HL | Computes the offset of the horizontal position into the attribute file | ||||||||||||||||||
BAFC | ADD HL,HL | |||||||||||||||||||
BAFD | ADD HL,HL | |||||||||||||||||||
BAFE | ADD HL,HL | |||||||||||||||||||
BAFF | ADD HL,HL | |||||||||||||||||||
BB00 | LD A,($A1C1) | Set DE to the horizontal position of the windows | ||||||||||||||||||
BB03 | LD E,A | |||||||||||||||||||
BB04 | LD D,$00 | |||||||||||||||||||
BB06 | ADD HL,DE | Add the vertical position to the offset previously computed | ||||||||||||||||||
BB07 | LD DE,$5802 | Point HL to the address of the windows location into the attribute file | ||||||||||||||||||
BB0A | ADD HL,DE | |||||||||||||||||||
BB0B | PUSH HL | Save HL | ||||||||||||||||||
BB0C | LD A,($A1C4) | Pick up the number of lines | ||||||||||||||||||
BB0F | ADD A,$02 | Adds two to the number of lines (border top and bottom) to obtain the height of the windows | ||||||||||||||||||
BB11 | LD B,A | Set B to the height of the windows | ||||||||||||||||||
BB12 | LD A,($A1C3) | Pick up the length of the longest line | ||||||||||||||||||
BB15 | ADD A,$02 | Adds two to the height of the longest line (border left and right) to obtain the height of the windows | ||||||||||||||||||
BB17 | LD E,A | Set E to the width of the windows | ||||||||||||||||||
BB18 | LD A,($A22C) | Pick up the color attribute for the windows border | ||||||||||||||||||
BB1B | CALL $D6A1 | Fill the windows (border included) with the color attribute of the borders | ||||||||||||||||||
BB1E | POP HL | Restore HL | ||||||||||||||||||
BB1F | LD DE,$0021 | Point HL to the address of the first line of the windows into the attribute file | ||||||||||||||||||
BB22 | ADD HL,DE | |||||||||||||||||||
BB23 | LD A,($A1C4) | Set B to the number of lines | ||||||||||||||||||
BB26 | LD B,A | |||||||||||||||||||
BB27 | LD A,($A1C3) | Set E to the length of the longest line | ||||||||||||||||||
BB2A | LD E,A | |||||||||||||||||||
BB2B | LD A,($A238) | Pick up the color attribute for the windows body | ||||||||||||||||||
BB2E | CALL $D6A1 | Fill the windows (only body) with the color attribute of the body | ||||||||||||||||||
BB31 | LD A,($A1C2) | Set HL to the vertical position | ||||||||||||||||||
BB34 | LD L,A | |||||||||||||||||||
BB35 | LD H,$00 | |||||||||||||||||||
BB37 | ADD HL,HL | Computes the pixel of the vertical position (x8) | ||||||||||||||||||
BB38 | ADD HL,HL | |||||||||||||||||||
BB39 | ADD HL,HL | |||||||||||||||||||
BB3A | ADD HL,HL | |||||||||||||||||||
BB3B | LD DE,$AC9A | Point HL to the display file lookup table corresponding to this vertical pixel | ||||||||||||||||||
BB3E | ADD HL,DE | |||||||||||||||||||
BB3F | LD IX,$6346 | Point IX to the graphics data of the top-left border windows tile | ||||||||||||||||||
BB43 | LD IY,$6366 | Point IY to the graphics data of the top-middle border windows tile | ||||||||||||||||||
BB47 | CALL $BB6B | Draw the top border of the windows | ||||||||||||||||||
BB4A | LD A,($A1C4) | Set B to the number of lines | ||||||||||||||||||
BB4D | LD B,A | |||||||||||||||||||
BB4E | PUSH BC | Save BC | ||||||||||||||||||
BB4F | LD IX,$63DE | Point IX to the graphics data of the left border windows tile | ||||||||||||||||||
BB53 | LD IY,$63EE | Point IY to the graphics data of the middle border windows tile (black tile) | ||||||||||||||||||
BB57 | CALL $BB6B | Draw the middle border of the windows | ||||||||||||||||||
BB5A | POP BC | Restore BC | ||||||||||||||||||
BB5B | DJNZ $BB4E | Jump back while there are lines to draw | ||||||||||||||||||
BB5D | LD IX,$6356 | Point IX to the graphics data of the bottom-left border windows tile | ||||||||||||||||||
BB61 | LD IY,$637E | Point IY to the graphics data of the bottom-middle border windows tile | ||||||||||||||||||
BB65 | CALL $BB6B | Draw the bottom border of the windows | ||||||||||||||||||
BB68 | POP IX | Restore IX | ||||||||||||||||||
BB6A | RET |
Prev: BAC6 | Up: Map | Next: BB6B |