Prev: 58742 Up: Map Next: 59020
58925: Routine at E62D
Used by the routine at Handler_Monsters.
Just instantly return if the monster is already "game over".
58925 LD A,(53828) Return if *JumpTable_Pointer is equal to 255.
58928 CP 255
58930 RET Z
Any states higher than 32 mean the monster is in the process of turning back into a human (pre-"game over").
58931 CP 32 Jump to Action_JumpTable if *JumpTable_Pointer is higher than 32.
58933 JR NC,Action_JumpTable
Handle if the monster is currently jumping.
58935 LD A,(53832) A=*Flag_MonsterJumping.
Moves the monster-is-jumping flag into the carry flag.
58938 RRCA Rotate A right one position, setting the carry flag if bit 0 was set.
58939 JR C,Action_JumpTable Jump to Action_JumpTable if the carry flag is set (if bit 0 was set).
Handle if the monster is currently climbing.
58941 LD A,(53830) A=*Flag_MonsterClimbing.
Moves the monster-is-climbing flag into the carry flag.
58944 RRCA Rotate A right one position, setting the carry flag if bit 0 was set.
58945 JR NC,58968 Jump to 58968 if the carry flag is not set (if bit 0 was unset).
58947 LD DE,33022 DE=33022.
58950 LD B,3 B=3.
58952 LD A,(53831) C=*Flag_Orientation.
58955 LD C,A
58956 LD A,B A=B.
58957 SUB C A-=C.
58958 SUB C A-=C.
58959 SUB C A-=C.
58960 LD C,A C=A.
58961 CALL 57517 Call 57517.
58964 JR Z,Action_JumpTable Jump to Action_JumpTable if {} is zero.
58966 JR 58991 Jump to 58991.
58968 LD A,(53838) Jump to Action_JumpTable if *Active_MonsterYPosition is equal to 18.
58971 CP 18
58973 JR Z,Action_JumpTable
58975 LD B,5 B=5.
58977 LD A,(53831) A=*Flag_Orientation.
58980 ADD A,2 A+=2.
58982 LD C,A C=A.
58983 LD DE,2319 DE=2319.
58986 CALL 57517 Call 57517.
58989 JR NZ,Action_JumpTable Jump to Action_JumpTable if {} is not zero.
58991 LD A,6 Write 6 to:
58993 LD (53828),A
58996 LD (53834),A
58999 LD A,1 Write 1 to *Flag_MonsterJumping.
59001 LD (53832),A
Using the value held in *JumpTable_Pointer jump to the correlated address from JumpTable.
Action_JumpTable 59004 LD A,(53828) A=*JumpTable_Pointer*2.
59007 ADD A,A
Create an offset using HL.
59008 LD H,0 H=0.
59010 LD L,A L=A.
59011 LD DE,61336 HL+=JumpTable.
59014 ADD HL,DE
Fetch the address to jump and store it in HL.
59015 LD A,(HL) A=*HL.
59016 INC HL Increment HL by one.
59017 LD H,(HL) H=*HL.
59018 LD L,A L=A.
59019 JP (HL) Jump to the address held by *HL.
Prev: 58742 Up: Map Next: 59020