Prev: 58301 Up: Map Next: 58362
58327: Draw Gauge Bar
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.
Input
HL The position of the left end
DrawGaugeBar 58327 LD DE,58362 Point DE at the colour rectangle.
58330 CALL FillRectangle Colour the bar.
58333 LD DE,58365 Point DE at the picture of the left end.
58336 CALL DrawPicture Draw it.
58339 LD A,8 Set the distance to the next piece to 8.
58341 ADD A,L Add the x position.
58342 LD L,A Move across to the next piece.
58343 LD B,9 Set the number of middle pieces to 9.
DrawGaugeBar_Loop 58345 PUSH BC Save the counter.
58346 LD DE,58375 Point DE at the picture of the middle piece.
58349 CALL DrawPicture Draw it.
58352 LD A,8 Set the distance to the next piece to 8.
58354 ADD A,L Add the x position.
58355 LD L,A Move across to the next piece.
58356 POP BC Restore the counter.
58357 DJNZ DrawGaugeBar_Loop Repeat until all of the middle pieces are drawn.
58359 JP DrawPicture Jump to DrawPicture.
Prev: 58301 Up: Map Next: 58362