![]() |
Routines |
| Prev: E576 | Up: Map | Next: E68C |
|
Used by the routine at Handler_Monsters.
|
||||
|
Just instantly return if the monster is already "game over".
|
||||
| E62D | LD A,($D244) | Return if *JumpTable_Pointer is equal to FF. | ||
| E630 | CP $FF | |||
| E632 | RET Z | |||
|
Any states higher than 20 mean the monster is in the process of turning back into a human (pre-"game over").
|
||||
| E633 | CP $20 | Jump to Action_JumpTable if *JumpTable_Pointer is higher than 20. | ||
| E635 | JR NC,Action_JumpTable | |||
|
Handle if the monster is currently jumping.
|
||||
| E637 | LD A,($D248) | A=*Flag_MonsterJumping. | ||
|
Moves the monster-is-jumping flag into the carry flag.
|
||||
| E63A | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||
| E63B | JR C,Action_JumpTable | Jump to Action_JumpTable if the carry flag is set (if bit 0 was set). | ||
|
Handle if the monster is currently climbing.
|
||||
| E63D | LD A,($D246) | A=*Flag_MonsterClimbing. | ||
|
Moves the monster-is-climbing flag into the carry flag.
|
||||
| E640 | RRCA | Rotate A right one position, setting the carry flag if bit 0 was set. | ||
| E641 | JR NC,$E658 | Jump to E658 if the carry flag is not set (if bit 0 was unset). | ||
| E643 | LD DE,$80FE | DE=80FE. | ||
| E646 | LD B,$03 | B=03. | ||
| E648 | LD A,($D247) | C=*Flag_Orientation. | ||
| E64B | LD C,A | |||
| E64C | LD A,B | A=B. | ||
| E64D | SUB C | A-=C. | ||
| E64E | SUB C | A-=C. | ||
| E64F | SUB C | A-=C. | ||
| E650 | LD C,A | C=A. | ||
| E651 | CALL $E0AD | Call E0AD. | ||
| E654 | JR Z,Action_JumpTable | Jump to Action_JumpTable if {} is zero. | ||
| E656 | JR $E66F | Jump to E66F. | ||
| E658 | LD A,($D24E) | Jump to Action_JumpTable if *Active_MonsterYPosition is equal to 12. | ||
| E65B | CP $12 | |||
| E65D | JR Z,Action_JumpTable | |||
| E65F | LD B,$05 | B=05. | ||
| E661 | LD A,($D247) | A=*Flag_Orientation. | ||
| E664 | ADD A,$02 | A+=02. | ||
| E666 | LD C,A | C=A. | ||
| E667 | LD DE,$090F | DE=090F. | ||
| E66A | CALL $E0AD | Call E0AD. | ||
| E66D | JR NZ,Action_JumpTable | Jump to Action_JumpTable if {} is not zero. | ||
| E66F | LD A,$06 | Write 06 to: | ||
| E671 | LD ($D244),A | |||
| E674 | LD ($D24A),A | |||
| E677 | LD A,$01 | Write 01 to *Flag_MonsterJumping. | ||
| E679 | LD ($D248),A | |||
|
Using the value held in *JumpTable_Pointer jump to the correlated address from JumpTable.
|
||||
| Action_JumpTable | E67C | LD A,($D244) | A=*JumpTable_Pointer*02. | |
| E67F | ADD A,A | |||
|
Create an offset using HL.
|
||||
| E680 | LD H,$00 | H=00. | ||
| E682 | LD L,A | L=A. | ||
| E683 | LD DE,$EF98 | HL+=JumpTable. | ||
| E686 | ADD HL,DE | |||
|
Fetch the address to jump and store it in HL.
|
||||
| E687 | LD A,(HL) | A=*HL. | ||
| E688 | INC HL | Increment HL by one. | ||
| E689 | LD H,(HL) | H=*HL. | ||
| E68A | LD L,A | L=A. | ||
| E68B | JP (HL) | Jump to the address held by *HL. | ||
| Prev: E576 | Up: Map | Next: E68C |