mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-29 17:32:47 -04:00
Merge branch 'HarbourMasters:develop' into openclose_disp_macro
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#endif
|
||||
|
||||
#include "debugconsole.h"
|
||||
#include "../libultraship/SohImGuiImpl.h"
|
||||
#include "../libultraship/ImGuiImpl.h"
|
||||
#include "savestates.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "actorViewer.h"
|
||||
#include "../../util.h"
|
||||
#include "../libultraship/SohImGuiImpl.h"
|
||||
#include "../libultraship/ImGuiImpl.h"
|
||||
#include "ImGuiHelpers.h"
|
||||
|
||||
#include <array>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "colViewer.h"
|
||||
#include "../libultraship/SohImGuiImpl.h"
|
||||
#include "../libultraship/ImGuiImpl.h"
|
||||
#include "ImGuiHelpers.h"
|
||||
#include "../../frame_interpolation.h"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "debugSaveEditor.h"
|
||||
#include "../../util.h"
|
||||
#include "../libultraship/SohImGuiImpl.h"
|
||||
#include "../libultraship/ImGuiImpl.h"
|
||||
#include "ImGuiHelpers.h"
|
||||
|
||||
#include <array>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <soh/OTRGlobals.h>
|
||||
#include <soh/OTRAudio.h>
|
||||
|
||||
#include <SohImGuiImpl.h>
|
||||
#include <ImGuiImpl.h>
|
||||
|
||||
#include "z64.h"
|
||||
#include "z64save.h"
|
||||
|
||||
@@ -56,7 +56,6 @@ OTRGlobals::OTRGlobals() {
|
||||
context = Ship::GlobalCtx2::CreateInstance("Ship of Harkinian");
|
||||
gSaveStateMgr = std::make_shared<SaveStateMgr>();
|
||||
context->GetWindow()->Init();
|
||||
CheckSaveFile(SRAM_SIZE);
|
||||
}
|
||||
|
||||
OTRGlobals::~OTRGlobals() {
|
||||
|
||||
@@ -51,6 +51,7 @@ void SaveManager::Init() {
|
||||
// If there is a lingering unversioned save, convert it
|
||||
if (std::filesystem::exists("oot_save.sav")) {
|
||||
ConvertFromUnversioned();
|
||||
std::filesystem::rename("oot_save.sav", "oot_save.bak");
|
||||
}
|
||||
|
||||
// If the global save file exist, load it. Otherwise, create it.
|
||||
@@ -1172,8 +1173,6 @@ void SaveManager::ConvertFromUnversioned() {
|
||||
}
|
||||
}
|
||||
|
||||
std::filesystem::rename("oot_save.sav", "oot_save.bak");
|
||||
|
||||
#undef SLOT_SIZE
|
||||
#undef SLOT_OFFSET
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "SohHooks.h"
|
||||
#include "Hooks.h"
|
||||
#include <string.h>
|
||||
|
||||
void func_800C3C80(AudioMgr* audioMgr) {
|
||||
|
||||
@@ -869,11 +869,12 @@ void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCt
|
||||
case SCENE_ZOORA:
|
||||
texture = gZoraShopTitleCardENGTex;
|
||||
break;
|
||||
case SCENE_ALLEY_SHOP:
|
||||
case SCENE_NIGHT_SHOP:
|
||||
texture = gBombchuShopTitleCardENGTex;
|
||||
break;
|
||||
case SCENE_DRAG:
|
||||
case SCENE_MAHOUYA:
|
||||
case SCENE_ALLEY_SHOP:
|
||||
texture = gPotionShopTitleCardENGTex;
|
||||
break;
|
||||
case SCENE_FACE_SHOP:
|
||||
|
||||
@@ -749,6 +749,9 @@ u16 Message_DrawItemIcon(GlobalContext* globalCtx, u16 itemId, Gfx** p, u16 i) {
|
||||
gDPSetCombineMode(gfx++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
gDPSetPrimColor(gfx++, 0, 0, 255, 255, 255, msgCtx->textColorAlpha);
|
||||
|
||||
// Invalidate icon texture as it may have changed from the last time a text box had an icon
|
||||
gSPInvalidateTexCache(gfx++, (uintptr_t)msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE);
|
||||
|
||||
if (itemId >= ITEM_MEDALLION_FOREST) {
|
||||
gDPLoadTextureBlock(gfx++, (uintptr_t)msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE, G_IM_FMT_RGBA, G_IM_SIZ_32b,
|
||||
24, 24, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
|
||||
@@ -3721,9 +3721,11 @@ void Interface_Draw(GlobalContext* globalCtx) {
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, ResourceMgr_LoadFileRaw("assets/ship_of_harkinian/buttons/dpad.bin"),
|
||||
G_IM_FMT_IA, G_IM_SIZ_16b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, OTRGetRectDimensionFromRightEdge(DPAD_X) << 2, DPAD_Y << 2,
|
||||
(OTRGetRectDimensionFromRightEdge(DPAD_X) + 32) << 2, (DPAD_Y + 32) << 2,
|
||||
G_TX_RENDERTILE, 0, 0, (1 << 10), (1 << 10));
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, OTRGetRectDimensionFromRightEdge(DPAD_X + Right_HUD_Margin) << 2,
|
||||
(DPAD_Y + (Top_HUD_Margin * -1)) << 2,
|
||||
(OTRGetRectDimensionFromRightEdge(DPAD_X + Right_HUD_Margin) + 32) << 2,
|
||||
(DPAD_Y + 32 + (Top_HUD_Margin * -1)) << 2, G_TX_RENDERTILE, 0, 0, (1 << 10),
|
||||
(1 << 10));
|
||||
|
||||
// DPad-Up Button Icon & Ammo Count
|
||||
if (gSaveContext.equips.buttonItems[4] < 0xF0) {
|
||||
|
||||
@@ -595,7 +595,7 @@ void BgJyaCobra_DrawShadow(BgJyaCobra* this, GlobalContext* globalCtx) {
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gDPLoadTextureBlock(POLY_XLU_DISP++, ALIGN16((s32)(&this->shadowTexture)), G_IM_FMT_I, G_IM_SIZ_8b, 0x40, 0x40, 0,
|
||||
gDPLoadTextureBlock(POLY_XLU_DISP++, ALIGN16((uintptr_t)(&this->shadowTexture)), G_IM_FMT_I, G_IM_SIZ_8b, 0x40, 0x40, 0,
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
||||
G_TX_NOLOD);
|
||||
|
||||
|
||||
@@ -69,9 +69,9 @@ static SceneSelectEntry sScenes[] = {
|
||||
{ "24:Grave 1", Select_LoadGame, 0x031C },
|
||||
{ "25:Grave 2", Select_LoadGame, 0x004B },
|
||||
{ "26:Royal Family's Tomb", Select_LoadGame, 0x002D },
|
||||
{ "27:Great Fairy's Fountain (Din)", Select_LoadGame, 0x0315 },
|
||||
{ "28:Great Fairy's Fountain (Farore)", Select_LoadGame, 0x036D },
|
||||
{ "29:Great Fairy's Fountain (Nayru)", Select_LoadGame, 0x0371 },
|
||||
{ "27:Great Fairy's Fountain (Upgrades)", Select_LoadGame, 0x0315 },
|
||||
{ "28:Fairy's Fountain (Grotto)", Select_LoadGame, 0x036D },
|
||||
{ "29:Great Fairy's Fountain (Magic)", Select_LoadGame, 0x0371 },
|
||||
{ "30:Ganon's Tower - Collapsing", Select_LoadGame, 0x043F },
|
||||
{ "31:Castle Courtyard", Select_LoadGame, 0x0400 },
|
||||
{ "32:Fishing Pond", Select_LoadGame, 0x045F },
|
||||
@@ -129,7 +129,7 @@ static SceneSelectEntry sScenes[] = {
|
||||
{ "84:Stairs to Ganondorf's Lair", Select_LoadGame, 0x041B },
|
||||
{ "85:Ganondorf's Lair", Select_LoadGame, 0x041F },
|
||||
{ "86:Ice Cavern", Select_LoadGame, 0x0088 },
|
||||
{ "87:Dampé Grave Relay Game", Select_LoadGame, 0x044F },
|
||||
{ "87:Dampe Grave Relay Game", Select_LoadGame, 0x044F },
|
||||
{ "88:Inside Ganon's Castle", Select_LoadGame, 0x0467 },
|
||||
{ "89:Ganon's Lair", Select_LoadGame, 0x0517 },
|
||||
{ "90:Escaping Ganon's Castle 1", Select_LoadGame, 0x0179 },
|
||||
|
||||
@@ -535,32 +535,37 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
||||
} else if (CVar_GetS32("gAssignableTunicsAndBoots", 0) != 0) {
|
||||
// Only allow assigning tunic and boots to c-buttons
|
||||
if (pauseCtx->cursorY[PAUSE_EQUIP] > 1) {
|
||||
u16 slot = 0;
|
||||
switch (cursorItem) {
|
||||
case ITEM_TUNIC_KOKIRI:
|
||||
slot = SLOT_TUNIC_KOKIRI;
|
||||
break;
|
||||
case ITEM_TUNIC_GORON:
|
||||
slot = SLOT_TUNIC_GORON;
|
||||
break;
|
||||
case ITEM_TUNIC_ZORA:
|
||||
slot = SLOT_TUNIC_ZORA;
|
||||
break;
|
||||
case ITEM_BOOTS_KOKIRI:
|
||||
slot = SLOT_BOOTS_KOKIRI;
|
||||
break;
|
||||
case ITEM_BOOTS_IRON:
|
||||
slot = SLOT_BOOTS_IRON;
|
||||
break;
|
||||
case ITEM_BOOTS_HOVER:
|
||||
slot = SLOT_BOOTS_HOVER;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
if (CHECK_OWNED_EQUIP(pauseCtx->cursorY[PAUSE_EQUIP], pauseCtx->cursorX[PAUSE_EQUIP] - 1)) {
|
||||
u16 slot = 0;
|
||||
switch (cursorItem) {
|
||||
case ITEM_TUNIC_KOKIRI:
|
||||
slot = SLOT_TUNIC_KOKIRI;
|
||||
break;
|
||||
case ITEM_TUNIC_GORON:
|
||||
slot = SLOT_TUNIC_GORON;
|
||||
break;
|
||||
case ITEM_TUNIC_ZORA:
|
||||
slot = SLOT_TUNIC_ZORA;
|
||||
break;
|
||||
case ITEM_BOOTS_KOKIRI:
|
||||
slot = SLOT_BOOTS_KOKIRI;
|
||||
break;
|
||||
case ITEM_BOOTS_IRON:
|
||||
slot = SLOT_BOOTS_IRON;
|
||||
break;
|
||||
case ITEM_BOOTS_HOVER:
|
||||
slot = SLOT_BOOTS_HOVER;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
KaleidoScope_SetupItemEquip(globalCtx, cursorItem, slot,
|
||||
pauseCtx->equipVtx[cursorSlot * 4].v.ob[0] * 10,
|
||||
pauseCtx->equipVtx[cursorSlot * 4].v.ob[1] * 10);
|
||||
} else {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
}
|
||||
KaleidoScope_SetupItemEquip(globalCtx, cursorItem, slot,
|
||||
pauseCtx->equipVtx[cursorSlot * 4].v.ob[0] * 10,
|
||||
pauseCtx->equipVtx[cursorSlot * 4].v.ob[1] * 10);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "textures/map_name_static/map_name_static.h"
|
||||
#include "textures/map_48x85_static/map_48x85_static.h"
|
||||
#include "vt.h"
|
||||
#include "SohHooks.h"
|
||||
#include "Hooks.h"
|
||||
|
||||
#include "soh/frame_interpolation.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user