Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EU option #77

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/hint_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ void HintTable_Init() {
/*---------------------
| JUNK HINT TEXT |
---------------------*/
hintTable[JUNK01] = HintText::Junk({Text{"<Junk hint here>", "", ""}});
hintTable[JUNK01] = HintText::Junk({Text{"That's no moon.", "", ""}});
hintTable[JUNK02] = HintText::Junk({Text{"The moon is haunted.", "", ""}});
hintTable[JUNK03] = HintText::Junk({Text{"Majora has sick dance moves.", "", ""}});
hintTable[JUNK04] = HintText::Junk({Text{"Making hints is hard.", "", ""}});
Expand Down Expand Up @@ -892,7 +892,7 @@ void HintTable_Init() {
hintTable[JUNK71] = HintText::Junk({Text{"These hints can be quite useful. This is an exception.", "", ""}});
hintTable[JUNK72] = HintText::Junk({Text{"Turns are more effective when you tilt the whole console.", "", ""}});
hintTable[JUNK73] = HintText::Junk({Text{"You ever been in a cockpit before?", "", ""}});
hintTable[JUNK74] = HintText::Junk({Text{"Smash 10 pots in 12 seconds.", "", ""}});
hintTable[JUNK74] = HintText::Junk({Text{"It's a secret to everybody", "", ""}});
hintTable[JUNK75] = HintText::Junk({Text{"You found me!", "", ""}});
hintTable[JUNK76] = HintText::Junk({Text{"I have it on my post-it note somewhere.", "", ""}});
hintTable[JUNK77] = HintText::Junk({Text{"Follow the rainbow.", "", ""}});
Expand Down
2 changes: 0 additions & 2 deletions source/include/menu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ void PrintOptionSubMenu();
void PrintSubMenu();
void PrintPresetsMenu();
void PrintResetToDefaultsMenu();
void PrintGenerateMenu();
void ClearDescription();
void PrintOptionDescription();
void PrintVersionDescription();
void GenerateRandomizer();
std::string GetInput(const char* hintText);

Expand Down
5 changes: 4 additions & 1 deletion source/include/setting_descriptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,7 @@ extern string_view compassShowWotHDesc;
extern string_view skipHMSCutsceneDesc;
extern string_view skipDarmaniCutsceneDesc;
extern string_view skipMikauCutsceneDesc;
extern string_view skipBombersMinigameDesc;
extern string_view skipBombersMinigameDesc;
extern string_view NARegionDesc;
extern string_view EURegionDesc;
extern string_view VersionDesc;
7 changes: 5 additions & 2 deletions source/include/settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ namespace Settings {
extern Option ChestSize;
extern Option ChangeOverworldItems;
extern Option IngameSpoilers;
extern Option RegionSelect;
extern Option MenuOpeningButton;
extern Option RsDurability;
extern Option SkipBombersMinigame;
Expand Down Expand Up @@ -529,8 +530,10 @@ namespace Settings {
extern u32 LinksPocketRewardBitMask;
extern std::array<u32, 9> rDungeonRewardOverrides;

extern u8 PlayOption;
extern u8 Version;
extern Option PlayOption;
extern Option Version;
extern std::vector<Option*> gameOptions;
extern Menu gameSettings;

}

Expand Down
89 changes: 6 additions & 83 deletions source/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ using namespace Settings;

namespace {
bool seedChanged;
bool choosePlayOption;
u16 pastSeedLength;
u16 settingBound = 0;
PrintConsole topScreen, bottomScreen;
Expand Down Expand Up @@ -48,7 +47,6 @@ void MenuInit() {
Settings::InitSettings();

seedChanged = false;
choosePlayOption = false;
pastSeedLength = Settings::seed.length();

settingBound = 0;
Expand Down Expand Up @@ -164,7 +162,7 @@ void MenuUpdate(u32 kDown) {
}
}
//If they pressed B on any menu other than main, go backwards to the previous menu
else if (kDown & KEY_B && currentMenu->mode != MAIN_MENU && !choosePlayOption) {
else if (kDown & KEY_B && currentMenu->mode != MAIN_MENU) {

//Want to reset generate menu when leaving
if (currentMenu->mode == POST_GENERATE) {
Expand Down Expand Up @@ -226,9 +224,6 @@ void MenuUpdate(u32 kDown) {
PrintResetToDefaultsMenu();
} else if (currentMenu->mode == GENERATE_MODE) {
UpdateGenerateMenu(kDown);
if (currentMenu->mode != POST_GENERATE) {
PrintGenerateMenu();
}
} else if (currentMenu->mode == SUB_MENU) {
PrintSubMenu();
}
Expand Down Expand Up @@ -322,34 +317,12 @@ void UpdateResetToDefaultsMenu(u32 kDown) {
}
u16 menuIdx2;
void UpdateGenerateMenu(u32 kDown) {
if (!choosePlayOption) {
if ((kDown & KEY_A) != 0) {
Settings::PlayOption = currentMenu->menuIdx;
consoleSelect(&bottomScreen);
consoleClear();
choosePlayOption = true;
menuIdx2 = currentMenu->menuIdx;
currentMenu->menuIdx = 0;
}
}
else {
if ((kDown & KEY_B) !=0) {
consoleSelect(&bottomScreen);
consoleClear();
choosePlayOption = false;
currentMenu->menuIdx = menuIdx2;
}
else if ((kDown & KEY_A) !=0) {
Settings::Version = currentMenu->menuIdx;
consoleSelect(&bottomScreen);
consoleClear();
//consoleSelect(&bottomScreen);
//consoleClear();
GenerateRandomizer();
//This is just a dummy mode to stop the prompt from appearing again
currentMenu->mode = POST_GENERATE;
choosePlayOption = false;
}
}
}
}

void PrintMainMenu() {
printf("\x1b[0;%dHMain Settings", 1+(BOTTOM_WIDTH-13)/2);
Expand Down Expand Up @@ -488,47 +461,6 @@ void PrintResetToDefaultsMenu() {
printf("\x1b[12;4HPress B to return to the preset menu.");
}

void PrintGenerateMenu() {

consoleSelect(&bottomScreen);

if (!choosePlayOption) {
printf("\x1b[3;%dHHow will you play?", 1+(BOTTOM_WIDTH-18)/2);
std::vector<std::string> playOptions = {"3ds Console", "Citra Emulator"};

for (u8 i = 0; i < playOptions.size(); i++) {

std::string option = playOptions[i];
u8 row = 6 + (i * 2);
//make the current selection green
if (currentMenu->menuIdx == i) {
printf("\x1b[%d;%dH%s>", row, 14, GREEN);
printf("\x1b[%d;%dH%s%s", row, 15, option.c_str(), RESET);
} else {
printf("\x1b[%d;%dH%s", row, 15, option.c_str());
}
}
}
else {
printf("\x1b[3;%dHSelect your game version", 1 + (BOTTOM_WIDTH -18) / 2);
std::vector<std::string> versionOptions = {"1.0", "1.1"};

for (u8 j=0; j < versionOptions.size(); j++) {
std::string option = versionOptions[j];
u8 row = 6 + (j * 2);
//make the current selection green
if (currentMenu->menuIdx == j) {
printf("\x1b[%d;%dH%s>", row, 14, GREEN);
printf("\x1b[%d;%dH%s%s", row, 15, option.c_str(), RESET);
} else {
printf("\x1b[%d;%dH%s", row, 15, option.c_str());
}
}
ClearDescription();
PrintVersionDescription();

}
}

void ClearDescription() {
consoleSelect(&topScreen);
Expand All @@ -546,15 +478,6 @@ void PrintOptionDescription() {
printf("\x1b[22;0H%s", description.data());
}

void PrintVersionDescription() {
ClearDescription(); //"Description must fit in this space ---------------//"
std::string_view description = "Due to patch size when using version 1.1 it can \n"
"take up to 30 seconds to launch the game, this is\n"
"expected and will not effect gameplay";

printf("\x1b[22;0H%s", description.data());
}

void GenerateRandomizer() {

consoleSelect(&topScreen);
Expand Down Expand Up @@ -590,11 +513,11 @@ void GenerateRandomizer() {
printf("\x1b[13;10HWriting Patch...");
if (WriteAllPatches()) {
printf("Done");
if (Settings::PlayOption == PATCH_CONSOLE) {
if (Settings::PlayOption.Value<u8>() == PATCH_CONSOLE) {
printf("\x1b[15;10HQuit out using the home menu. Then\n");
printf("\x1b[16;10Henable game patching and launch MM3D!\n");
}
else if (Settings::PlayOption == PATCH_CITRA) {
else if (Settings::PlayOption.Value<u8>() == PATCH_CITRA) {
printf("\x1b[15;10HCopy code.ips, exheader.bin and romfs to\n");
printf("\x1b[16;10Hthe MM3D mods folder, then launch MM3D!\n");
}
Expand Down
Loading
Loading