mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 17:32:19 -05:00
Make it build.
This commit is contained in:
parent
69eebf0984
commit
f354460d04
@ -193,7 +193,7 @@ void RandomizerOnFlagSetHandler(int16_t flagType, int16_t flag) {
|
||||
auto loc = Rando::Context::GetInstance()->GetItemLocation(rc);
|
||||
if (loc == nullptr || loc->HasObtained()) return;
|
||||
|
||||
SPDLOG_INFO("Queuing RC: {}", rc);
|
||||
SPDLOG_INFO("Queuing RC: {}", static_cast<uint32_t>(rc));
|
||||
randomizerQueuedChecks.push(rc);
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ void RandomizerOnSceneFlagSetHandler(int16_t sceneNum, int16_t flagType, int16_t
|
||||
auto loc = Rando::Context::GetInstance()->GetItemLocation(rc);
|
||||
if (loc == nullptr || loc->HasObtained()) return;
|
||||
|
||||
SPDLOG_INFO("Queuing RC: {}", rc);
|
||||
SPDLOG_INFO("Queuing RC: {}", static_cast<uint32_t>(rc));
|
||||
randomizerQueuedChecks.push(rc);
|
||||
}
|
||||
|
||||
@ -235,11 +235,11 @@ void RandomizerOnPlayerUpdateForRCQueueHandler() {
|
||||
GetItemEntry getItemEntry = Rando::Context::GetInstance()->GetFinalGIEntry(rc, true, (GetItemID)Rando::StaticData::GetLocation(rc)->GetVanillaItem());
|
||||
|
||||
if (loc->HasObtained()) {
|
||||
SPDLOG_INFO("RC {} already obtained, skipping", rc);
|
||||
SPDLOG_INFO("RC {} already obtained, skipping", static_cast<uint32_t>(rc));
|
||||
} else {
|
||||
randomizerQueuedCheck = rc;
|
||||
randomizerQueuedItemEntry = getItemEntry;
|
||||
SPDLOG_INFO("Queueing Item mod {} item {} from RC {}", getItemEntry.modIndex, getItemEntry.itemId, rc);
|
||||
SPDLOG_INFO("Queueing Item mod {} item {} from RC {}", getItemEntry.modIndex, getItemEntry.itemId, static_cast<uint32_t>(rc));
|
||||
if (
|
||||
// Skipping ItemGet animation incompatible with checks that require closing a text box to finish
|
||||
rc != RC_HF_OCARINA_OF_TIME_ITEM &&
|
||||
@ -276,7 +276,7 @@ void RandomizerOnPlayerUpdateForItemQueueHandler() {
|
||||
return;
|
||||
}
|
||||
|
||||
SPDLOG_INFO("Attempting to give Item mod {} item {} from RC {}", randomizerQueuedItemEntry.modIndex, randomizerQueuedItemEntry.itemId, randomizerQueuedCheck);
|
||||
SPDLOG_INFO("Attempting to give Item mod {} item {} from RC {}", randomizerQueuedItemEntry.modIndex, randomizerQueuedItemEntry.itemId, static_cast<uint32_t>(randomizerQueuedCheck));
|
||||
GiveItemEntryWithoutActor(gPlayState, randomizerQueuedItemEntry);
|
||||
if (player->stateFlags1 & PLAYER_STATE1_IN_WATER) {
|
||||
// Allow the player to receive the item while swimming
|
||||
@ -290,7 +290,7 @@ void RandomizerOnItemReceiveHandler(GetItemEntry receivedItemEntry) {
|
||||
|
||||
auto loc = Rando::Context::GetInstance()->GetItemLocation(randomizerQueuedCheck);
|
||||
if (randomizerQueuedItemEntry.modIndex == receivedItemEntry.modIndex && randomizerQueuedItemEntry.itemId == receivedItemEntry.itemId) {
|
||||
SPDLOG_INFO("Item received mod {} item {} from RC {}", receivedItemEntry.modIndex, receivedItemEntry.itemId, randomizerQueuedCheck);
|
||||
SPDLOG_INFO("Item received mod {} item {} from RC {}", receivedItemEntry.modIndex, receivedItemEntry.itemId, static_cast<uint32_t>(randomizerQueuedCheck));
|
||||
loc->MarkAsObtained();
|
||||
randomizerQueuedCheck = RC_UNKNOWN_CHECK;
|
||||
randomizerQueuedItemEntry = GET_ITEM_NONE;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "option.h"
|
||||
#include "libultraship/bridge.h"
|
||||
#include <Context.h>
|
||||
#include <ImGui/imgui.h>
|
||||
#include <imgui.h>
|
||||
#include "soh/UIWidgets.hpp"
|
||||
|
||||
namespace Rando {
|
||||
@ -198,7 +198,7 @@ bool Option::RenderCheckbox() const {
|
||||
if (CustomCheckbox(name.c_str(), &val, disabled, disabledGraphic)) {
|
||||
CVarSetInteger(cvarName.c_str(), val);
|
||||
changed = true;
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
if (!description.empty()) {
|
||||
UIWidgets::InsertHelpHoverText(description.c_str());
|
||||
@ -220,7 +220,7 @@ bool Option::RenderCombobox() const {
|
||||
selected--;
|
||||
CVarSetInteger(cvarName.c_str(), selected);
|
||||
changed = true;
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
if (!description.empty()) {
|
||||
UIWidgets::InsertHelpHoverText(description.c_str());
|
||||
@ -233,7 +233,7 @@ bool Option::RenderCombobox() const {
|
||||
CVarSetInteger(cvarName.c_str(), static_cast<int>(i));
|
||||
changed = true;
|
||||
selected = i;
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -296,7 +296,7 @@ bool Option::RenderSlider() const {
|
||||
}
|
||||
if (changed) {
|
||||
CVarSetInteger(cvarName.c_str(), val);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
@ -2321,11 +2321,11 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
enabledTrickString += ",";
|
||||
}
|
||||
if (enabledTrickString == "") {
|
||||
CVarClear(CVarClear(CVAR_RANDOMIZER_SETTING("EnabledTricks"));
|
||||
CVarClear(CVAR_RANDOMIZER_SETTING("EnabledTricks"));
|
||||
} else {
|
||||
CVarSetString(CVarSetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), enabledTrickString.c_str());
|
||||
CVarSetString(CVAR_RANDOMIZER_SETTING("EnabledTricks"), enabledTrickString.c_str());
|
||||
}
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
Rando::Tricks::DrawTagChips(option.GetTags());
|
||||
ImGui::SameLine();
|
||||
|
@ -144,8 +144,8 @@ RandomizerCheckArea currentArea = RCAREA_INVALID;
|
||||
OSContPad* trackerButtonsPressed;
|
||||
std::unordered_map<RandomizerCheck, std::string> checkNameOverrides;
|
||||
|
||||
bool passesTextFilter(ImGuiTextFilter& checkSearch, const RandomizerCheckObject rcObject);
|
||||
bool shouldHideArea(ImGuiTextFilter& checkSearch, std::map<RandomizerCheckArea, std::vector<RandomizerCheckObject>> checksByArea, const RandomizerCheckArea rcArea);
|
||||
bool passesTextFilter(ImGuiTextFilter& checkSearch, const RandomizerCheck check);
|
||||
bool shouldHideArea(ImGuiTextFilter& checkSearch, std::map<RandomizerCheckArea, std::vector<RandomizerCheck>> checksByArea, const RandomizerCheckArea rcArea);
|
||||
void BeginFloatWindows(std::string UniqueName, bool& open, ImGuiWindowFlags flags = 0);
|
||||
bool CompareChecks(RandomizerCheck, RandomizerCheck);
|
||||
bool CheckByArea(RandomizerCheckArea);
|
||||
@ -1056,7 +1056,7 @@ void CheckTrackerWindow::DrawElement() {
|
||||
doAreaScroll = false;
|
||||
}
|
||||
for (auto rc : checks) {
|
||||
if (doDraw && isThisAreaSpoiled && IsVisibleInCheckTracker(rc) && passesTextFilter(checkSearch, rcObject)) {
|
||||
if (doDraw && isThisAreaSpoiled && IsVisibleInCheckTracker(rc) && passesTextFilter(checkSearch, rc)) {
|
||||
DrawLocation(rc);
|
||||
}
|
||||
}
|
||||
@ -1076,7 +1076,7 @@ void CheckTrackerWindow::DrawElement() {
|
||||
}
|
||||
}
|
||||
|
||||
bool shouldHideArea(ImGuiTextFilter& checkSearch, std::map<RandomizerCheckArea, std::vector<RandomizerCheckObject>> checksByArea, RandomizerCheckArea rcArea) {
|
||||
bool shouldHideArea(ImGuiTextFilter& checkSearch, std::map<RandomizerCheckArea, std::vector<RandomizerCheck>> checksByArea, RandomizerCheckArea rcArea) {
|
||||
bool shouldHideFilteredAreas = CVarGetInteger(CVAR_TRACKER_CHECK("HideFilteredAreas"), 1);
|
||||
if (!shouldHideFilteredAreas) {
|
||||
return false;
|
||||
@ -1091,10 +1091,10 @@ bool shouldHideArea(ImGuiTextFilter& checkSearch, std::map<RandomizerCheckArea,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool passesTextFilter(ImGuiTextFilter& checkSearch, RandomizerCheckObject check) {
|
||||
bool passesTextFilter(ImGuiTextFilter& checkSearch, RandomizerCheck check) {
|
||||
return (
|
||||
checkSearch.PassFilter(RandomizerCheckObjects::GetRCAreaName(check.rcArea).c_str()) ||
|
||||
checkSearch.PassFilter(check.rcShortName.c_str())
|
||||
checkSearch.PassFilter(RandomizerCheckObjects::GetRCAreaName(Rando::StaticData::GetLocation(check)->GetArea()).c_str()) ||
|
||||
checkSearch.PassFilter(Rando::StaticData::GetLocation(check)->GetShortName().c_str())
|
||||
);
|
||||
}
|
||||
|
||||
@ -1425,7 +1425,7 @@ void DrawLocation(RandomizerCheck rc) {
|
||||
mainColor =
|
||||
!IsHeartPiece((GetItemID)Rando::StaticData::RetrieveItem(loc->GetVanillaItem()).GetItemID()) && !IS_RANDO
|
||||
? CVarGetColor(CVAR_TRACKER_CHECK("Skipped.ExtraColor"), Color_Skipped_Extra_Default)
|
||||
: CVarGetColor(CVAR_TRACKER_CHECK("Skipped.MainColor", Color_Main_Default);
|
||||
: CVarGetColor(CVAR_TRACKER_CHECK("Skipped.MainColor"), Color_Main_Default);
|
||||
extraColor = CVarGetColor(CVAR_TRACKER_CHECK("Skipped.ExtraColor"), Color_Skipped_Extra_Default);
|
||||
} else if (status == RCSHOW_SEEN || status == RCSHOW_IDENTIFIED) {
|
||||
if (!showHidden && CVarGetInteger(CVAR_TRACKER_CHECK("Seen.Hide"), 0)) {
|
||||
|
@ -5178,6 +5178,8 @@ void Interface_Draw(PlayState* play) {
|
||||
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
|
||||
|
||||
if (fullUi) {
|
||||
s16 PosX_RC;
|
||||
s16 PosY_RC;
|
||||
//when not having a wallet in rando, don't calculate the ruppe icon
|
||||
if (!IS_RANDO || Flags_GetRandomizerInf(RAND_INF_HAS_WALLET)) {
|
||||
// Rupee Icon
|
||||
@ -5218,6 +5220,7 @@ void Interface_Draw(PlayState* play) {
|
||||
} else {
|
||||
rColor = rupeeWalletColors[0];
|
||||
}
|
||||
}
|
||||
|
||||
//Rupee icon & counter
|
||||
s16 X_Margins_RC;
|
||||
@ -5231,8 +5234,6 @@ void Interface_Draw(PlayState* play) {
|
||||
}
|
||||
s16 PosX_RC_ori = OTRGetRectDimensionFromLeftEdge(26+X_Margins_RC);
|
||||
s16 PosY_RC_ori = 206+Y_Margins_RC;
|
||||
s16 PosX_RC;
|
||||
s16 PosY_RC;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Rupees.PosType"), 0) != 0) {
|
||||
PosY_RC = CVarGetInteger(CVAR_COSMETIC("HUD.Rupees.PosY"), 0)+Y_Margins_RC;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.Rupees.PosType"), 0) == 1) {//Anchor Left
|
||||
|
@ -69,7 +69,7 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play2) {
|
||||
Actor_SetScale(&this->actor, 0.013f);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
if(CVarGetInteger(CVAR_ENHANCEMENT("CustomizeBombchuBowling"), 0) && CVarGetInteger(i == 0 ? CVAR_ENHANCEMENT("BombchuBowlingNoSmallCucco"), : CVAR_ENHANCEMENT("BombchuBowlingNoBigCucco"), 0)) {
|
||||
if(CVarGetInteger(CVAR_ENHANCEMENT("CustomizeBombchuBowling"), 0) && CVarGetInteger(i == 0 ? CVAR_ENHANCEMENT("BombchuBowlingNoSmallCucco") : CVAR_ENHANCEMENT("BombchuBowlingNoBigCucco"), 0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ void EnSyatekiItm_Idle(EnSyatekiItm* this, PlayState* play) {
|
||||
0;
|
||||
s32 ammunition = 15;
|
||||
if(CVarGetInteger(CVAR_ENHANCEMENT("CustomizeShootingGallery"), 0)) {
|
||||
ammunition = CVarGetInteger(LINK_IS_ADULT ? CVAR_ENHANCEMENT("ShootingGalleryAmmoAdult"), : CVAR_ENHANCEMENT("ShootingGalleryAmmoChild"), 15);
|
||||
ammunition = CVarGetInteger(LINK_IS_ADULT ? CVAR_ENHANCEMENT("ShootingGalleryAmmoAdult") : CVAR_ENHANCEMENT("ShootingGalleryAmmoChild"), 15);
|
||||
}
|
||||
func_8008EF44(play, ammunition);
|
||||
this->roundNum = this->hitCount = 0;
|
||||
|
@ -395,7 +395,7 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, PlayState* play) {
|
||||
this->timer = 20;
|
||||
s32 ammunition = 15;
|
||||
if(CVarGetInteger(CVAR_ENHANCEMENT("CustomizeShootingGallery"), 0)) {
|
||||
ammunition = CVarGetInteger(LINK_IS_ADULT ? CVAR_ENHANCEMENT("ShootingGalleryAmmoAdult"), : CVAR_ENHANCEMENT("ShootingGalleryAmmoChild"), 15);
|
||||
ammunition = CVarGetInteger(LINK_IS_ADULT ? CVAR_ENHANCEMENT("ShootingGalleryAmmoAdult") : CVAR_ENHANCEMENT("ShootingGalleryAmmoChild"), 15);
|
||||
}
|
||||
func_8008EF44(play, ammunition);
|
||||
this->actionFunc = EnSyatekiMan_RestartGame;
|
||||
|
Loading…
Reference in New Issue
Block a user