Prev: 60721 Up: Map Next: 61040
60866: Routine at EDC2
60866 LD A,(53783) A=*Active_MonsterControl.
60869 AND %00001111 Keep only bits 0-3.
60871 LD B,A B=A.
60872 BIT 3,B Jump to 60901 if bit 3 of B is set.
60874 JR NZ,60901
60876 BIT 2,B Jump to 61002 if bit 2 of B is set.
60878 JP NZ,61002
60881 LD A,(53831) A=*Flag_Orientation.
Moves the orientation flag into the carry flag.
60884 RRCA Rotate A right one position, setting the carry flag if bit 0 was set.
60885 JR C,60894 Jump to 60894 if the carry flag is set.
60887 BIT 1,B Jump to 60946 if bit 1 of B is set.
60889 JR NZ,60946
60891 JP 61318 Jump to 61318.
60894 BIT 1,B Jump to 60946 if bit 1 of B is not set.
60896 JR Z,60946
60898 JP 61318 Jump to 61318.
60901 LD HL,65025 HL=65025.
60904 LD DE,65027 DE=65027.
60907 CALL 62290 Call 62290.
60910 LD A,22 Write 22 to *JumpTable_Pointer.
60912 LD (53828),A
60915 LD H,254 H=254.
60917 LD D,H D=H.
60918 LD L,1 L=1.
60920 LD E,0 E=0.
60922 CALL Monster_CalculatePosition Call Monster_CalculatePosition.
The routine at DrawMonsterSprite handles which monster to display.
60925 LD A,37 A=sprite ID 37.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
37 sprite-37-left 101 sprite-101-left 165 sprite-165-left
60927 CALL DrawMonsterSprite Call DrawMonsterSprite.
60930 LD H,2 H=2.
60932 LD L,1 L=1.
60934 LD D,H D=H.
60935 LD E,0 E=0.
60937 CALL Monster_CalculatePosition Call Monster_CalculatePosition.
The routine at DrawMonsterSprite handles which monster to display.
60940 LD A,31 A=sprite ID 31.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
31 sprite-31-left 95 sprite-95-left 159 sprite-159-left
60942 CALL DrawMonsterSprite Call DrawMonsterSprite.
60945 RET Return.
60946 LD HL,260 HL=260.
60949 LD DE,256 DE=256.
60952 CALL 62290 Call 62290.
60955 LD A,23 Write 23 to *JumpTable_Pointer.
60957 LD (53828),A
Set the co-ordinates for where to draw.
60960 LD BC,(53837) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
60964 INC B Increment B by two.
60965 INC B
60966 LD A,(53831) A=*Flag_Orientation.
60969 XOR %00000001 Flip bit 0.
60971 ADD A,C A+=C.
60972 LD C,A C=A.
The routine at DrawMonsterSprite handles which monster to display.
60973 LD A,31 A=sprite ID 31.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
31 sprite-31-left 95 sprite-95-left 159 sprite-159-left
60975 CALL DrawMonsterSprite Call DrawMonsterSprite.
Again, set the co-ordinates for where to draw.
60978 LD BC,(53837) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
60982 LD A,(53831) A=*Flag_Orientation.
60985 SUB C A-=C.
60986 CPL Invert the bits in A.
60987 INC A Increment A by one.
60988 LD C,A C=A.
60989 LD A,(53831) A=*Flag_Orientation.
60992 XOR %00000001 Flip bit 0.
60994 ADD A,C A+=C.
60995 LD C,A C=A.
The routine at DrawMonsterSprite handles which monster to display.
60996 LD A,29 A=sprite ID 29.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
29 sprite-29-left 93 sprite-93-left 157 sprite-157-left
60998 CALL DrawMonsterSprite Call DrawMonsterSprite.
61001 RET Return.
61002 LD HL,771 HL=771.
61005 LD DE,769 DE=769.
61008 CALL 62290 Call 62290.
61011 LD A,25 Write 25 to *JumpTable_Pointer.
61013 LD (53828),A
Set the co-ordinates for where to draw.
61016 LD BC,(53837) BC=*Active_MonsterXPosition/Active_MonsterYPosition.
61020 LD A,(53831) A=*Flag_Orientation.
61023 SUB C A-=C.
61024 CPL Invert the bits in A.
61025 INC A Increment A by one.
61026 LD C,A C=A.
61027 LD A,(53831) A=*Flag_Orientation.
61030 XOR %00000001 Flip bit 0.
61032 ADD A,C A+=C.
61033 LD C,A C=A.
The routine at DrawMonsterSprite handles which monster to display.
61034 LD A,11 A=sprite ID 11.
George Lizzy Ralph
ID Sprite ID Sprite ID Sprite
11 sprite-11-left 75 sprite-75-left 139 sprite-139-left
61036 CALL DrawMonsterSprite Call DrawMonsterSprite.
61039 RET Return.
Prev: 60721 Up: Map Next: 61040