Prev: 36864 Up: Map Next: 37022
36878: Yin-yang Controller
Used by the routines at Game_Over, Demo_Mode and Start_1UP_Game.
Player 1 yin-yang functionality.
Yin_Yang_1UP 36878 LD A,(43528) If P1_Points_Awarded is 0 then no point was awarded for 1UP. Jump forward to Yin_Yang_2UP.
36881 AND A
36882 JP Z,Yin_Yang_2UP
Update 1UP yin-yang total.
36885 LD HL,43521 Add P1_Points_Awarded to P1_Yin_Yang and update the new total at P1_Yin_Yang.
36888 ADD A,(HL)
36889 LD (HL),A
Check if 1UP yin-yang total is now 1.
36890 CP 1 If the total is not 1 then skip forward to Yin_Yang_1UP_2.
36892 JR NZ,Yin_Yang_1UP_2
36894 LD DE,37546 Call Yin_Yang_Copy using Yin_Yang_UDG_Half.
36897 LD HL,1032
36900 CALL Yin_Yang_Copy
36903 RET Return.
Check if 1UP yin-yang total is now 2.
Yin_Yang_1UP_2 36904 CP 2 If the total is not 2 then skip forward to Yin_Yang_1UP_3.
36906 JR NZ,Yin_Yang_1UP_3
36908 LD DE,37514 Call Yin_Yang_Copy using Yin_Yang_UDG_Full.
36911 LD HL,1032
36914 CALL Yin_Yang_Copy
36917 RET Return.
Check if 1UP yin-yang total is now 3.
Yin_Yang_1UP_3 36918 CP 3 If the total is not 3 then skip forward to Yin_Yang_1UP_4.
36920 JR NZ,Yin_Yang_1UP_4
36922 LD DE,37514 Call Yin_Yang_Copy using Yin_Yang_UDG_Full.
36925 LD HL,1032
36928 CALL Yin_Yang_Copy
36931 LD DE,37546 Call Yin_Yang_Copy using Yin_Yang_UDG_Half.
36934 LD HL,264
36937 CALL Yin_Yang_Copy
36940 RET Return.
1UP yin-yang total is 4.
Yin_Yang_1UP_4 36941 LD DE,37514 Call Yin_Yang_Copy using Yin_Yang_UDG_Full.
36944 LD HL,264
36947 CALL Yin_Yang_Copy
36950 RET Return.
Player 2 yin-yang functionality.
Yin_Yang_2UP 36951 LD A,(43592) If P2_Points_Awarded is 0 then no point was awarded for 2UP, if so then return.
36954 AND A
36955 RET Z
Update 2UP yin-yang total.
36956 LD HL,43585 Add P2_Points_Awarded to P2_Yin_Yang and update the new total at P2_Yin_Yang.
36959 ADD A,(HL)
36960 LD (HL),A
Check if 2UP yin-yang total is now 1.
36961 CP 1 If the total is not 1 then skip forward to Yin_Yang_2UP_2.
36963 JR NZ,Yin_Yang_2UP_2
36965 LD DE,37546 Call Yin_Yang_Copy using Yin_Yang_UDG_Half.
36968 LD HL,6664
36971 CALL Yin_Yang_Copy
36974 RET Return.
Check if 2UP yin-yang total is now 2.
Yin_Yang_2UP_2 36975 CP 2 If the total is not 2 then skip forward to Yin_Yang_2UP_3.
36977 JR NZ,Yin_Yang_2UP_3
36979 LD DE,37514 Call Yin_Yang_Copy using Yin_Yang_UDG_Full.
36982 LD HL,6664
36985 CALL Yin_Yang_Copy
36988 RET Return.
Check if 2UP yin-yang total is now 3.
Yin_Yang_2UP_3 36989 CP 3 If the total is not 3 then skip forward to Yin_Yang_2UP_4.
36991 JR NZ,Yin_Yang_2UP_4
36993 LD DE,37514 Call Yin_Yang_Copy using Yin_Yang_UDG_Full.
36996 LD HL,6664
36999 CALL Yin_Yang_Copy
37002 LD DE,37546 Call Yin_Yang_Copy using Yin_Yang_UDG_Half.
37005 LD HL,7432
37008 CALL Yin_Yang_Copy
37011 RET Return.
2UP yin-yang total is 4.
Yin_Yang_2UP_4 37012 LD DE,37514 Call Yin_Yang_Copy using Yin_Yang_UDG_Full.
37015 LD HL,7432
37018 CALL Yin_Yang_Copy
37021 RET Return.
Prev: 36864 Up: Map Next: 37022