.KS1 LDX XSAV ; Store the current ship's slot number in XSAV JSR KILLSHP ; Call KILLSHP to remove the ship in slot X from our ; local bubble of universe LDX XSAV ; Restore the current ship's slot number from XSAV, ; which now points to the next ship in the bubble JMP MAL1 ; Jump to MAL1 to rejoin the main flight loop at the ; start of the ship analysis loopName: KS1 [Show more] Type: Subroutine Category: Universe Summary: Remove the current ship from our local bubble of universeContext: See this subroutine in context in the source code References: This subroutine is called as follows: * Main flight loop (Part 12 of 16) calls KS1
Part 12 of the main flight loop calls this routine to remove the ship that is currently being analysed by the flight loop. Once the ship is removed, it jumps back to MAL1 to rejoin the main flight loop, with X pointing to the same slot that we just cleared (and which now contains the next ship in the local bubble of universe).
Arguments: XX0 The address of the blueprint for this ship INF The address of the data block for this ship
[X]
Subroutine KILLSHP (category: Universe)
Remove a ship from our local bubble of universe
[X]
Entry point MAL1 in subroutine Main flight loop (Part 4 of 16) (category: Main loop)
Marks the beginning of the ship analysis loop, so we can jump back here from part 12 of the main flight loop to work our way through each ship in the local bubble. We also jump back here when a ship is removed from the bubble, so we can continue processing from the next ship