Prev: B6A7 Up: Map Next: B7A9
B6BC: Handler: Bull
Used by the routine at Handler_Madrid.
Handler_Bull B6BC LD A,($EFFA) Jump to Handler_Bull_Play if the player has not been hit by the bull.
B6BF CP $08
B6C1 JR NZ,Handler_Bull_Play
B6C3 LD SP,($99AE) SP=*99AE.
B6C7 RET Return.
The player is still alive!
Handler_Bull_Play B6C8 LD A,$00 Write 00 to *99AA.
B6CA LD ($99AA),A
B6CD LD IX,$7258 IX=7258.
B6D1 LD A,($7207) Jump to Handler_Bull_0 if *7207 is equal to 01.
B6D4 CP $01
B6D6 JR Z,Handler_Bull_0
B6D8 CP $05 Return if *7207 is not equal to 05.
B6DA RET NZ
Handler_Bull_0 B6DB DEC (IX+$00) Decrease *IX+00 by one.
B6DE JP NZ,Handler_Bull_8 Jump to Handler_Bull_8 if A is not zero.
B6E1 LD (IX+$00),$01 Write 01 to *IX+00.
B6E5 LD HL,$7258 HL=7258.
B6E8 CALL $9439 Call 9439.
B6EB BIT 5,(IX+$06) Test bit 5 of *IX+06.
B6EF JR NZ,Handler_Bull_3 Jump to Handler_Bull_3 if A is not zero.
B6F1 DEC (IX+$07) Decrease *IX+07 by one.
B6F4 JR Z,Handler_Bull_4 Jump to Handler_Bull_4 if A is zero.
B6F6 LD L,(IX+$01) L=*IX+01.
B6F9 LD H,(IX+$02) H=*IX+02.
B6FC CALL $9375 Call 9375.
B6FF AND %01000001 Keep only bits 0 and 6.
B701 JR Z,Handler_Bull_1 Jump to Handler_Bull_1 if A is zero.
B703 CP $01 Jump to Handler_Bull_4 if A is equal to 01.
B705 JR Z,Handler_Bull_4
B707 LD A,$08 Write 00001000 ("Hit By The Bull") to *GameState_1.
B709 LD ($EFFA),A
B70C JP $9926 Jump to 9926.
Handler_Bull_1 B70F LD A,$7A Jump to Handler_Bull_4 if 7A is equal to H.
B711 CP H
B712 JR Z,Handler_Bull_4
B714 LD (IX+$04),L Write L to *IX+04.
B717 LD (IX+$05),H Write H to *IX+05.
B71A SET 5,(IX+$06) Set bit 5 of *IX+06.
Handler_Bull_2 B71E JP $9926 Jump to 9926.
Handler_Bull_3 B721 RES 5,(IX+$06) Reset bit 5 of *IX+06.
B725 JR Handler_Bull_2 Jump to Handler_Bull_2.
Handler_Bull_4 B727 CALL $97D7 Call 97D7.
B72A LD A,H Jump to Handler_Bull_5 if H is higher than L.
B72B CP L
B72C JR NC,Handler_Bull_5
B72E LD A,C A=C.
B72F LD C,B C=B.
B730 LD B,A B=A.
Handler_Bull_5 B731 LD A,(IX+$06) A=*IX+06.
B734 AND %00011000 Keep only bits 3-4.
B736 XOR %00010000 Flip bit 4.
B738 CP B Compare A with B.
B739 JR NZ,Handler_Bull_6 Jump to Handler_Bull_6 if A is not zero.
B73B LD B,C B=C.
Handler_Bull_6 B73C LD (IX+$06),B Write B to *IX+06.
B73F CALL $9619 Call 9619.
B742 LD A,($99A5) A=*99A5.
B745 AND %00000011 Keep only bits 0-1.
B747 JR Z,Handler_Bull_7 Jump to Handler_Bull_7 if A is zero.
B749 ADD A,$05 A+=05.
B74B LD IX,$7258 IX=7258.
B74F LD (IX+$07),A Write A to *IX+07.
B752 JP Handler_Bull_2 Jump to Handler_Bull_2.
Handler_Bull_7 B755 CALL $9619 Call 9619.
B758 LD A,($99A5) A=*99A5.
B75B AND %00011110 Keep only bits 1-4.
B75D ADD A,$0A A+=0A.
B75F LD ($7258),A Write A to *7258.
B762 LD IX,$7258 IX=7258.
B766 LD A,(IX+$06) A=*IX+06.
B769 AND %00011000 Keep only bits 3-4.
B76B RRCA RRCA.
B76C LD HL,$BA4E HL=BA4E.
B76F LD E,A E=A.
B770 LD D,$00 D=00.
B772 ADD HL,DE HL+=DE.
B773 LD DE,$72B0 DE=72B0.
B776 LD BC,$0004 BC=0004.
B779 LDIR LDIR.
B77B JP Handler_Bull_2 Jump to Handler_Bull_2.
Handler_Bull_8 B77E LD A,(IX+$00) A=*IX+00.
B781 AND %00000011 Keep only bits 0-1.
B783 RET NZ Return if {} is not zero.
B784 LD IX,($72B0) IX=*72B0.
B788 LD E,(IX+$00) E=*IX+00.
B78B LD D,(IX+$01) D=*IX+01.
B78E LD HL,($72B2) HL=*72B2.
B791 EX DE,HL Exchange the DE and HL registers.
B792 LD ($72B2),HL Write HL to *72B2.
B795 LD (IX+$00),E Write E to *IX+00.
B798 LD (IX+$01),D Write D to *IX+01.
B79B LD IX,$7258 IX=7258.
B79F LD L,(IX+$04) L=*IX+04.
B7A2 LD H,(IX+$05) H=*IX+05.
B7A5 CALL $9914 Call 9914.
B7A8 RET Return.
Prev: B6A7 Up: Map Next: B7A9