Prev: 59778 Up: Map Next: 59908
59803: Animate: Waiting
Animate_Waiting 59803 CALL Controls Call Controls.
59806 AND A Jump to Controls_JumpPunch if any monster control has been pressed.
59807 JP NZ,Controls_JumpPunch
59810 LD A,(53842) Jump to Waiting_Action if *Active_MonsterControlType is not set to "computer controlled".
59813 AND A
59814 JR NZ,Waiting_Action
The monster is being controlled by the computer, so rather than wait - pick a completely random number between 0-255 and use this as the control byte.
59816 CALL RandomNumber Call RandomNumber.
59819 JP Controls_JumpPunch Jump to Controls_JumpPunch.
The monster is player controlled so start the action.
Waiting_Action 59822 LD A,(53830) A=*Flag_MonsterClimbing.
59825 RRCA Set the carry flag if the monster is currently "climbing".
59826 JP C,Climbing_Waiting Jump to Climbing_Waiting if the carry flag is set.
The monster is on the ground so select the normal body sprite.
59829 LD A,5 A=sprite ID 5.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
5 sprite-5-left 69 sprite-69-left 133 sprite-133-left
Set the co-ordinates for where to draw.
59831 LD BC,(53837) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
59835 CALL DrawMonsterSprite Call DrawMonsterSprite.
Again, set the co-ordinates for where to draw.
59838 LD BC,(53837) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
59842 LD A,(53831) A=*Flag_Orientation.
59845 XOR %00000001 Flip bit 0.
59847 ADD A,C A+=C.
59848 LD C,A C=A.
Overwrite the head section, as the monster turns to face the camera to "speak".
59849 LD A,15 A=sprite ID 15.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
15 sprite-15-left 79 sprite-79-left 143 sprite-143-left
59851 CALL DrawMonsterSprite Call DrawMonsterSprite.
Set the co-ordinates for where to draw.
59854 LD BC,(53837) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
59858 INC B Increment both the X and Y positions by one to target drawing the mouth animation.
59859 INC C
59860 LD A,(53831) A=*Flag_Orientation.
59863 XOR %00000001 Flip bit 0.
59865 ADD A,C A+=C.
59866 LD C,A C=A.
Choose a frame randomly for the mouth sprite.
DrawMonsterMouth 59867 CALL RandomNumber A=random number between 0-2.
59870 AND %00000011
59872 JR Z,DrawMonsterMouth
59874 DEC A
59875 ADD A,A A=17+(A*2).
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
17 sprite-17-left 81 sprite-81-left 145 sprite-145-left
19 sprite-19-left 83 sprite-83-left 147 sprite-147-left
21 sprite-21-left 85 sprite-85-left 149 sprite-149-left
59876 ADD A,17
59878 CALL DrawMonsterSprite Call DrawMonsterSprite.
59881 RET Return.
The monster is currently climbing so use the correct body sprite.
Climbing_Waiting 59882 LD A,9 A=sprite ID 9.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
9 sprite-9-left 73 sprite-73-left 137 sprite-137-left
Set the co-ordinates for where to draw.
59884 LD BC,(53837) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
59888 CALL DrawMonsterSprite Call DrawMonsterSprite.
Again, set the co-ordinates for where to draw.
59891 LD BC,(53837) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
59895 LD A,13 A=sprite ID 13.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
13 sprite-13-left 77 sprite-77-left 141 sprite-141-left
59897 CALL DrawMonsterSprite Call DrawMonsterSprite.
Set the co-ordinates for where to draw.
59900 LD BC,(53837) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
59904 INC B Increment both the X and Y positions by one to target drawing the mouth animation.
59905 INC C
59906 JR DrawMonsterMouth Jump to DrawMonsterMouth.
Prev: 59778 Up: Map Next: 59908