Prev: F434 Up: Map Next: F4B8
F450: Routine at F450
Used by the routine at ProcessMonsters.
F450 LD B,A B=A.
F451 INC HL Increment HL by one.
F452 LD C,(HL) C=*HL.
F453 INC HL Increment HL by one.
F454 LD A,(HL) A=*HL.
F455 RRCA Rotate A right one position, setting the carry flag if bit 0 was set.
F456 RET NC Return if the carry flag is not set.
F457 INC HL Increment HL by one.
F458 LD A,(HL) A=*HL.
F459 RRCA Rotate A left one position, setting the carry flag if bit 0 was set.
F45A RET C Return if the carry flag is set.
F45B LD ($D228),BC Write BC to *D228.
F45F LD H,$00 H=00.
F461 LD L,B L=B.
F462 LD D,H D=H.
F463 LD E,C E=C.
F464 ADD HL,HL HL*=20+DE.
F465 ADD HL,HL
F466 ADD HL,HL
F467 ADD HL,HL
F468 ADD HL,HL
F469 ADD HL,DE
F46A LD A,$01 A=01.
F46C LD ($D3FB),A Write A to *D3FB.
F46F LD ($D22A),HL Write HL to *D22A.
This entry point is used by the routines at Handler_Eating and Handler_EatFood.
F472 LD DE,$013F DE=013F.
F475 CALL $E0CF Call E0CF.
F478 LD A,($D3FC) A=*D3FC.
F47B RRCA Rotate A right one position, setting the carry flag if bit 0 was set.
F47C JR C,$F480 Jump to F480 if the carry flag is set.
F47E JR Z,$F488 Jump to F488 if A is zero.
F480 LD BC,$0000 BC=0000.
F483 LD E,$01 E=01.
F485 CALL $F543 Call F543.
F488 LD A,($D215) A=*D215.
F48B CP $4D Jump to F4E6 if A is lower than 4D.
F48D JR C,$F4E6
F48F SUB $4C A-=4C.
F491 AND %00000011 Keep only bits 0-1.
F493 CP $01 Jump to F4E6 if A is not equal to 01.
F495 JR NZ,$F4E6
F497 LD A,$01 Write 01 to *D3FC.
F499 LD ($D3FC),A
F49C LD A,($D215) A=*D215.
F49F SUB $4D A-=4D.
F4A1 SRL A Shift A right twice.
F4A3 SRL A
F4A5 CP $08 Jump to Handler_Eating if A is lower than 08.
F4A7 JR C,Handler_Eating
F4A9 AND %00000011 Keep only bits 0-1.
F4AB INC A Increment A by one.
F4AC ADD A,A A+=A.
F4AD LD D,A D=A.
F4AE LD E,$03 E=03.
F4B0 LD A,($DF45) A=*Temp_MonsterID.
F4B3 CALL Handler_AddPoints Call Handler_AddPoints.
F4B6 JR Handler_EatFood_SetState Jump to Handler_EatFood_SetState.
Prev: F434 Up: Map Next: F4B8