From bcc10e2d4e43ab1d527f6f9c7bde96834a2bf94d Mon Sep 17 00:00:00 2001 From: Jeremy Rand Date: Sun, 14 Feb 2021 14:59:44 -0500 Subject: [PATCH] Bump the version 0.9.7. Add some code to preload the sounds after initial launch so starting the first game doesn't take extra long. --- BuGS/game.s | 7 +++++++ BuGS/main.c | 14 ++++++++++++++ BuGS/main.rez | 4 ++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/BuGS/game.s b/BuGS/game.s index b7a0b56..7c21daa 100644 --- a/BuGS/game.s +++ b/BuGS/game.s @@ -86,6 +86,12 @@ gameLoop anop jsl updateSegments jsl updateSounds + lda shouldPreloadSound + bne gameLoop_skipPreload + jsl preloadSound + lda #1 + sta shouldPreloadSound +gameLoop_skipPreload anop jsl checkKeyboard jsl waitForVbl @@ -1031,5 +1037,6 @@ vblLoop anop shouldQuit dc i2'1' borderColour dc i2'0' frameCount dc i2'0' +shouldPreloadSound dc i2'0' end diff --git a/BuGS/main.c b/BuGS/main.c index ff183a6..cd15994 100644 --- a/BuGS/main.c +++ b/BuGS/main.c @@ -174,6 +174,20 @@ void loadScorpionSound(word addr) } +void preloadSound(void) +{ + LoadResource(rRawSound, SPIDER_SOUND); + LoadResource(rRawSound, DEATH_SOUND); + LoadResource(rRawSound, SEGMENTS_SOUND); + LoadResource(rRawSound, BONUS_SOUND); + LoadResource(rRawSound, KILL_SOUND); + LoadResource(rRawSound, FIRE_SOUND); + LoadResource(rRawSound, EXTRA_LIFE_SOUND); + LoadResource(rRawSound, FLEA_SOUND); + LoadResource(rRawSound, SCORPION_SOUND); +} + + void allocateFilenameHandle(void) { if (filenameHandle == NULL) diff --git a/BuGS/main.rez b/BuGS/main.rez index 3be5f92..d66a95a 100644 --- a/BuGS/main.rez +++ b/BuGS/main.rez @@ -40,7 +40,7 @@ resource rPString (DOWNLOAD_URL_STR, $0000) { resource rPString (ARCHIVE_STR, $0000) { - "BuGS096.bxy" + "BuGS097.shk" }; @@ -63,7 +63,7 @@ resource rVersion (1) { { 0, /* Major version number in BCD */ 9, /* Minor version number in BCD */ - 6, /* Bug version number in BCD */ + 7, /* Bug version number in BCD */ beta, /* Development phase */ 0 /* Release number */ },