diff --git a/libultraship/libultraship/ImGuiImpl.cpp b/libultraship/libultraship/ImGuiImpl.cpp
index 691302de3..a82826a65 100644
--- a/libultraship/libultraship/ImGuiImpl.cpp
+++ b/libultraship/libultraship/ImGuiImpl.cpp
@@ -897,10 +897,12 @@ namespace SohImGui {
if (ImGui::BeginMenu("Graphics"))
{
+#ifndef __APPLE__
EnhancementSliderFloat("Internal Resolution: %d %%", "##IMul", "gInternalResolution", 0.5f, 2.0f, "", 1.0f, true);
Tooltip("Multiplies your output resolution by the value inputted, as a more intensive but effective form of anti-aliasing");
gfx_current_dimensions.internal_mul = CVar_GetFloat("gInternalResolution", 1);
- EnhancementSliderInt("MSAA: %d", "##IMSAA", "gMSAAValue", 1, 8, "");
+#endif
+ EnhancementSliderInt("MSAA: %d", "##IMSAA", "gMSAAValue", 1, 8, "", 1, true);
Tooltip("Activates multi-sample anti-aliasing when above 1x up to 8x for 8 samples for every pixel");
gfx_msaa_level = CVar_GetS32("gMSAAValue", 1);
diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp
index dd5f9bf95..10ba45ec5 100644
--- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp
+++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp
@@ -2651,7 +2651,11 @@ void gfx_init(struct GfxWindowManagerAPI *wapi, struct GfxRenderingAPI *rapi, co
gfx_wapi->init(game_name, start_in_fullscreen, width, height);
gfx_rapi->init();
gfx_rapi->update_framebuffer_parameters(0, width, height, 1, false, true, true, true);
+#ifdef __APPLE__
+ gfx_current_dimensions.internal_mul = 1;
+#else
gfx_current_dimensions.internal_mul = CVar_GetFloat("gInternalResolution", 1);
+#endif
gfx_msaa_level = CVar_GetS32("gMSAAValue", 1);
gfx_current_dimensions.width = width;
gfx_current_dimensions.height = height;
@@ -2870,4 +2874,4 @@ uint16_t gfx_get_pixel_depth(float x, float y) {
get_pixel_depth_pending.clear();
return get_pixel_depth_cached.find(make_pair(x, y))->second;
-}
\ No newline at end of file
+}
diff --git a/soh/include/z64player.h b/soh/include/z64player.h
index 45b717c14..0425c8eae 100644
--- a/soh/include/z64player.h
+++ b/soh/include/z64player.h
@@ -366,7 +366,20 @@ typedef struct {
/* 0x00 */ s32 active;
/* 0x04 */ Vec3f tip;
/* 0x10 */ Vec3f base;
-} WeaponInfo; // size = 0x1C
+} WeaponInfo; // size = 0x1C\
+
+typedef enum {
+ FLAG_NONE,
+ FLAG_SCENE_SWITCH,
+ FLAG_SCENE_TREASURE,
+ FLAG_SCENE_CLEAR,
+ FLAG_SCENE_COLLECTIBLE,
+} FlagType;
+
+typedef struct {
+ /* 0x00 */ s32 flagID; // which flag to set when Player_SetPendingFlag is called
+ /* 0x04 */ FlagType flagType; // type of flag to set when Player_SetPendingFlag is called
+} PendingFlag; // size = 0x06
#define PLAYER_STATE1_0 (1 << 0)
#define PLAYER_STATE1_1 (1 << 1)
@@ -623,6 +636,7 @@ typedef struct Player {
/* 0x0A87 */ u8 unk_A87;
/* 0x0A88 */ Vec3f unk_A88; // previous body part 0 position
/* 0x0A89 */ bool pendingIceTrap;
-} Player; // size = 0xA94
+ /* 0x0A95 */ PendingFlag pendingFlag;
+} Player; // size = 0xAA1
#endif
diff --git a/soh/soh.vcxproj.filters b/soh/soh.vcxproj.filters
index f0c05dee8..2a29a969d 100644
--- a/soh/soh.vcxproj.filters
+++ b/soh/soh.vcxproj.filters
@@ -82,6 +82,24 @@
{04fc1c52-49ff-48e2-ae23-2c00867374f8}
+
+ {fd63976d-64b1-45ee-b3ab-530c636391c3}
+
+
+ {ff94f63c-a792-49af-869b-42557318a32b}
+
+
+ {1ba82a8d-b7d9-4f79-b80b-389322e189bc}
+
+
+ {9e20d69b-6a26-48ef-9aae-09c149b2c459}
+
+
+ {d7b4c12f-3876-40ec-a8ec-db435513156c}
+
+
+ {38ae4e39-fade-4f81-bfdb-af83bf641df0}
+
@@ -2206,172 +2224,172 @@
Header Files\include
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\hint_list
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\hint_list
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\hint_list
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando\location_access
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer\3drando
- Source Files
+ Source Files\soh\Enhancements\randomizer
- Header Files
+ Header Files\soh\Enhancements\randomizer
Header Files\soh\Enhancements
- Source Files\src
+ Source Files\soh\Enhancements\randomizer
@@ -3945,118 +3963,118 @@
Header Files\include
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer\3drando
- Header Files
+ Header Files\soh\Enhancements\randomizer
Header Files\soh\Enhancements
- Source Files\src
+ Header Files\soh\Enhancements\randomizer
diff --git a/soh/soh/Enhancements/randomizer/3drando/hint_list.cpp b/soh/soh/Enhancements/randomizer/3drando/hint_list.cpp
index 19329675a..11fd2b441 100644
--- a/soh/soh/Enhancements/randomizer/3drando/hint_list.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/hint_list.cpp
@@ -2102,7 +2102,7 @@ void HintTable_Init() {
hintTable[GANON_LINE07] = HintText::GanonLine({
//obscure text
- Text{"What about Zelda makes you think she'd be a better ruler than I?^I saved Lon Lon Ranch,&fed the hungry,&and my castle floats.",
+ Text{"What about Zelda makes you think&she'd be a better ruler than I?^I saved Lon Lon Ranch,&fed the hungry,&and my castle floats.",
/*french*/"Zelda ne sera jamais un meilleur monarque que moi!^J'ai un château volant, mes sujets sont des belles amazones... et mes Moblins sont clairement plus puissants que jamais!",
/*spanish*/"¿Qué te hace pensar que Zelda gobierna mejor que yo?^Yo he salvado el Rancho Lon Lon,&he alimentado a los hambrientos&y hasta hago que mi castillo flote."},
});
diff --git a/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp b/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
index 210ed6031..1ecd4230c 100644
--- a/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
@@ -579,7 +579,7 @@ std::string AutoFormatHintTextString(std::string unformattedHintTextString) {
bool needsAutomaicNewlines = true;
if (textStr == "Erreur 0x69a504:&Traduction manquante^C'est de la faute à Purple Hato!&J'vous jure!" ||
textStr == "Mon très cher @:&Viens vite au château, je t'ai préparé&un délicieux gâteau...^À bientôt, Princesse Zelda" ||
- textStr == "What about Zelda makes you think she'd be a better ruler than I?^I saved Lon Lon Ranch,&fed the hungry,&and my castle floats." ||
+ textStr == "What about Zelda makes you think&she'd be a better ruler than I?^I saved Lon Lon Ranch,&fed the hungry,&and my castle floats." ||
textStr == "Many tricks are up my sleeve,&to save yourself&you'd better leave!" ||
textStr == "I've learned this spell,&it's really neat,&I'll keep it later&for your treat!" ||
textStr == "Sale petit garnement,&tu fais erreur!&C'est maintenant que marque&ta dernière heure!" ||
diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp
index f611909b1..d1d9ebb73 100644
--- a/soh/soh/OTRGlobals.cpp
+++ b/soh/soh/OTRGlobals.cpp
@@ -1514,3 +1514,7 @@ extern "C" s32 Randomizer_GetRandomizedItemId(GetItemID ogId, s16 actorId, s16 a
extern "C" s32 Randomizer_GetItemIdFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId) {
return OTRGlobals::Instance->gRandomizer->GetRandomizedItemIdFromKnownCheck(randomizerCheck, ogId);
}
+
+extern "C" bool Randomizer_ItemIsIceTrap(RandomizerCheck randomizerCheck, GetItemID ogId) {
+ return gSaveContext.n64ddFlag && Randomizer_GetItemIdFromKnownCheck(randomizerCheck, ogId) == GI_ICE_TRAP;
+}
diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h
index d03c913e1..d838b94df 100644
--- a/soh/soh/OTRGlobals.h
+++ b/soh/soh/OTRGlobals.h
@@ -100,6 +100,7 @@ s16 Randomizer_GetItemModelFromId(s16 itemId);
s32 Randomizer_GetItemIDFromGetItemID(s32 getItemId);
s32 Randomizer_GetRandomizedItemId(GetItemID ogId, s16 actorId, s16 actorParams, s16 sceneNum);
s32 Randomizer_GetItemIdFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId);
+bool Randomizer_ItemIsIceTrap(RandomizerCheck randomizerCheck, GetItemID ogId);
#endif
#endif
diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c
index 763ed1ee8..d5bcb5beb 100644
--- a/soh/src/code/z_play.c
+++ b/soh/src/code/z_play.c
@@ -238,10 +238,11 @@ void GivePlayerRandoRewardZeldaLightArrowsGift(GlobalContext* globalCtx, Randomi
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) && LINK_IS_ADULT &&
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TOKINOMA) &&
!Flags_GetTreasure(globalCtx, 0x1E) && player != NULL && !Player_InBlockingCsMode(globalCtx, player) &&
- globalCtx->sceneLoadFlag == 0 && player->getItemId == GI_NONE) {
+ globalCtx->sceneLoadFlag == 0) {
GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, GI_ARROW_LIGHT);
GiveItemWithoutActor(globalCtx, getItemId);
- Flags_SetTreasure(globalCtx, 0x1E);
+ player->pendingFlag.flagID = 0x1E;
+ player->pendingFlag.flagType = FLAG_SCENE_TREASURE;
}
}
@@ -1409,7 +1410,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
OVERLAY_DISP = sp70;
globalCtx->unk_121C7 = 2;
SREG(33) |= 1;
- } else {
+ } else if (R_PAUSE_MENU_MODE != 3) {
Gameplay_Draw_DrawOverlayElements:
if ((HREG(80) != 10) || (HREG(89) != 0)) {
Gameplay_DrawOverlayElements(globalCtx);
diff --git a/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c b/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c
index 859afb406..2d42c191e 100644
--- a/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c
+++ b/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c
@@ -1059,7 +1059,7 @@ void EnSkj_SetupPostSariasSong(EnSkj* this) {
}
void EnSkj_ChangeModeAfterSong(EnSkj* this, GlobalContext* globalCtx) {
- if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
+ if (((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) || Randomizer_ItemIsIceTrap(RC_LW_SKULL_KID, GI_HEART_PIECE)) {
gSaveContext.itemGetInf[1] |= 0x40;
EnSkj_SetNaviId(this);
EnSkj_SetupWaitInRange(this);
diff --git a/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c
index 88ce05819..d9f96e177 100644
--- a/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c
+++ b/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c
@@ -288,14 +288,16 @@ void func_80B3CA38(EnXc* this, GlobalContext* globalCtx) {
}
void GivePlayerRandoRewardSheikSong(EnXc* sheik, GlobalContext* globalCtx, RandomizerCheck check, int sheikType, GetItemID ogSongId) {
- if (sheik->actor.parent != NULL && sheik->actor.parent->id == GET_PLAYER(globalCtx)->actor.id &&
+ Player* player = GET_PLAYER(globalCtx);
+ if (sheik->actor.parent != NULL && sheik->actor.parent->id == player->actor.id &&
!(gSaveContext.eventChkInf[5] & sheikType)) {
gSaveContext.eventChkInf[5] |= sheikType;
} else if (!(gSaveContext.eventChkInf[5] & sheikType)) {
GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, ogSongId);
if (check == RC_SHEIK_AT_TEMPLE && !Flags_GetTreasure(globalCtx, 0x1F)) {
if (func_8002F434(&sheik->actor, globalCtx, getItemId, 10000.0f, 100.0f)) {
- Flags_SetTreasure(globalCtx, 0x1F);
+ player->pendingFlag.flagID = 0x1F;
+ player->pendingFlag.flagType = FLAG_SCENE_TREASURE;
}
} else if (check != RC_SHEIK_AT_TEMPLE) {
func_8002F434(&sheik->actor, globalCtx, getItemId, 10000.0f, 100.0f);
diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c
index eed877c7f..34a94c67b 100644
--- a/soh/src/overlays/actors/ovl_player_actor/z_player.c
+++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c
@@ -159,6 +159,7 @@ void func_8083CA20(GlobalContext* globalCtx, Player* this);
void func_8083CA54(GlobalContext* globalCtx, Player* this);
void func_8083CA9C(GlobalContext* globalCtx, Player* this);
s32 func_8083E0FC(Player* this, GlobalContext* globalCtx);
+void Player_SetPendingFlag(Player* this, GlobalContext* globalCtx);
s32 func_8083E5A8(Player* this, GlobalContext* globalCtx);
s32 func_8083EB44(Player* this, GlobalContext* globalCtx);
s32 func_8083F7BC(Player* this, GlobalContext* globalCtx);
@@ -6228,6 +6229,30 @@ void func_8083E4C4(GlobalContext* globalCtx, Player* this, GetItemEntry* giEntry
func_80078884((this->getItemId < 0) ? NA_SE_SY_GET_BOXITEM : NA_SE_SY_GET_ITEM);
}
+// Sets a flag according to which type of flag is specified in player->pendingFlag.flagType
+// and which flag is specified in player->pendingFlag.flagID.
+void Player_SetPendingFlag(Player* this, GlobalContext* globalCtx) {
+ switch (this->pendingFlag.flagType) {
+ case FLAG_SCENE_CLEAR:
+ Flags_SetClear(globalCtx, this->pendingFlag.flagID);
+ break;
+ case FLAG_SCENE_COLLECTIBLE:
+ Flags_SetCollectible(globalCtx, this->pendingFlag.flagID);
+ break;
+ case FLAG_SCENE_SWITCH:
+ Flags_SetSwitch(globalCtx, this->pendingFlag.flagID);
+ break;
+ case FLAG_SCENE_TREASURE:
+ Flags_SetTreasure(globalCtx, this->pendingFlag.flagID);
+ break;
+ case FLAG_NONE:
+ default:
+ break;
+ }
+ this->pendingFlag.flagType = FLAG_NONE;
+ this->pendingFlag.flagID = 0;
+}
+
s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
Actor* interactedActor;
@@ -6251,6 +6276,7 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
this->stateFlags1 &= ~(PLAYER_STATE1_10 | PLAYER_STATE1_11);
this->actor.colChkInfo.damage = 0;
func_80837C0C(globalCtx, this, 3, 0.0f, 0.0f, 0, 20);
+ Player_SetPendingFlag(this, globalCtx);
return;
}
@@ -12687,6 +12713,8 @@ s32 func_8084DFF4(GlobalContext* globalCtx, Player* this) {
Message_StartTextbox(globalCtx, giEntry->textId, &this->actor);
Item_Give(globalCtx, giEntry->itemId);
+
+ Player_SetPendingFlag(this, globalCtx);
// In rando the fanfares are handled by a function in code_800EC960.c
if (gSaveContext.n64ddFlag) {