Merge pull request #2207 from HarbourMasters/develop-bradley

bradley -> dev
This commit is contained in:
briaguya 2022-12-19 05:31:43 -05:00 committed by GitHub
commit a95b1067b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 47 additions and 41 deletions

View File

@ -49,8 +49,8 @@ endif()
# Global configuration types # Global configuration types
################################################################################ ################################################################################
if (CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch") if (CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")
set(CMAKE_C_FLAGS_DEBUG "-O3 -ffast-math") set(CMAKE_C_FLAGS_DEBUG "-g -ffast-math -DDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-O3 -ffast-math") set(CMAKE_CXX_FLAGS_DEBUG "-g -ffast-math -DDEBUG")
set(CMAKE_C_FLAGS_RELEASE "-O3 -ffast-math -DNDEBUG") set(CMAKE_C_FLAGS_RELEASE "-O3 -ffast-math -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -ffast-math -DNDEBUG") set(CMAKE_CXX_FLAGS_RELEASE "-O3 -ffast-math -DNDEBUG")
else() else()

View File

@ -1,7 +1,7 @@
<Root> <Root>
<File Name="object_d_hsblock" Segment="6"> <File Name="object_d_hsblock" Segment="6">
<Collision Name="gHookshotPostCol" Offset="0x578"/> <Collision Name="gHookshotTargetCol" Offset="0x578"/>
<Collision Name="gHookshotTargetCol" Offset="0x730"/> <Collision Name="gHookshotPostCol" Offset="0x730"/>
<DList Name="gHookshotPostDL" Offset="0x210"/> <DList Name="gHookshotPostDL" Offset="0x210"/>
<DList Name="gHookshotTargetDL" Offset="0x470"/> <DList Name="gHookshotTargetDL" Offset="0x470"/>
<Texture Name="gHookshotTargetTex" OutName="hookshot_target" Format="i4" Width="64" Height="64" Offset="0x760"/> <Texture Name="gHookshotTargetTex" OutName="hookshot_target" Format="i4" Width="64" Height="64" Offset="0x760"/>

View File

@ -21,7 +21,7 @@
<Array Name="ovl_Boss_Ganon2_Vtx_00CC98" Count="4" Offset="0x00C958"> <Array Name="ovl_Boss_Ganon2_Vtx_00CC98" Count="4" Offset="0x00C958">
<Vtx/> <Vtx/>
</Array> </Array>
<DList Name="ovl_Boss_Ganon2_DL_00CCD8" Offset="0x00CA98"/> <DList Name="ovl_Boss_Ganon2_DL_00CCD8" Offset="0x00C998"/>
<Texture Name="ovl_Boss_Ganon2_Tex_00CD58" OutName="tex_0000CD58" Format="i4" Width="32" Height="160" Offset="0x00CA18"/> <Texture Name="ovl_Boss_Ganon2_Tex_00CD58" OutName="tex_0000CD58" Format="i4" Width="32" Height="160" Offset="0x00CA18"/>
<Array Name="ovl_Boss_Ganon2_Vtx_00D758" Count="4" Offset="0x00D418"> <Array Name="ovl_Boss_Ganon2_Vtx_00D758" Count="4" Offset="0x00D418">
<Vtx/> <Vtx/>

View File

