diff --git a/assets/stages/Level1/Definition/Level1HouseStageDefinition.c b/assets/stages/Level1/Definition/Level1HouseStageDefinition.c index 6908d0852..680a70a38 100644 --- a/assets/stages/Level1/Definition/Level1HouseStageDefinition.c +++ b/assets/stages/Level1/Definition/Level1HouseStageDefinition.c @@ -73,7 +73,7 @@ PositionedEntityROMDef LEVEL1_HOUSE_STAGE_ST_ENTITIES[] = {&CLOUDS_IM, {(194), (138), (LAYER_4), 0}, 0, NULL, NULL, NULL, false}, // Clouds {&LEVEL_1_HOUSE_LIGHT_IM, {(196), (140), (LAYER_0_ITEMS - 1), 0}, 0, NULL, NULL, NULL, false}, // Light {&COIN_AG, {(204), (146), LAYER_0_ITEMS, LAYER_0_ITEMS_DISPLACEMENT}, 26, NULL, NULL, NULL, false}, // Coin - {&FIRE_SMALL_AG, {(240), (155), (24), 0}, 0, NULL, NULL, NULL, false}, // Fire + {&FIRE_SMALL_AG, {(240), (155), (32), 0}, 0, NULL, NULL, NULL, false}, // Fire {&COLLISION_TOP_CL, {(240), (152), (0), 0}, 0, NULL, NULL, (void*)&level1_house_stage_collision_24_24_8, false}, // Fireplace Collision {&MOUND_BG_BACK_IM, {(255), (104), (LAYER_5), 0}, 0, NULL, NULL, NULL, false}, // Mountains {&COLLISION_CL, {(264), (128), (0), 0}, 0, NULL, NULL, (void*)&level1_house_stage_collision_16_96_8, false}, // Right Collision @@ -257,9 +257,9 @@ StageROMDef LEVEL1_HOUSE_STAGE_ST = // __spt1 0, // __spt2 - 0, + 16, // __spt3 - 0, + 1, }, // optical configuration values diff --git a/lib/release/release.bat.dist b/lib/release/release.bat.dist index 3a417ea9b..602e125b4 100644 --- a/lib/release/release.bat.dist +++ b/lib/release/release.bat.dist @@ -13,7 +13,7 @@ SET LDT=%LDT:~0,4%-%LDT:~4,2%-%LDT:~6,2% ECHO STARTING RELEASE PROCESS... ECHO. -FOR %%M IN (debug, beta, tools) DO ( +FOR %%M IN (release, tools, debug) DO ( ::OUTPUT MODE ECHO Mode: %%M diff --git a/source/states/OptionsScreenState/OptionsScreenState.c b/source/states/OptionsScreenState/OptionsScreenState.c index 3c8b4a922..ce831dcd5 100644 --- a/source/states/OptionsScreenState/OptionsScreenState.c +++ b/source/states/OptionsScreenState/OptionsScreenState.c @@ -36,6 +36,7 @@ #include #include #include +#include #include "OptionsScreenState.h" @@ -44,6 +45,8 @@ //--------------------------------------------------------------------------------------------------------- extern StageROMDef EMPTY_STAGE_ST; +extern const u16 SPLASH_SCREENS_OPTION_SELECT_SND[]; +extern const u16 SPLASH_SCREENS_OPTION_CONFIRM_SND[]; //--------------------------------------------------------------------------------------------------------- @@ -184,6 +187,8 @@ void OptionsScreenState::processUserInput(UserInput userInput) (void (*)(Object, Object))OptionsScreenState::onOptionSelectedFadeOutComplete, // callback function Object::safeCast(this) // callback scope ); + + OptionsScreenState::playConfirmSound(this); } else if((userInput.pressedKey & K_B) || (userInput.pressedKey & K_SEL)) { @@ -204,13 +209,27 @@ void OptionsScreenState::processUserInput(UserInput userInput) else if((userInput.pressedKey & K_LU) || (userInput.pressedKey & K_RU)) { OptionsSelector::selectPrevious(this->optionsSelector); + OptionsScreenState::playMenuSound(this); } else if((userInput.pressedKey & K_LD) || (userInput.pressedKey & K_RD)) { OptionsSelector::selectNext(this->optionsSelector); + OptionsScreenState::playMenuSound(this); } } +void OptionsScreenState::playMenuSound() +{ + Vector3D position = {192, 112, 0}; + SoundManager::playFxSound(SoundManager::getInstance(), SPLASH_SCREENS_OPTION_SELECT_SND, position); +} + +void OptionsScreenState::playConfirmSound() +{ + Vector3D position = {192, 112, 0}; + SoundManager::playFxSound(SoundManager::getInstance(), SPLASH_SCREENS_OPTION_CONFIRM_SND, position); +} + // handle event void OptionsScreenState::onFadeInComplete(Object eventFirer __attribute__ ((unused))) { diff --git a/source/states/OverworldState/OverworldState.c b/source/states/OverworldState/OverworldState.c index fe410a68b..5c92d1ed2 100644 --- a/source/states/OverworldState/OverworldState.c +++ b/source/states/OverworldState/OverworldState.c @@ -42,6 +42,7 @@ #include #include #include +#include //--------------------------------------------------------------------------------------------------------- @@ -49,6 +50,7 @@ //--------------------------------------------------------------------------------------------------------- extern StageROMDef OVERWORLD1_STAGE_ST; +extern const u16 SPLASH_SCREENS_OPTION_CONFIRM_SND[]; //--------------------------------------------------------------------------------------------------------- @@ -199,7 +201,14 @@ void OverworldState::processUserInput(UserInput userInput) Object::safeCast(this) // callback scope ); - } else if(K_B & userInput.pressedKey) { // disable user input + // play sound + Vector3D position = {192, 112, 0}; + SoundManager::playFxSound(SoundManager::getInstance(), SPLASH_SCREENS_OPTION_CONFIRM_SND, position); + + } + else if(K_B & userInput.pressedKey) + { + // disable user input Game::disableKeypad(Game::getInstance()); // start a fade out effect diff --git a/source/states/PauseScreenState/PauseScreenState.c b/source/states/PauseScreenState/PauseScreenState.c index cab623d1c..0c94047ad 100644 --- a/source/states/PauseScreenState/PauseScreenState.c +++ b/source/states/PauseScreenState/PauseScreenState.c @@ -38,6 +38,7 @@ #include #include #include +#include #include @@ -46,6 +47,8 @@ //--------------------------------------------------------------------------------------------------------- extern StageROMDef PAUSE_SCREEN_STAGE_ST; +extern const u16 SPLASH_SCREENS_OPTION_SELECT_SND[]; +extern const u16 SPLASH_SCREENS_OPTION_CONFIRM_SND[]; //--------------------------------------------------------------------------------------------------------- @@ -179,6 +182,9 @@ void PauseScreenState::processUserInput(UserInput userInput) Object::safeCast(this) // callback scope ); + // play sound + PauseScreenState::playConfirmSound(this); + break; case kPauseScreenOptionQuitLevel: @@ -203,6 +209,10 @@ void PauseScreenState::processUserInput(UserInput userInput) // set mode accordingly this->mode = kPauseScreenModeShowConfirmQuit; + + // play sound + PauseScreenState::playConfirmSound(this); + break; } } @@ -222,6 +232,9 @@ void PauseScreenState::processUserInput(UserInput userInput) (void (*)(Object, Object))PauseScreenState::onFadeOutComplete, // callback function Object::safeCast(this) // callback scope ); + + // play sound + PauseScreenState::playConfirmSound(this); } } else if((this->mode == kPauseScreenModeShowConfirmQuit) && (userInput.pressedKey & K_B)) @@ -236,13 +249,26 @@ void PauseScreenState::processUserInput(UserInput userInput) else if((this->mode == kPauseScreenModeShowOptions) && ((userInput.pressedKey & K_LU) || (userInput.pressedKey & K_RU))) { OptionsSelector::selectPrevious(this->optionsSelector); + PauseScreenState::playMenuSound(this); } else if((this->mode == kPauseScreenModeShowOptions) && ((userInput.pressedKey & K_LD) || (userInput.pressedKey & K_RD))) { OptionsSelector::selectNext(this->optionsSelector); + PauseScreenState::playMenuSound(this); } } +void PauseScreenState::playMenuSound() +{ + Vector3D position = {192, 112, 0}; + SoundManager::playFxSound(SoundManager::getInstance(), SPLASH_SCREENS_OPTION_SELECT_SND, position); +} +void PauseScreenState::playConfirmSound() +{ + Vector3D position = {192, 112, 0}; + SoundManager::playFxSound(SoundManager::getInstance(), SPLASH_SCREENS_OPTION_CONFIRM_SND, position); +} + // handle event void PauseScreenState::onFadeInComplete(Object eventFirer __attribute__ ((unused))) { diff --git a/source/states/TitleScreenState/TitleScreenState.c b/source/states/TitleScreenState/TitleScreenState.c index d2224a536..3aa7a1245 100644 --- a/source/states/TitleScreenState/TitleScreenState.c +++ b/source/states/TitleScreenState/TitleScreenState.c @@ -42,6 +42,7 @@ #include #include #include +#include //--------------------------------------------------------------------------------------------------------- @@ -49,6 +50,8 @@ //--------------------------------------------------------------------------------------------------------- extern StageROMDef TITLE_SCREEN_STAGE_ST; +extern const u16 SPLASH_SCREENS_OPTION_SELECT_SND[]; +extern const u16 SPLASH_SCREENS_OPTION_CONFIRM_SND[]; //--------------------------------------------------------------------------------------------------------- @@ -308,6 +311,9 @@ void TitleScreenState::processUserInput(UserInput userInput) Object::safeCast(this) // callback scope ); + // play sound + TitleScreenState::playConfirmSound(this); + break; case kTitleScreenOptionNewGame: @@ -385,10 +391,12 @@ void TitleScreenState::processUserInput(UserInput userInput) else if((this->mode == kTitleScreenModeShowOptions) && ((userInput.pressedKey & K_LL) || (userInput.pressedKey & K_RL))) { OptionsSelector::selectPrevious(this->optionsSelector); + TitleScreenState::playMenuSound(this); } else if((this->mode == kTitleScreenModeShowOptions) && ((userInput.pressedKey & K_LR) || (userInput.pressedKey & K_RR))) { OptionsSelector::selectNext(this->optionsSelector); + TitleScreenState::playMenuSound(this); } else if((this->mode == kTitleScreenModeShowConfirmNewGame) && (userInput.pressedKey & K_B)) { @@ -408,6 +416,18 @@ void TitleScreenState::processUserInput(UserInput userInput) } } +void TitleScreenState::playMenuSound() +{ + Vector3D position = {192, 112, 0}; + SoundManager::playFxSound(SoundManager::getInstance(), SPLASH_SCREENS_OPTION_SELECT_SND, position); +} + +void TitleScreenState::playConfirmSound() +{ + Vector3D position = {192, 112, 0}; + SoundManager::playFxSound(SoundManager::getInstance(), SPLASH_SCREENS_OPTION_CONFIRM_SND, position); +} + // handle event void TitleScreenState::onSecondChange(Object eventFirer __attribute__ ((unused))) {