![]() |
Routines |
| Prev: 43945 | Up: Map | Next: 44089 |
|
Handle the missile launcher (types 112 to 127). Kill Jetman if he is in range, then while *IX+23 is set step the frame, count it down, draw its gauge and flash the base or alien banner. Otherwise continue at AlignToRover_TestRoverY.
|
||||||||
|
Test range, then draw the missile banner when *IX+23 is set.
|
||||||||
| Handler_MissileLauncher | 43962 | LD E,24 | E=24. | |||||
| 43964 | CALL TickThenExplode_TestJetman | Call TickThenExplode_TestJetman. | ||||||
| 43967 | CALL C,TickThenExplode_KillJetman | Call TickThenExplode_KillJetman if this actor is close enough. | ||||||
| 43970 | LD A,(IX+23) | Jump to AlignToRover_TestRoverY if *IX+23 is zero. | ||||||
| 43973 | AND A | |||||||
| 43974 | JR Z,AlignToRover_TestRoverY | |||||||
| 43976 | CALL DrawCurrentActor | Call DrawCurrentActor. | ||||||
|
Count down *IX+23 every sixteenth frame, unless the countdown is suspended.
|
||||||||
| 43979 | LD A,(24130) | Fetch GameTimer. | ||||||
| 43982 | CPL | Invert the bits. | ||||||
| 43983 | AND %00001111 | Keep only bits 0-3. | ||||||
| 43985 | RET NZ | Return if the result is not zero. | ||||||
| 43986 | LD A,(24167) | Jump to Handler_MissileLauncher_Gauge if GameDelayTimer is not zero. | ||||||
| 43989 | AND A | |||||||
| 43990 | JR NZ,Handler_MissileLauncher_Gauge | |||||||
| 43992 | LD A,(24696) | Fetch Jetman_Slot. | ||||||
| 43995 | CP 129 | Compare it against 129. | ||||||
|
See Infinite Time.
|
||||||||
| Handler_MissileLauncher_TestType | 43997 | JR Z,Handler_MissileLauncher_Gauge | Jump to Handler_MissileLauncher_Gauge if Jetman's type is 129. | |||||
| 43999 | DEC (IX+23) | Decrease *IX+23 by one. | ||||||
| 44002 | CALL Z,Handler_Missile_ConvertExploding | Call Handler_Missile_ConvertExploding if it is now zero. | ||||||
|
Draw the gauge for *IX+23.
|
||||||||
| Handler_MissileLauncher_Gauge | 44005 | LD A,(IX+23) | Fetch *IX+23. | |||||
| 44008 | LD HL,8256 | HL=8256. | ||||||
| 44011 | CALL DrawGauge | Call DrawGauge. | ||||||
|
Flash one of the banner tiles, chosen by which side of Jetman the actor is on.
|
||||||||
| 44014 | CALL Handler_Missile | Call Handler_Missile. | ||||||
| 44017 | JR NC,Handler_MissileLauncher_FlashBanner | Jump to Handler_MissileLauncher_FlashBanner if the actor is not to the left of Jetman. | ||||||
|
The actor is to the left, so flash the first tile (22651) and set the second tile (22653) to a steady colour.
|
||||||||
| 44019 | CALL FlashAttribute | Call FlashAttribute to fetch the flashing attribute. | ||||||
| 44022 | LD HL,22651 | Point HL at the first banner tile (22651). | ||||||
| 44025 | CALL Handler_Colour2x2 | Call Handler_Colour2x2 to colour the tile with A. | ||||||
| 44028 | LD HL,22653 | Point HL at the second banner tile (22653). | ||||||
| 44031 | LD A,66 | Set the steady attribute in A to INK:RED, PAPER:BLACK (BRIGHT). | ||||||
| Handler_MissileLauncher_Loop | 44033 | CALL Handler_Colour2x2 | Call Handler_Colour2x2 to colour the tile with A. | |||||
|
Print the base or alien banner message at fixed points in the timer, otherwise return.
|
||||||||
| 44036 | LD A,(24130) | Fetch GameTimer. | ||||||
| 44039 | AND %00111111 | Keep only bits 0-5. | ||||||
| 44041 | CP 15 | Compare it against 15. | ||||||
| 44043 | JR Z,Handler_MissileLauncher_PrintBase | Jump to Handler_MissileLauncher_PrintBase if they are equal. | ||||||
| 44045 | CP 47 | Return if it is not 47. | ||||||
| 44047 | RET NZ | |||||||
|
Handle printing the "
" messaging.
|
||||||||
| 44048 | LD DE,44068 | DE=BannerMessaging_Alien. | ||||||
| BannerMessaging_Print | 44051 | LD HL,4312 | HL=4312 (screen location). | |||||
| 44054 | CALL PrintStringColour | Call PrintStringColour. | ||||||
| 44057 | RET | Return. | ||||||
|
Handle printing the "
" messaging.
|
||||||||
| Handler_MissileLauncher_PrintBase | 44058 | LD DE,44063 | DE=BannerMessaging_Base. | |||||
| 44061 | JR BannerMessaging_Print | Jump to BannerMessaging_Print. | ||||||
| BannerMessaging_Base | 44063 | DEFM "Ecde","f"+128 | Attribute: INK:CYAN, PAPER:BLACK (BRIGHT) + " ". |
|||||
| BannerMessaging_Alien | 44068 | DEFM "Eghi","j"+128 | Attribute: INK:CYAN, PAPER:BLACK (BRIGHT) + " ". |
|||||
|
The actor is not to the left, so flash the second tile (22653) and set the first tile (22651) to a steady colour.
|
||||||||
| Handler_MissileLauncher_FlashBanner | 44073 | CALL FlashAttribute | Call FlashAttribute to fetch the flashing attribute. | |||||
| 44076 | LD HL,22653 | Point HL at the second banner tile (22653). | ||||||
| 44079 | CALL Handler_Colour2x2 | Call Handler_Colour2x2 to colour the tile with A. | ||||||
| 44082 | LD HL,22651 | Point HL at the first banner tile (22651). | ||||||
| 44085 | LD A,66 | Set the steady attribute in A to INK:RED, PAPER:BLACK (BRIGHT). | ||||||
| 44087 | JR Handler_MissileLauncher_Loop | Jump to Handler_MissileLauncher_Loop to colour the tile with A. | ||||||
| Prev: 43945 | Up: Map | Next: 44089 |