Prev: D19D Up: Map Next: D22D
D1FA: Draw the edges of a building definition's two faces
Used by the routine at DRAW_OUTLINE.
The two faces of a building definition, eight columns each, drawn left to right from the cell's corner at DRAW_X and DRAW_Y -- the first down the screen, the second, mirrored, up it -- as edge pictures only (DRAW_EDGE, with C = 0). Used by DRAW_OUTLINE for a building's near faces. Leaves DRAW_X and DRAW_Y at the right-hand corner.
Input
A the building table's index: the cell's type times two, plus 1 for the turned view
OUTLINE_NEAR_FACES D1FA LD BC,BUILDING_TABLE IY = the definition (BUILDING_TABLE)
D1FD CALL TABLE_WORD
D200 PUSH HL
D201 POP IY
D203 XOR A The first face, unmirrored, C = 0
D204 LD (DRAW_PASS),A
D207 LD BC,$0800
OUTLINE_NEAR_FACES_0 D20A CALL DRAW_EDGE Eight columns' edges, rightwards and down the screen
D20D CALL EDGE_RIGHT_DOWN
D210 DJNZ OUTLINE_NEAR_FACES_0
D212 LD HL,(DRAW_Y) Up 8 lines for the second face, which slopes the other way
D215 LD DE,$0008
D218 ADD HL,DE
D219 LD (DRAW_Y),HL
D21C LD A,$01 Mirrored
D21E LD (DRAW_PASS),A
D221 LD BC,$0800
OUTLINE_NEAR_FACES_1 D224 CALL DRAW_EDGE Eight columns, rightwards and up
D227 CALL EDGE_RIGHT_UP
D22A DJNZ OUTLINE_NEAR_FACES_1
D22C RET
Prev: D19D Up: Map Next: D22D