Routines |
Prev: 58108 | Up: Map | Next: 58323 |
58153 | LD A,(43064) | A=*43064-(*IY+5)-13. | ||
58156 | SUB (IY+5) | |||
58159 | SUB 13 | |||
58161 | CP 230 | |||
58163 | RET C | |||
58164 | LD A,(43065) | A=*43065-(*IY+10)-28. | ||
58167 | SUB (IY+10) | |||
58170 | SUB 28 | |||
58172 | CP 214 | |||
58174 | RET C | |||
This entry point is used by the routines at 61815, 62961 and 63673.
|
||||
58175 | LD A,(46431) | Return if Flag_DemoMode is not zero. | ||
58178 | OR A | |||
58179 | RET NZ | |||
58180 | EXX | Switch to the shadow registers. | ||
58181 | LD BC,25610 | BC=25610. | ||
58184 | LD DE,257 | DE=257. | ||
58187 | LD HL,25601 | HL=25601. | ||
58190 | CALL PlayWaveSequence | Call PlayWaveSequence. | ||
58193 | LD A,(62062) | *IY+20-=*62062. | ||
58196 | LD B,A | |||
58197 | LD A,(IY+20) | |||
58200 | SUB B | |||
58201 | LD (IY+20),A | |||
58204 | JR Z,58210 | If *IY+20 <= 0 jump to 58210. | ||
58206 | JR C,58210 | |||
58208 | JR 58220 | Jump to 58220. | ||
A life has been "spent" so refill the endurance meter to the top.
|
||||
58210 | LD (IY+20),128 | Write 128 to *IY+20. | ||
Lose one heart...
|
||||
58214 | DEC (IY+45) | Decrease *IY+45 by one. | ||
If the players hearts are now zero the game is over.
|
||||
58217 | JP Z,GameOver | If current players hearts (*IY+45) are now zero jump to GameOver. | ||
58220 | EXX | Switch back to the normal registers. | ||
This entry point is used by the routines at PrintBanner and 63508.
|
||||
58221 | EXX | Switch to the shadow registers. | ||
Draw the hearts to indicate the number of lives remaining.
|
||||
58222 | LD C,70 | C=70 (INK: YELLOW, PAPER: BLACK (BRIGHT) ). | ||
58224 | LD HL,57308 | Write Font to 47081. | ||
58227 | LD (47081),HL | |||
58230 | LD DE,540 | DE=540 (screen co-ordinates). | ||
58233 | LD L,(IY+45) | L=*IY+45 (current players hearts). | ||
58236 | DEC L | Decrease L by one. | ||
58237 | LD B,2 | B=2 (counter). | ||
58239 | LD A,L | |||
58240 | OR A | |||
58241 | LD A,31 | A=31. | ||
58243 | JR NZ,58246 | |||
58245 | INC A | |||
58246 | CALL DrawSprite | Call DrawSprite. | ||
58249 | INC E | Increment E by two. | ||
58250 | INC E | |||
58251 | CP 32 | |||
58253 | JR Z,58256 | |||
58255 | DEC L | |||
58256 | DJNZ 58239 | |||
Draws the endurance ribbon.
|
||||
58258 | LD C,67 | C=67 (INK: MAGENTA, PAPER: BLACK (BRIGHT) ). | ||
58260 | LD DE,784 | DE=784. | ||
58263 | LD L,92 | L=92. | ||
58265 | LD B,(IY+20) | B=*IY+20. | ||
58268 | LD A,B | |||
58269 | SUB 8 | |||
58271 | JR C,58300 | |||
58273 | LD B,A | |||
58274 | LD A,L | |||
58275 | CALL DrawSprite | Call DrawSprite. | ||
58278 | XOR 1 | |||
58280 | LD L,A | |||
58281 | INC E | |||
58282 | LD A,B | |||
58283 | OR A | |||
58284 | JR NZ,58268 | |||
58286 | BIT 5,E | |||
58288 | JR Z,58292 | |||
58290 | EXX | Switch back to the normal registers. | ||
58291 | RET | Return. | ||
58292 | LD A,32 | A=32. | ||
58294 | CALL DrawSprite | Call DrawSprite. | ||
58297 | INC E | Increment E by one. | ||
58298 | JR 58286 | Jump to 58286. | ||
58300 | ADD A,8 | A+=8. | ||
58302 | SRL A | |||
58304 | LD B,A | |||
58305 | LD A,L | |||
58306 | CP 92 | |||
58308 | JR NZ,58314 | |||
58310 | LD A,93 | A=93. | ||
58312 | JR 58316 | Jump to 58316. | ||
58314 | LD A,96 | A=96. | ||
58316 | ADD A,B | A+=B. | ||
58317 | CALL DrawSprite | Call DrawSprite. | ||
58320 | INC E | Increment E by one. | ||
58321 | JR 58286 | Jump to 58286. |
Prev: 58108 | Up: Map | Next: 58323 |