Prev: ECD8 Up: Map Next: ED94
ECDF: Handler for the cooked chicken monsters
Used by the routine at Update_Room00.
Input
Output
Handler_Chickens ECDF LD A,(Flag_BaddyInit)
ECE2 OR A
ECE3 JR NZ,Handler_Chickens_0
ECE5 LD A,$01
ECE7 LD (Flag_BaddyInit),A
ECEA LD HL,$8088
ECED LD (Chicken1_Pos),HL
ECF0 LD (BitmapX),HL
ECF3 LD A,$7B
ECF5 LD (Chicken_Bmp),A
ECF8 CALL Bitmap16Draw
ECFB LD HL,$A8A8
ECFE LD (Chicken2_Pos),HL
ED01 LD (BitmapX),HL
ED04 CALL Bitmap16Draw
ED07 RET
Handler_Chickens_0 ED08 LD B,$02
ED0A LD IX,Chicken1_Pos
ED0E LD A,(Chicken_Bmp)
ED11 INC A
ED12 CP $7F
ED14 JR NZ,Handler_Chickens_1
ED16 LD A,$7B
Handler_Chickens_1 ED18 LD D,A
Handler_Chickens_2 ED19 LD L,(IX+$00)
ED1C LD H,(IX+$01)
ED1F LD C,(IX+$02)
ED22 LD (BitmapX),HL
ED25 PUSH BC
ED26 PUSH DE
ED27 LD B,$01
ED29 CALL Wally_HitTest
ED2C POP DE
ED2D POP BC
ED2E INC IX
ED30 INC IX
ED32 INC IX
ED34 LD A,H
ED35 CP $80
ED37 JR NZ,Handler_Chickens_4
ED39 LD A,(Chicken_Bmp)
ED3C CALL Bitmap16Draw
ED3F DEC L
ED40 DEC L
ED41 LD A,L
ED42 CP $78
ED44 JR NZ,Handler_Chickens_3
ED46 LD H,$82
Handler_Chickens_3 ED48 LD (BitmapX),HL
ED4B LD A,D
ED4C CALL Bitmap16Draw
ED4F LD (IX-$03),L
ED52 LD (IX-$02),H
ED55 DJNZ Handler_Chickens_2
ED57 LD A,D
ED58 LD (Chicken_Bmp),A
ED5B RET
Handler_Chickens_4 ED5C CP $A8
ED5E JR Z,Handler_Chickens_5
ED60 LD A,(Chicken_Bmp)
ED63 CALL Bitmap16Draw
ED66 INC H
ED67 INC H
ED68 JR Handler_Chickens_3
Handler_Chickens_5 ED6A LD A,C
ED6B OR A
ED6C JR Z,Handler_Chickens_6
ED6E LD A,(Chicken_Bmp)
ED71 CALL Bitmap16Draw
ED74 DEC L
ED75 DEC L
ED76 LD A,L
ED77 CP $08
ED79 JR NZ,Handler_Chickens_3
ED7B LD L,$B4
ED7D LD H,$80
ED7F JR Handler_Chickens_3
Handler_Chickens_6 ED81 LD A,(Chicken_Bmp)
ED84 CALL Bitmap16Draw
ED87 INC L
ED88 INC L
ED89 LD A,L
ED8A CP $E8
ED8C JR NZ,Handler_Chickens_3
ED8E LD L,$B4
ED90 LD H,$80
ED92 JR Handler_Chickens_3
Prev: ECD8 Up: Map Next: ED94