mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 13:23:45 -07:00
Merge 8d4a23109a
into 1d20000411
This commit is contained in:
commit
0c25c8861d
5 changed files with 25 additions and 12 deletions
|
@ -502,6 +502,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||||
target_compile_options(${PROJECT_NAME} PRIVATE
|
target_compile_options(${PROJECT_NAME} PRIVATE
|
||||||
-Wall -Wextra -Wno-error
|
-Wall -Wextra -Wno-error
|
||||||
|
-Wformat-security
|
||||||
-Wno-return-type
|
-Wno-return-type
|
||||||
-Wno-unused-parameter
|
-Wno-unused-parameter
|
||||||
-Wno-unused-function
|
-Wno-unused-function
|
||||||
|
@ -529,6 +530,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
|
||||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")
|
elseif (CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")
|
||||||
target_compile_options(${PROJECT_NAME} PRIVATE
|
target_compile_options(${PROJECT_NAME} PRIVATE
|
||||||
-Wall -Wextra -Wno-error
|
-Wall -Wextra -Wno-error
|
||||||
|
-Wformat-security
|
||||||
-Wno-return-type
|
-Wno-return-type
|
||||||
-Wno-unused-parameter
|
-Wno-unused-parameter
|
||||||
-Wno-unused-function
|
-Wno-unused-function
|
||||||
|
@ -579,6 +581,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
|
||||||
|
|
||||||
target_compile_options(${PROJECT_NAME} PRIVATE
|
target_compile_options(${PROJECT_NAME} PRIVATE
|
||||||
-Wall -Wextra -Wno-error
|
-Wall -Wextra -Wno-error
|
||||||
|
-Wformat-security
|
||||||
-Wno-unused-parameter
|
-Wno-unused-parameter
|
||||||
-Wno-unused-function
|
-Wno-unused-function
|
||||||
-Wno-unused-variable
|
-Wno-unused-variable
|
||||||
|
|
|
@ -395,7 +395,7 @@ void PresetsCustomWidget(WidgetInfo& info) {
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::AlignTextToFramePadding();
|
ImGui::AlignTextToFramePadding();
|
||||||
ImGui::Text(name.c_str());
|
ImGui::Text("%s", name.c_str());
|
||||||
for (int i = PRESET_SECTION_SETTINGS; i < PRESET_SECTION_MAX; i++) {
|
for (int i = PRESET_SECTION_SETTINGS; i < PRESET_SECTION_MAX; i++) {
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
DrawSectionCheck(name, !info.presetValues["blocks"].contains(blockInfo[i].names[1]), &info.apply[i],
|
DrawSectionCheck(name, !info.presetValues["blocks"].contains(blockInfo[i].names[1]), &info.apply[i],
|
||||||
|
|
|
@ -572,7 +572,9 @@ void DrawFlagTableArray16(const FlagTable& flagTable, uint16_t row, uint16_t& fl
|
||||||
PopStyleCheckbox();
|
PopStyleCheckbox();
|
||||||
if (ImGui::IsItemHovered() && hasDescription) {
|
if (ImGui::IsItemHovered() && hasDescription) {
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
ImGui::Text("%s", UIWidgets::WrappedText(flagTable.flagDescriptions.at(row * 16 + flagIndex), 60).c_str());
|
uint16_t index = row * 16 + flagIndex;
|
||||||
|
const char* desc = flagTable.flagDescriptions.at(index);
|
||||||
|
ImGui::Text("0x%02X: %s", index, UIWidgets::WrappedText(desc, 60).c_str());
|
||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
}
|
}
|
||||||
ImGui::PopID();
|
ImGui::PopID();
|
||||||
|
@ -930,7 +932,15 @@ void DrawFlagsTab() {
|
||||||
for (int j = 0; j < flagTable.size + 1; j++) {
|
for (int j = 0; j < flagTable.size + 1; j++) {
|
||||||
DrawGroupWithBorder(
|
DrawGroupWithBorder(
|
||||||
[&]() {
|
[&]() {
|
||||||
ImGui::Text("%s", fmt::format("{:<2x}", j).c_str());
|
if (j == 0) {
|
||||||
|
for (int k = 0xF; k >= 0; k--) {
|
||||||
|
ImGui::SameLine(37.5 + ((0xF - k) * 33.8));
|
||||||
|
ImGui::Text("%X", k);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::Text("%s", fmt::format("{:<2X}", j).c_str());
|
||||||
|
|
||||||
switch (flagTable.flagTableType) {
|
switch (flagTable.flagTableType) {
|
||||||
case EVENT_CHECK_INF:
|
case EVENT_CHECK_INF:
|
||||||
DrawFlagTableArray16(flagTable, j, gSaveContext.eventChkInf[j]);
|
DrawFlagTableArray16(flagTable, j, gSaveContext.eventChkInf[j]);
|
||||||
|
|
|
@ -647,7 +647,7 @@ void PlandomizerOverlayText(std::pair<Rando::Item, uint32_t> drawObject) {
|
||||||
imageMax.y - ImGui::CalcTextSize(std::to_string(drawObject.second).c_str()).y - 2);
|
imageMax.y - ImGui::CalcTextSize(std::to_string(drawObject.second).c_str()).y - 2);
|
||||||
|
|
||||||
ImGui::SetCursorScreenPos(textPos);
|
ImGui::SetCursorScreenPos(textPos);
|
||||||
ImGui::Text(std::to_string(drawObject.second).c_str());
|
ImGui::Text("%s", std::to_string(drawObject.second).c_str());
|
||||||
|
|
||||||
// Overlay item info
|
// Overlay item info
|
||||||
if (drawObject.first.GetRandomizerGet() >= RG_PROGRESSIVE_HOOKSHOT &&
|
if (drawObject.first.GetRandomizerGet() >= RG_PROGRESSIVE_HOOKSHOT &&
|
||||||
|
@ -665,7 +665,7 @@ void PlandomizerOverlayText(std::pair<Rando::Item, uint32_t> drawObject) {
|
||||||
ImGui::SetCursorScreenPos(textPos);
|
ImGui::SetCursorScreenPos(textPos);
|
||||||
std::string overlayText = "+";
|
std::string overlayText = "+";
|
||||||
overlayText += extractNumberInParentheses(drawObject.first.GetName().english.c_str());
|
overlayText += extractNumberInParentheses(drawObject.first.GetName().english.c_str());
|
||||||
ImGui::Text(overlayText.c_str());
|
ImGui::Text("%s", overlayText.c_str());
|
||||||
}
|
}
|
||||||
if (drawObject.first.GetRandomizerGet() >= RG_FOREST_TEMPLE_BOSS_KEY &&
|
if (drawObject.first.GetRandomizerGet() >= RG_FOREST_TEMPLE_BOSS_KEY &&
|
||||||
drawObject.first.GetRandomizerGet() <= RG_GANONS_CASTLE_BOSS_KEY) {
|
drawObject.first.GetRandomizerGet() <= RG_GANONS_CASTLE_BOSS_KEY) {
|
||||||
|
@ -678,7 +678,7 @@ void PlandomizerOverlayText(std::pair<Rando::Item, uint32_t> drawObject) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::Text(shortName.c_str());
|
ImGui::Text("%s", shortName.c_str());
|
||||||
}
|
}
|
||||||
if (drawObject.first.GetRandomizerGet() >= RG_OCARINA_A_BUTTON &&
|
if (drawObject.first.GetRandomizerGet() >= RG_OCARINA_A_BUTTON &&
|
||||||
drawObject.first.GetRandomizerGet() <= RG_OCARINA_C_RIGHT_BUTTON) {
|
drawObject.first.GetRandomizerGet() <= RG_OCARINA_C_RIGHT_BUTTON) {
|
||||||
|
@ -691,7 +691,7 @@ void PlandomizerOverlayText(std::pair<Rando::Item, uint32_t> drawObject) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::Text(shortName.c_str());
|
ImGui::Text("%s", shortName.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1066,7 +1066,7 @@ void PlandomizerDrawHintsWindow() {
|
||||||
ImGui::SeparatorText(hintData.hintName.c_str());
|
ImGui::SeparatorText(hintData.hintName.c_str());
|
||||||
ImGui::Text("Current Hint: ");
|
ImGui::Text("Current Hint: ");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::TextWrapped(hintData.hintText.c_str());
|
ImGui::TextWrapped("%s", hintData.hintText.c_str());
|
||||||
|
|
||||||
if (spoilerHintData.size() > 0) {
|
if (spoilerHintData.size() > 0) {
|
||||||
hintInputText = plandoHintData[index].hintText.c_str();
|
hintInputText = plandoHintData[index].hintText.c_str();
|
||||||
|
@ -1115,9 +1115,9 @@ void PlandomizerDrawLocationsWindow(RandomizerCheckArea rcArea) {
|
||||||
auto randoArea = Rando::StaticData::GetLocation(checkID)->GetArea();
|
auto randoArea = Rando::StaticData::GetLocation(checkID)->GetArea();
|
||||||
if (rcArea == RCAREA_INVALID || rcArea == randoArea) {
|
if (rcArea == RCAREA_INVALID || rcArea == randoArea) {
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::TextWrapped(spoilerData.checkName.c_str());
|
ImGui::TextWrapped("%s", spoilerData.checkName.c_str());
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::TextWrapped(spoilerData.checkRewardItem.GetName().english.c_str());
|
ImGui::TextWrapped("%s", spoilerData.checkRewardItem.GetName().english.c_str());
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
PlandomizerDrawItemSlots(index);
|
PlandomizerDrawItemSlots(index);
|
||||||
if (plandoLogData[index].checkRewardItem.GetRandomizerGet() == RG_ICE_TRAP) {
|
if (plandoLogData[index].checkRewardItem.GetRandomizerGet() == RG_ICE_TRAP) {
|
||||||
|
|
|
@ -1085,7 +1085,7 @@ void CheckTrackerWindow::DrawElement() {
|
||||||
totalChecksSS << totalChecksAvailable << " Available / ";
|
totalChecksSS << totalChecksAvailable << " Available / ";
|
||||||
}
|
}
|
||||||
totalChecksSS << totalChecksGotten << " Checked / " << totalChecks << " Total";
|
totalChecksSS << totalChecksGotten << " Checked / " << totalChecks << " Total";
|
||||||
ImGui::Text(totalChecksSS.str().c_str());
|
ImGui::Text("%s", totalChecksSS.str().c_str());
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
|
@ -1194,7 +1194,7 @@ void CheckTrackerWindow::DrawElement() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::Text(areaTotalsSS.str().c_str());
|
ImGui::Text("%s", areaTotalsSS.str().c_str());
|
||||||
UIWidgets::Tooltip(areaTotalsTooltipSS.str().c_str());
|
UIWidgets::Tooltip(areaTotalsTooltipSS.str().c_str());
|
||||||
} else {
|
} else {
|
||||||
ImGui::Text("???");
|
ImGui::Text("???");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue