![]() |
Routines |
| Prev: CAA7 | Up: Map | Next: CB66 |
|
Used by the routines at DrawHUD and ShowTitleScreen.
Draws the frame round the playfield from the values in the table at FrameParameters: a vertical line at each side, a double horizontal line at the top and bottom, a graphic at each of the four corners with a coloured line along each edge, and then the ticks along the edges.
|
|||||||||
| DrawFrame | CACB | LD L,(IX+$00) | The low byte of the address of the left side. | ||||||
| CACE | LD H,(IX+$01) | The high byte of the address of the left side. | |||||||
| CAD1 | LD E,(IX+$02) | The low byte of the address of the right side. | |||||||
| CAD4 | LD D,(IX+$03) | The high byte of the address of the right side. | |||||||
| CAD7 | LD B,(IX+$04) | The number of rows in the two sides. | |||||||
| DrawFrame_Sides | CADA | LD (HL),$66 | Plot the patterned byte 66 on the left side. | ||||||
| CADC | LD A,$66 | The same byte for the right side. | |||||||
| CADE | LD (DE),A | Plot it on the right side. | |||||||
| CADF | CALL MoveUpARow | Move the left side up one pixel row. | |||||||
| CAE2 | CALL MoveUpARowDE | Move the right side up one pixel row. | |||||||
| CAE5 | DJNZ DrawFrame_Sides | Repeat for each row of the sides. | |||||||
| CAE7 | LD L,(IX+$05) | The low byte of the address of the bottom rules. | |||||||
| CAEA | LD H,(IX+$06) | The high byte of the address of the bottom rules. | |||||||
| CAED | LD E,(IX+$07) | The low byte of the address of the top rules. | |||||||
| CAF0 | LD D,(IX+$08) | The high byte of the address of the top rules. | |||||||
| CAF3 | CALL DrawLinePair | Draw one pixel row of the top and bottom rules. | |||||||
| CAF6 | CALL DrawLinePair | Draw the next pixel row of those rules. | |||||||
| CAF9 | DEC H | Move the bottom rule up one pixel row. | |||||||
| CAFA | DEC H | Move the bottom rule up another pixel row. | |||||||
| CAFB | DEC D | Move the top rule up one pixel row. | |||||||
| CAFC | DEC D | Move the top rule up another pixel row. | |||||||
| CAFD | CALL DrawLinePair | Draw one pixel row of the inner rules. | |||||||
| CB00 | CALL DrawLinePair | Draw the next pixel row of the inner rules. | |||||||
| CB03 | LD DE,$CC14 | The corner graphics start at FrameCornerGraphics. | |||||||
| CB06 | LD ($CE3A),DE | Keep that address for the next corner. | |||||||
| CB0A | LD E,(IX+$09) | The low byte of the address of the corner table. | |||||||
| CB0D | LD D,(IX+$0A) | The high byte of the address of the corner table. | |||||||
| CB10 | LD B,$04 | There are four corners. | |||||||
| DrawFrame_Corners | CB12 | PUSH BC | Keep the number of corners still to draw. | ||||||
| CB13 | CALL FetchPosition | Read the position of this corner graphic. | |||||||
| CB16 | PUSH DE | Keep the place in the corner table. | |||||||
| CB17 | LD DE,($CE3A) | The graphic for this corner. | |||||||
| CB1B | CALL DrawBitmap | Draw the corner graphic. | |||||||
| CB1E | LD ($CE3A),DE | The next corner graphic follows this one. | |||||||
| CB22 | POP DE | Back to the corner table. | |||||||
| CB23 | CALL FetchPosition | Read the position of the coloured edge. | |||||||
| CB26 | CALL FillAttributes | Colour that edge. | |||||||
| CB29 | POP BC | Bring back the number of corners. | |||||||
| CB2A | DJNZ DrawFrame_Corners | Repeat for each corner. | |||||||
| CB2C | LD B,(IX+$0B) | The number of ticks along each edge. | |||||||
| CB2F | LD E,(IX+$0C) | The low byte of the address of the tick table. | |||||||
| CB32 | LD D,(IX+$0D) | The high byte of the address of the tick table. | |||||||
| DrawFrame_Ticks | CB35 | PUSH BC | Keep the number of ticks still to draw. | ||||||
| CB36 | LD A,(DE) | The pixel column of this tick. | |||||||
| CB37 | LD L,A | That column is its horizontal position. | |||||||
| CB38 | LD H,(IX+$0E) | The pixel row of the top edge. | |||||||
| CB3B | PUSH DE | Keep the place in the tick table. | |||||||
| CB3C | LD DE,$C94D | The top and bottom tick is HorizontalTickGraphic. | |||||||
| CB3F | CALL DrawBitmap | Draw the tick on the top edge. | |||||||
| CB42 | LD H,$BE | The bottom edge is pixel row BE. | |||||||
| CB44 | LD DE,$C94D | The same top and bottom tick. | |||||||
| CB47 | CALL DrawBitmap | Draw the tick on the bottom edge. | |||||||
| CB4A | POP DE | Back to the tick table. | |||||||
| CB4B | INC DE | The next byte is the pixel row of the side ticks. | |||||||
| CB4C | LD A,(DE) | That row. | |||||||
| CB4D | LD H,A | It is their vertical position. | |||||||
| CB4E | LD L,$00 | The left edge is pixel column zero. | |||||||
| CB50 | PUSH DE | Keep the place in the tick table. | |||||||
| CB51 | LD DE,$C955 | The side tick is VerticalTickGraphic. | |||||||
| CB54 | CALL DrawBitmap | Draw the tick on the left edge. | |||||||
| CB57 | LD L,(IX+$0F) | The pixel column of the right edge. | |||||||
| CB5A | LD DE,$C955 | The same side tick. | |||||||
| CB5D | CALL DrawBitmap | Draw the tick on the right edge. | |||||||
| CB60 | POP DE | Back to the tick table. | |||||||
| CB61 | INC DE | Move on to the next tick. | |||||||
| CB62 | POP BC | Bring back the number of ticks. | |||||||
| CB63 | DJNZ DrawFrame_Ticks | Repeat for each tick. | |||||||
| CB65 | RET | Return. | |||||||
| Prev: CAA7 | Up: Map | Next: CB66 |