Skip to content

Commit

Permalink
Beta Sold-Out Model setting
Browse files Browse the repository at this point in the history
  • Loading branch information
HylianFreddy committed Dec 9, 2023
1 parent 3438023 commit 709e962
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/descriptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,13 @@ string_view mirrorWorldEntranceDesc = "Different entrances to the same region
string_view mirrorWorldRandomDesc = "Whether the world is mirrored may change after\n" //
"every loading zone inconsistently."; //
/*------------------------------ //
| SOLD OUT COSMETIC SHOP MODEL | //
------------------------------*/ //
string_view betaSoldOutDesc = "The game contains an unused model for sold out\n" //
"items in shops. It's a remade version of the N64\n"
"model, spelling \"Sold Out\" in English.\n\n" //
"This setting enables its use in shops."; //
/*------------------------------ //
| SHUFFLE MUSIC | //
------------------------------*/ //
string_view musicRandoDesc = "Randomize the music in the game."; //
Expand Down
2 changes: 2 additions & 0 deletions source/descriptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,8 @@ extern string_view mirrorWorldSceneDesc;
extern string_view mirrorWorldEntranceDesc;
extern string_view mirrorWorldRandomDesc;

extern string_view betaSoldOutDesc;

extern string_view musicRandoDesc;
extern string_view shuffleBGMDesc;
extern string_view shuffleMelodiesDesc;
Expand Down
15 changes: 15 additions & 0 deletions source/patch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,21 @@ bool WriteAllPatches() {
return false;
}

/*---------------------------------
| Sold Out Cosmetic Shop Model |
---------------------------------*/

const u32 SHOPITEMENTRY_SOLDOUT_CMBINDEX_ADDR = 0x525672;
char soldOutCMBIndex = 0;

patchOffset = V_TO_P(SHOPITEMENTRY_SOLDOUT_CMBINDEX_ADDR);
patchSize = 1;

if (Settings::BetaSoldOut &&
!WritePatch(patchOffset, patchSize, &soldOutCMBIndex, code, bytesWritten, totalRW, buf)) {
return false;
}

/*-------------------------
| EOF |
--------------------------*/
Expand Down
2 changes: 2 additions & 0 deletions source/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,7 @@ std::string finalChuTrailOuterColor = BombchuTrailOuterColor.GetSelectedOption
Option ColoredKeys = Option::Bool("Colored Small Keys", {"Off", "On"}, {coloredKeysDesc}, OptionCategory::Cosmetic);
Option ColoredBossKeys = Option::Bool("Colored Boss Keys", {"Off", "On"}, {coloredBossKeysDesc}, OptionCategory::Cosmetic);
Option MirrorWorld = Option::U8 ("Mirror World", {"Off", "On", "Scene", "Entrance", "Random"}, {mirrorWorldOffDesc, mirrorWorldOnDesc, mirrorWorldSceneDesc, mirrorWorldEntranceDesc, mirrorWorldRandomDesc}, OptionCategory::Cosmetic);
Option BetaSoldOut = Option::Bool("Beta Sold-Out Model",{"Off", "On"}, {betaSoldOutDesc}, OptionCategory::Cosmetic);

std::vector<Option *> cosmeticOptions = {
&CustomTunicColors,
Expand Down Expand Up @@ -1247,6 +1248,7 @@ std::vector<Option *> cosmeticOptions = {
&ColoredKeys,
&ColoredBossKeys,
&MirrorWorld,
&BetaSoldOut,
};

static std::vector<std::string> musicOptions = {"Off", "On (Mixed)", "On (Grouped)", "On (Own)"};
Expand Down
1 change: 1 addition & 0 deletions source/settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,7 @@ extern std::string finalChuTrailOuterColor;
extern Option ColoredKeys;
extern Option ColoredBossKeys;
extern Option MirrorWorld;
extern Option BetaSoldOut;

extern Option ShuffleMusic;
extern Option ShuffleBGM;
Expand Down

0 comments on commit 709e962

Please sign in to comment.