Prev: ED31 Up: Map Next: EE70
EDC2: Routine at EDC2
EDC2 LD A,($D217) A=*D217.
EDC5 AND %00001111 Keep only bits 0-3.
EDC7 LD B,A B=A.
EDC8 BIT 3,B Jump to EDE5 if bit 3 of B is set.
EDCA JR NZ,$EDE5
EDCC BIT 2,B Jump to EE4A if bit 2 of B is set.
EDCE JP NZ,$EE4A
EDD1 LD A,($D247) A=*Flag_Orientation.
Moves the orientation flag into the carry flag.
EDD4 RRCA Rotate A right one position, setting the carry flag if bit 0 was set.
EDD5 JR C,$EDDE Jump to EDDE if the carry flag is set.
EDD7 BIT 1,B Jump to EE12 if bit 1 of B is set.
EDD9 JR NZ,$EE12
EDDB JP $EF86 Jump to EF86.
EDDE BIT 1,B Jump to EE12 if bit 1 of B is not set.
EDE0 JR Z,$EE12
EDE2 JP $EF86 Jump to EF86.
EDE5 LD HL,$FE01 HL=FE01.
EDE8 LD DE,$FE03 DE=FE03.
EDEB CALL $F352 Call F352.
EDEE LD A,$16 Write 16 to *JumpTable_Pointer.
EDF0 LD ($D244),A
EDF3 LD H,$FE H=FE.
EDF5 LD D,H D=H.
EDF6 LD L,$01 L=01.
EDF8 LD E,$00 E=00.
EDFA CALL Monster_CalculatePosition Call Monster_CalculatePosition.
The routine at DrawMonsterSprite handles which monster to display.
EDFD 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
EDFF CALL DrawMonsterSprite Call DrawMonsterSprite.
EE02 LD H,$02 H=02.
EE04 LD L,$01 L=01.
EE06 LD D,H D=H.
EE07 LD E,$00 E=00.
EE09 CALL Monster_CalculatePosition Call Monster_CalculatePosition.
The routine at DrawMonsterSprite handles which monster to display.
EE0C LD A,$1F A=sprite ID 1F.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
1F sprite-31-left 5F sprite-95-left 9F sprite-159-left
EE0E CALL DrawMonsterSprite Call DrawMonsterSprite.
EE11 RET Return.
EE12 LD HL,$0104 HL=0104.
EE15 LD DE,$0100 DE=0100.
EE18 CALL $F352 Call F352.
EE1B LD A,$17 Write 17 to *JumpTable_Pointer.
EE1D LD ($D244),A
Set the co-ordinates for where to draw.
EE20 LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
EE24 INC B Increment B by two.
EE25 INC B
EE26 LD A,($D247) A=*Flag_Orientation.
EE29 XOR %00000001 Flip bit 0.
EE2B ADD A,C A+=C.
EE2C LD C,A C=A.
The routine at DrawMonsterSprite handles which monster to display.
EE2D LD A,$1F A=sprite ID 1F.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
1F sprite-31-left 5F sprite-95-left 9F sprite-159-left
EE2F CALL DrawMonsterSprite Call DrawMonsterSprite.
Again, set the co-ordinates for where to draw.
EE32 LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
EE36 LD A,($D247) A=*Flag_Orientation.
EE39 SUB C A-=C.
EE3A CPL Invert the bits in A.
EE3B INC A Increment A by one.
EE3C LD C,A C=A.
EE3D LD A,($D247) A=*Flag_Orientation.
EE40 XOR %00000001 Flip bit 0.
EE42 ADD A,C A+=C.
EE43 LD C,A C=A.
The routine at DrawMonsterSprite handles which monster to display.
EE44 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
EE46 CALL DrawMonsterSprite Call DrawMonsterSprite.
EE49 RET Return.
EE4A LD HL,$0303 HL=0303.
EE4D LD DE,$0301 DE=0301.
EE50 CALL $F352 Call F352.
EE53 LD A,$19 Write 19 to *JumpTable_Pointer.
EE55 LD ($D244),A
Set the co-ordinates for where to draw.
EE58 LD BC,($D24D) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
EE5C LD A,($D247) A=*Flag_Orientation.
EE5F SUB C A-=C.
EE60 CPL Invert the bits in A.
EE61 INC A Increment A by one.
EE62 LD C,A C=A.
EE63 LD A,($D247) A=*Flag_Orientation.
EE66 XOR %00000001 Flip bit 0.
EE68 ADD A,C A+=C.
EE69 LD C,A C=A.
The routine at DrawMonsterSprite handles which monster to display.
EE6A LD A,$0B A=sprite ID 0B.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
0B sprite-11-left 4B sprite-75-left 8B sprite-139-left
EE6C CALL DrawMonsterSprite Call DrawMonsterSprite.
EE6F RET Return.
Prev: ED31 Up: Map Next: EE70