Skip to navigation


Main loop: Main game loop (Part 2 of 6)

[Elite-A, Parasite]

Name: Main game loop (Part 2 of 6) [Show more] Type: Subroutine Category: Main loop Summary: Update the main loop counters Deep dive: Program flow of the main game loop Ship data blocks Fixing ship positions
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * Main game loop (Part 6 of 6) calls via TT100 * me2 calls via me3

This section covers the following: * Update the main loop counters
Other entry points: TT100 The entry point for the start of the main game loop, which calls the main flight loop and the moves into the spawning routine me3 Used by me2 to jump back into the main game loop after printing an in-flight message
.TT100 DEC DLY \ Decrement the delay counter in DLY, so any in-flight \ messages get removed once the counter reaches zero BEQ me2 \ If DLY is now 0, jump to me2 to remove any in-flight \ message from the space view, and once done, return to \ me3 below, skipping the following two instructions BPL me3 \ If DLY is positive, jump to me3 to skip the next \ instruction INC DLY \ If we get here, DLY is negative, so we have gone too \ and need to increment DLY back to 0 .me3 DEC MCNT \ Decrement the main loop counter in MCNT