Routines |
Prev: 55921 | Up: Map | Next: 56244 |
Used by the routines at Human_Lobber and Human_Shooter.
|
||||
TargetMonster | 56190 | XOR A | Write 0 to *53780. | |
56191 | LD (53780),A | |||
56194 | CALL RandomNumber | Get a random number between 0-3. | ||
56197 | AND %00000011 | |||
Note; CharacterPicker increments A on entry.
|
||||
ConvertToMonsterId | 56199 | CALL CharacterPicker | Call CharacterPicker. | |
This entry point is used by the routine at 56281.
|
||||
CheckIfMonsterIsAlive | 56202 | CP 200 | Jump to SetTargetedMonster_XPos if the monster state is lower than 200. | |
56204 | JR C,SetTargetedMonster_XPos | |||
56206 | LD A,128 | Write 128 to *53780. | ||
56208 | LD (53780),A | |||
The monster ID e.g. 1 - George, 2 - Lizzy and 3 Ralph.
|
||||
56211 | LD A,B | A=the selected monster ID. | ||
Try again with the next monster in sequence.
|
||||
56212 | JR ConvertToMonsterId | Jump to ConvertToMonsterId. | ||
SetTargetedMonster_XPos | 56214 | LD A,(53780) | A=*53780. | |
56217 | OR B | Set the bits from B. | ||
56218 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
56219 | LD A,(DE) | A=the targeted monsters X position. | ||
56220 | INC A | Increment A by two. | ||
56221 | INC A | |||
56222 | LD B,A | B=A. | ||
56223 | CP 100 | Jump to SetTargetedMonster_YPos if A is lower than 100. | ||
56225 | JR C,SetTargetedMonster_YPos | |||
56227 | LD B,0 | B=0. | ||
SetTargetedMonster_YPos | 56229 | INC DE | Increment DE by one. | |
56230 | LD A,(DE) | A=the targeted monsters y position. | ||
56231 | INC A | Increment A by one. | ||
56232 | LD C,A | C=A. | ||
56233 | CP 100 | Jump to TargetMonster_0 if A is lower than 100. | ||
56235 | JR C,TargetMonster_0 | |||
56237 | LD C,0 | C=0. | ||
TargetMonster_0 | 56239 | XOR A | Write 0 to *53780. | |
56240 | LD (53780),A | |||
56243 | RET | Return. |
Prev: 55921 | Up: Map | Next: 56244 |