Prev: EC8A Up: Map Next: ED31
ECE0: Handler: Punching While Jumping
Used by the routine at EAF6.
Handler_JumpPunch ECE0 LD A,($D217) A=*Active_MonsterControl.
ECE3 AND %00001111 Keep only bits 0-3.
ECE5 LD B,A Store the result in B.
ECE6 BIT 3,B Jump to Handler_JumpPunchUp if bit 3 of B is set.
ECE8 JR NZ,Handler_JumpPunchUp
ECEA JR Handler_JumpPunchLeftRight Jump to Handler_JumpPunchLeftRight.
Handles when the monster is jumping and punches upwards.
Handler_JumpPunchUp ECEC LD HL,$FE00 HL=FE00.
ECEF LD DE,$FE03 DE=FE03.
ECF2 CALL $F352 Call F352.
Set the co-ordinates for where to draw.
ECF5 LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
ECF9 DEC B Decrease the Y position by two to draw the upper section of the monsters body.
ECFA DEC B
The routine at DrawMonsterSprite handles which monster to display.
ECFB LD A,$25 A=sprite ID 25.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
25 sprite-37-left 65 sprite-101-left A5 sprite-165-left
ECFD CALL DrawMonsterSprite Call DrawMonsterSprite.
Again, set the co-ordinates for where to draw.
ED00 LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
ED04 INC B Increment the Y position by two to draw the lower section of the monsters body.
ED05 INC B
The routine at DrawMonsterSprite handles which monster to display.
ED06 LD A,$23 A=sprite ID 23.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
23 sprite-35-left 63 sprite-99-left A3 sprite-163-left
ED08 CALL DrawMonsterSprite Call DrawMonsterSprite.
ED0B RET Return.
Handles when the monster is jumping and punches left or right.
Handler_JumpPunchLeftRight ED0C LD HL,$0103 HL=0103.
ED0F LD DE,$0100 DE=0100.
ED12 CALL $F352 Call F352.
Set the co-ordinates for where to draw.
ED15 LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
ED19 INC B Increment the Y position by two to draw the lower section of the monsters body.
ED1A INC B
The routine at DrawMonsterSprite handles which monster to display.
ED1B LD A,$23 A=sprite ID 23.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
23 sprite-35-left 63 sprite-99-left A3 sprite-163-left
ED1D CALL DrawMonsterSprite Call DrawMonsterSprite.
Again, set the co-ordinates for where to draw.
ED20 LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
ED24 LD A,($D247) H=*Flag_Orientation.
ED27 LD H,A
ED28 LD A,C C-=H.
ED29 SUB H
ED2A LD C,A
The routine at DrawMonsterSprite handles which monster to display.
ED2B LD A,$1D A=sprite ID 1D.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
1D sprite-29-left 5D sprite-93-left 9D sprite-157-left
ED2D CALL DrawMonsterSprite Call DrawMonsterSprite.
ED30 RET Return.
Prev: EC8A Up: Map Next: ED31