Prev: 9D42 Up: Map Next: A15C
A0D6: Handler: Bust
Used by the routine at 9D42.
Handler_Bust A0D6 CALL PrintString_Loop Call PrintString_Loop.
A0D9 DEFB $16,$0A,$01 PRINT AT: 0A, 01.
A0DC DEFM "BUST[[" bust
A0E2 DEFB $FF Terminator.
A0E3 LD HL,$9AA8 HL=BustCounter.
A0E6 INC (HL) Increment *HL by one.
A0E7 LD HL,($9B33) HL=*9B33.
A0EA LD A,($9AB7) Jump to Bust_UpdateSingleUp_Total if *9AB7 is zero.
A0ED AND A
A0EE JR Z,Bust_UpdateSingleUp_Total
A0F0 LD A,($9AB8) Jump to Bust_Update1Up_Total if *ActivePlayer is zero.
A0F3 AND A
A0F4 JR Z,Bust_Update1Up_Total
Update 2UP total.
A0F6 LD ($9AB0),HL Write HL to *2UP_Total.
A0F9 JR Handler_Bust_0 Jump to Handler_Bust_0.
Update 1UP total.
Bust_Update1Up_Total A0FB LD ($9AB2),HL Write HL to *1UP_Total.
A0FE JR Handler_Bust_0 Jump to Handler_Bust_0.
Update the total for single player games.
Bust_UpdateSingleUp_Total A100 LD ($9B1F),HL Write HL to *Total.
This entry point is used by the routine at 9D42.
Handler_Bust_0 A103 LD HL,$0810 Write 0810 to *FloatingHandCoordinates.
A106 LD ($9AC3),HL
A109 LD A,($9AB7) Jump to Handler_Bust_2 if *9AB7 is zero.
A10C AND A
A10D JR Z,Handler_Bust_2
A10F LD A,($9AB8) Jump to Handler_Bust_1 if *ActivePlayer is zero.
A112 AND A
A113 JR Z,Handler_Bust_1
A115 LD HL,($9AB0) HL=*2UP_Total.
A118 JR Handler_Bust_3 Jump to Handler_Bust_3.
Handler_Bust_1 A11A LD HL,($9AB2) HL=*1UP_Total.
A11D JR Handler_Bust_3 Jump to Handler_Bust_3.
Handler_Bust_2 A11F LD HL,($9B1F) Write *Total to *AF49.
Handler_Bust_3 A122 LD ($AF49),HL
A125 LD HL,$0C01 Write 0C01 to *AF5D.
A128 LD ($AF5D),HL
A12B CALL $AE17 Call AE17.
A12E LD A,($9AAD) Jump to Handler_Bust_4 if *9AAD is not equal to B4.
A131 CP $B4
A133 JR NZ,Handler_Bust_4
A135 LD A,($9AA8) Jump to Handler_Bust_4 if *BustCounter is not zero.
A138 AND A
A139 JR NZ,Handler_Bust_4
A13B CALL Sound_180Speech Call Sound_180Speech.
Handler_Bust_4 A13E XOR A Write 00 to;
A13F LD ($9AAD),A
A142 LD ($9AA8),A
A145 LD A,($9B06) Jump to Messaging_YouWin_0 if *9B06 is not zero.
A148 AND A
A149 JR NZ,Messaging_YouWin_0
A14B CALL LongPause Call LongPause.
A14E LD A,($9AB7) Jump to Messaging_YouWin if *9AB7 is zero.
A151 AND A
A152 JR Z,Messaging_YouWin
A154 CALL Print_CurrentPlayerID Call Print_CurrentPlayerID.
A157 CALL $A7F8 Call A7F8.
A15A JR Messaging_YouWin_0 Jump to Messaging_YouWin_0.
Prev: 9D42 Up: Map Next: A15C