Prev: E982 Up: Map Next: EA04
E99B: Animate: Waiting
Animate_Waiting E99B CALL Controls Call Controls.
E99E AND A Jump to Controls_JumpPunch if any monster control has been pressed.
E99F JP NZ,Controls_JumpPunch
E9A2 LD A,($D252) Jump to Waiting_Action if *Active_MonsterControlType is not set to "computer controlled".
E9A5 AND A
E9A6 JR NZ,Waiting_Action
The monster is being controlled by the computer, so rather than wait - pick a completely random number between 00-FF and use this as the control byte.
E9A8 CALL RandomNumber Call RandomNumber.
E9AB JP Controls_JumpPunch Jump to Controls_JumpPunch.
The monster is player controlled so start the action.
Waiting_Action E9AE LD A,($D246) A=*Flag_MonsterClimbing.
E9B1 RRCA Set the carry flag if the monster is currently "climbing".
E9B2 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.
E9B5 LD A,$05 A=sprite ID 05.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
05 sprite-5-left 45 sprite-69-left 85 sprite-133-left
Set the co-ordinates for where to draw.
E9B7 LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
E9BB CALL DrawMonsterSprite Call DrawMonsterSprite.
Again, set the co-ordinates for where to draw.
E9BE LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
E9C2 LD A,($D247) A=*Flag_Orientation.
E9C5 XOR %00000001 Flip bit 0.
E9C7 ADD A,C A+=C.
E9C8 LD C,A C=A.
Overwrite the head section, as the monster turns to face the camera to "speak".
E9C9 LD A,$0F A=sprite ID 0F.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
0F sprite-15-left 4F sprite-79-left 8F sprite-143-left
E9CB CALL DrawMonsterSprite Call DrawMonsterSprite.
Set the co-ordinates for where to draw.
E9CE LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
E9D2 INC B Increment both the X and Y positions by one to target drawing the mouth animation.
E9D3 INC C
E9D4 LD A,($D247) A=*Flag_Orientation.
E9D7 XOR %00000001 Flip bit 0.
E9D9 ADD A,C A+=C.
E9DA LD C,A C=A.
Choose a frame randomly for the mouth sprite.
DrawMonsterMouth E9DB CALL RandomNumber A=random number between 00-02.
E9DE AND %00000011
E9E0 JR Z,DrawMonsterMouth
E9E2 DEC A
E9E3 ADD A,A A=11+(A*02).
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
11 sprite-17-left 51 sprite-81-left 91 sprite-145-left
13 sprite-19-left 53 sprite-83-left 93 sprite-147-left
15 sprite-21-left 55 sprite-85-left 95 sprite-149-left
E9E4 ADD A,$11
E9E6 CALL DrawMonsterSprite Call DrawMonsterSprite.
E9E9 RET Return.
The monster is currently climbing so use the correct body sprite.
Climbing_Waiting E9EA LD A,$09 A=sprite ID 09.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
09 sprite-9-left 49 sprite-73-left 89 sprite-137-left
Set the co-ordinates for where to draw.
E9EC LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
E9F0 CALL DrawMonsterSprite Call DrawMonsterSprite.
Again, set the co-ordinates for where to draw.
E9F3 LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
E9F7 LD A,$0D A=sprite ID 0D.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
0D sprite-13-left 4D sprite-77-left 8D sprite-141-left
E9F9 CALL DrawMonsterSprite Call DrawMonsterSprite.
Set the co-ordinates for where to draw.
E9FC LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
EA00 INC B Increment both the X and Y positions by one to target drawing the mouth animation.
EA01 INC C
EA02 JR DrawMonsterMouth Jump to DrawMonsterMouth.
Prev: E982 Up: Map Next: EA04