;;; General ;;; { Gunship. Brings Samus to Zebes, acts as a save and recharge station, takes Samus from Zebes Enemy ID: $D07F: Gunship top $D0BF: Gunship bottom / entrance pad Bank: $A2 Enemy projectiles: $A379: Gunship liftoff dust clouds ; Gunship top Parameter 0: Unused Parameter 1: Unused Parameter 2: Unused ; Gunship bottom Parameter 0: Unused Parameter 1: Unused Parameter 2: Gunship part { 0: Gunship bottom 1: Entrance pad } Uses palette 7 regardless of enemy set Gunship top must be first enemy in room, followed by gunship bottom, then entrance pad Gunship top must be first enemy in enemy set during escape, due to hardcoding the location of the liftoff dust clouds in VRAM ($A2:ABC7) The initial Y position of gunship top enemy is moved 25px upwards, gunship bottom is moved 15px upwards If landing on Zebes from Ceres or if a demo not in set 0 is playing, gunship top/bottom Y position is set to 17px above Samus Entrance pad Y position is set to gunship top's Y position 1 If a demo in set 0 is playing, Samus' Y position is set to 472h If landing on Zebes: Gunship moves itself and Samus down at a rate of 4.5 px/frame until Y position 300h; then 2.5 px/frame until gunship top Y position is 45Fh Note that Samus' initial position is set by Crateria load station 12h, once the ship lands it will teleport Samus to the enemy's X position (+ 1) Spawns a palette FX object that modifies sprite palette 7 colour Fh Uses load station 0 (hardcoded) for both post-landing save and manual save, Crateria load station 0 has a hardcoded ship icon spawned over the usual save icon in the map (see $82:B6BC) } ;;; Behaviour ;;; { Gunship bottom and entrance pad are primarily driven by the gunship top and only serve to run an instruction list for graphics with no main AI } ;;; WRAM ;;; { ; Gunship top $0FA8: Function timer $0FAC: Hover index. Cycles between 0..3. Indexes $A2:A7CF hover movement table. Initialised to 0. $0FAE: Hover timer. Enemy processes next hover movement when this reaches zero. Initialised to 1. Reset value is 10h. $0FB0: Brakes timer in braking (0..10h). Enemy fixed Y position, initialised to enemy Y position when ejecting Samus, used as reference point for Samus entering/exiting transitions. $0FB2: Function. Initialised to $A80C if landing on Zebes, $AB60 if demo set 0 is playing, $A9BD otherwise. { $A80C: Landing on Zebes - descending $A8D0: Landing on Zebes - apply brakes $A942: Landing on Zebes - wait for gunship entrance to open $A950: Landing on Zebes - eject Samus $A987: Landing on Zebes - wait for gunship entrance to close, then unlock Samus and save $A9BD: Idle - handle letting Samus enter $AA4F: Samus entering - wait for entrance pad to open $AA5D: Samus entering - lower Samus $AA94: Samus entering - wait for entrance pad to close $AAA2: Samus entered - go to liftoff or restore Samus health / ammo $AB1F: Samus entered - handle save confirmation $AB60: Samus exiting - wait for entrance pad to open $AB6E: Samus exiting - raise Samus $ABA5: Samus exiting - wait for entrance pad to close, then unlock Samus $ABC7: Liftoff - load dust cloud tiles $AC1B: Liftoff - fire up engines and spawn dust clouds $ACD7: Liftoff - steady rise $AD0E: Liftoff - accelerating / set game state $AD2D: Liftoff - accelerating } ; Gunship bottom / entrance pad $0FAE: Hover sound effect timer (if gunship bottom) (0..47h) $0FB0: Liftoff timer (if gunship bottom) (0..80h) $0FB2: Initialised to $A7D7 (RTL). Gunship Y velocity * 100h during liftoff (if gunship bottom) } ;;; Enemy population ;;; { ________________________________________ Enemy ID | __________________________________ X position | | _____________________________ Y position | | | _______________________ Initialisation parameter | | | | _________________ Properties. 2000h = process instructions, 400h = intangible | | | | | ____________ Extra properties | | | | | | ______ Parameter 1 | | | | | | | _ Parameter 2 | | | | | | | | ; Room $91F8, state $9213. Landing site - default ; Room $91F8, state $922D. Landing site - event "Zebes is awake" is set ; Room $91F8, state $9247. Landing site - power bombs have been collected D07F, 0480,0478, 0000, 2400,0000, 0000,0000 ; Gunship top D0BF, 0480,0478, 0000, 2400,0000, 0000,0000 ; Gunship bottom / entrance pad D0BF, 0480,0478, 0000, 2400,0000, 0000,0001 ; Gunship bottom / entrance pad ; Room $91F8, state $9261. Landing site - event "Zebes timebomb set" is set D07F, 0480,0478, 0000, 2400,0000, 0000,0000 ; Gunship top D0BF, 0480,0478, 0000, 2400,0000, 0000,0000 ; Gunship bottom / entrance pad D0BF, 0480,0478, 0000, 2400,0000, 0000,0001 ; Gunship bottom / entrance pad } ;;; Enemy header ;;; { __________ Gunship top | ___ Gunship bottom / entrance pad | | 1000 0200 ; 0: Tile data size A59E A59E ; 2: Palette 0014 0014 ; 4: Health 0028 0028 ; 6: Damage 005C 0060 ; 8: Width 0028 0028 ; Ah: Height A2 A2 ; Ch: Bank 00 00 ; Dh: Hurt AI time 0000 0000 ; Eh: Cry 0000 0000 ; 10h: Boss ID A644 A6D2 ; 12h: Initialisation AI 0001 0001 ; 14h: Number of parts A759 804C ; 18h: Main AI 800F 800F ; 1Ah: Grapple AI 804C 804C ; 1Ch: Hurt AI 8041 804C ; 1Eh: Frozen AI 0000 0000 ; 20h: Time is frozen AI 0000 0000 ; 22h: Death animation 804C 804C ; 28h: Power bomb reaction 0000 0000 ; 2Ah: Sidehopper variant index 804C 804C ; 30h: Enemy touch 804C 804C ; 32h: Enemy shot ADB600 ADB600 ; 36h: Tile data 02 02 ; 39h: Layer F3C2 F3C2 ; 3Ah: Drop chances ($B4) EC1C EC1C ; 3Ch: Vulnerabilities ($B4) 0000 0000 ; 3Eh: Enemy name ($B4) } ;;; Enemy vulnerabilities ;;; { ; Default } ;;; Enemy drop chances ;;; { 00 ; Small health 00 ; Big health 00 ; Missiles FF ; 100.0% Nothing 00 ; Super missiles 00 ; Power bombs }