Skip to navigation

Drawing the landscape: DrawOneFaceTile

Name: DrawOneFaceTile [Show more] Type: Subroutine Category: Drawing the landscape Summary: Draw a tile with one quadrilateral (four-sided) face
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * DrawFlatTile calls DrawOneFaceTile * DrawSlopingTile calls DrawOneFaceTile

Arguments: X The reference shape to use when picking the tile's colour from the tileShapeColour table
.DrawOneFaceTile LDA tileShapeColour,X \ Set polygonColours to the entry for the reference STA polygonColours \ shape from the tileShapeColour or tileShapeColour+16 \ table, so we draw the polygon in the correct colour LDA #%00000000 \ Clear bits 6 and 7 of polygonType so the following STA polygonType \ call to DrawPolygon draws a quadrilateral tile face JMP DrawPolygon \ Jump to DrawPolygon to draw the quadrilateral and \ return from the subroutine using a tail call