Prev: 59971 Up: Map Next: 60150
60060: Event: Landed?
Event_Landed 60060 LD A,(53835) Jump to Landed_CheckControls if *Active_MonsterActionCountdown is equal to 25.
60063 CP 25
60065 JR Z,Landed_CheckControls
60067 DEC A Decrease *Active_MonsterActionCountdown by one.
60068 LD (53835),A
60071 JR NZ,Landed_OnAss Jump to Landed_OnAss if *Active_MonsterActionCountdown is not yet zero.
Not sure if this is a bug or not but this is why the player monster continually "sits down" after landing if you don't touch the controls. Then again, maybe it's intentional given 60060 checks if this is 25.
60073 LD A,25 Reset *Active_MonsterActionCountdown to 25.
60075 LD (53835),A
60078 LD A,(53842) Jump to Landed_GetUp if *Active_MonsterControlType is set to "computer controlled".
60081 AND A
60082 JR Z,Landed_GetUp
This monster isn't computer controlled so check if any controls have been pressed.
Landed_CheckControls 60084 CALL Controls Call Controls.
60087 AND A Jump to Landed_OnAss if no controls are being pressed.
60088 JR Z,Landed_OnAss
Either a monster player control has been pressed, or this is a computer controlled monster.
Landed_GetUp 60090 LD A,(53831) A=*Flag_Orientation.
Moves the orientation flag into the carry flag.
60093 RRCA Rotate A right one position, setting the carry flag if bit 0 was set.
60094 CALL NC,Handler_DecreaseMonsterXPosition Call Handler_DecreaseMonsterXPosition if the carry flag is not set.
Restart the actions jump table back to the beginning.
60097 XOR A A=0.
60098 LD (53828),A Reset *JumpTable_Pointer back to 0.
Set the monster flags back to "normal" states.
60101 LD (53830),A Write "not climbing" (0) to *Flag_MonsterClimbing.
60104 LD (53832),A Write "not jumping" (0) to *Flag_MonsterJumping.
60107 JP Action_JumpTable Jump to Action_JumpTable.
No controls are being pressed and *Active_MonsterActionCountdown is not yet zero, so the monster is still flat on their ass.
The routine at DrawMonsterSprite handles which monster to display.
Landed_OnAss 60110 LD A,7 A=sprite ID 7.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
7 sprite-7-left 71 sprite-71-left 135 sprite-135-left
Set the co-ordinates for where to draw.
60112 LD BC,(53837) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
60116 CALL DrawMonsterSprite Call DrawMonsterSprite.
Again, set the co-ordinates for where to draw.
60119 LD BC,(53837) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
60123 INC B Increment the Y position by two and the X position by one, to target drawing the mouth/ fist section.
60124 INC B
60125 INC C
Adjust the Y position for which way the monster is facing.
60126 LD A,(53831) A=*Flag_Orientation.
60129 XOR %00000001 Flip bit 0.
60131 ADD A,C A+=C.
60132 LD C,A C=A.
The routine at DrawMonsterSprite handles which monster to display.
60133 LD A,27 A=sprite ID 27.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
27 sprite-27-left 91 sprite-91-left 155 sprite-155-left
60135 CALL DrawMonsterSprite Call DrawMonsterSprite.
60138 LD A,(53828) Return if *JumpTable_Pointer is not equal to 32.
60141 CP 32
60143 RET NZ
60144 LD A,33 Write 33 to *JumpTable_Pointer.
60146 LD (53828),A
60149 RET Return.
Prev: 59971 Up: Map Next: 60150