@ -909,6 +909,9 @@ void VanillaFill() {
CreateItemOverrides(); CreateItemOverrides();
CreateEntranceOverrides(); CreateEntranceOverrides();
CreateAlwaysIncludedMessages(); CreateAlwaysIncludedMessages();
if (ShuffleWarpSongs) {
CreateWarpSongTexts();
}
} }
void ClearProgress() { void ClearProgress() {
@ -1071,6 +1074,9 @@ int Fill() {
if (ShuffleMerchants.Is(SHUFFLEMERCHANTS_HINTS)) { if (ShuffleMerchants.Is(SHUFFLEMERCHANTS_HINTS)) {
CreateMerchantsHints(); CreateMerchantsHints();
} }
if (ShuffleWarpSongs) {
CreateWarpSongTexts();
}
return 1; return 1;
} }
//Unsuccessful placement //Unsuccessful placement

View File

@ -779,7 +779,6 @@ void CreateAllHints() {
CreateGanonText(); CreateGanonText();
CreateAltarText(); CreateAltarText();
CreateWarpSongTexts();
SPDLOG_DEBUG("\nNOW CREATING HINTS\n"); SPDLOG_DEBUG("\nNOW CREATING HINTS\n");
const HintSetting& hintSetting = hintSettingTable[Settings::HintDistribution.Value<uint8_t>()]; const HintSetting& hintSetting = hintSettingTable[Settings::HintDistribution.Value<uint8_t>()];

View File

@ -220,6 +220,7 @@ extern std::array<ConditionalAlwaysHint, 9> conditionalAlwaysHints;
extern uint32_t GetHintRegionHintKey(const uint32_t area); extern uint32_t GetHintRegionHintKey(const uint32_t area);
extern void CreateAllHints(); extern void CreateAllHints();
extern void CreateMerchantsHints(); extern void CreateMerchantsHints();
extern void CreateWarpSongTexts();
Text& GetChildAltarText(); Text& GetChildAltarText();
Text& GetAdultAltarText(); Text& GetAdultAltarText();

View File

@ -342,20 +342,20 @@ void Randomizer::LoadHintLocations(const char* spoilerFileName) {
CustomMessageManager::Instance->CreateMessage(Randomizer::hintMessageTableID, TEXT_WARP_RANDOM_REPLACED_TEXT, CustomMessageManager::Instance->CreateMessage(Randomizer::hintMessageTableID, TEXT_WARP_RANDOM_REPLACED_TEXT,
{ TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM,
"Warp to&{{location}}?\x1B&%gOK&No%w\x02", "Warp to&{{location}}?\x1B&%gOK&No%w\x02",
"Warp to&{{location}}?\x1B&%gOK&No%w\x02", // TODO: German translation "Zu {{location}}?\x1B&%gOK&No%w\x02",
"Se téléporter vers&{{location}}?\x1B&%gOK!&Non%w\x02" }); "Se téléporter vers&{{location}}?\x1B&%gOK!&Non%w\x02" });
CustomMessageManager::Instance->CreateMessage(Randomizer::hintMessageTableID, TEXT_LAKE_HYLIA_WATER_SWITCH_SIGN, CustomMessageManager::Instance->CreateMessage(Randomizer::hintMessageTableID, TEXT_LAKE_HYLIA_WATER_SWITCH_SIGN,
{ TEXTBOX_TYPE_WOODEN, TEXTBOX_POS_BOTTOM, { TEXTBOX_TYPE_WOODEN, TEXTBOX_POS_BOTTOM,
"Water level control system.&Keep away!", "Water level control system.&Keep away!",
"Wasserstand Kontrollsystem&Finger weg!", "Wasserstand Kontrollsystem&Finger weg!",
"Contrôle du niveau de l'eau.&Ne pas toucher!" "Système de contrôle du niveau&d'eau.&Ne pas toucher!"
}); });
CustomMessageManager::Instance->CreateMessage(Randomizer::hintMessageTableID, TEXT_LAKE_HYLIA_WATER_SWITCH_NAVI, CustomMessageManager::Instance->CreateMessage(Randomizer::hintMessageTableID, TEXT_LAKE_HYLIA_WATER_SWITCH_NAVI,
{ TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM, { TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM,
"This switch is rustier than you think.^Something must be wrong with the&pipe system in the Water Temple.", "%cThis switch is rustier than you think.^%cSomething must be wrong with the&pipe system in the %bWater Temple%c.",
"Dieser Schalter scheint rostiger zu&sein als er aussieht.^Etwas muss mit dem Leitungssystem&im Wassertempel nicht stimmen.", "%cDieser Schalter scheint rostiger zu&sein als er aussieht.^%cEtwas muss mit dem Leitungssystem&im %bWassertempel%c nicht stimmen.",
"Cet interrupteur est très rouillé.^Quelque chose ne va pas avec&la tuyauterie du Temple de l'Eau." "%cCet interrupteur est très rouillé.^%cIl doit y avoir un problème avec&la tuyauterie du %bTemple de l'Eau%c."
}); });
} }
@ -471,9 +471,9 @@ void Randomizer::LoadMerchantMessages(const char* spoilerFileName) {
{ {
TEXTBOX_TYPE_BLACK, TEXTBOX_TYPE_BLACK,
TEXTBOX_POS_TOP, TEXTBOX_POS_TOP,
"Finally! Now I can go back to being &an %rarms dealer!%w", "Finally! Now I can go back to being &an %rarms dealer%w!",
"Endlich! Schon bald kann ich wieder &%rKrabbelminen-Händler%w sein!", "Endlich! Schon bald kann ich wieder &%rKrabbelminen-Händler%w sein!",
"Squalala! Je vais enfin pouvoir &%rprendre des vacances!%w" "Squalala! Je vais enfin pouvoir &%rprendre des vacances%w!"
} }
); );
@ -4203,7 +4203,7 @@ CustomMessageEntry Randomizer::GetWarpSongMessage(u16 textId, bool mysterious) {
if (mysterious) { if (mysterious) {
std::vector<std::string> locationName ={ std::vector<std::string> locationName ={
"a mysterious place", "a mysterious place",
"a mysterious place", // TODO: German translation "ein mysteriöser Ort",
"un endroit mystérieux", "un endroit mystérieux",
}; };

View File

@ -297,19 +297,17 @@ void Draw_SfxTab(const std::string& tabId, const std::map<u16, std::tuple<std::s
ImGui::SameLine(); ImGui::SameLine();
ImGui::PushItemWidth(-FLT_MIN); ImGui::PushItemWidth(-FLT_MIN);
if (ImGui::Button(randomizeButton.c_str())) { if (ImGui::Button(randomizeButton.c_str())) {
bool valid = false; while (true) {
uint32_t value; auto it = map.begin();
while (!valid) { std::advance(it, rand() % map.size());
value = Random(2, map.size()); const auto& [value, seqData] = *it;
if (map.contains(value)) { const auto& [name, sfxKey, seqType] = seqData;
auto [name, sfxKey, seqType] = map.at(value);
if (seqType & type) { if (seqType & type) {
valid = true;
}
}
}
CVar_SetS32(cvarKey.c_str(), value); CVar_SetS32(cvarKey.c_str(), value);
SohImGui::RequestCvarSaveOnNextTick(); SohImGui::RequestCvarSaveOnNextTick();
break;
}
}
} }
} }
ImGui::EndTable(); ImGui::EndTable();
@ -355,7 +353,7 @@ void DrawSfxEditor(bool& open) {
CVar_SetS32("gSfxEditor", 0); CVar_SetS32("gSfxEditor", 0);
return; return;
} }
ImGui::SetNextWindowSize(ImVec2(465, 630), ImGuiCond_FirstUseEver); ImGui::SetNextWindowSize(ImVec2(900, 630), ImGuiCond_FirstUseEver);
if (!ImGui::Begin("SFX Editor", &open)) { if (!ImGui::Begin("SFX Editor", &open)) {
ImGui::End(); ImGui::End();
return; return;

View File

@ -95,7 +95,7 @@ extern "C" void OTRMessage_Init()
{ {
TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM, TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM,
"You got a %rGold Skulltula Token%w!&You've collected %r{{gsCount}}%w tokens&in total!\x0E\x3C", "You got a %rGold Skulltula Token%w!&You've collected %r{{gsCount}}%w tokens&in total!\x0E\x3C",
"Du erhälst ein %rGoldene&Skulltula-Symbol%w! Du hast&insgesamt %r{{gsCount}}%w symbol gesammelt!\x0E\x3C", "Ein %rGoldenes Skulltula-Symbol%w!&Du hast nun insgesamt %r{{gsCount}}%w Golende&Skulltula-Symbole gesammelt!\x0E\x3C",
"Vous obtenez un %rSymbole de&Skulltula d'or%w! Vous avez&collecté %r{{gsCount}}%w symboles en tout!\x0E\x3C" "Vous obtenez un %rSymbole de&Skulltula d'or%w! Vous avez&collecté %r{{gsCount}}%w symboles en tout!\x0E\x3C"
} }
); );
@ -104,7 +104,7 @@ extern "C" void OTRMessage_Init()
{ {
TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM, TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM,
"You got a %rGold Skulltula Token%w!&You've collected %r{{gsCount}}%w tokens&in total!", "You got a %rGold Skulltula Token%w!&You've collected %r{{gsCount}}%w tokens&in total!",
"Du erhälst ein %rGoldene&Skulltula-Symbol%w! Du hast&insgesamt %r{{gsCount}}%w symbol gesammelt!", "Ein %rGoldenes Skulltula-Symbol%w!&Du hast nun insgesamt %r{{gsCount}}%w Golende&Skulltula-Symbole gesammelt!",
"Vous obtenez un %rSymbole de&Skulltula d'or%w! Vous avez&collecté %r{{gsCount}}%w symboles en tout!" "Vous obtenez un %rSymbole de&Skulltula d'or%w! Vous avez&collecté %r{{gsCount}}%w symboles en tout!"
} }
); );
@ -131,7 +131,7 @@ extern "C" void OTRMessage_Init()
{ {
TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM, TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM,
"You got a %rHeart Container%w!&You've collected %r{{heartContainerCount}}%w containers&in total!", "You got a %rHeart Container%w!&You've collected %r{{heartContainerCount}}%w containers&in total!",
"Du erhältst ein %rHerzgefäß%w! Du&hast insgesamt %r{{heartContainerCount}}%w Gefäße&gesammelt!", "Ein %rHerzcontainer%w!&Du hast nun insgesamt %r{{heartContainerCount}}%w&Herzcontainer gesammelt!",
"Vous obtenez un %rCoeur&d'Energie%w! Vous en avez&collecté %r{{heartContainerCount}}%w en tout!" "Vous obtenez un %rCoeur&d'Energie%w! Vous en avez&collecté %r{{heartContainerCount}}%w en tout!"
} }
); );
@ -140,7 +140,7 @@ extern "C" void OTRMessage_Init()
{ {
TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM, TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM,
"You got a %rHeart Piece%w!&You've collected %r{{heartPieceCount}}%w pieces&in total!", "You got a %rHeart Piece%w!&You've collected %r{{heartPieceCount}}%w pieces&in total!",
"Du erhältst ein %rHerzteil%w! Du hast&insgesamt %r{{heartPieceCount}}%w Teile&gesammelt!", "Ein %rHerzteil%w!&Du hast nun insgesamt %r{{heartPieceCount}}%w&Herteile gesammelt!",
"Vous obtenez un %rQuart de&Coeur%w! Vous en avez collecté&%r{{heartPieceCount}}%w en tout!" "Vous obtenez un %rQuart de&Coeur%w! Vous en avez collecté&%r{{heartPieceCount}}%w en tout!"
} }
); );
@ -149,8 +149,8 @@ extern "C" void OTRMessage_Init()
{ {
TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM, TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM,
"You look bored. Wanna go out for a&walk?\x1B&%gYes&No%w", "You look bored. Wanna go out for a&walk?\x1B&%gYes&No%w",
"Du siehst gelangweilt aus.&Willst du einen Spaziergang machen?\x1B&%gJa&Nein%w", //TODO: AI translated, replace with actual translation "Du siehst gelangweilt aus.&Willst du einen Spaziergang machen?\x1B&%gJa&Nein%w",
"Tu as l'air de t'ennuyer. Tu veux&aller faire une promenade?\x1B&%gOui&Non%w", //TODO: AI translated, replace with actual translation "Tu as l'air de t'ennuyer. Tu veux&aller faire un tour?\x1B&%gOui&Non%w",
} }
); );
} }

