Prev: E2FC Up: Map Next: E3D3
E329: Routine at E329
Used by the routines at ED2A, EFC7, F10E, F177 and F5F1.
E329 LD A,($A838) A=*A838-(*IY+05)-0D.
E32C SUB (IY+$05)
E32F SUB $0D
E331 CP $E6
E333 RET C
E334 LD A,($A839) A=*A839-(*IY+0A)-1C.
E337 SUB (IY+$0A)
E33A SUB $1C
E33C CP $D6
E33E RET C
This entry point is used by the routines at F177, F5F1 and F8B9.
E33F LD A,($B55F) Return if Flag_DemoMode is not zero.
E342 OR A
E343 RET NZ
E344 EXX Switch to the shadow registers.
E345 LD BC,$640A BC=640A.
E348 LD DE,$0101 DE=0101.
E34B LD HL,$6401 HL=6401.
E34E CALL PlayWaveSequence Call PlayWaveSequence.
E351 LD A,($F26E) *IY+14-=*F26E.
E354 LD B,A
E355 LD A,(IY+$14)
E358 SUB B
E359 LD (IY+$14),A
E35C JR Z,$E362 If *IY+14 <= 00 jump to E362.
E35E JR C,$E362
E360 JR $E36C Jump to E36C.
A life has been "spent" so refill the endurance meter to the top.
E362 LD (IY+$14),$80 Write 80 to *IY+14.
Lose one heart...
E366 DEC (IY+$2D) Decrease *IY+2D by one.
If the players hearts are now zero the game is over.
E369 JP Z,GameOver If current players hearts (*IY+2D) are now zero jump to GameOver.
E36C EXX Switch back to the normal registers.
This entry point is used by the routines at PrintBanner and F814.
E36D EXX Switch to the shadow registers.
Draw the hearts to indicate the number of lives remaining.
E36E LD C,$46 C=46 (INK: YELLOW, PAPER: BLACK (BRIGHT) ).
E370 LD HL,$DFDC Write Font to B7E9.
E373 LD ($B7E9),HL
E376 LD DE,$021C DE=021C (screen co-ordinates).
E379 LD L,(IY+$2D) L=*IY+2D (current players hearts).
E37C DEC L Decrease L by one.
E37D LD B,$02 B=02 (counter).
E37F LD A,L
E380 OR A
E381 LD A,$1F A=1F.
E383 JR NZ,$E386
E385 INC A
E386 CALL DrawSprite Call DrawSprite.
E389 INC E Increment E by two.
E38A INC E
E38B CP $20
E38D JR Z,$E390
E38F DEC L
E390 DJNZ $E37F
Draws the endurance ribbon.
E392 LD C,$43 C=43 (INK: MAGENTA, PAPER: BLACK (BRIGHT) ).
E394 LD DE,$0310 DE=0310.
E397 LD L,$5C L=5C.
E399 LD B,(IY+$14) B=*IY+14.
E39C LD A,B
E39D SUB $08
E39F JR C,$E3BC
E3A1 LD B,A
E3A2 LD A,L
E3A3 CALL DrawSprite Call DrawSprite.
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 Switch back to the normal registers.
E3B3 RET Return.
E3B4 LD A,$20 A=20.
E3B6 CALL DrawSprite Call DrawSprite.
E3B9 INC E Increment E by one.
E3BA JR $E3AE Jump to E3AE.
E3BC ADD A,$08 A+=08.
E3BE SRL A
E3C0 LD B,A
E3C1 LD A,L
E3C2 CP $5C
E3C4 JR NZ,$E3CA
E3C6 LD A,$5D A=5D.
E3C8 JR $E3CC Jump to E3CC.
E3CA LD A,$60 A=60.
E3CC ADD A,B A+=B.
E3CD CALL DrawSprite Call DrawSprite.
E3D0 INC E Increment E by one.
E3D1 JR $E3AE Jump to E3AE.
Prev: E2FC Up: Map Next: E3D3