![]() |
Routines |
| Prev: E329 | Up: Map | Next: E3D3 |
| E36D | EXX | Swap main registers. | ||
|
First, draw the lives.
|
||||
| E36E | LD C,$46 | Set the attribute to be bright yellow on black. | ||
| E370 | LD HL,$DFDC | Point HL at the UDGs for the endurance display. | ||
| E373 | LD ($B7E9),HL | Change the routine at B7BA to use these UDGs. | ||
| E376 | LD DE,$021C | Set the co-ordinates to 1C , 02. | ||
| E379 | LD L,(IY+$2D) | Put the number of lives in L. | ||
| E37C | DEC L | Make this 0 based. | ||
| E37D | LD B,$02 | Maximum of two lives to draw. | ||
| E37F | LD A,L | Set the zero flag if this is the last life, ie: nothing to draw. | ||
| E380 | OR A | |||
| E381 | LD A,$1F | Set the initial position to 1F. | ||
| E383 | JR NZ,$E386 | Jump forward if there are no lives left to draw. | ||
| E385 | INC A | Increment the current position. | ||
| E386 | CALL $B7BA | Draw the graphic. | ||
| E389 | INC E | Move forward two columns. | ||
| E38A | INC E | |||
| E38B | CP $20 | Have we reached the last column? | ||
| E38D | JR Z,$E390 | Jump forward if we have. | ||
| E38F | DEC L | Otherwise decrement the number of lives left to draw and loop back to draw another one. | ||
| E390 | DJNZ $E37F | |||
|
The lives are all drawn, now draw the endurance.
|
||||
| E392 | LD C,$43 | Set the attribute to be bright magenta on black. | ||
| E394 | LD DE,$0310 | Set the co-ordinates to 10 , 03. | ||
| E397 | LD L,$5C | |||
| E399 | LD B,(IY+$14) | Put the endurance value in B. | ||
| E39C | LD A,B | Get the amount of endurance left to draw. | ||
| E39D | SUB $08 | |||
| E39F | JR C,$E3BC | |||
| E3A1 | LD B,A | |||
| E3A2 | LD A,L | |||
| E3A3 | CALL $B7BA | Draw the graphic. | ||
| E3A6 | XOR $01 | |||
| E3A8 | LD L,A | |||
| E3A9 | INC E | |||
| E3AA | LD A,B | |||
| E3AB | OR A | |||
| E3AC | JR NZ,$E39C | |||
| E3AE | BIT 5,E | |||
| E3B0 | JR Z,$E3B4 | |||
| E3B2 | EXX | |||
| E3B3 | RET | |||
| E3B4 | LD A,$20 | |||
| E3B6 | CALL $B7BA | Draw the graphic. | ||
| E3B9 | INC E | |||
| E3BA | JR $E3AE | |||
| E3BC | ADD A,$08 | |||
| E3BE | SRL A | |||
| E3C0 | LD B,A | |||
| E3C1 | LD A,L | |||
| E3C2 | CP $5C | |||
| E3C4 | JR NZ,$E3CA | |||
| E3C6 | LD A,$5D | |||
| E3C8 | JR $E3CC | |||
| E3CA | LD A,$60 | |||
| E3CC | ADD A,B | |||
| E3CD | CALL $B7BA | Draw the graphic. | ||
| E3D0 | INC E | |||
| E3D1 | JR $E3AE | |||
| Prev: E329 | Up: Map | Next: E3D3 |