View File

@ -93,13 +93,13 @@ void EnGm_Destroy(Actor* thisx, PlayState* play) {
s32 func_80A3D7C8(void) { s32 func_80A3D7C8(void) {
if (LINK_AGE_IN_YEARS == YEARS_CHILD) { if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
return 0; return 0;
} else if (!(gBitFlags[2] & gSaveContext.inventory.equipment)) {
return 1;
} else if (gBitFlags[3] & gSaveContext.inventory.equipment) {
return 2;
} else if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF) && } else if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF) &&
(gBitFlags[2] & gSaveContext.inventory.equipment)) { !Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
return 1; return 1;
} else if (!(gBitFlags[2] & gSaveContext.inventory.equipment)) { // Don't have giant's knife
return 1;
} else if (gBitFlags[3] & gSaveContext.inventory.equipment) { // Have broken giant's knife
return 2;
} else { } else {
return 3; return 3;
} }
@ -256,7 +256,6 @@ void EnGm_ProcessChoiceIndex(EnGm* this, PlayState* play) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE); GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
gSaveContext.pendingSale = itemEntry.itemId; gSaveContext.pendingSale = itemEntry.itemId;
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f); GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
gSaveContext.infTable[11] |= 2; gSaveContext.infTable[11] |= 2;
this->actionFunc = func_80A3DF00; this->actionFunc = func_80A3DF00;
} else { } else {
@ -276,6 +275,11 @@ void EnGm_ProcessChoiceIndex(EnGm* this, PlayState* play) {
void func_80A3DF00(EnGm* this, PlayState* play) { void func_80A3DF00(EnGm* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) { if (Actor_HasParent(&this->actor, play)) {
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
}
this->actor.parent = NULL; this->actor.parent = NULL;
this->actionFunc = func_80A3DF60; this->actionFunc = func_80A3DF60;
} else { } else {
@ -284,14 +288,12 @@ void func_80A3DF00(EnGm* this, PlayState* play) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE); GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
gSaveContext.pendingSale = itemEntry.itemId; gSaveContext.pendingSale = itemEntry.itemId;
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f); GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
gSaveContext.infTable[11] |= 2; gSaveContext.infTable[11] |= 2;
} }
else { else {
gSaveContext.pendingSale = ItemTable_Retrieve(GI_SWORD_KNIFE).itemId; gSaveContext.pendingSale = ItemTable_Retrieve(GI_SWORD_KNIFE).itemId;
func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f); func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f);
} }
} }
} }