![]() |
Routines |
| Prev: 44459 | Up: Map | Next: 44599 |
|
Keep the flame (types 130/131 or 134/135 via Handler_UpwardMissileFlame_HangLeft) attached to the missile held in the slot at Object_Slot_3. The flame is cleared if that slot no longer holds the missile.
|
||||||||
|
Hang this actor off the 128 slot at Object_Slot_3.
|
||||||||
| Handler_UpwardMissileFlame | 44522 | LD A,(24888) | Fetch Object_Slot_3. | |||||
| 44525 | CP 128 | Jump to Handler_Missile_ClearType if the type is not 128. | ||||||
| 44527 | JR NZ,Handler_Missile_ClearType | |||||||
| 44529 | LD HL,(24890) | Fetch Object_Slot_3_Position. | ||||||
| 44532 | LD BC,20 | Add a 20 offset. | ||||||
| 44535 | ADD HL,BC | |||||||
|
Place this actor at the missile's position, offset for the flame.
|
||||||||
| Handler_Missile_MaskWorldX | 44536 | LD A,H | Fetch the high byte. | |||||
| 44537 | AND %00011111 | Keep only bits 0-4. | ||||||
| 44539 | LD H,A | Write it back. | ||||||
| 44540 | LD (IX+2),L | Write the low byte as the actor world X. | ||||||
| 44543 | LD (IX+3),H | Write the high byte. | ||||||
| 44546 | LD A,(24892) | Fetch Object_Slot_3_Y. | ||||||
| 44549 | ADD A,16 | Add 16. | ||||||
| 44551 | LD (IX+4),A | Write it as the actor Y. | ||||||
|
Alternate the flame frame and colour.
|
||||||||
| 44554 | LD A,(IX+0) | Fetch the actor type. | ||||||
| 44557 | XOR %00000001 | Flip bit 0. | ||||||
| 44559 | LD (IX+0),A | Write it back. | ||||||
| 44562 | LD A,(IX+7) | Fetch the actor colour. | ||||||
| 44565 | XOR %00000100 | Flip bit 2. | ||||||
| 44567 | LD (IX+7),A | Write it back. | ||||||
| 44570 | JP DrawCurrentActor_Draw | Jump to DrawCurrentActor_Draw. | ||||||
|
The same hang, offset left, for type 132.
|
||||||||
| Handler_UpwardMissileFlame_HangLeft | 44573 | LD A,(24888) | Fetch Object_Slot_3. | |||||
| 44576 | CP 132 | Jump to Handler_Missile_ClearType if the type is not 132. | ||||||
| 44578 | JR NZ,Handler_Missile_ClearType | |||||||
| 44580 | LD HL,(24890) | Fetch Object_Slot_3_Position. | ||||||
| 44583 | LD BC,16 | Set the offset in BC to 0016. | ||||||
| 44586 | AND A | Clear the carry flag. | ||||||
| 44587 | SBC HL,BC | Subtract the offset. | ||||||
| 44589 | JR Handler_Missile_MaskWorldX | Jump to Handler_Missile_MaskWorldX. | ||||||
| Handler_Missile_ClearType | 44591 | CALL DrawCachedSprite | Call DrawCachedSprite. | |||||
| 44594 | LD (IX+0),0 | Write 0 to the actor type. | ||||||
| 44598 | RET | Return. | ||||||
| Prev: 44459 | Up: Map | Next: 44599 |