![]() |
Routines |
| Prev: 51879 | Up: Map | Next: 52070 |
|
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 | 51915 | LD L,(IX+0) | The low byte of the address of the left side. | ||||||
| 51918 | LD H,(IX+1) | The high byte of the address of the left side. | |||||||
| 51921 | LD E,(IX+2) | The low byte of the address of the right side. | |||||||
| 51924 | LD D,(IX+3) | The high byte of the address of the right side. | |||||||
| 51927 | LD B,(IX+4) | The number of rows in the two sides. | |||||||
| DrawFrame_Sides | 51930 | LD (HL),102 | Plot the patterned byte 102 on the left side. | ||||||
| 51932 | LD A,102 | The same byte for the right side. | |||||||
| 51934 | LD (DE),A | Plot it on the right side. | |||||||
| 51935 | CALL MoveUpARow | Move the left side up one pixel row. | |||||||
| 51938 | CALL MoveUpARowDE | Move the right side up one pixel row. | |||||||
| 51941 | DJNZ DrawFrame_Sides | Repeat for each row of the sides. | |||||||
| 51943 | LD L,(IX+5) | The low byte of the address of the bottom rules. | |||||||
| 51946 | LD H,(IX+6) | The high byte of the address of the bottom rules. | |||||||
| 51949 | LD E,(IX+7) | The low byte of the address of the top rules. | |||||||
| 51952 | LD D,(IX+8) | The high byte of the address of the top rules. | |||||||
| 51955 | CALL DrawLinePair | Draw one pixel row of the top and bottom rules. | |||||||
| 51958 | CALL DrawLinePair | Draw the next pixel row of those rules. | |||||||
| 51961 | DEC H | Move the bottom rule up one pixel row. | |||||||
| 51962 | DEC H | Move the bottom rule up another pixel row. | |||||||
| 51963 | DEC D | Move the top rule up one pixel row. | |||||||
| 51964 | DEC D | Move the top rule up another pixel row. | |||||||
| 51965 | CALL DrawLinePair | Draw one pixel row of the inner rules. | |||||||
| 51968 | CALL DrawLinePair | Draw the next pixel row of the inner rules. | |||||||
| 51971 | LD DE,52244 | The corner graphics start at FrameCornerGraphics. | |||||||
| 51974 | LD (52794),DE | Keep that address for the next corner. | |||||||
| 51978 | LD E,(IX+9) | The low byte of the address of the corner table. | |||||||
| 51981 | LD D,(IX+10) | The high byte of the address of the corner table. | |||||||
| 51984 | LD B,4 | There are four corners. | |||||||
| DrawFrame_Corners | 51986 | PUSH BC | Keep the number of corners still to draw. | ||||||
| 51987 | CALL FetchPosition | Read the position of this corner graphic. | |||||||
| 51990 | PUSH DE | Keep the place in the corner table. | |||||||
| 51991 | LD DE,(52794) | The graphic for this corner. | |||||||
| 51995 | CALL DrawBitmap | Draw the corner graphic. | |||||||
| 51998 | LD (52794),DE | The next corner graphic follows this one. | |||||||
| 52002 | POP DE | Back to the corner table. | |||||||
| 52003 | CALL FetchPosition | Read the position of the coloured edge. | |||||||
| 52006 | CALL FillAttributes | Colour that edge. | |||||||
| 52009 | POP BC | Bring back the number of corners. | |||||||
| 52010 | DJNZ DrawFrame_Corners | Repeat for each corner. | |||||||
| 52012 | LD B,(IX+11) | The number of ticks along each edge. | |||||||
| 52015 | LD E,(IX+12) | The low byte of the address of the tick table. | |||||||
| 52018 | LD D,(IX+13) | The high byte of the address of the tick table. | |||||||
| DrawFrame_Ticks | 52021 | PUSH BC | Keep the number of ticks still to draw. | ||||||
| 52022 | LD A,(DE) | The pixel column of this tick. | |||||||
| 52023 | LD L,A | That column is its horizontal position. | |||||||
| 52024 | LD H,(IX+14) | The pixel row of the top edge. | |||||||
| 52027 | PUSH DE | Keep the place in the tick table. | |||||||
| 52028 | LD DE,51533 | The top and bottom tick is HorizontalTickGraphic. | |||||||
| 52031 | CALL DrawBitmap | Draw the tick on the top edge. | |||||||
| 52034 | LD H,190 | The bottom edge is pixel row 190. | |||||||
| 52036 | LD DE,51533 | The same top and bottom tick. | |||||||
| 52039 | CALL DrawBitmap | Draw the tick on the bottom edge. | |||||||
| 52042 | POP DE | Back to the tick table. | |||||||
| 52043 | INC DE | The next byte is the pixel row of the side ticks. | |||||||
| 52044 | LD A,(DE) | That row. | |||||||
| 52045 | LD H,A | It is their vertical position. | |||||||
| 52046 | LD L,0 | The left edge is pixel column zero. | |||||||
| 52048 | PUSH DE | Keep the place in the tick table. | |||||||
| 52049 | LD DE,51541 | The side tick is VerticalTickGraphic. | |||||||
| 52052 | CALL DrawBitmap | Draw the tick on the left edge. | |||||||
| 52055 | LD L,(IX+15) | The pixel column of the right edge. | |||||||
| 52058 | LD DE,51541 | The same side tick. | |||||||
| 52061 | CALL DrawBitmap | Draw the tick on the right edge. | |||||||
| 52064 | POP DE | Back to the tick table. | |||||||
| 52065 | INC DE | Move on to the next tick. | |||||||
| 52066 | POP BC | Bring back the number of ticks. | |||||||
| 52067 | DJNZ DrawFrame_Ticks | Repeat for each tick. | |||||||
| 52069 | RET | Return. | |||||||
| Prev: 51879 | Up: Map | Next: 52070 |