Skip to navigation


Main loop: MainLoop (Part 3 of 15)

Name: MainLoop (Part 3 of 15) [Show more] Type: Subroutine Category: Main loop Summary: Make the sound of firing, if appropriate Deep dive: Program flow of the main game loop
Context: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
LDA firingStatus \ If firingStatus is zero then there are no bullets in BEQ main5 \ the air, so jump to main5 to skip updating the bullet \ positions JSR UpdateBullets \ Update the bullet positions LDA gunSoundCounter \ If gunSoundCounter = 0 then we don't have any gun BEQ main5 \ firing sounds to make, so jump to main5 to skip the \ gun sounds code DEC gunSoundCounter \ Decrement the sound counter in gunSoundCounter LDA #6 \ Make sound #6, the sound of our guns firing JSR MakeSound