![]() |
Routines |
| Prev: E3BD | Up: Map | Next: E3FA |
|
Used by the routine at DrawPanel.
Draws the empty bar of one of the two gauges, which is made of a picture of the left end, nine copies of a picture of the middle and a picture of the right end. The bar is then filled by UpdateGauge.
|
||||||||
| DrawGaugeBar | E3D7 | LD DE,$E3FA | Point DE at the colour rectangle. | |||||
| E3DA | CALL FillRectangle | Colour the bar. | ||||||
| E3DD | LD DE,$E3FD | Point DE at the picture of the left end. | ||||||
| E3E0 | CALL DrawPicture | Draw it. | ||||||
| E3E3 | LD A,$08 | Set the distance to the next piece to 08. | ||||||
| E3E5 | ADD A,L | Add the x position. | ||||||
| E3E6 | LD L,A | Move across to the next piece. | ||||||
| E3E7 | LD B,$09 | Set the number of middle pieces to 09. | ||||||
| DrawGaugeBar_Loop | E3E9 | PUSH BC | Save the counter. | |||||
| E3EA | LD DE,$E407 | Point DE at the picture of the middle piece. | ||||||
| E3ED | CALL DrawPicture | Draw it. | ||||||
| E3F0 | LD A,$08 | Set the distance to the next piece to 08. | ||||||
| E3F2 | ADD A,L | Add the x position. | ||||||
| E3F3 | LD L,A | Move across to the next piece. | ||||||
| E3F4 | POP BC | Restore the counter. | ||||||
| E3F5 | DJNZ DrawGaugeBar_Loop | Repeat until all of the middle pieces are drawn. | ||||||
| E3F7 | JP DrawPicture | Jump to DrawPicture. | ||||||
| Prev: E3BD | Up: Map | Next: E3FA |