Merges origin/develop into LocationTracker to resolve conflict with randomizer_check_objects.cpp

This commit is contained in:
sonoftunk 2022-11-29 20:57:31 -05:00
commit 08a487f35e
419 changed files with 3046 additions and 2218 deletions

View File

@ -11,7 +11,31 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.event == 'pull_request' }} if: ${{ github.event.workflow_run.event == 'pull_request' }}
steps: steps:
- id: 'get-info' - id: 'pr-number'
uses: actions/github-script@v6
with:
result-encoding: string
script: |
const {owner, repo} = context.repo;
const pullHeadSHA = '${{github.event.workflow_run.head_sha}}';
const pullUserId = ${{github.event.sender.id}};
const prNumber = await (async () => {
const pulls = await github.rest.pulls.list({owner, repo});
for await (const {data} of github.paginate.iterator(pulls)) {
for (const pull of data) {
if (pull.head.sha === pullHeadSHA && pull.user.id === pullUserId) {
return pull.number;
}
}
}
})();
if (!prNumber) {
return core.error(`No matching pull request found`);
}
return prNumber;
- id: 'artifacts-text'
uses: actions/github-script@v6 uses: actions/github-script@v6
with: with:
result-encoding: string result-encoding: string
@ -25,13 +49,13 @@ jobs:
return allArtifacts.data.artifacts.reduce((acc, item) => { return allArtifacts.data.artifacts.reduce((acc, item) => {
if (item.name === "assets") return acc; if (item.name === "assets") return acc;
acc += ` acc += `
- [${item.name}](${context.payload.repository.html_url}/suites/${context.payload.workflow_run.check_suite_id}/artifacts/${item.id})`; - [${item.name}.zip](https://nightly.link/${context.repo.owner}/${context.repo.repo}/actions/artifacts/${item.id}.zip)`;
return acc; return acc;
}, '### Build Artifacts'); }, '### Build Artifacts');
- id: 'add-to-pr' - id: 'add-to-pr'
uses: garrettjoecox/pr-section@3.1.0 uses: garrettjoecox/pr-section@3.1.0
with: with:
repo-token: '${{ secrets.GITHUB_TOKEN }}' repo-token: '${{ secrets.GITHUB_TOKEN }}'
pr-number: ${{ github.event.workflow_run.pull_requests[0].number }} pr-number: ${{ steps.pr-number.outputs.result }}
section-name: 'artifacts' section-name: 'artifacts'
section-value: '${{ steps.get-info.outputs.result }}' section-value: '${{ steps.artifacts-text.outputs.result }}'

View File

@ -85,6 +85,8 @@ _Note: If you're using Visual Studio Code, the [cpack plugin](https://marketplac
# Clone the repo # Clone the repo
git clone https://github.com/HarbourMasters/Shipwright.git git clone https://github.com/HarbourMasters/Shipwright.git
cd Shipwright cd Shipwright
# Clone the submodule libultraship
git submodule update --init
# Copy the baserom to the OTRExporter folder # Copy the baserom to the OTRExporter folder
cp <path to your ROM> OTRExporter cp <path to your ROM> OTRExporter
# Generate Ninja project # Generate Ninja project
@ -123,6 +125,8 @@ _Note: If you're using Visual Studio Code, the [cpack plugin](https://marketplac
# Clone the repo # Clone the repo
git clone https://github.com/HarbourMasters/Shipwright.git git clone https://github.com/HarbourMasters/Shipwright.git
cd ShipWright cd ShipWright
# Clone the submodule libultraship
git submodule update --init
# Copy the baserom to the OTRExporter folder # Copy the baserom to the OTRExporter folder
cp <path to your ROM> OTRExporter cp <path to your ROM> OTRExporter
# Generate Ninja project # Generate Ninja project

View File

@ -7,8 +7,8 @@ set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE)
project(Ship LANGUAGES C CXX project(Ship LANGUAGES C CXX
VERSION 5.0.0) VERSION 5.0.1)
set(PROJECT_BUILD_NAME "FLYNN ALFA" CACHE STRING "") set(PROJECT_BUILD_NAME "FLYNN BRAVO" CACHE STRING "")
set(PROJECT_TEAM "github.com/harbourmasters" CACHE STRING "") set(PROJECT_TEAM "github.com/harbourmasters" CACHE STRING "")
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT soh) set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT soh)

16
soh/include/alignment.h Normal file
View File

@ -0,0 +1,16 @@
#ifndef ALIGNMENT_H
#define ALIGNMENT_H
#define ALIGN8(val) (((val) + 7) & ~7)
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
#define ALIGN32(val) (((val) + 0x1F) & ~0x1F)
#define ALIGN64(val) (((val) + 0x3F) & ~0x3F)
#define ALIGN256(val) (((val) + 0xFF) & ~0xFF)
#ifdef __GNUC__
#define ALIGNED8 __attribute__ ((aligned (8)))
#else
#define ALIGNED8
#endif
#endif

View File

@ -1173,42 +1173,42 @@ s16 Quake_Calc(Camera* camera, QuakeCamCalc* camData);
Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far); Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far);
Gfx* Gfx_SetFogWithSync(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far); Gfx* Gfx_SetFogWithSync(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far);
Gfx* Gfx_SetFog2(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far); Gfx* Gfx_SetFog2(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far);
Gfx* Gfx_CallSetupDL(Gfx* gfx, u32 i); Gfx* Gfx_SetupDL(Gfx* gfx, u32 i);
Gfx* func_800937C0(Gfx* gfx); Gfx* Gfx_SetupDL_57(Gfx* gfx);
Gfx* func_80093808(Gfx* gfx); Gfx* Gfx_SetupDL_52NoCD(Gfx* gfx);
void func_800938B4(GraphicsContext* gfxCtx); void Gfx_SetupDL_57Opa(GraphicsContext* gfxCtx);
void func_8009398C(GraphicsContext* gfxCtx); void Gfx_SetupDL_51Opa(GraphicsContext* gfxCtx);
void func_80093AD0(GraphicsContext* gfxCtx); void Gfx_SetupDL_54Opa(GraphicsContext* gfxCtx);
void func_80093BA8(GraphicsContext* gfxCtx); void Gfx_SetupDL_26Opa(GraphicsContext* gfxCtx);
void func_80093C14(GraphicsContext* gfxCtx); void Gfx_SetupDL_25Xlu2(GraphicsContext* gfxCtx);
void func_80093C80(PlayState* play); void func_80093C80(PlayState* play);
void func_80093D18(GraphicsContext* gfxCtx); void Gfx_SetupDL_25Opa(GraphicsContext* gfxCtx);
void func_80093D84(GraphicsContext* gfxCtx); void Gfx_SetupDL_25Xlu(GraphicsContext* gfxCtx);
Gfx* func_80093F34(Gfx* gfx); Gfx* Gfx_SetupDL_64(Gfx* gfx);
Gfx* func_80093F58(Gfx* gfx); Gfx* Gfx_SetupDL_34(Gfx* gfx);
void func_80094044(GraphicsContext* gfxCtx); void Gfx_SetupDL_44Xlu(GraphicsContext* gfxCtx);
void func_800940B0(GraphicsContext* gfxCtx); void Gfx_SetupDL_36Opa(GraphicsContext* gfxCtx);
void func_80094140(GraphicsContext* gfxCtx); void Gfx_SetupDL_28Opa(GraphicsContext* gfxCtx);
Gfx* func_8009411C(Gfx* gfx); Gfx* Gfx_SetupDL_28(Gfx* gfx);
void func_800942F0(GraphicsContext* gfxCtx); void Gfx_SetupDL_38Xlu(GraphicsContext* gfxCtx);
void func_8009435C(GraphicsContext* gfxCtx); void Gfx_SetupDL_4Xlu(GraphicsContext* gfxCtx);
void func_800943C8(GraphicsContext* gfxCtx); void Gfx_SetupDL_37Opa(GraphicsContext* gfxCtx);
Gfx* func_800944A0(Gfx* gfx); Gfx* Gfx_SetupDL_39(Gfx* gfx);
void func_800944C4(GraphicsContext* gfxCtx); void Gfx_SetupDL_39Opa(GraphicsContext* gfxCtx);
void func_80094520(GraphicsContext* gfxCtx); void Gfx_SetupDL_39Overlay(GraphicsContext* gfxCtx);
void func_8009457C(Gfx** gfxp); void Gfx_SetupDL_39Ptr(Gfx** gfxp);
void func_800945A0(GraphicsContext* gfxCtx); void Gfx_SetupDL_40Opa(GraphicsContext* gfxCtx);
void func_8009460C(GraphicsContext* gfxCtx); void Gfx_SetupDL_41Opa(GraphicsContext* gfxCtx);
void func_80094678(GraphicsContext* gfxCtx); void Gfx_SetupDL_47Xlu(GraphicsContext* gfxCtx);
Gfx* func_80094968(Gfx* gfx); Gfx* Gfx_SetupDL_20NoCD(Gfx* gfx);
Gfx* func_800946E4(Gfx* gfx); Gfx* Gfx_SetupDL_66(Gfx* gfx);
Gfx* func_800947AC(Gfx* gfx); Gfx* func_800947AC(Gfx* gfx);
void func_800949A8(GraphicsContext* gfxCtx); void Gfx_SetupDL_42Opa(GraphicsContext* gfxCtx);
void func_80094A14(GraphicsContext* gfxCtx); void Gfx_SetupDL_42Overlay(GraphicsContext* gfxCtx);
void func_80094B58(GraphicsContext* gfxCtx); void Gfx_SetupDL_27Xlu(GraphicsContext* gfxCtx);
void func_80094BC4(GraphicsContext* gfxCtx); void Gfx_SetupDL_60NoCDXlu(GraphicsContext* gfxCtx);
void func_80094C50(GraphicsContext* gfxCtx); void Gfx_SetupDL_61Xlu(GraphicsContext* gfxCtx);
void func_80094D28(Gfx** gfxp); void Gfx_SetupDL_56Ptr(Gfx** gfxp);
Gfx* Gfx_BranchTexScroll(Gfx** gfxp, u32 x, u32 y, s32 width, s32 height); Gfx* Gfx_BranchTexScroll(Gfx** gfxp, u32 x, u32 y, s32 width, s32 height);
Gfx* func_80094E78(GraphicsContext* gfxCtx, u32 x, u32 y); Gfx* func_80094E78(GraphicsContext* gfxCtx, u32 x, u32 y);
Gfx* Gfx_TexScroll(GraphicsContext* gfxCtx, u32 x, u32 y, s32 width, s32 height); Gfx* Gfx_TexScroll(GraphicsContext* gfxCtx, u32 x, u32 y, s32 width, s32 height);
@ -1217,7 +1217,7 @@ Gfx* Gfx_TwoTexScroll(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 wi
Gfx* Gfx_TwoTexScrollEnvColor(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2, Gfx* Gfx_TwoTexScrollEnvColor(GraphicsContext* gfxCtx, s32 tile1, u32 x1, u32 y1, s32 width1, s32 height1, s32 tile2,
u32 x2, u32 y2, s32 width2, s32 height2, s32 r, s32 g, s32 b, s32 a); u32 x2, u32 y2, s32 width2, s32 height2, s32 r, s32 g, s32 b, s32 a);
Gfx* Gfx_EnvColor(GraphicsContext* gfxCtx, s32 r, s32 g, s32 b, s32 a); Gfx* Gfx_EnvColor(GraphicsContext* gfxCtx, s32 r, s32 g, s32 b, s32 a);
void func_80095248(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b); void Gfx_SetupFrame(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b);
void func_80095974(GraphicsContext* gfxCtx); void func_80095974(GraphicsContext* gfxCtx);
void func_80095AA0(PlayState* play, Room* room, Input* arg2, UNK_TYPE arg3); void func_80095AA0(PlayState* play, Room* room, Input* arg2, UNK_TYPE arg3);
void func_8009638C(Gfx** displayList, void* source, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 mode0, void func_8009638C(Gfx** displayList, void* source, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 mode0,

View File

@ -3,49 +3,51 @@
#include <endianness.h> #include <endianness.h>
// Upstream TODO: Document reasoning for change
// #ifndef __GNUC__
// #define __attribute__(x)
// #endif
// #ifndef AVOID_UB
// #define BAD_RETURN(type) type
// #else
// #define BAD_RETURN(type) void
// #endif
// #define UNUSED __attribute__((unused))
// #define FALLTHROUGH __attribute__((fallthrough))
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0])) #define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0])) #define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
#define PHYSICAL_TO_VIRTUAL(addr) (void*)((uintptr_t)(addr) + 0x80000000) #define PHYSICAL_TO_VIRTUAL(addr) (void*)((uintptr_t)(addr) + 0x80000000)
#define VIRTUAL_TO_PHYSICAL(addr) (uintptr_t)((u8*)(addr) - 0x80000000) #define VIRTUAL_TO_PHYSICAL(addr) (uintptr_t)((u8*)(addr) - 0x80000000)
// Upstream TODO: Document reasoning for change
//#define SEGMENTED_TO_VIRTUAL(addr) PHYSICAL_TO_VIRTUAL(gSegments[SEGMENT_NUMBER(addr)] + SEGMENT_OFFSET(addr)) //#define SEGMENTED_TO_VIRTUAL(addr) PHYSICAL_TO_VIRTUAL(gSegments[SEGMENT_NUMBER(addr)] + SEGMENT_OFFSET(addr))
#define SEGMENTED_TO_VIRTUAL(addr) addr #define SEGMENTED_TO_VIRTUAL(addr) addr
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
#define ALIGN32(val) (((val) + 0x1F) & ~0x1F)
#define ALIGN64(val) (((val) + 0x3F) & ~0x3F)
#define ALIGN256(val) (((val) + 0xFF) & ~0xFF)
#define OFFSETOF(structure, member) ((size_t)&(((structure*)0)->member))
#define SQ(x) ((x)*(x)) #define SQ(x) ((x)*(x))
#define ABS(x) ((x) >= 0 ? (x) : -(x)) #define ABS(x) ((x) >= 0 ? (x) : -(x))
#define DECR(x) ((x) == 0 ? 0 : --(x)) #define DECR(x) ((x) == 0 ? 0 : --(x))
#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x)) #define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x)) #define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
#define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x)) #define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x))
#define MEDIAN3(a1, a2, a3) \
(((a2) >= (a1)) ? (((a3) >= (a2)) ? (a2) : (((a1) >= (a3)) ? (a1) : (a3))) \
: (((a2) >= (a3)) ? (a2) : (((a3) >= (a1)) ? (a1) : (a3))))
#define RGBA8(r, g, b, a) ((((r) & 0xFF) << 24) | (((g) & 0xFF) << 16) | (((b) & 0xFF) << 8) | (((a) & 0xFF) << 0)) #define RGBA8(r, g, b, a) ((((r) & 0xFF) << 24) | (((g) & 0xFF) << 16) | (((b) & 0xFF) << 8) | (((a) & 0xFF) << 0))
#define GET_PLAYER(play) ((Player*)(play)->actorCtx.actorLists[ACTORCAT_PLAYER].head) #define GET_PLAYER(play) ((Player*)(play)->actorCtx.actorLists[ACTORCAT_PLAYER].head)
#define GET_ACTIVE_CAM(play) ((play)->cameraPtrs[(play)->activeCamera]) #define GET_ACTIVE_CAM(play) ((play)->cameraPtrs[(play)->activeCamera]) // Upstream TODO: Camera
#define LINK_IS_ADULT (gSaveContext.linkAge == 0) #define LINK_IS_ADULT (gSaveContext.linkAge == LINK_AGE_ADULT)
#define LINK_IS_CHILD (gSaveContext.linkAge == 1) #define LINK_IS_CHILD (gSaveContext.linkAge == LINK_AGE_CHILD)
#define CHECK_EQUIPMENT_AGE(i, j) (CVar_GetS32("gTimelessEquipment", 0) || (gEquipAgeReqs[i][j] == 9) || (gEquipAgeReqs[i][j] == ((void)0, gSaveContext.linkAge)))
#define CHECK_SLOT_AGE(slotIndex) (CVar_GetS32("gTimelessEquipment", 0) || (gSlotAgeReqs[slotIndex] == 9) || gSlotAgeReqs[slotIndex] == ((void)0, gSaveContext.linkAge))
#define CHECK_ITEM_AGE(itemIndex) (CVar_GetS32("gTimelessEquipment", 0) || (gItemAgeReqs[itemIndex] == 9) || (gItemAgeReqs[itemIndex] == gSaveContext.linkAge))
#define YEARS_CHILD 5 #define YEARS_CHILD 5
#define YEARS_ADULT 17 #define YEARS_ADULT 17
#define LINK_AGE_IN_YEARS (!LINK_IS_ADULT ? YEARS_CHILD : YEARS_ADULT) #define LINK_AGE_IN_YEARS (!LINK_IS_ADULT ? YEARS_CHILD : YEARS_ADULT)
#define CLOCK_TIME(hr, min) ((s32)(((hr) * 60 + (min)) * (f32)0x10000 / (24 * 60) + 0.5f))
#define IS_DAY (gSaveContext.nightFlag == 0) #define IS_DAY (gSaveContext.nightFlag == 0)
#define IS_NIGHT (gSaveContext.nightFlag == 1) #define IS_NIGHT (gSaveContext.nightFlag == 1)
@ -56,7 +58,15 @@
#define ALL_EQUIP_VALUE(equip) ((s32)(gSaveContext.inventory.equipment & gEquipMasks[equip]) >> gEquipShifts[equip]) #define ALL_EQUIP_VALUE(equip) ((s32)(gSaveContext.inventory.equipment & gEquipMasks[equip]) >> gEquipShifts[equip])
#define CUR_EQUIP_VALUE(equip) ((s32)(gSaveContext.equips.equipment & gEquipMasks[equip]) >> gEquipShifts[equip]) #define CUR_EQUIP_VALUE(equip) ((s32)(gSaveContext.equips.equipment & gEquipMasks[equip]) >> gEquipShifts[equip])
#define CHECK_OWNED_EQUIP(equip, value) ((gBitFlags[value] << gEquipShifts[equip]) & gSaveContext.inventory.equipment) #define OWNED_EQUIP_FLAG(equip, value) (gBitFlags[value] << gEquipShifts[equip])
#define OWNED_EQUIP_FLAG_ALT(equip, value) ((1 << (value)) << gEquipShifts[equip])
#define CHECK_OWNED_EQUIP(equip, value) (OWNED_EQUIP_FLAG(equip, value) & gSaveContext.inventory.equipment)
#define CHECK_OWNED_EQUIP_ALT(equip, value) (gBitFlags[(value) + (equip) * 4] & gSaveContext.inventory.equipment)
#define SWORD_EQUIP_TO_PLAYER(swordEquip) (swordEquip)
#define SHIELD_EQUIP_TO_PLAYER(shieldEquip) (shieldEquip)
#define TUNIC_EQUIP_TO_PLAYER(tunicEquip) ((tunicEquip) - 1)
#define BOOTS_EQUIP_TO_PLAYER(bootsEquip) ((bootsEquip) - 1)
#define CUR_UPG_VALUE(upg) ((s32)(gSaveContext.inventory.upgrades & gUpgradeMasks[upg]) >> gUpgradeShifts[upg]) #define CUR_UPG_VALUE(upg) ((s32)(gSaveContext.inventory.upgrades & gUpgradeMasks[upg]) >> gUpgradeShifts[upg])
#define CAPACITY(upg, value) gUpgradeCapacities[upg][value] #define CAPACITY(upg, value) gUpgradeCapacities[upg][value]
@ -72,6 +82,21 @@
#define HIGH_SCORE(score) (gSaveContext.highScores[score]) #define HIGH_SCORE(score) (gSaveContext.highScores[score])
#define GET_EVENTCHKINF(flag) (gSaveContext.eventChkInf[(flag) >> 4] & (1 << ((flag) & 0xF)))
#define SET_EVENTCHKINF(flag) (gSaveContext.eventChkInf[(flag) >> 4] |= (1 << ((flag) & 0xF)))
#define CLEAR_EVENTCHKINF(flag) (gSaveContext.eventChkInf[(flag) >> 4] &= ~(1 << ((flag) & 0xF)))
#define GET_ITEMGETINF(flag) (gSaveContext.itemGetInf[(flag) >> 4] & (1 << ((flag) & 0xF)))
#define SET_ITEMGETINF(flag) (gSaveContext.itemGetInf[(flag) >> 4] |= (1 << ((flag) & 0xF)))
#define GET_INFTABLE(flag) (gSaveContext.infTable[(flag) >> 4] & (1 << ((flag) & 0xF)))
#define SET_INFTABLE(flag) (gSaveContext.infTable[(flag) >> 4] |= (1 << ((flag) & 0xF)))
#define CLEAR_INFTABLE(flag) (gSaveContext.infTable[(flag) >> 4] &= ~(1 << ((flag) & 0xF)))
#define GET_EVENTINF(flag) (gSaveContext.eventInf[(flag) >> 4] & (1 << ((flag) & 0xF)))
#define SET_EVENTINF(flag) (gSaveContext.eventInf[(flag) >> 4] |= (1 << ((flag) & 0xF)))
#define CLEAR_EVENTINF(flag) (gSaveContext.eventInf[(flag) >> 4] &= ~(1 << ((flag) & 0xF)))
#define B_BTN_ITEM ((gSaveContext.buttonStatus[0] == ITEM_NONE) \ #define B_BTN_ITEM ((gSaveContext.buttonStatus[0] == ITEM_NONE) \
? ITEM_NONE \ ? ITEM_NONE \
: (gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KNIFE) \ : (gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KNIFE) \
@ -82,15 +107,13 @@
? gSaveContext.equips.buttonItems[(button) + 1] \ ? gSaveContext.equips.buttonItems[(button) + 1] \
: ITEM_NONE) : ITEM_NONE)
#define DPAD_ITEM(button) ((gSaveContext.buttonStatus[(button) + 5] != BTN_DISABLED) \
? gSaveContext.equips.buttonItems[(button) + 4] \
: ITEM_NONE)
#define CHECK_BTN_ALL(state, combo) (~((state) | ~(combo)) == 0) #define CHECK_BTN_ALL(state, combo) (~((state) | ~(combo)) == 0)
#define CHECK_BTN_ANY(state, combo) (((state) & (combo)) != 0) #define CHECK_BTN_ANY(state, combo) (((state) & (combo)) != 0)
#define CHECK_FLAG_ALL(flags, mask) (((flags) & (mask)) == (mask)) #define CHECK_FLAG_ALL(flags, mask) (((flags) & (mask)) == (mask))
// #region SOH [General]
// Logging changes
#ifndef NDEBUG #ifndef NDEBUG
#define LOG(exp, value, format) \ #define LOG(exp, value, format) \
do { \ do { \
@ -133,30 +156,8 @@
#define LOG_THREAD_ID() ((void)0) #define LOG_THREAD_ID() ((void)0)
#define LOG_HUNGUP_THREAD() ((void)0) #define LOG_HUNGUP_THREAD() ((void)0)
#endif #endif
// #endregion
#define MATRIX_TOMTX(dest) Matrix_ToMtx(dest, __FILE__, __LINE__)
#define MATRIX_NEWMTX(gfxCtx) Matrix_NewMtx(gfxCtx, __FILE__, __LINE__)
#define MATRIX_CHECKFLOATS(mf) Matrix_CheckFloats(mf, __FILE__, __LINE__)
#define ZELDA_ARENA_MALLOC_DEBUG(size) ZeldaArena_MallocDebug(size, __FILE__, __LINE__)
#define ZELDA_ARENA_MALLOC_RDEBUG(size) ZeldaArena_MallocRDebug(size, __FILE__, __LINE__)
#define ZELDA_ARENA_REALLOC_DEBUG(ptr, newSize) ZeldaArena_ReallocDebug(ptr, newSize, __FILE__, __LINE__)
#define ZELDA_ARENA_FREE_DEBUG(ptr) ZeldaArena_FreeDebug(ptr, __FILE__, __LINE__)
#define SYSTEM_ARENA_MALLOC_DEBUG(size) SystemArena_MallocDebug(size, __FILE__, __LINE__)
#define SYSTEM_ARENA_MALLOC_RDEBUG(size) SystemArena_MallocRDebug(size, __FILE__, __LINE__)
#define SYSTEM_ARENA_REALLOC_DEBUG(ptr, newSize) SystemArena_ReallocDebug(ptr, newSize, __FILE__, __LINE__)
#define SYSTEM_ARENA_FREE_DEBUG(ptr) SystemArena_FreeDebug(ptr, __FILE__, __LINE__)
#define DEBUG_ARENA_MALLOC_DEBUG(size) DebugArena_MallocDebug(size, __FILE__, __LINE__)
#define DEBUG_ARENA_MALLOC_RDEBUG(size) DebugArena_MallocRDebug(size, __FILE__, __LINE__)
#define DEBUG_ARENA_REALLOC_DEBUG(ptr, newSize) DebugArena_ReallocDebug(ptr, newSize, __FILE__, __LINE__)
#define DEBUG_ARENA_FREE_DEBUG(ptr) DebugArena_FreeDebug(ptr, __FILE__, __LINE__)
#define GAMESTATE_ALLOC_MC(gameState, size) GameState_Alloc(gameState, size, __FILE__, __LINE__)
#define GAMESTATE_MALLOC_DEBUG(gameState, size) GameAlloc_MallocDebug(gameState, size, __FILE__, __LINE__)
#define BGCHECK_POS_ERROR_CHECK(vec3f) BgCheck_PosErrorCheck(vec3f, __FILE__, __LINE__)
#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \ #define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \
do { \ do { \
@ -180,12 +181,17 @@ extern GraphicsContext* __gfxCtx;
#define WORK_DISP __gfxCtx->work.p #define WORK_DISP __gfxCtx->work.p
#define POLY_OPA_DISP __gfxCtx->polyOpa.p #define POLY_OPA_DISP __gfxCtx->polyOpa.p
#define POLY_XLU_DISP __gfxCtx->polyXlu.p #define POLY_XLU_DISP __gfxCtx->polyXlu.p
// #region SOH [General]
// Upstream TODO: Document reasoning for these only existing in SoH
#define WORLD_OVERLAY_DISP __gfxCtx->worldOverlay.p #define WORLD_OVERLAY_DISP __gfxCtx->worldOverlay.p
#define POLY_KAL_DISP __gfxCtx->polyKal.p #define POLY_KAL_DISP __gfxCtx->polyKal.p
// #endregion
#define OVERLAY_DISP __gfxCtx->overlay.p #define OVERLAY_DISP __gfxCtx->overlay.p
// __gfxCtx shouldn't be used directly. // __gfxCtx shouldn't be used directly.
// Use the DISP macros defined above when writing to display buffers. // Use the DISP macros defined above when writing to display buffers.
// #region SOH [General]
// Augmented to provide debug information in debug build and support interpolation
#ifndef NDEBUG #ifndef NDEBUG
#define OPEN_DISPS(gfxCtx) \ #define OPEN_DISPS(gfxCtx) \
{ \ { \
@ -221,6 +227,7 @@ extern GraphicsContext* __gfxCtx;
} \ } \
(void)0 (void)0
#endif #endif
// #endregion
/** /**
* `x` vertex x * `x` vertex x
@ -237,11 +244,13 @@ extern GraphicsContext* __gfxCtx;
#define VTX_T(x,y,z,s,t,cr,cg,cb,a) { { x, y, z }, 0, { s, t }, { cr, cg, cb, a } } #define VTX_T(x,y,z,s,t,cr,cg,cb,a) { { x, y, z }, 0, { s, t }, { cr, cg, cb, a } }
// #region SOH [WiiU]
#ifdef __WIIU__ #ifdef __WIIU__
#define ASSERT(expression) (void)((!!(expression)) || (_assert(#expression, __FILE__, (unsigned)(__LINE__)), 0)) #define ASSERT(expression) (void)((!!(expression)) || (_assert(#expression, __FILE__, (unsigned)(__LINE__)), 0))
#else #else
#define ASSERT(expression) (void)((!!(expression)) || (__assert(#expression, __FILE__, (unsigned)(__LINE__)), 0)) #define ASSERT(expression) (void)((!!(expression)) || (__assert(#expression, __FILE__, (unsigned)(__LINE__)), 0))
#endif #endif
// #endregion
#define gDPSetTileCustom(pkt, fmt, siz, width, height, pal, cms, cmt, masks, maskt, shifts, shiftt) \ #define gDPSetTileCustom(pkt, fmt, siz, width, height, pal, cms, cmt, masks, maskt, shifts, shiftt) \
do { \ do { \
@ -256,14 +265,51 @@ extern GraphicsContext* __gfxCtx;
((height)-1) << G_TEXTURE_IMAGE_FRAC); \ ((height)-1) << G_TEXTURE_IMAGE_FRAC); \
} while (0) } while (0)
#ifdef __GNUC__ // #region SOH [General]
#define ALIGNED8 __attribute__ ((aligned (8))) #define OFFSETOF(structure, member) ((size_t)&(((structure*)0)->member))
#else
#define ALIGNED8 #define MEDIAN3(a1, a2, a3) \
#endif (((a2) >= (a1)) ? (((a3) >= (a2)) ? (a2) : (((a1) >= (a3)) ? (a1) : (a3))) \
: (((a2) >= (a3)) ? (a2) : (((a3) >= (a1)) ? (a1) : (a3))))
#define MATRIX_TOMTX(dest) Matrix_ToMtx(dest, __FILE__, __LINE__)
#define MATRIX_NEWMTX(gfxCtx) Matrix_NewMtx(gfxCtx, __FILE__, __LINE__)
#define MATRIX_CHECKFLOATS(mf) Matrix_CheckFloats(mf, __FILE__, __LINE__)
#define ZELDA_ARENA_MALLOC_DEBUG(size) ZeldaArena_MallocDebug(size, __FILE__, __LINE__)
#define ZELDA_ARENA_MALLOC_RDEBUG(size) ZeldaArena_MallocRDebug(size, __FILE__, __LINE__)
#define ZELDA_ARENA_REALLOC_DEBUG(ptr, newSize) ZeldaArena_ReallocDebug(ptr, newSize, __FILE__, __LINE__)
#define ZELDA_ARENA_FREE_DEBUG(ptr) ZeldaArena_FreeDebug(ptr, __FILE__, __LINE__)
#define SYSTEM_ARENA_MALLOC_DEBUG(size) SystemArena_MallocDebug(size, __FILE__, __LINE__)
#define SYSTEM_ARENA_MALLOC_RDEBUG(size) SystemArena_MallocRDebug(size, __FILE__, __LINE__)
#define SYSTEM_ARENA_REALLOC_DEBUG(ptr, newSize) SystemArena_ReallocDebug(ptr, newSize, __FILE__, __LINE__)
#define SYSTEM_ARENA_FREE_DEBUG(ptr) SystemArena_FreeDebug(ptr, __FILE__, __LINE__)
#define DEBUG_ARENA_MALLOC_DEBUG(size) DebugArena_MallocDebug(size, __FILE__, __LINE__)
#define DEBUG_ARENA_MALLOC_RDEBUG(size) DebugArena_MallocRDebug(size, __FILE__, __LINE__)
#define DEBUG_ARENA_REALLOC_DEBUG(ptr, newSize) DebugArena_ReallocDebug(ptr, newSize, __FILE__, __LINE__)
#define DEBUG_ARENA_FREE_DEBUG(ptr) DebugArena_FreeDebug(ptr, __FILE__, __LINE__)
#define GAMESTATE_ALLOC_MC(gameState, size) GameState_Alloc(gameState, size, __FILE__, __LINE__)
#define GAMESTATE_MALLOC_DEBUG(gameState, size) GameAlloc_MallocDebug(gameState, size, __FILE__, __LINE__)
#define BGCHECK_POS_ERROR_CHECK(vec3f) BgCheck_PosErrorCheck(vec3f, __FILE__, __LINE__)
#define SEG_ADDR(seg, addr) (addr | (seg << 24) | 1) #define SEG_ADDR(seg, addr) (addr | (seg << 24) | 1)
// #endregion
// #region SOH [Enhancements]
#define CHECK_EQUIPMENT_AGE(i, j) (CVar_GetS32("gTimelessEquipment", 0) || (gEquipAgeReqs[i][j] == 9) || (gEquipAgeReqs[i][j] == ((void)0, gSaveContext.linkAge)))
#define CHECK_SLOT_AGE(slotIndex) (CVar_GetS32("gTimelessEquipment", 0) || (gSlotAgeReqs[slotIndex] == 9) || gSlotAgeReqs[slotIndex] == ((void)0, gSaveContext.linkAge))
#define CHECK_ITEM_AGE(itemIndex) (CVar_GetS32("gTimelessEquipment", 0) || (gItemAgeReqs[itemIndex] == 9) || (gItemAgeReqs[itemIndex] == gSaveContext.linkAge))
#define DPAD_ITEM(button) ((gSaveContext.buttonStatus[(button) + 5] != BTN_DISABLED) \
? gSaveContext.equips.buttonItems[(button) + 4] \
: ITEM_NONE)
// #endregion
// #region SOH [Randomizer]
#define NUM_TRIALS 6 #define NUM_TRIALS 6
#define NUM_SHOP_ITEMS 64 #define NUM_SHOP_ITEMS 64
#define NUM_SCRUBS 46 #define NUM_SCRUBS 46
@ -277,5 +323,6 @@ extern GraphicsContext* __gfxCtx;
#define GERUDO_FORTRESS_SMALL_KEY_MAX 4 #define GERUDO_FORTRESS_SMALL_KEY_MAX 4
#define GANONS_CASTLE_SMALL_KEY_MAX (ResourceMgr_IsSceneMasterQuest(SCENE_GANONTIKA) ? 3 : 2) #define GANONS_CASTLE_SMALL_KEY_MAX (ResourceMgr_IsSceneMasterQuest(SCENE_GANONTIKA) ? 3 : 2)
#define TREASURE_GAME_SMALL_KEY_MAX 6 #define TREASURE_GAME_SMALL_KEY_MAX 6
// #endregion
#endif #endif

View File

@ -24,6 +24,7 @@
#include "z64skin.h" #include "z64skin.h"
#include "z64transition.h" #include "z64transition.h"
#include "z64interface.h" #include "z64interface.h"
#include "alignment.h"
#include "sequence.h" #include "sequence.h"
#include "sfx.h" #include "sfx.h"
#include <color.h> #include <color.h>
@ -212,6 +213,81 @@ typedef struct {
/* 0x0124 */ s32 unk_124; /* 0x0124 */ s32 unk_124;
} View; // size = 0x128 } View; // size = 0x128
typedef enum {
/* 0 */ SETUPDL_0,
/* 1 */ SETUPDL_1,
/* 2 */ SETUPDL_2,
/* 3 */ SETUPDL_3,
/* 4 */ SETUPDL_4,
/* 5 */ SETUPDL_5,
/* 6 */ SETUPDL_6,
/* 7 */ SETUPDL_7,
/* 8 */ SETUPDL_8,
/* 9 */ SETUPDL_9,
/* 10 */ SETUPDL_10,
/* 11 */ SETUPDL_11,
/* 12 */ SETUPDL_12,
/* 13 */ SETUPDL_13,
/* 14 */ SETUPDL_14,
/* 15 */ SETUPDL_15,
/* 16 */ SETUPDL_16,
/* 17 */ SETUPDL_17,
/* 18 */ SETUPDL_18,
/* 19 */ SETUPDL_19,
/* 20 */ SETUPDL_20,
/* 21 */ SETUPDL_21,
/* 22 */ SETUPDL_22,
/* 23 */ SETUPDL_23,
/* 24 */ SETUPDL_24,
/* 25 */ SETUPDL_25,
/* 26 */ SETUPDL_26,
/* 27 */ SETUPDL_27,
/* 28 */ SETUPDL_28,
/* 29 */ SETUPDL_29,
/* 30 */ SETUPDL_30,
/* 31 */ SETUPDL_31,
/* 32 */ SETUPDL_32,
/* 33 */ SETUPDL_33,
/* 34 */ SETUPDL_34,
/* 35 */ SETUPDL_35,
/* 36 */ SETUPDL_36,
/* 37 */ SETUPDL_37,
/* 38 */ SETUPDL_38,
/* 39 */ SETUPDL_39,
/* 40 */ SETUPDL_40,
/* 41 */ SETUPDL_41,
/* 42 */ SETUPDL_42,
/* 43 */ SETUPDL_43,
/* 44 */ SETUPDL_44,
/* 45 */ SETUPDL_45,
/* 46 */ SETUPDL_46,
/* 47 */ SETUPDL_47,
/* 48 */ SETUPDL_48,
/* 49 */ SETUPDL_49,
/* 50 */ SETUPDL_50,
/* 51 */ SETUPDL_51,
/* 52 */ SETUPDL_52,
/* 53 */ SETUPDL_53,
/* 54 */ SETUPDL_54,
/* 55 */ SETUPDL_55,
/* 56 */ SETUPDL_56,
/* 57 */ SETUPDL_57,
/* 58 */ SETUPDL_58,
/* 59 */ SETUPDL_59,
/* 60 */ SETUPDL_60,
/* 61 */ SETUPDL_61,
/* 62 */ SETUPDL_62,
/* 63 */ SETUPDL_63,
/* 64 */ SETUPDL_64,
/* 65 */ SETUPDL_65,
/* 66 */ SETUPDL_66,
/* 67 */ SETUPDL_67,
/* 68 */ SETUPDL_68,
/* 69 */ SETUPDL_69,
/* 70 */ SETUPDL_70,
/* 71 */ SETUPDL_MAX
} SetupDL;
typedef struct { typedef struct {
/* 0x00 */ u8 seqId; /* 0x00 */ u8 seqId;
/* 0x01 */ u8 natureAmbienceId; /* 0x01 */ u8 natureAmbienceId;

View File

@ -2,6 +2,7 @@
#define Z64PLAYER_H #define Z64PLAYER_H
#include "z64actor.h" #include "z64actor.h"
#include "alignment.h"
#include "soh/Enhancements/item-tables/ItemTableTypes.h" #include "soh/Enhancements/item-tables/ItemTableTypes.h"
struct Player; struct Player;
@ -64,84 +65,85 @@ typedef enum {
} PlayerMask; } PlayerMask;
typedef enum { typedef enum {
/* 0x00 */ PLAYER_AP_NONE, /* 0x00 */ PLAYER_IA_NONE,
/* 0x01 */ PLAYER_AP_LAST_USED, /* 0x01 */ PLAYER_IA_LAST_USED,
/* 0x02 */ PLAYER_AP_FISHING_POLE, /* 0x02 */ PLAYER_IA_FISHING_POLE,
/* 0x03 */ PLAYER_AP_SWORD_MASTER, /* 0x03 */ PLAYER_IA_SWORD_MASTER,
/* 0x04 */ PLAYER_AP_SWORD_KOKIRI, /* 0x04 */ PLAYER_IA_SWORD_KOKIRI,
/* 0x05 */ PLAYER_AP_SWORD_BGS, /* 0x05 */ PLAYER_IA_SWORD_BGS,
/* 0x06 */ PLAYER_AP_STICK, /* 0x06 */ PLAYER_IA_STICK,
/* 0x07 */ PLAYER_AP_HAMMER, /* 0x07 */ PLAYER_IA_HAMMER,
/* 0x08 */ PLAYER_AP_BOW, /* 0x08 */ PLAYER_IA_BOW,
/* 0x09 */ PLAYER_AP_BOW_FIRE, /* 0x09 */ PLAYER_IA_BOW_FIRE,
/* 0x0A */ PLAYER_AP_BOW_ICE, /* 0x0A */ PLAYER_IA_BOW_ICE,
/* 0x0B */ PLAYER_AP_BOW_LIGHT, /* 0x0B */ PLAYER_IA_BOW_LIGHT,
/* 0x0C */ PLAYER_AP_BOW_0C, /* 0x0C */ PLAYER_IA_BOW_0C,
/* 0x0D */ PLAYER_AP_BOW_0D, /* 0x0D */ PLAYER_IA_BOW_0D,
/* 0x0E */ PLAYER_AP_BOW_0E, /* 0x0E */ PLAYER_IA_BOW_0E,
/* 0x0F */ PLAYER_AP_SLINGSHOT, /* 0x0F */ PLAYER_IA_SLINGSHOT,
/* 0x10 */ PLAYER_AP_HOOKSHOT, /* 0x10 */ PLAYER_IA_HOOKSHOT,
/* 0x11 */ PLAYER_AP_LONGSHOT, /* 0x11 */ PLAYER_IA_LONGSHOT,
/* 0x12 */ PLAYER_AP_BOMB, /* 0x12 */ PLAYER_IA_BOMB,
/* 0x13 */ PLAYER_AP_BOMBCHU, /* 0x13 */ PLAYER_IA_BOMBCHU,
/* 0x14 */ PLAYER_AP_BOOMERANG, /* 0x14 */ PLAYER_IA_BOOMERANG,
/* 0x15 */ PLAYER_AP_MAGIC_SPELL_15, /* 0x15 */ PLAYER_IA_MAGIC_SPELL_15,
/* 0x16 */ PLAYER_AP_MAGIC_SPELL_16, /* 0x16 */ PLAYER_IA_MAGIC_SPELL_16,
/* 0x17 */ PLAYER_AP_MAGIC_SPELL_17, /* 0x17 */ PLAYER_IA_MAGIC_SPELL_17,
/* 0x18 */ PLAYER_AP_FARORES_WIND, /* 0x18 */ PLAYER_IA_FARORES_WIND,
/* 0x19 */ PLAYER_AP_NAYRUS_LOVE, /* 0x19 */ PLAYER_IA_NAYRUS_LOVE,
/* 0x1A */ PLAYER_AP_DINS_FIRE, /* 0x1A */ PLAYER_IA_DINS_FIRE,
/* 0x1B */ PLAYER_AP_NUT, /* 0x1B */ PLAYER_IA_NUT,
/* 0x1C */ PLAYER_AP_OCARINA_FAIRY, /* 0x1C */ PLAYER_IA_OCARINA_FAIRY,
/* 0x1D */ PLAYER_AP_OCARINA_TIME, /* 0x1D */ PLAYER_IA_OCARINA_TIME,
/* 0x1E */ PLAYER_AP_BOTTLE, /* 0x1E */ PLAYER_IA_BOTTLE,
/* 0x1F */ PLAYER_AP_BOTTLE_FISH, /* 0x1F */ PLAYER_IA_BOTTLE_FISH,
/* 0x20 */ PLAYER_AP_BOTTLE_FIRE, /* 0x20 */ PLAYER_IA_BOTTLE_FIRE,
/* 0x21 */ PLAYER_AP_BOTTLE_BUG, /* 0x21 */ PLAYER_IA_BOTTLE_BUG,
/* 0x22 */ PLAYER_AP_BOTTLE_POE, /* 0x22 */ PLAYER_IA_BOTTLE_POE,
/* 0x23 */ PLAYER_AP_BOTTLE_BIG_POE, /* 0x23 */ PLAYER_IA_BOTTLE_BIG_POE,
/* 0x24 */ PLAYER_AP_BOTTLE_LETTER, /* 0x24 */ PLAYER_IA_BOTTLE_LETTER,
/* 0x25 */ PLAYER_AP_BOTTLE_POTION_RED, /* 0x25 */ PLAYER_IA_BOTTLE_POTION_RED,
/* 0x26 */ PLAYER_AP_BOTTLE_POTION_BLUE, /* 0x26 */ PLAYER_IA_BOTTLE_POTION_BLUE,
/* 0x27 */ PLAYER_AP_BOTTLE_POTION_GREEN, /* 0x27 */ PLAYER_IA_BOTTLE_POTION_GREEN,
/* 0x28 */ PLAYER_AP_BOTTLE_MILK, /* 0x28 */ PLAYER_IA_BOTTLE_MILK,
/* 0x29 */ PLAYER_AP_BOTTLE_MILK_HALF, /* 0x29 */ PLAYER_IA_BOTTLE_MILK_HALF,
/* 0x2A */ PLAYER_AP_BOTTLE_FAIRY, /* 0x2A */ PLAYER_IA_BOTTLE_FAIRY,
/* 0x2B */ PLAYER_AP_LETTER_ZELDA, /* 0x2B */ PLAYER_IA_LETTER_ZELDA,
/* 0x2C */ PLAYER_AP_WEIRD_EGG, /* 0x2C */ PLAYER_IA_WEIRD_EGG,
/* 0x2D */ PLAYER_AP_CHICKEN, /* 0x2D */ PLAYER_IA_CHICKEN,
/* 0x2E */ PLAYER_AP_BEAN, /* 0x2E */ PLAYER_IA_BEAN,
/* 0x2F */ PLAYER_AP_POCKET_EGG, /* 0x2F */ PLAYER_IA_POCKET_EGG,
/* 0x30 */ PLAYER_AP_POCKET_CUCCO, /* 0x30 */ PLAYER_IA_POCKET_CUCCO,
/* 0x31 */ PLAYER_AP_COJIRO, /* 0x31 */ PLAYER_IA_COJIRO,
/* 0x32 */ PLAYER_AP_ODD_MUSHROOM, /* 0x32 */ PLAYER_IA_ODD_MUSHROOM,
/* 0x33 */ PLAYER_AP_ODD_POTION, /* 0x33 */ PLAYER_IA_ODD_POTION,
/* 0x34 */ PLAYER_AP_SAW, /* 0x34 */ PLAYER_IA_SAW,
/* 0x35 */ PLAYER_AP_SWORD_BROKEN, /* 0x35 */ PLAYER_IA_SWORD_BROKEN,
/* 0x36 */ PLAYER_AP_PRESCRIPTION, /* 0x36 */ PLAYER_IA_PRESCRIPTION,
/* 0x37 */ PLAYER_AP_FROG, /* 0x37 */ PLAYER_IA_FROG,
/* 0x38 */ PLAYER_AP_EYEDROPS, /* 0x38 */ PLAYER_IA_EYEDROPS,
/* 0x39 */ PLAYER_AP_CLAIM_CHECK, /* 0x39 */ PLAYER_IA_CLAIM_CHECK,
/* 0x3A */ PLAYER_AP_MASK_KEATON, /* 0x3A */ PLAYER_IA_MASK_KEATON,
/* 0x3B */ PLAYER_AP_MASK_SKULL, /* 0x3B */ PLAYER_IA_MASK_SKULL,
/* 0x3C */ PLAYER_AP_MASK_SPOOKY, /* 0x3C */ PLAYER_IA_MASK_SPOOKY,
/* 0x3D */ PLAYER_AP_MASK_BUNNY, /* 0x3D */ PLAYER_IA_MASK_BUNNY,
/* 0x3E */ PLAYER_AP_MASK_GORON, /* 0x3E */ PLAYER_IA_MASK_GORON,
/* 0x3F */ PLAYER_AP_MASK_ZORA, /* 0x3F */ PLAYER_IA_MASK_ZORA,
/* 0x40 */ PLAYER_AP_MASK_GERUDO, /* 0x40 */ PLAYER_IA_MASK_GERUDO,
/* 0x41 */ PLAYER_AP_MASK_TRUTH, /* 0x41 */ PLAYER_IA_MASK_TRUTH,
/* 0x42 */ PLAYER_AP_LENS, /* 0x42 */ PLAYER_IA_LENS,
/* 0x43 */ PLAYER_AP_SHIELD_DEKU, // Upstream TODO: Document why these entries were added
/* 0x44 */ PLAYER_AP_SHIELD_HYLIAN, /* 0x43 */ PLAYER_IA_SHIELD_DEKU,
/* 0x45 */ PLAYER_AP_SHIELD_MIRROR, /* 0x44 */ PLAYER_IA_SHIELD_HYLIAN,
/* 0x46 */ PLAYER_AP_TUNIC_KOKIRI, /* 0x45 */ PLAYER_IA_SHIELD_MIRROR,
/* 0x47 */ PLAYER_AP_TUNIC_GORON, /* 0x46 */ PLAYER_IA_TUNIC_KOKIRI,
/* 0x48 */ PLAYER_AP_TUNIC_ZORA, /* 0x47 */ PLAYER_IA_TUNIC_GORON,
/* 0x49 */ PLAYER_AP_BOOTS_KOKIRI, /* 0x48 */ PLAYER_IA_TUNIC_ZORA,
/* 0x4A */ PLAYER_AP_BOOTS_IRON, /* 0x49 */ PLAYER_IA_BOOTS_KOKIRI,
/* 0x4B */ PLAYER_AP_BOOTS_HOVER, /* 0x4A */ PLAYER_IA_BOOTS_IRON,
/* 0x4C */ PLAYER_AP_MAX /* 0x4B */ PLAYER_IA_BOOTS_HOVER,
} PlayerActionParam; /* 0x4C */ PLAYER_IA_MAX
} PlayerItemAction;
typedef enum { typedef enum {
/* 0x00 */ PLAYER_LIMB_NONE, /* 0x00 */ PLAYER_LIMB_NONE,
@ -170,27 +172,59 @@ typedef enum {
} PlayerLimb; } PlayerLimb;
typedef enum { typedef enum {
/* 0 */ PLAYER_BODYPART_WAIST, // PLAYER_LIMB_WAIST /* 0x00 */ PLAYER_BODYPART_WAIST, // PLAYER_LIMB_WAIST
/* 1 */ PLAYER_BODYPART_R_THIGH, // PLAYER_LIMB_R_THIGH /* 0x01 */ PLAYER_BODYPART_R_THIGH, // PLAYER_LIMB_R_THIGH
/* 2 */ PLAYER_BODYPART_R_SHIN, // PLAYER_LIMB_R_SHIN /* 0x02 */ PLAYER_BODYPART_R_SHIN, // PLAYER_LIMB_R_SHIN
/* 3 */ PLAYER_BODYPART_R_FOOT, // PLAYER_LIMB_R_FOOT /* 0x03 */ PLAYER_BODYPART_R_FOOT, // PLAYER_LIMB_R_FOOT
/* 4 */ PLAYER_BODYPART_L_THIGH, // PLAYER_LIMB_L_THIGH /* 0x04 */ PLAYER_BODYPART_L_THIGH, // PLAYER_LIMB_L_THIGH
/* 5 */ PLAYER_BODYPART_L_SHIN, // PLAYER_LIMB_L_SHIN /* 0x05 */ PLAYER_BODYPART_L_SHIN, // PLAYER_LIMB_L_SHIN
/* 6 */ PLAYER_BODYPART_L_FOOT, // PLAYER_LIMB_L_FOOT /* 0x06 */ PLAYER_BODYPART_L_FOOT, // PLAYER_LIMB_L_FOOT
/* 7 */ PLAYER_BODYPART_HEAD, // PLAYER_LIMB_HEAD /* 0x07 */ PLAYER_BODYPART_HEAD, // PLAYER_LIMB_HEAD
/* 8 */ PLAYER_BODYPART_HAT, // PLAYER_LIMB_HAT /* 0x08 */ PLAYER_BODYPART_HAT, // PLAYER_LIMB_HAT
/* 9 */ PLAYER_BODYPART_COLLAR, // PLAYER_LIMB_COLLAR /* 0x09 */ PLAYER_BODYPART_COLLAR, // PLAYER_LIMB_COLLAR
/* 10 */ PLAYER_BODYPART_L_SHOULDER, // PLAYER_LIMB_L_SHOULDER /* 0x0A */ PLAYER_BODYPART_L_SHOULDER, // PLAYER_LIMB_L_SHOULDER
/* 11 */ PLAYER_BODYPART_L_FOREARM, // PLAYER_LIMB_L_FOREARM /* 0x0B */ PLAYER_BODYPART_L_FOREARM, // PLAYER_LIMB_L_FOREARM
/* 12 */ PLAYER_BODYPART_L_HAND, // PLAYER_LIMB_L_HAND /* 0x0C */ PLAYER_BODYPART_L_HAND, // PLAYER_LIMB_L_HAND
/* 13 */ PLAYER_BODYPART_R_SHOULDER, // PLAYER_LIMB_R_SHOULDER /* 0x0D */ PLAYER_BODYPART_R_SHOULDER, // PLAYER_LIMB_R_SHOULDER
/* 14 */ PLAYER_BODYPART_R_FOREARM, // PLAYER_LIMB_R_FOREARM /* 0x0E */ PLAYER_BODYPART_R_FOREARM, // PLAYER_LIMB_R_FOREARM
/* 15 */ PLAYER_BODYPART_R_HAND, // PLAYER_LIMB_R_HAND /* 0x0F */ PLAYER_BODYPART_R_HAND, // PLAYER_LIMB_R_HAND
/* 16 */ PLAYER_BODYPART_SHEATH, // PLAYER_LIMB_SHEATH /* 0x10 */ PLAYER_BODYPART_SHEATH, // PLAYER_LIMB_SHEATH
/* 17 */ PLAYER_BODYPART_TORSO, // PLAYER_LIMB_TORSO /* 0x11 */ PLAYER_BODYPART_TORSO, // PLAYER_LIMB_TORSO
/* 18 */ PLAYER_BODYPART_MAX /* 0x12 */ PLAYER_BODYPART_MAX
} PlayerBodyPart; } PlayerBodyPart;
typedef enum {
/* 0 */ PLAYER_MWA_FORWARD_SLASH_1H,
/* 1 */ PLAYER_MWA_FORWARD_SLASH_2H,
/* 2 */ PLAYER_MWA_FORWARD_COMBO_1H,
/* 3 */ PLAYER_MWA_FORWARD_COMBO_2H,
/* 4 */ PLAYER_MWA_RIGHT_SLASH_1H,
/* 5 */ PLAYER_MWA_RIGHT_SLASH_2H,
/* 6 */ PLAYER_MWA_RIGHT_COMBO_1H,
/* 7 */ PLAYER_MWA_RIGHT_COMBO_2H,
/* 8 */ PLAYER_MWA_LEFT_SLASH_1H,
/* 9 */ PLAYER_MWA_LEFT_SLASH_2H,
/* 10 */ PLAYER_MWA_LEFT_COMBO_1H,
/* 11 */ PLAYER_MWA_LEFT_COMBO_2H,
/* 12 */ PLAYER_MWA_STAB_1H,
/* 13 */ PLAYER_MWA_STAB_2H,
/* 14 */ PLAYER_MWA_STAB_COMBO_1H,
/* 15 */ PLAYER_MWA_STAB_COMBO_2H,
/* 16 */ PLAYER_MWA_FLIPSLASH_START,
/* 17 */ PLAYER_MWA_JUMPSLASH_START,
/* 18 */ PLAYER_MWA_FLIPSLASH_FINISH,
/* 19 */ PLAYER_MWA_JUMPSLASH_FINISH,
/* 20 */ PLAYER_MWA_BACKSLASH_RIGHT,
/* 21 */ PLAYER_MWA_BACKSLASH_LEFT,
/* 22 */ PLAYER_MWA_HAMMER_FORWARD,
/* 23 */ PLAYER_MWA_HAMMER_SIDE,
/* 24 */ PLAYER_MWA_SPIN_ATTACK_1H,
/* 25 */ PLAYER_MWA_SPIN_ATTACK_2H,
/* 26 */ PLAYER_MWA_BIG_SPIN_1H,
/* 27 */ PLAYER_MWA_BIG_SPIN_2H,
/* 28 */ PLAYER_MWA_MAX
} PlayerMeleeWeaponAnimation;
typedef enum { typedef enum {
/* -1 */ PLAYER_DOORTYPE_AJAR = -1, /* -1 */ PLAYER_DOORTYPE_AJAR = -1,
/* 0 */ PLAYER_DOORTYPE_NONE, /* 0 */ PLAYER_DOORTYPE_NONE,
@ -200,124 +234,125 @@ typedef enum {
} PlayerDoorType; } PlayerDoorType;
typedef enum { typedef enum {
/* 0 */ PLAYER_MODELGROUP_0, // unused (except with the `Player_OverrideLimbDrawPause` bug) /* 0x00 */ PLAYER_MODELGROUP_0, // unused (except with the `Player_OverrideLimbDrawPause` bug)
/* 1 */ PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD, // kokiri/master sword, shield not in hand /* 0x01 */ PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD, // kokiri/master sword, shield not in hand
/* 2 */ PLAYER_MODELGROUP_SWORD, // kokiri/master sword and possibly shield /* 0x02 */ PLAYER_MODELGROUP_SWORD, // kokiri/master sword and possibly shield
/* 3 */ PLAYER_MODELGROUP_DEFAULT, // non-specific models, for items that don't have particular link models /* 0x03 */ PLAYER_MODELGROUP_DEFAULT, // non-specific models, for items that don't have particular link models
/* 4 */ PLAYER_MODELGROUP_4, // unused, same as PLAYER_MODELGROUP_DEFAULT /* 0x04 */ PLAYER_MODELGROUP_4, // unused, same as PLAYER_MODELGROUP_DEFAULT
/* 5 */ PLAYER_MODELGROUP_BGS, // biggoron sword /* 0x05 */ PLAYER_MODELGROUP_BGS, // biggoron sword
/* 6 */ PLAYER_MODELGROUP_BOW_SLINGSHOT, // bow/slingshot /* 0x06 */ PLAYER_MODELGROUP_BOW_SLINGSHOT, // bow/slingshot
/* 7 */ PLAYER_MODELGROUP_EXPLOSIVES, // bombs, bombchus, same as PLAYER_MODELGROUP_DEFAULT /* 0x07 */ PLAYER_MODELGROUP_EXPLOSIVES, // bombs, bombchus, same as PLAYER_MODELGROUP_DEFAULT
/* 8 */ PLAYER_MODELGROUP_BOOMERANG, /* 0x08 */ PLAYER_MODELGROUP_BOOMERANG,
/* 9 */ PLAYER_MODELGROUP_HOOKSHOT, /* 0x09 */ PLAYER_MODELGROUP_HOOKSHOT,
/* 10 */ PLAYER_MODELGROUP_10, // stick/fishing pole (which are drawn separately) /* 0x0A */ PLAYER_MODELGROUP_10, // stick/fishing pole (which are drawn separately)
/* 11 */ PLAYER_MODELGROUP_HAMMER, /* 0x0B */ PLAYER_MODELGROUP_HAMMER,
/* 12 */ PLAYER_MODELGROUP_OCARINA, // ocarina /* 0x0C */ PLAYER_MODELGROUP_OCARINA, // ocarina
/* 13 */ PLAYER_MODELGROUP_OOT, // ocarina of time /* 0x0D */ PLAYER_MODELGROUP_OOT, // ocarina of time
/* 14 */ PLAYER_MODELGROUP_BOTTLE, // bottles (drawn separately) /* 0x0E */ PLAYER_MODELGROUP_BOTTLE, // bottles (drawn separately)
/* 15 */ PLAYER_MODELGROUP_15, // "last used" /* 0x0F */ PLAYER_MODELGROUP_15, // "last used"
/* 16 */ PLAYER_MODELGROUP_MAX /* 0x10 */ PLAYER_MODELGROUP_MAX
} PlayerModelGroup; } PlayerModelGroup;
typedef enum { typedef enum {
/* 0 */ PLAYER_MODELGROUPENTRY_ANIM, /* 0x00 */ PLAYER_MODELGROUPENTRY_ANIM,
/* 1 */ PLAYER_MODELGROUPENTRY_LEFT_HAND, /* 0x01 */ PLAYER_MODELGROUPENTRY_LEFT_HAND,
/* 2 */ PLAYER_MODELGROUPENTRY_RIGHT_HAND, /* 0x02 */ PLAYER_MODELGROUPENTRY_RIGHT_HAND,
/* 3 */ PLAYER_MODELGROUPENTRY_SHEATH, /* 0x03 */ PLAYER_MODELGROUPENTRY_SHEATH,
/* 4 */ PLAYER_MODELGROUPENTRY_WAIST, /* 0x04 */ PLAYER_MODELGROUPENTRY_WAIST,
/* 5 */ PLAYER_MODELGROUPENTRY_MAX /* 0x05 */ PLAYER_MODELGROUPENTRY_MAX
} PlayerModelGroupEntry; } PlayerModelGroupEntry;
typedef enum { typedef enum {
// left hand // left hand
/* 0 */ PLAYER_MODELTYPE_LH_OPEN, // empty open hand /* 0x00 */ PLAYER_MODELTYPE_LH_OPEN, // empty open hand
/* 1 */ PLAYER_MODELTYPE_LH_CLOSED, // empty closed hand /* 0x01 */ PLAYER_MODELTYPE_LH_CLOSED, // empty closed hand
/* 2 */ PLAYER_MODELTYPE_LH_SWORD, // holding kokiri/master sword /* 0x02 */ PLAYER_MODELTYPE_LH_SWORD, // holding kokiri/master sword
/* 3 */ PLAYER_MODELTYPE_3, // unused, same as PLAYER_MODELTYPE_LH_SWORD /* 0x03 */ PLAYER_MODELTYPE_LH_SWORD_2, // unused, same as PLAYER_MODELTYPE_LH_SWORD
/* 4 */ PLAYER_MODELTYPE_LH_BGS, // holding bgs/broken giant knife (child: master sword) /* 0x04 */ PLAYER_MODELTYPE_LH_BGS, // holding bgs/broken giant knife (child: master sword)
/* 5 */ PLAYER_MODELTYPE_LH_HAMMER, // holding hammer (child: empty hand) /* 0x05 */ PLAYER_MODELTYPE_LH_HAMMER, // holding hammer (child: empty hand)
/* 6 */ PLAYER_MODELTYPE_LH_BOOMERANG, // holding boomerang (adult: empty hand) /* 0x06 */ PLAYER_MODELTYPE_LH_BOOMERANG, // holding boomerang (adult: empty hand)
/* 7 */ PLAYER_MODELTYPE_LH_BOTTLE, // holding bottle (bottle drawn separately) /* 0x07 */ PLAYER_MODELTYPE_LH_BOTTLE, // holding bottle (bottle drawn separately)
// right hand // right hand
/* 8 */ PLAYER_MODELTYPE_RH_OPEN, // empty open hand /* 0x08 */ PLAYER_MODELTYPE_RH_OPEN, // empty open hand
/* 9 */ PLAYER_MODELTYPE_RH_CLOSED, // empty closed hand /* 0x09 */ PLAYER_MODELTYPE_RH_CLOSED, // empty closed hand
/* 10 */ PLAYER_MODELTYPE_RH_SHIELD, // holding a shield (including no shield) /* 0x0A */ PLAYER_MODELTYPE_RH_SHIELD, // holding a shield (including no shield)
/* 11 */ PLAYER_MODELTYPE_RH_BOW_SLINGSHOT, // holding bow/slingshot /* 0x0B */ PLAYER_MODELTYPE_RH_BOW_SLINGSHOT, // holding bow/slingshot
/* 12 */ PLAYER_MODELTYPE_12, // unused, same as PLAYER_MODELTYPE_RH_BOW_SLINGSHOT /* 0x0C */ PLAYER_MODELTYPE_RH_BOW_SLINGSHOT_2, // unused, same as PLAYER_MODELTYPE_RH_BOW_SLINGSHOT
/* 13 */ PLAYER_MODELTYPE_RH_OCARINA, // holding ocarina (child: fairy ocarina, adult: OoT) /* 0x0D */ PLAYER_MODELTYPE_RH_OCARINA, // holding ocarina (child: fairy ocarina, adult: OoT)
/* 14 */ PLAYER_MODELTYPE_RH_OOT, // holding OoT /* 0x0E */ PLAYER_MODELTYPE_RH_OOT, // holding OoT
/* 15 */ PLAYER_MODELTYPE_RH_HOOKSHOT, // holding hookshot (child: empty hand) /* 0x0F */ PLAYER_MODELTYPE_RH_HOOKSHOT, // holding hookshot (child: empty hand)
// sheath // sheath
/* 16 */ PLAYER_MODELTYPE_SHEATH_16, // sheathed kokiri/master sword? /* 0x10 */ PLAYER_MODELTYPE_SHEATH_16, // sheathed kokiri/master sword?
/* 17 */ PLAYER_MODELTYPE_SHEATH_17, // empty sheath? /* 0x11 */ PLAYER_MODELTYPE_SHEATH_17, // empty sheath?
/* 18 */ PLAYER_MODELTYPE_SHEATH_18, // sword sheathed and shield on back? /* 0x12 */ PLAYER_MODELTYPE_SHEATH_18, // sword sheathed and shield on back?
/* 19 */ PLAYER_MODELTYPE_SHEATH_19, // empty sheath and shield on back? /* 0x13 */ PLAYER_MODELTYPE_SHEATH_19, // empty sheath and shield on back?
// waist // waist
/* 20 */ PLAYER_MODELTYPE_WAIST, /* 0x14 */ PLAYER_MODELTYPE_WAIST,
/* 21 */ PLAYER_MODELTYPE_MAX, /* 0x15 */ PLAYER_MODELTYPE_MAX,
/* 0xFF */ PLAYER_MODELTYPE_RH_FF = 0xFF // disable shield collider, cutscene-specific /* 0xFF */ PLAYER_MODELTYPE_RH_FF = 0xFF // disable shield collider, cutscene-specific
} PlayerModelType; } PlayerModelType;
typedef enum { typedef enum {
/* 0 */ PLAYER_ANIMTYPE_0, /* 0x00 */ PLAYER_ANIMTYPE_0,
/* 1 */ PLAYER_ANIMTYPE_1, /* 0x01 */ PLAYER_ANIMTYPE_1,
/* 2 */ PLAYER_ANIMTYPE_2, /* 0x02 */ PLAYER_ANIMTYPE_2,
/* 3 */ PLAYER_ANIMTYPE_3, /* 0x03 */ PLAYER_ANIMTYPE_3,
/* 4 */ PLAYER_ANIMTYPE_4, /* 0x04 */ PLAYER_ANIMTYPE_4,
/* 5 */ PLAYER_ANIMTYPE_5, /* 0x05 */ PLAYER_ANIMTYPE_5,
/* 6 */ PLAYER_ANIMTYPE_MAX /* 0x06 */ PLAYER_ANIMTYPE_MAX
} PlayerAnimType; } PlayerAnimType;
typedef enum { typedef enum {
/* 0 */ PLAYER_ANIMGROUP_0, /* 0x00 */ PLAYER_ANIMGROUP_0,
/* 1 */ PLAYER_ANIMGROUP_1, /* 0x01 */ PLAYER_ANIMGROUP_1,
/* 2 */ PLAYER_ANIMGROUP_2, /* 0x02 */ PLAYER_ANIMGROUP_2,
/* 3 */ PLAYER_ANIMGROUP_3, /* 0x03 */ PLAYER_ANIMGROUP_3,
/* 4 */ PLAYER_ANIMGROUP_4, /* 0x04 */ PLAYER_ANIMGROUP_4,
/* 5 */ PLAYER_ANIMGROUP_5, /* 0x05 */ PLAYER_ANIMGROUP_5,
/* 6 */ PLAYER_ANIMGROUP_6, /* 0x06 */ PLAYER_ANIMGROUP_6,
/* 7 */ PLAYER_ANIMGROUP_7, /* 0x07 */ PLAYER_ANIMGROUP_7,
/* 8 */ PLAYER_ANIMGROUP_8, /* 0x08 */ PLAYER_ANIMGROUP_8,
/* 9 */ PLAYER_ANIMGROUP_9, /* 0x09 */ PLAYER_ANIMGROUP_9,
/* 10 */ PLAYER_ANIMGROUP_10, /* 0x0A */ PLAYER_ANIMGROUP_10,
/* 11 */ PLAYER_ANIMGROUP_11, /* 0x0B */ PLAYER_ANIMGROUP_11,
/* 12 */ PLAYER_ANIMGROUP_12, /* 0x0C */ PLAYER_ANIMGROUP_12,
/* 13 */ PLAYER_ANIMGROUP_13, /* 0x0D */ PLAYER_ANIMGROUP_13,
/* 14 */ PLAYER_ANIMGROUP_14, /* 0x0E */ PLAYER_ANIMGROUP_14,
/* 15 */ PLAYER_ANIMGROUP_15, /* 0x0F */ PLAYER_ANIMGROUP_15,
/* 16 */ PLAYER_ANIMGROUP_16, /* 0x10 */ PLAYER_ANIMGROUP_16,
/* 17 */ PLAYER_ANIMGROUP_17, /* 0x11 */ PLAYER_ANIMGROUP_17,
/* 18 */ PLAYER_ANIMGROUP_18, /* 0x12 */ PLAYER_ANIMGROUP_18,
/* 19 */ PLAYER_ANIMGROUP_19, /* 0x13 */ PLAYER_ANIMGROUP_19,
/* 20 */ PLAYER_ANIMGROUP_20, /* 0x14 */ PLAYER_ANIMGROUP_20,
/* 21 */ PLAYER_ANIMGROUP_21, /* 0x15 */ PLAYER_ANIMGROUP_21,
/* 22 */ PLAYER_ANIMGROUP_22, /* 0x16 */ PLAYER_ANIMGROUP_22,
/* 23 */ PLAYER_ANIMGROUP_23, /* 0x17 */ PLAYER_ANIMGROUP_23,
/* 24 */ PLAYER_ANIMGROUP_24, /* 0x18 */ PLAYER_ANIMGROUP_24,
/* 25 */ PLAYER_ANIMGROUP_25, /* 0x19 */ PLAYER_ANIMGROUP_25,
/* 26 */ PLAYER_ANIMGROUP_26, /* 0x1A */ PLAYER_ANIMGROUP_26,
/* 27 */ PLAYER_ANIMGROUP_27, /* 0x1B */ PLAYER_ANIMGROUP_27,
/* 28 */ PLAYER_ANIMGROUP_28, /* 0x1C */ PLAYER_ANIMGROUP_28,
/* 29 */ PLAYER_ANIMGROUP_29, /* 0x1D */ PLAYER_ANIMGROUP_29,
/* 30 */ PLAYER_ANIMGROUP_30, /* 0x1E */ PLAYER_ANIMGROUP_30,
/* 31 */ PLAYER_ANIMGROUP_31, /* 0x1F */ PLAYER_ANIMGROUP_31,
/* 32 */ PLAYER_ANIMGROUP_32, /* 0x20 */ PLAYER_ANIMGROUP_32,
/* 33 */ PLAYER_ANIMGROUP_33, /* 0x21 */ PLAYER_ANIMGROUP_33,
/* 34 */ PLAYER_ANIMGROUP_34, /* 0x22 */ PLAYER_ANIMGROUP_34,
/* 35 */ PLAYER_ANIMGROUP_35, /* 0x23 */ PLAYER_ANIMGROUP_35,
/* 36 */ PLAYER_ANIMGROUP_36, /* 0x24 */ PLAYER_ANIMGROUP_36,
/* 37 */ PLAYER_ANIMGROUP_37, /* 0x25 */ PLAYER_ANIMGROUP_37,
/* 38 */ PLAYER_ANIMGROUP_38, /* 0x26 */ PLAYER_ANIMGROUP_38,
/* 39 */ PLAYER_ANIMGROUP_39, /* 0x27 */ PLAYER_ANIMGROUP_39,
/* 40 */ PLAYER_ANIMGROUP_40, /* 0x28 */ PLAYER_ANIMGROUP_40,
/* 41 */ PLAYER_ANIMGROUP_41, /* 0x29 */ PLAYER_ANIMGROUP_41,
/* 42 */ PLAYER_ANIMGROUP_42, /* 0x2A */ PLAYER_ANIMGROUP_42,
/* 43 */ PLAYER_ANIMGROUP_43, /* 0x2B */ PLAYER_ANIMGROUP_43,
/* 44 */ PLAYER_ANIMGROUP_44, /* 0x2C */ PLAYER_ANIMGROUP_44,
/* 45 */ PLAYER_ANIMGROUP_MAX /* 0x2D */ PLAYER_ANIMGROUP_MAX
} PlayerAnimGroup; } PlayerAnimGroup;
#define PLAYER_LIMB_BUF_COUNT PLAYER_LIMB_MAX + 2 // 2 extra entries in limb buffers? #define LIMB_BUF_COUNT(limbCount) ((ALIGN16((limbCount) * sizeof(Vec3s)) + sizeof(Vec3s) - 1) / sizeof(Vec3s))
#define PLAYER_LIMB_BUF_COUNT LIMB_BUF_COUNT(PLAYER_LIMB_MAX)
typedef struct { typedef struct {
/* 0x00 */ f32 unk_00; /* 0x00 */ f32 unk_00;
@ -361,6 +396,9 @@ typedef struct {
/* 0x10 */ Vec3f base; /* 0x10 */ Vec3f base;
} WeaponInfo; // size = 0x1C } WeaponInfo; // size = 0x1C
// #region SOH [General]
// Supporting pendingFlag
// Upstream TODO: Rename these to be more obviously SoH specific
typedef enum { typedef enum {
FLAG_NONE, FLAG_NONE,
FLAG_SCENE_SWITCH, FLAG_SCENE_SWITCH,
@ -375,9 +413,10 @@ typedef struct {
/* 0x00 */ s32 flagID; // which flag to set when Player_SetPendingFlag is called /* 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 /* 0x04 */ FlagType flagType; // type of flag to set when Player_SetPendingFlag is called
} PendingFlag; // size = 0x06 } PendingFlag; // size = 0x06
// #endregion
#define PLAYER_STATE1_0 (1 << 0) #define PLAYER_STATE1_0 (1 << 0)
#define PLAYER_STATE1_1 (1 << 1) #define PLAYER_STATE1_SWINGING_BOTTLE (1 << 1)
#define PLAYER_STATE1_2 (1 << 2) #define PLAYER_STATE1_2 (1 << 2)
#define PLAYER_STATE1_3 (1 << 3) #define PLAYER_STATE1_3 (1 << 3)
#define PLAYER_STATE1_4 (1 << 4) #define PLAYER_STATE1_4 (1 << 4)
@ -425,9 +464,9 @@ typedef struct {
#define PLAYER_STATE2_13 (1 << 13) #define PLAYER_STATE2_13 (1 << 13)
#define PLAYER_STATE2_14 (1 << 14) #define PLAYER_STATE2_14 (1 << 14)
#define PLAYER_STATE2_15 (1 << 15) #define PLAYER_STATE2_15 (1 << 15)
#define PLAYER_STATE2_16 (1 << 16) #define PLAYER_STATE2_DO_ACTION_ENTER (1 << 16) // Turns on the "Enter On A" DoAction
#define PLAYER_STATE2_17 (1 << 17) #define PLAYER_STATE2_17 (1 << 17)
#define PLAYER_STATE2_18 (1 << 18) #define PLAYER_STATE2_CRAWLING (1 << 18) // Crawling through a crawlspace
#define PLAYER_STATE2_19 (1 << 19) #define PLAYER_STATE2_19 (1 << 19)
#define PLAYER_STATE2_20 (1 << 20) #define PLAYER_STATE2_20 (1 << 20)
#define PLAYER_STATE2_21 (1 << 21) #define PLAYER_STATE2_21 (1 << 21)
@ -448,7 +487,7 @@ typedef struct {
#define PLAYER_STATE3_3 (1 << 3) #define PLAYER_STATE3_3 (1 << 3)
#define PLAYER_STATE3_4 (1 << 4) #define PLAYER_STATE3_4 (1 << 4)
#define PLAYER_STATE3_5 (1 << 5) #define PLAYER_STATE3_5 (1 << 5)
#define PLAYER_STATE3_6 (1 << 6) #define PLAYER_STATE3_RESTORE_NAYRUS_LOVE (1 << 6) // Set by ocarina effects actors when destroyed to signal Nayru's Love may be restored (see `ACTOROVL_ALLOC_ABSOLUTE`)
#define PLAYER_STATE3_7 (1 << 7) #define PLAYER_STATE3_7 (1 << 7)
typedef void (*PlayerFunc674)(struct Player*, struct PlayState*); typedef void (*PlayerFunc674)(struct Player*, struct PlayState*);
@ -458,14 +497,14 @@ typedef void (*PlayerFuncA74)(struct PlayState*, struct Player*);
typedef struct Player { typedef struct Player {
/* 0x0000 */ Actor actor; /* 0x0000 */ Actor actor;
/* 0x014C */ s8 currentTunic; // current tunic from `PlayerTunic` /* 0x014C */ s8 currentTunic; // current tunic from `PlayerTunic`
/* 0x014D */ s8 currentSwordItem; // current sword Item ID /* 0x014D */ s8 currentSwordItemId;
/* 0x014E */ s8 currentShield; // current shield from `PlayerShield` /* 0x014E */ s8 currentShield; // current shield from `PlayerShield`
/* 0x014F */ s8 currentBoots; // current boots from `PlayerBoots` /* 0x014F */ s8 currentBoots; // current boots from `PlayerBoots`
/* 0x0150 */ s8 heldItemButton; // Button index for the item currently used /* 0x0150 */ s8 heldItemButton; // Button index for the item currently used
/* 0x0151 */ s8 heldItemActionParam; // Action param for the item currently used /* 0x0151 */ s8 heldItemAction; // Item action for the item currently used
/* 0x0152 */ u8 heldItemId; // Item id for the item currently used /* 0x0152 */ u8 heldItemId; // Item id for the item currently used
/* 0x0153 */ s8 prevBoots; // previous boots from `PlayerBoots` /* 0x0153 */ s8 prevBoots; // previous boots from `PlayerBoots`
/* 0x0154 */ s8 itemActionParam; // the difference between this and heldItemActionParam is unclear /* 0x0154 */ s8 itemAction; // the difference between this and heldItemAction is unclear
/* 0x0155 */ char unk_155[0x003]; /* 0x0155 */ char unk_155[0x003];
/* 0x0158 */ u8 modelGroup; /* 0x0158 */ u8 modelGroup;
/* 0x0159 */ u8 nextModelGroup; /* 0x0159 */ u8 nextModelGroup;
@ -499,7 +538,7 @@ typedef struct Player {
/* 0x042D */ s8 doorDirection; /* 0x042D */ s8 doorDirection;
/* 0x042E */ s16 doorTimer; /* 0x042E */ s16 doorTimer;
/* 0x0430 */ Actor* doorActor; /* 0x0430 */ Actor* doorActor;
/* 0x0434 */ s16 getItemId; /* 0x0434 */ s16 getItemId; // Upstream TODO: Document why this is s16 while it's s8 upstream
/* 0x0436 */ u16 getItemDirection; /* 0x0436 */ u16 getItemDirection;
/* 0x0438 */ Actor* interactRangeActor; /* 0x0438 */ Actor* interactRangeActor;
/* 0x043C */ s8 mountSide; /* 0x043C */ s8 mountSide;
@ -514,16 +553,16 @@ typedef struct Player {
/* 0x0450 */ Vec3f unk_450; /* 0x0450 */ Vec3f unk_450;
/* 0x045C */ Vec3f unk_45C; /* 0x045C */ Vec3f unk_45C;
/* 0x0468 */ char unk_468[0x002]; /* 0x0468 */ char unk_468[0x002];
/* 0x046A */ s16 unk_46A; /* 0x046A */ s16 doorBgCamIndex;
/* 0x046C */ s16 unk_46C; /* 0x046C */ s16 subCamId;
/* 0x046E */ char unk_46E[0x02A]; /* 0x046E */ char unk_46E[0x02A];
/* 0x0498 */ ColliderCylinder cylinder; /* 0x0498 */ ColliderCylinder cylinder;
/* 0x04E4 */ ColliderQuad swordQuads[2]; /* 0x04E4 */ ColliderQuad meleeWeaponQuads[2];
/* 0x05E4 */ ColliderQuad shieldQuad; /* 0x05E4 */ ColliderQuad shieldQuad;
/* 0x0664 */ Actor* unk_664; /* 0x0664 */ Actor* unk_664;
/* 0x0668 */ char unk_668[0x004]; /* 0x0668 */ char unk_668[0x004];
/* 0x066C */ s32 unk_66C; /* 0x066C */ s32 unk_66C;
/* 0x0670 */ s32 swordEffectIndex; /* 0x0670 */ s32 meleeWeaponEffectIndex;
/* 0x0674 */ PlayerFunc674 func_674; /* 0x0674 */ PlayerFunc674 func_674;
/* 0x0678 */ PlayerAgeProperties* ageProperties; /* 0x0678 */ PlayerAgeProperties* ageProperties;
/* 0x067C */ u32 stateFlags1; /* 0x067C */ u32 stateFlags1;
@ -565,8 +604,8 @@ typedef struct Player {
/* 0x083C */ s16 currentYaw; /* 0x083C */ s16 currentYaw;
/* 0x083E */ s16 targetYaw; /* 0x083E */ s16 targetYaw;
/* 0x0840 */ u16 unk_840; /* 0x0840 */ u16 unk_840;
/* 0x0842 */ s8 swordAnimation; /* 0x0842 */ s8 meleeWeaponAnimation;
/* 0x0843 */ s8 swordState; /* 0x0843 */ s8 swordState; // Upstream TODO: meleeWeaponState
/* 0x0844 */ s8 unk_844; /* 0x0844 */ s8 unk_844;
/* 0x0845 */ u8 unk_845; /* 0x0845 */ u8 unk_845;
/* 0x0846 */ u8 unk_846; /* 0x0846 */ u8 unk_846;
@ -609,14 +648,14 @@ typedef struct Player {
/* 0x08A2 */ s16 unk_8A2; /* 0x08A2 */ s16 unk_8A2;
/* 0x08A4 */ f32 unk_8A4; /* 0x08A4 */ f32 unk_8A4;
/* 0x08A8 */ f32 unk_8A8; /* 0x08A8 */ f32 unk_8A8;
/* 0x08AC */ f32 windSpeed; /* 0x08AC */ f32 windSpeed; // Pushing player, examples include water currents, floor conveyors, climbing sloped surfaces // Upstream TODO: pushedSpeed
/* 0x08B0 */ s16 windDirection; /* 0x08B0 */ s16 windDirection; // Yaw direction of player being pushed // Upstream TODO: pushedYaw
/* 0x08B4 */ WeaponInfo swordInfo[3]; /* 0x08B4 */ WeaponInfo meleeWeaponInfo[3];
/* 0x0908 */ Vec3f bodyPartsPos[18]; /* 0x0908 */ Vec3f bodyPartsPos[PLAYER_BODYPART_MAX];
/* 0x09E0 */ MtxF mf_9E0; /* 0x09E0 */ MtxF mf_9E0;
/* 0x0A20 */ MtxF shieldMf; /* 0x0A20 */ MtxF shieldMf;
/* 0x0A60 */ u8 isBurning; /* 0x0A60 */ u8 isBurning;
/* 0x0A61 */ u8 flameTimers[18]; // one flame per body part /* 0x0A61 */ u8 flameTimers[PLAYER_BODYPART_MAX]; // one flame per body part
/* 0x0A73 */ u8 unk_A73; /* 0x0A73 */ u8 unk_A73;
/* 0x0A74 */ PlayerFuncA74 func_A74; /* 0x0A74 */ PlayerFuncA74 func_A74;
/* 0x0A78 */ s8 invincibilityTimer; // prevents damage when nonzero (positive = visible, counts towards zero each frame) /* 0x0A78 */ s8 invincibilityTimer; // prevents damage when nonzero (positive = visible, counts towards zero each frame)
@ -630,9 +669,15 @@ typedef struct Player {
/* 0x0A86 */ s8 unk_A86; /* 0x0A86 */ s8 unk_A86;
/* 0x0A87 */ u8 unk_A87; /* 0x0A87 */ u8 unk_A87;
/* 0x0A88 */ Vec3f unk_A88; // previous body part 0 position /* 0x0A88 */ Vec3f unk_A88; // previous body part 0 position
/* 0x0A95 */ PendingFlag pendingFlag; // #region SOH [General]
/* 0x0AA1 */ u8 boomerangQuickRecall; // Has the player pressed the boomerang button while it's in the air still? // Upstream TODO: Rename these to be more obviously SoH specific
/* 0x0AA2 */ GetItemEntry getItemEntry; /* */ PendingFlag pendingFlag;
} Player; // size = 0xAAA /* */ GetItemEntry getItemEntry;
// #endregion
// #region SOH [Enhancements]
// Upstream TODO: Rename this to make it more obvious it is apart of an enhancement
/* */ u8 boomerangQuickRecall; // Has the player pressed the boomerang button while it's in the air still?
// #endregion
} Player; // size = 0xA94
#endif #endif

View File

@ -9,16 +9,42 @@
#include "soh/Enhancements/gameplaystats.h" #include "soh/Enhancements/gameplaystats.h"
#include "soh/Enhancements/randomizer/randomizer_entrance.h" #include "soh/Enhancements/randomizer/randomizer_entrance.h"
typedef enum {
/* 0x0 */ MAGIC_STATE_IDLE, // Regular gameplay
/* 0x1 */ MAGIC_STATE_CONSUME_SETUP, // Sets the speed at which magic border flashes
/* 0x2 */ MAGIC_STATE_CONSUME, // Consume magic until target is reached or no more magic is available
/* 0x3 */ MAGIC_STATE_METER_FLASH_1, // Flashes border and freezes Dark Link
/* 0x4 */ MAGIC_STATE_METER_FLASH_2, // Flashes border and draws yellow magic to preview target consumption
/* 0x5 */ MAGIC_STATE_RESET, // Reset colors and return to idle
/* 0x6 */ MAGIC_STATE_METER_FLASH_3, // Flashes border with no additional behaviour
/* 0x7 */ MAGIC_STATE_CONSUME_LENS, // Magic slowly consumed by lens.
/* 0x8 */ MAGIC_STATE_STEP_CAPACITY, // Step `magicCapacity` to full capacity
/* 0x9 */ MAGIC_STATE_FILL, // Add magic until magicFillTarget is reached.
/* 0xA */ MAGIC_STATE_ADD // Add requested magic
} MagicState;
typedef enum {
/* 0 */ MAGIC_CONSUME_NOW, // Consume Magic immediately without preview
/* 1 */ MAGIC_CONSUME_WAIT_NO_PREVIEW, // Sets consume target but waits to consume. No yellow magic preview to target consumption. Unused
/* 2 */ MAGIC_CONSUME_NOW_ALT, // Identical behaviour to MAGIC_CONSUME_NOW. Unused
/* 3 */ MAGIC_CONSUME_LENS, // Lens consumption
/* 4 */ MAGIC_CONSUME_WAIT_PREVIEW, // Sets consume target but waits to consume. Draws yellow magic to target consumption
/* 5 */ MAGIC_ADD // Sets a target to add magic
} MagicChangeType;
#define MAGIC_NORMAL_METER 0x30
#define MAGIC_DOUBLE_METER (2 * MAGIC_NORMAL_METER)
typedef struct { typedef struct {
/* 0x00 */ u8 buttonItems[8]; /* 0x00 */ u8 buttonItems[8]; // SOH [Enhancements] Changed from 4 to 8 to support Dpad equips
/* 0x04 */ u8 cButtonSlots[7]; /* 0x04 */ u8 cButtonSlots[7]; // SOH [Enhancements] Changed from 3 to 7 to support Dpad equips
/* 0x08 */ u16 equipment; /* 0x08 */ u16 equipment; // a mask where each nibble corresponds to a type of equipment `EquipmentType`, and each nibble is a piece `EquipValue*`
} ItemEquips; // size = 0x0A } ItemEquips; // size = 0x0A
typedef struct { typedef struct {
/* 0x00 */ u8 items[24]; /* 0x00 */ u8 items[24];
/* 0x18 */ s8 ammo[16]; /* 0x18 */ s8 ammo[16];
/* 0x28 */ u16 equipment; /* 0x28 */ u16 equipment; // a mask where each nibble corresponds to a type of equipment `EquipmentType`, and each bit to an owned piece `EquipInv*`
/* 0x2C */ u32 upgrades; /* 0x2C */ u32 upgrades;
/* 0x30 */ u32 questItems; /* 0x30 */ u32 questItems;
/* 0x34 */ u8 dungeonItems[20]; /* 0x34 */ u8 dungeonItems[20];
@ -49,11 +75,24 @@ typedef struct {
} SavedSceneFlags; // size = 0x1C } SavedSceneFlags; // size = 0x1C
typedef struct { typedef struct {
/* 0x00 */ s16 scene; /* 0x00 */ s16 scene; // Upstream TODO: sceneId
/* 0x02 */ Vec3s pos; /* 0x02 */ Vec3s pos;
/* 0x08 */ s16 angle; /* 0x08 */ s16 angle;
} HorseData; // size = 0x0A } HorseData; // size = 0x0A
/**
* The respawn mode names refer to the perceived player movement when respawning
* "down": being on ground
* "return": coming from the ground
* "top": coming from the air
*/
typedef enum {
/* 0x00 */ RESPAWN_MODE_DOWN, /* Normal Void Outs */
/* 0x01 */ RESPAWN_MODE_RETURN, /* Grotto Returnpoints */
/* 0x02 */ RESPAWN_MODE_TOP, /* Farore's Wind */
/* 0x03 */ RESPAWN_MODE_MAX
} RespawnMode;
typedef struct { typedef struct {
/* 0x00 */ Vec3f pos; /* 0x00 */ Vec3f pos;
/* 0x0C */ s16 yaw; /* 0x0C */ s16 yaw;
@ -93,60 +132,71 @@ typedef struct {
typedef struct { typedef struct {
/* 0x0000 */ s32 entranceIndex; // start of `save` substruct, originally called "memory" /* 0x0000 */ s32 entranceIndex; // start of `save` substruct, originally called "memory"
/* 0x0004 */ s32 linkAge; // 0: Adult; 1: Child /* 0x0004 */ s32 linkAge; // 0: Adult; 1: Child (see enum `LinkAge`)
/* 0x0008 */ s32 cutsceneIndex; /* 0x0008 */ s32 cutsceneIndex;
/* 0x000C */ u16 dayTime; // "zelda_time" /* 0x000C */ u16 dayTime; // "zelda_time"
/* 0x0010 */ s32 nightFlag; /* 0x0010 */ s32 nightFlag;
/* 0x0014 */ s32 totalDays; /* 0x0014 */ s32 totalDays;
/* 0x0018 */ s32 bgsDayCount; // increments with totalDays, can be cleared with `Environment_ClearBgsDayCount` /* 0x0018 */ s32 bgsDayCount; // increments with totalDays, can be cleared with `Environment_ClearBgsDayCount`
/* 0x001C */ char newf[6]; // string "ZELDAZ". start of `info` substruct, originally called "information"
/* 0x0022 */ u16 deaths; /* 0x0022 */ u16 deaths;
/* 0x0024 */ char playerName[8]; /* 0x0024 */ char playerName[8];
/* 0x002C */ s16 n64ddFlag; /* 0x002C */ s16 n64ddFlag;
/* 0x002E */ s16 healthCapacity; // "max_life" /* 0x002E */ s16 healthCapacity; // "max_life"
/* 0x0030 */ s16 health; // "now_life" /* 0x0030 */ s16 health; // "now_life"
/* 0x0032 */ s8 magicLevel; /* 0x0032 */ s8 magicLevel; // 0 for no magic/new load, 1 for magic, 2 for double magic
/* 0x0033 */ s8 magic; /* 0x0033 */ s8 magic; // current magic available for use
/* 0x0034 */ s16 rupees; /* 0x0034 */ s16 rupees;
/* 0x0036 */ u16 swordHealth; /* 0x0036 */ u16 swordHealth;
/* 0x0038 */ u16 naviTimer; /* 0x0038 */ u16 naviTimer;
/* 0x003A */ u8 magicAcquired; /* 0x003A */ u8 isMagicAcquired;
/* 0x003C */ u8 doubleMagic; /* 0x003B */ char unk_3B[0x01];
/* 0x003D */ u8 doubleDefense; /* 0x003C */ u8 isDoubleMagicAcquired;
/* 0x003D */ u8 isDoubleDefenseAcquired;
/* 0x003E */ u8 bgsFlag; /* 0x003E */ u8 bgsFlag;
/* 0x003F */ u8 ocarinaGameRoundNum; /* 0x003F */ u8 ocarinaGameRoundNum;
/* 0x0040 */ ItemEquips childEquips; /* 0x0040 */ ItemEquips childEquips;
/* 0x004A */ ItemEquips adultEquips; /* 0x004A */ ItemEquips adultEquips;
/* 0x0054 */ u32 unk_54; // this may be incorrect, currently used for alignement /* 0x0054 */ u32 unk_54; // this may be incorrect, currently used for alignment
/* 0x0066 */ s16 savedSceneNum; /* 0x0058 */ char unk_58[0x0E];
/* 0x0066 */ s16 savedSceneNum; // Upstream TODO: sceneId
/* 0x0068 */ ItemEquips equips; /* 0x0068 */ ItemEquips equips;
/* 0x0074 */ Inventory inventory; /* 0x0074 */ Inventory inventory;
/* 0x00D4 */ SavedSceneFlags sceneFlags[124]; /* 0x00D4 */ SavedSceneFlags sceneFlags[124];
/* 0x0E64 */ FaroresWindData fw; /* 0x0E64 */ FaroresWindData fw;
/* 0x0E8C */ char unk_E8C[0x10];
/* 0x0E9C */ s32 gsFlags[6]; /* 0x0E9C */ s32 gsFlags[6];
/* 0x0EB4 */ char unk_EB4[0x4];
/* 0x0EB8 */ s32 highScores[7]; /* 0x0EB8 */ s32 highScores[7];
/* 0x0ED4 */ u16 eventChkInf[14]; // "event_chk_inf" /* 0x0ED4 */ u16 eventChkInf[14]; // "event_chk_inf"
/* 0x0EF0 */ u16 itemGetInf[4]; // "item_get_inf" /* 0x0EF0 */ u16 itemGetInf[4]; // "item_get_inf"
/* 0x0EF8 */ u16 infTable[30]; // "inf_table" /* 0x0EF8 */ u16 infTable[30]; // "inf_table"
/* 0x0F34 */ char unk_F34[0x04];
/* 0x0F38 */ u32 worldMapAreaData; // "area_arrival" /* 0x0F38 */ u32 worldMapAreaData; // "area_arrival"
/* 0x0F40 */ u8 scarecrowCustomSongSet; /* 0x0F3C */ char unk_F3C[0x4];
/* 0x0F41 */ OcarinaNote scarecrowCustomSong[108]; /* 0x0F40 */ u8 scarecrowLongSongSet;
/* 0x0F41 */ OcarinaNote scarecrowLongSong[108]; // Upstream TODO: Audio
/* 0x12A1 */ char unk_12A1[0x24];
/* 0x12C5 */ u8 scarecrowSpawnSongSet; /* 0x12C5 */ u8 scarecrowSpawnSongSet;
/* 0x12C6 */ OcarinaNote scarecrowSpawnSong[16]; /* 0x12C6 */ OcarinaNote scarecrowSpawnSong[16]; // Upstream TODO: Audio
/* 0x1346 */ char unk_1346[0x02]; /* 0x1346 */ char unk_1346[0x02];
/* 0x1348 */ HorseData horseData; /* 0x1348 */ HorseData horseData;
/* 0x1352 */ u16 checksum; // "check_sum"
/* 0x1354 */ s32 fileNum; // "file_no" /* 0x1354 */ s32 fileNum; // "file_no"
/* 0x1358 */ char unk_1358[0x0004]; /* 0x1358 */ char unk_1358[0x0004];
/* 0x135C */ s32 gameMode; /* 0x135C */ s32 gameMode;
/* 0x1360 */ s32 sceneSetupIndex; /* 0x1360 */ s32 sceneSetupIndex; // "counter" // Upstream TODO: sceneLayer
/* 0x1364 */ s32 respawnFlag; // "restart_flag" /* 0x1364 */ s32 respawnFlag; // "restart_flag"
/* 0x1368 */ RespawnData respawn[3]; // "restart_data" /* 0x1368 */ RespawnData respawn[RESPAWN_MODE_MAX]; // "restart_data"
/* 0x13BC */ f32 entranceSpeed; /* 0x13BC */ f32 entranceSpeed;
/* 0x13C0 */ u16 entranceSound; /* 0x13C0 */ u16 entranceSound;
/* 0x13C3 */ u8 unk_13C3; /* 0x13C2 */ char unk_13C2[0x0001];
/* 0x13C3 */ u8 retainWeatherMode;
/* 0x13C4 */ s16 dogParams; /* 0x13C4 */ s16 dogParams;
/* 0x13C6 */ u8 textTriggerFlags; /* 0x13C6 */ u8 textTriggerFlags;
/* 0x13C7 */ u8 showTitleCard; /* 0x13C7 */ u8 showTitleCard;
/* 0x13C8 */ s16 nayrusLoveTimer; /* 0x13C8 */ s16 nayrusLoveTimer;
/* 0x13CA */ char unk_13CA[0x0002];
/* 0x13CC */ s16 rupeeAccumulator; /* 0x13CC */ s16 rupeeAccumulator;
/* 0x13CE */ s16 timer1State; /* 0x13CE */ s16 timer1State;
/* 0x13D0 */ s16 timer1Value; /* 0x13D0 */ s16 timer1Value;
@ -154,64 +204,69 @@ typedef struct {
/* 0x13D4 */ s16 timer2Value; /* 0x13D4 */ s16 timer2Value;
/* 0x13D6 */ s16 timerX[2]; /* 0x13D6 */ s16 timerX[2];
/* 0x13DA */ s16 timerY[2]; /* 0x13DA */ s16 timerY[2];
/* 0x13DE */ char unk_13DE[0x0002];
/* 0x13E0 */ u8 seqId; /* 0x13E0 */ u8 seqId;
/* 0x13E1 */ u8 natureAmbienceId; /* 0x13E1 */ u8 natureAmbienceId;
/* 0x13E2 */ u8 buttonStatus[9]; /* 0x13E2 */ u8 buttonStatus[9]; // SOH [Enhancements] Changed from 5 to 9 to support Dpad equips
/* 0x13E7 */ u8 unk_13E7; // alpha related /* 0x13E7 */ u8 unk_13E7; // alpha related
/* 0x13E8 */ u16 unk_13E8; // alpha type? /* 0x13E8 */ u16 unk_13E8; // alpha type?
/* 0x13EA */ u16 unk_13EA; // also alpha type? /* 0x13EA */ u16 unk_13EA; // also alpha type?
/* 0x13EC */ u16 unk_13EC; // alpha type counter? /* 0x13EC */ u16 unk_13EC; // alpha type counter?
/* 0x13EE */ u16 unk_13EE; // previous alpha type? /* 0x13EE */ u16 unk_13EE; // previous alpha type?
/* 0x13F0 */ s16 unk_13F0; // magic related /* 0x13F0 */ s16 magicState; // determines magic meter behavior on each frame
/* 0x13F2 */ s16 unk_13F2; // magic related /* 0x13F2 */ s16 prevMagicState; // used to resume the previous state after adding or filling magic
/* 0x13F4 */ s16 unk_13F4; // magic related /* 0x13F4 */ s16 magicCapacity; // maximum magic available
/* 0x13F6 */ s16 unk_13F6; // magic related /* 0x13F6 */ s16 magicFillTarget; // target used to fill magic. Target can either be full capacity (Magic_Fill, magic upgrades), or the saved magic amount (loading a file, game over)
/* 0x13F8 */ s16 unk_13F8; // magic related /* 0x13F8 */ s16 magicTarget; // target for magic to step to when adding or consuming magic
/* 0x13FA */ u16 eventInf[4]; // "event_inf" /* 0x13FA */ u16 eventInf[4]; // "event_inf"
/* 0x1402 */ u16 mapIndex; // intended for maps/minimaps but commonly used as the dungeon index /* 0x1402 */ u16 mapIndex; // intended for maps/minimaps but commonly used as the dungeon index
/* 0x1404 */ u16 minigameState; /* 0x1404 */ u16 minigameState;
/* 0x1406 */ u16 minigameScore; // "yabusame_total" /* 0x1406 */ u16 minigameScore; // "yabusame_total"
/* 0x1408 */ char unk_1408[0x0001];
/* 0x1409 */ u8 language; // NTSC 0: Japanese; 1: English | PAL 0: English; 1: German; 2: French /* 0x1409 */ u8 language; // NTSC 0: Japanese; 1: English | PAL 0: English; 1: German; 2: French
/* 0x140A */ u8 audioSetting; /* 0x140A */ u8 audioSetting;
/* 0x140B */ char unk_140B[0x0001];
/* 0x140C */ u8 zTargetSetting; // 0: Switch; 1: Hold /* 0x140C */ u8 zTargetSetting; // 0: Switch; 1: Hold
/* 0x140E */ u16 forcedSeqId; // immediately start playing the sequence if set /* 0x140E */ u16 forcedSeqId; // immediately start playing the sequence if set
/* 0x1410 */ u8 unk_1410; // transition related /* 0x1410 */ u8 cutsceneTransitionControl; // context dependent usage: can either trigger a delayed fade or control fill alpha
/* 0x1411 */ char unk_1411[0x0001];
/* 0x1412 */ u16 nextCutsceneIndex; /* 0x1412 */ u16 nextCutsceneIndex;
/* 0x1414 */ u8 cutsceneTrigger; /* 0x1414 */ u8 cutsceneTrigger;
/* 0x1415 */ u8 chamberCutsceneNum; /* 0x1415 */ u8 chamberCutsceneNum;
/* 0x1416 */ u16 nextDayTime; // "next_zelda_time" /* 0x1416 */ u16 nextDayTime; // "next_zelda_time"
/* 0x1418 */ u8 fadeDuration; /* 0x1418 */ u8 transFadeDuration;
/* 0x1419 */ u8 unk_1419; // transition related /* 0x1419 */ u8 transWipeSpeed;
/* 0x141A */ u16 skyboxTime; /* 0x141A */ u16 skyboxTime;
/* 0x141C */ u8 dogIsLost; /* 0x141C */ u8 dogIsLost;
/* 0x141D */ u8 nextTransition; /* 0x141D */ u8 nextTransitionType;
/* 0x141E */ char unk_141E[0x0002];
/* 0x1420 */ s16 worldMapArea; /* 0x1420 */ s16 worldMapArea;
/* 0x1422 */ s16 sunsSongState; // controls the effects of suns song /* 0x1422 */ s16 sunsSongState; // controls the effects of suns song
/* 0x1424 */ s16 healthAccumulator; /* 0x1424 */ s16 healthAccumulator;
uint32_t isMasterQuest; // #region SOH [General]
RandoSetting randoSettings[300]; // Upstream TODO: Move these to their own struct or name to more obviously specific to SoH
ItemLocationRando itemLocations[RC_MAX]; /* */ uint32_t isMasterQuest;
HintLocationRando hintLocations[50]; /* */ u8 mqDungeonCount;
EntranceOverride entranceOverrides[ENTRANCE_OVERRIDES_MAX_COUNT]; /* */ u8 pendingIceTrapCount;
char childAltarText[250]; /* */ SohStats sohStats;
char adultAltarText[750]; /* */ u8 temporaryWeapon;
char ganonHintText[150]; // #endregion
char ganonText[250]; // #region SOH [Randomizer]
u8 seedIcons[5]; // Upstream TODO: Move these to their own struct or name to more obviously specific to Randomizer
u16 randomizerInf[9]; /* */ RandoSetting randoSettings[300];
u8 temporaryWeapon; /* */ ItemLocationRando itemLocations[RC_MAX];
u16 adultTradeItems; /* */ HintLocationRando hintLocations[50];
u8 pendingIceTrapCount; /* */ EntranceOverride entranceOverrides[ENTRANCE_OVERRIDES_MAX_COUNT];
u8 mqDungeonCount; /* */ char childAltarText[250];
SohStats sohStats; /* */ char adultAltarText[750];
/* */ char ganonHintText[150];
/* */ char ganonText[250];
/* */ u8 seedIcons[5];
/* */ u16 randomizerInf[9];
/* */ u16 adultTradeItems;
// #endregion
} SaveContext; // size = 0x1428 } SaveContext; // size = 0x1428
typedef enum {
/* 0x00 */ RESPAWN_MODE_DOWN, /* Normal Void Outs */
/* 0x01 */ RESPAWN_MODE_RETURN, /* Grotto Returnpoints */
/* 0x02 */ RESPAWN_MODE_TOP /* Farore's Wind */
} RespawnMode;
typedef enum { typedef enum {
/* 0x00 */ BTN_ENABLED, /* 0x00 */ BTN_ENABLED,
/* 0xFF */ BTN_DISABLED = 0xFF /* 0xFF */ BTN_DISABLED = 0xFF
@ -243,4 +298,521 @@ typedef enum {
/* 3 */ SUNSSONG_SPECIAL // time does not advance, but signals the song was played. used for freezing redeads /* 3 */ SUNSSONG_SPECIAL // time does not advance, but signals the song was played. used for freezing redeads
} SunsSongState; } SunsSongState;
typedef enum {
/* 0 */ GAMEMODE_NORMAL,
/* 1 */ GAMEMODE_TITLE_SCREEN,
/* 2 */ GAMEMODE_FILE_SELECT, // Note: only instance type transitions swap to file select
/* 3 */ GAMEMODE_END_CREDITS
} GameMode;
typedef enum {
/* 0 */ SCENE_LAYER_CHILD_DAY,
/* 1 */ SCENE_LAYER_CHILD_NIGHT,
/* 2 */ SCENE_LAYER_ADULT_DAY,
/* 3 */ SCENE_LAYER_ADULT_NIGHT,
/* 4 */ SCENE_LAYER_CUTSCENE_FIRST
} SceneLayer;
#define IS_CUTSCENE_LAYER (gSaveContext.sceneLayer >= SCENE_LAYER_CUTSCENE_FIRST)
typedef enum {
/* 0 */ LINK_AGE_ADULT,
/* 1 */ LINK_AGE_CHILD
} LinkAge;
/*
*
* SaveContext flags
*
*/
/*
* SaveContext.eventChkInf
*/
#define EVENTCHKINF_02 0x02
#define EVENTCHKINF_03 0x03
#define EVENTCHKINF_04 0x04
#define EVENTCHKINF_05 0x05
#define EVENTCHKINF_07 0x07
#define EVENTCHKINF_09 0x09
#define EVENTCHKINF_0A 0x0A
#define EVENTCHKINF_0B 0x0B
#define EVENTCHKINF_0C 0x0C
#define EVENTCHKINF_0F 0x0F
#define EVENTCHKINF_10 0x10
#define EVENTCHKINF_11 0x11
#define EVENTCHKINF_12 0x12
#define EVENTCHKINF_TALON_WOKEN_IN_CASTLE 0x13
#define EVENTCHKINF_TALON_RETURNED_FROM_CASTLE 0x14
#define EVENTCHKINF_15 0x15
#define EVENTCHKINF_16 0x16
#define EVENTCHKINF_EPONA_OBTAINED 0x18
#define EVENTCHKINF_1B 0x1B
#define EVENTCHKINF_1C 0x1C
#define EVENTCHKINF_1D 0x1D
#define EVENTCHKINF_1E 0x1E
#define EVENTCHKINF_20 0x20
#define EVENTCHKINF_21 0x21
#define EVENTCHKINF_22 0x22
#define EVENTCHKINF_23 0x23
#define EVENTCHKINF_25 0x25
#define EVENTCHKINF_2A 0x2A
#define EVENTCHKINF_2B 0x2B
#define EVENTCHKINF_2C 0x2C
#define EVENTCHKINF_2D 0x2D
#define EVENTCHKINF_2F 0x2F
#define EVENTCHKINF_30 0x30
#define EVENTCHKINF_31 0x31
#define EVENTCHKINF_32 0x32
#define EVENTCHKINF_33 0x33
#define EVENTCHKINF_37 0x37
#define EVENTCHKINF_38 0x38
#define EVENTCHKINF_39 0x39
#define EVENTCHKINF_3A 0x3A
#define EVENTCHKINF_3B 0x3B
#define EVENTCHKINF_3C 0x3C
// 0x40
#define EVENTCHKINF_40_INDEX 4
#define EVENTCHKINF_40_SHIFT 0
#define EVENTCHKINF_40_MASK (1 << EVENTCHKINF_40_SHIFT)
#define EVENTCHKINF_40 ((EVENTCHKINF_40_INDEX << 4) | EVENTCHKINF_40_SHIFT)
#define EVENTCHKINF_41 0x41
#define EVENTCHKINF_42 0x42
#define EVENTCHKINF_43 0x43
#define EVENTCHKINF_45 0x45
#define EVENTCHKINF_48 0x48
#define EVENTCHKINF_49 0x49
#define EVENTCHKINF_4A 0x4A
#define EVENTCHKINF_4B 0x4B
#define EVENTCHKINF_4C 0x4C
#define EVENTCHKINF_4D 0x4D
#define EVENTCHKINF_4E 0x4E
#define EVENTCHKINF_4F 0x4F
#define EVENTCHKINF_50 0x50
#define EVENTCHKINF_51 0x51
#define EVENTCHKINF_52 0x52
#define EVENTCHKINF_54 0x54
#define EVENTCHKINF_55 0x55
#define EVENTCHKINF_59 0x59
#define EVENTCHKINF_5A 0x5A
#define EVENTCHKINF_5B 0x5B
#define EVENTCHKINF_5C 0x5C
#define EVENTCHKINF_65 0x65
#define EVENTCHKINF_67 0x67
#define EVENTCHKINF_68 0x68
#define EVENTCHKINF_69 0x69
#define EVENTCHKINF_TALON_WOKEN_IN_KAKARIKO 0x6A
// 0x6B
#define EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_INDEX 6
#define EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_SHIFT 11
#define EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_MASK (1 << EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_SHIFT)
#define EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO ((EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_INDEX << 4) | EVENTCHKINF_TALON_RETURNED_FROM_KAKARIKO_SHIFT)
#define EVENTCHKINF_6E 0x6E
#define EVENTCHKINF_6F 0x6F
#define EVENTCHKINF_70 0x70
#define EVENTCHKINF_71 0x71
#define EVENTCHKINF_72 0x72
#define EVENTCHKINF_73 0x73
#define EVENTCHKINF_74 0x74
#define EVENTCHKINF_75 0x75
#define EVENTCHKINF_76 0x76
#define EVENTCHKINF_77 0x77
#define EVENTCHKINF_78 0x78
#define EVENTCHKINF_80 0x80
#define EVENTCHKINF_82 0x82
#define EVENTCHKINF_8C 0x8C
#define EVENTCHKINF_8D 0x8D
#define EVENTCHKINF_8E 0x8E
#define EVENTCHKINF_8F 0x8F
// 0x90-0x93
// carpenters freed from the gerudo
#define EVENTCHKINF_CARPENTERS_FREE_INDEX 9
#define EVENTCHKINF_CARPENTERS_FREE_SHIFT(n) (0 + (n))
#define EVENTCHKINF_CARPENTERS_FREE_MASK(n) (1 << EVENTCHKINF_CARPENTERS_FREE_SHIFT(n))
#define EVENTCHKINF_CARPENTERS_FREE(n) ((EVENTCHKINF_CARPENTERS_FREE_INDEX << 4) | EVENTCHKINF_CARPENTERS_FREE_SHIFT(n))
#define EVENTCHKINF_CARPENTERS_FREE_MASK_ALL (\
EVENTCHKINF_CARPENTERS_FREE_MASK(0) \
| EVENTCHKINF_CARPENTERS_FREE_MASK(1) \
| EVENTCHKINF_CARPENTERS_FREE_MASK(2) \
| EVENTCHKINF_CARPENTERS_FREE_MASK(3) )
#define GET_EVENTCHKINF_CARPENTERS_FREE_ALL() \
CHECK_FLAG_ALL(gSaveContext.eventChkInf[EVENTCHKINF_CARPENTERS_FREE_INDEX], EVENTCHKINF_CARPENTERS_FREE_MASK_ALL)
#define EVENTCHKINF_94 0x94
#define EVENTCHKINF_95 0x95
#define EVENTCHKINF_96 0x96
#define EVENTCHKINF_9C 0x9C
#define EVENTCHKINF_A0 0xA0
#define EVENTCHKINF_A1 0xA1
#define EVENTCHKINF_A3 0xA3
#define EVENTCHKINF_A4 0xA4
#define EVENTCHKINF_A5 0xA5
#define EVENTCHKINF_A6 0xA6
#define EVENTCHKINF_A7 0xA7
#define EVENTCHKINF_A8 0xA8
#define EVENTCHKINF_A9 0xA9
#define EVENTCHKINF_AA 0xAA
#define EVENTCHKINF_AC 0xAC
#define EVENTCHKINF_AD 0xAD
#define EVENTCHKINF_B0 0xB0
#define EVENTCHKINF_B1 0xB1
#define EVENTCHKINF_B2 0xB2
#define EVENTCHKINF_B3 0xB3
#define EVENTCHKINF_B4 0xB4
#define EVENTCHKINF_B5 0xB5
#define EVENTCHKINF_B6 0xB6
#define EVENTCHKINF_B7 0xB7
#define EVENTCHKINF_B8 0xB8
#define EVENTCHKINF_B9 0xB9
#define EVENTCHKINF_BA 0xBA
#define EVENTCHKINF_BB 0xBB
#define EVENTCHKINF_BC 0xBC
#define EVENTCHKINF_BD 0xBD
#define EVENTCHKINF_BE 0xBE
#define EVENTCHKINF_BF 0xBF
#define EVENTCHKINF_C0 0xC0
#define EVENTCHKINF_C1 0xC1
#define EVENTCHKINF_C3 0xC3
#define EVENTCHKINF_C4 0xC4
#define EVENTCHKINF_C5 0xC5
#define EVENTCHKINF_C6 0xC6
#define EVENTCHKINF_C7 0xC7
#define EVENTCHKINF_C8 0xC8
#define EVENTCHKINF_C9 0xC9
// 0xD0-0xD6
#define EVENTCHKINF_SONGS_FOR_FROGS_INDEX 13
#define EVENTCHKINF_SONGS_FOR_FROGS_CHOIR_SHIFT 0
#define EVENTCHKINF_SONGS_FOR_FROGS_ZL_SHIFT 1
#define EVENTCHKINF_SONGS_FOR_FROGS_EPONA_SHIFT 2
#define EVENTCHKINF_SONGS_FOR_FROGS_SUNS_SHIFT 3
#define EVENTCHKINF_SONGS_FOR_FROGS_SARIA_SHIFT 4
#define EVENTCHKINF_SONGS_FOR_FROGS_SOT_SHIFT 5
#define EVENTCHKINF_SONGS_FOR_FROGS_STORMS_SHIFT 6
#define EVENTCHKINF_SONGS_FOR_FROGS_CHOIR_MASK (1 << EVENTCHKINF_SONGS_FOR_FROGS_CHOIR_SHIFT)
#define EVENTCHKINF_SONGS_FOR_FROGS_ZL_MASK (1 << EVENTCHKINF_SONGS_FOR_FROGS_ZL_SHIFT)
#define EVENTCHKINF_SONGS_FOR_FROGS_EPONA_MASK (1 << EVENTCHKINF_SONGS_FOR_FROGS_EPONA_SHIFT)
#define EVENTCHKINF_SONGS_FOR_FROGS_SUNS_MASK (1 << EVENTCHKINF_SONGS_FOR_FROGS_SUNS_SHIFT)
#define EVENTCHKINF_SONGS_FOR_FROGS_SARIA_MASK (1 << EVENTCHKINF_SONGS_FOR_FROGS_SARIA_SHIFT)
#define EVENTCHKINF_SONGS_FOR_FROGS_SOT_MASK (1 << EVENTCHKINF_SONGS_FOR_FROGS_SOT_SHIFT)
#define EVENTCHKINF_SONGS_FOR_FROGS_STORMS_MASK (1 << EVENTCHKINF_SONGS_FOR_FROGS_STORMS_SHIFT)
#define EVENTCHKINF_SONGS_FOR_FROGS_CHOIR ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_CHOIR_SHIFT)
#define EVENTCHKINF_SONGS_FOR_FROGS_ZL ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_ZL_SHIFT)
#define EVENTCHKINF_SONGS_FOR_FROGS_EPONA ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_EPONA_SHIFT)
#define EVENTCHKINF_SONGS_FOR_FROGS_SUNS ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_SUNS_SHIFT)
#define EVENTCHKINF_SONGS_FOR_FROGS_SARIA ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_SARIA_SHIFT)
#define EVENTCHKINF_SONGS_FOR_FROGS_SOT ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_SOT_SHIFT)
#define EVENTCHKINF_SONGS_FOR_FROGS_STORMS ((EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) | EVENTCHKINF_SONGS_FOR_FROGS_STORMS_SHIFT)
// 0xDA-0xDE
#define EVENTCHKINF_DA_DB_DC_DD_DE_INDEX 13
#define EVENTCHKINF_DA_MASK (1 << 10)
#define EVENTCHKINF_DB_MASK (1 << 11)
#define EVENTCHKINF_DC_MASK (1 << 12)
#define EVENTCHKINF_DD_MASK (1 << 13)
#define EVENTCHKINF_DE_MASK (1 << 14)
/*
* SaveContext.itemGetInf
*/
#define ITEMGETINF_TALON_BOTTLE 0x02
#define ITEMGETINF_03 0x03
#define ITEMGETINF_04 0x04
#define ITEMGETINF_05 0x05
#define ITEMGETINF_06 0x06
#define ITEMGETINF_07 0x07
#define ITEMGETINF_08 0x08
#define ITEMGETINF_09 0x09
#define ITEMGETINF_0A 0x0A
#define ITEMGETINF_0B 0x0B
#define ITEMGETINF_0C 0x0C
#define ITEMGETINF_0D 0x0D
#define ITEMGETINF_0E 0x0E
#define ITEMGETINF_0F 0x0F
#define ITEMGETINF_10 0x10
#define ITEMGETINF_11 0x11
#define ITEMGETINF_12 0x12
#define ITEMGETINF_13 0x13
#define ITEMGETINF_15 0x15
#define ITEMGETINF_16 0x16
#define ITEMGETINF_17 0x17
// 0x18-0x1A
#define ITEMGETINF_18_19_1A_INDEX 1
#define ITEMGETINF_18_SHIFT 8
#define ITEMGETINF_19_SHIFT 9
#define ITEMGETINF_1A_SHIFT 10
#define ITEMGETINF_18_MASK (1 << ITEMGETINF_18_SHIFT)
#define ITEMGETINF_19_MASK (1 << ITEMGETINF_19_SHIFT)
#define ITEMGETINF_1A_MASK (1 << ITEMGETINF_1A_SHIFT)
#define ITEMGETINF_18 ((ITEMGETINF_18_19_1A_INDEX << 4) | ITEMGETINF_18_SHIFT)
#define ITEMGETINF_19 ((ITEMGETINF_18_19_1A_INDEX << 4) | ITEMGETINF_19_SHIFT)
#define ITEMGETINF_1A ((ITEMGETINF_18_19_1A_INDEX << 4) | ITEMGETINF_1A_SHIFT)
#define ITEMGETINF_1B 0x1B
#define ITEMGETINF_1C 0x1C
#define ITEMGETINF_1D 0x1D
#define ITEMGETINF_1E 0x1E
#define ITEMGETINF_1F 0x1F
#define ITEMGETINF_23 0x23
#define ITEMGETINF_24 0x24
#define ITEMGETINF_25 0x25
#define ITEMGETINF_26 0x26
#define ITEMGETINF_2A 0x2A
#define ITEMGETINF_2C 0x2C
#define ITEMGETINF_2E 0x2E
#define ITEMGETINF_30 0x30
#define ITEMGETINF_31 0x31
#define ITEMGETINF_38 0x38
#define ITEMGETINF_39 0x39
#define ITEMGETINF_3A 0x3A
#define ITEMGETINF_3B 0x3B
#define ITEMGETINF_3F 0x3F
/*
* SaveContext.infTable
*/
#define INFTABLE_00 0x00
#define INFTABLE_01 0x01
#define INFTABLE_03 0x03
#define INFTABLE_05 0x05
#define INFTABLE_0C 0x0C
#define INFTABLE_0E 0x0E
#define INFTABLE_10 0x10
#define INFTABLE_15 0x15
#define INFTABLE_17 0x17
#define INFTABLE_19 0x19
#define INFTABLE_1E 0x1E
#define INFTABLE_22 0x22
#define INFTABLE_24 0x24
#define INFTABLE_26 0x26
#define INFTABLE_28 0x28
#define INFTABLE_2A 0x2A
#define INFTABLE_2B 0x2B
#define INFTABLE_2E 0x2E
#define INFTABLE_2F 0x2F
#define INFTABLE_30 0x30
#define INFTABLE_41 0x41
#define INFTABLE_47 0x47
#define INFTABLE_51 0x51
#define INFTABLE_59 0x59
#define INFTABLE_61 0x61
#define INFTABLE_66 0x66
#define INFTABLE_6A 0x6A
#define INFTABLE_6C 0x6C
#define INFTABLE_71 0x71
#define INFTABLE_76 0x76
#define INFTABLE_77 0x77
#define INFTABLE_TALKED_TO_TALON_IN_RANCH_HOUSE 0x7E
#define INFTABLE_84 0x84
#define INFTABLE_85 0x85
#define INFTABLE_8B 0x8B
#define INFTABLE_8C 0x8C
#define INFTABLE_8D 0x8D
#define INFTABLE_8E 0x8E
#define INFTABLE_94 0x94
#define INFTABLE_97 0x97
#define INFTABLE_9A 0x9A
#define INFTABLE_A2 0xA2
#define INFTABLE_AB 0xAB
#define INFTABLE_B0 0xB0
#define INFTABLE_B1 0xB1
#define INFTABLE_B4 0xB4
#define INFTABLE_B6 0xB6
#define INFTABLE_B7 0xB7
#define INFTABLE_B8 0xB8
#define INFTABLE_B9 0xB9
#define INFTABLE_BC 0xBC
#define INFTABLE_C0 0xC0
#define INFTABLE_C1 0xC1
#define INFTABLE_C2 0xC2
#define INFTABLE_C3 0xC3
#define INFTABLE_C4 0xC4
#define INFTABLE_C5 0xC5
#define INFTABLE_C6 0xC6
#define INFTABLE_C7 0xC7
#define INFTABLE_C8 0xC8
#define INFTABLE_C9 0xC9
#define INFTABLE_CA 0xCA
#define INFTABLE_CB 0xCB
#define INFTABLE_CC 0xCC
#define INFTABLE_CD 0xCD
#define INFTABLE_CE 0xCE
#define INFTABLE_D0 0xD0
#define INFTABLE_D2 0xD2
#define INFTABLE_D4 0xD4
#define INFTABLE_D6 0xD6
#define INFTABLE_D8 0xD8
#define INFTABLE_D9 0xD9
#define INFTABLE_E0 0xE0
#define INFTABLE_E3 0xE3
#define INFTABLE_E6 0xE6
#define INFTABLE_EB 0xEB
#define INFTABLE_F0 0xF0
#define INFTABLE_F4 0xF4
#define INFTABLE_F8 0xF8
#define INFTABLE_FC 0xFC
#define INFTABLE_109 0x109
#define INFTABLE_10A 0x10A
#define INFTABLE_10B 0x10B
#define INFTABLE_10C 0x10C
#define INFTABLE_10D 0x10D
#define INFTABLE_10E 0x10E
#define INFTABLE_10F 0x10F
#define INFTABLE_113 0x113
#define INFTABLE_11A 0x11A
#define INFTABLE_11E 0x11E
#define INFTABLE_124 0x124
#define INFTABLE_129 0x129
#define INFTABLE_12A 0x12A
#define INFTABLE_138 0x138
#define INFTABLE_139 0x139
#define INFTABLE_140 0x140
#define INFTABLE_141 0x141
#define INFTABLE_142 0x142
#define INFTABLE_143 0x143
#define INFTABLE_144 0x144
#define INFTABLE_145 0x145
#define INFTABLE_146 0x146
#define INFTABLE_147 0x147
#define INFTABLE_160 0x160
#define INFTABLE_161 0x161
#define INFTABLE_162 0x162
#define INFTABLE_163 0x163
#define INFTABLE_164 0x164
#define INFTABLE_166 0x166
#define INFTABLE_16A 0x16A
#define INFTABLE_16C 0x16C
#define INFTABLE_170 0x170
#define INFTABLE_171 0x171
#define INFTABLE_172 0x172
#define INFTABLE_176 0x176
#define INFTABLE_178 0x178
#define INFTABLE_17C 0x17C
#define INFTABLE_17F 0x17F
#define INFTABLE_190 0x190
#define INFTABLE_191 0x191
#define INFTABLE_192 0x192
#define INFTABLE_193 0x193
#define INFTABLE_195 0x195
#define INFTABLE_196 0x196
#define INFTABLE_197 0x197
#define INFTABLE_198 0x198
// 0x199-0x19F
#define INFTABLE_199_19A_19B_19C_19D_19E_19F_INDEX 25
#define INFTABLE_199_MASK (1 << 9)
#define INFTABLE_19A_MASK (1 << 10)
#define INFTABLE_19B_MASK (1 << 11)
#define INFTABLE_19C_MASK (1 << 12)
#define INFTABLE_19D_MASK (1 << 13)
#define INFTABLE_19E_MASK (1 << 14)
#define INFTABLE_19F_MASK (1 << 15)
// 0x1A0-0x1AF
#define INFTABLE_1AX_INDEX 26
#define INFTABLE_1A0_SHIFT 0
#define INFTABLE_1A1_SHIFT 1
#define INFTABLE_1A2_SHIFT 2
#define INFTABLE_1A3_SHIFT 3
#define INFTABLE_1A4_SHIFT 4
#define INFTABLE_1A5_SHIFT 5
#define INFTABLE_1A6_SHIFT 6
#define INFTABLE_1A7_SHIFT 7
#define INFTABLE_1A8_SHIFT 8
#define INFTABLE_1A9_SHIFT 9
#define INFTABLE_1AB_SHIFT 11
#define INFTABLE_1AD_SHIFT 13
// 0x1D0-0x1DF
#define INFTABLE_1DX_INDEX 29
/*
* SaveContext.eventInf
*/
// 0x00-0x0F
// horses related
#define EVENTINF_HORSES_INDEX 0
#define EVENTINF_HORSES_STATE_SHIFT 0
#define EVENTINF_HORSES_HORSETYPE_SHIFT 4
#define EVENTINF_HORSES_05_SHIFT 5
#define EVENTINF_HORSES_06_SHIFT 6
#define EVENTINF_HORSES_08_SHIFT 8
#define EVENTINF_HORSES_0A_SHIFT 10
#define EVENTINF_HORSES_0F_SHIFT 15 // unused?
#define EVENTINF_HORSES_STATE_MASK (0xF << EVENTINF_HORSES_STATE_SHIFT)
#define EVENTINF_HORSES_HORSETYPE_MASK (1 << EVENTINF_HORSES_HORSETYPE_SHIFT)
#define EVENTINF_HORSES_05_MASK (1 << EVENTINF_HORSES_05_SHIFT)
#define EVENTINF_HORSES_06_MASK (1 << EVENTINF_HORSES_06_SHIFT)
#define EVENTINF_HORSES_0F_MASK (1 << EVENTINF_HORSES_0F_SHIFT)
#define EVENTINF_HORSES_05 ((EVENTINF_HORSES_INDEX << 4) | EVENTINF_HORSES_05_SHIFT)
#define EVENTINF_HORSES_06 ((EVENTINF_HORSES_INDEX << 4) | EVENTINF_HORSES_06_SHIFT)
// Used in z_en_ta (Talon) to store Cucco game winning status
// and in z_en_ge1 (Gerudo) to store archery in-progress status
#define EVENTINF_HORSES_08 ((EVENTINF_HORSES_INDEX << 4) | EVENTINF_HORSES_08_SHIFT)
#define EVENTINF_CUCCO_GAME_WON EVENTINF_HORSES_08
// Used in z_en_ta (Talon) and z_en_ma3 (Malon) to store minigame finishing status
#define EVENTINF_HORSES_0A ((EVENTINF_HORSES_INDEX << 4) | EVENTINF_HORSES_0A_SHIFT)
#define EVENTINF_CUCCO_GAME_FINISHED EVENTINF_HORSES_0A
typedef enum {
/* 0 */ EVENTINF_HORSES_STATE_0,
/* 1 */ EVENTINF_HORSES_STATE_1,
/* 2 */ EVENTINF_HORSES_STATE_2,
/* 3 */ EVENTINF_HORSES_STATE_3,
/* 4 */ EVENTINF_HORSES_STATE_4,
/* 5 */ EVENTINF_HORSES_STATE_5,
/* 6 */ EVENTINF_HORSES_STATE_6,
/* 7 */ EVENTINF_HORSES_STATE_7
} EventInfHorsesState;
// "InRaceSeq"
#define GET_EVENTINF_HORSES_STATE() \
((gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & EVENTINF_HORSES_STATE_MASK) >> EVENTINF_HORSES_STATE_SHIFT)
#define SET_EVENTINF_HORSES_STATE(v) \
gSaveContext.eventInf[EVENTINF_HORSES_INDEX] = \
(gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & ~EVENTINF_HORSES_STATE_MASK) | \
((v) << EVENTINF_HORSES_STATE_SHIFT)
#define GET_EVENTINF_HORSES_HORSETYPE() \
((gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & EVENTINF_HORSES_HORSETYPE_MASK) >> EVENTINF_HORSES_HORSETYPE_SHIFT)
#define SET_EVENTINF_HORSES_HORSETYPE(v) \
gSaveContext.eventInf[EVENTINF_HORSES_INDEX] = \
(gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & ~EVENTINF_HORSES_HORSETYPE_MASK) | \
((v) << EVENTINF_HORSES_HORSETYPE_SHIFT)
#define SET_EVENTINF_HORSES_0F(v) \
gSaveContext.eventInf[EVENTINF_HORSES_INDEX] = \
(gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & ~EVENTINF_HORSES_0F_MASK) | ((v) << EVENTINF_HORSES_0F_SHIFT)
#define EVENTINF_10 0x10
// 0x20-0x24
#define EVENTINF_20_21_22_23_24_INDEX 2
#define EVENTINF_20_MASK (1 << 0)
#define EVENTINF_21_MASK (1 << 1)
#define EVENTINF_22_MASK (1 << 2)
#define EVENTINF_23_MASK (1 << 3)
#define EVENTINF_24_MASK (1 << 4)
#define EVENTINF_30 0x30
#endif #endif

View File

@ -245,6 +245,52 @@ namespace GameControlEditor {
UIWidgets::EnhancementSliderFloat("Camera Sensitivity: %d %%", "##Sensitivity", "gCameraSensitivity", 0.01f, 5.0f, "", 1.0f, true, true); UIWidgets::EnhancementSliderFloat("Camera Sensitivity: %d %%", "##Sensitivity", "gCameraSensitivity", 0.01f, 5.0f, "", 1.0f, true, true);
} }
void DrawDpadControlPanel() {
if (!ImGui::CollapsingHeader("D-Pad Controls")) {
return;
}
ImVec2 cursor = ImGui::GetCursorPos();
ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5));
SohImGui::BeginGroupPanel("D-Pad Options", ImGui::GetContentRegionAvail());
UIWidgets::PaddedEnhancementCheckbox("D-pad Support on Pause Screen", "gDpadPause");
DrawHelpIcon("Navigate Pause with the D-pad\nIf used with D-pad as Equip Items, you must hold C-Up to equip instead of navigate\n"
"To make the cursor only move a single space no matter how long a direction is held, manually set gDpadHoldChange to 0");
UIWidgets::PaddedEnhancementCheckbox("D-pad Support in Text Boxes", "gDpadText");
DrawHelpIcon("Navigate choices in text boxes, shop item selection, and the file select / name entry screens with the D-pad\n"
"To make the cursor only move a single space during name entry no matter how long a direction is held, manually set gDpadHoldChange to 0");
UIWidgets::PaddedEnhancementCheckbox("D-pad as Equip Items", "gDpadEquips");
DrawHelpIcon("Equip items and equipment on the D-pad\nIf used with D-pad on Pause Screen, you must hold C-Up to equip instead of navigate");
SohImGui::EndGroupPanel();
}
void DrawMiscControlPanel() {
if (!ImGui::CollapsingHeader("Miscellaneous Controls")) {
return;
}
ImVec2 cursor = ImGui::GetCursorPos();
ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5));
SohImGui::BeginGroupPanel("Misc Controls", ImGui::GetContentRegionAvail());
UIWidgets::PaddedEnhancementCheckbox("Enable walk speed modifiers", "gEnableWalkModify", true, false);
DrawHelpIcon("Hold the assigned button to change the maximum walking speed\nTo change the assigned button, go into the Ports tabs above");
if (CVar_GetS32("gEnableWalkModify", 0)) {
UIWidgets::Spacer(5);
SohImGui::BeginGroupPanel("Walk Modifier", ImGui::GetContentRegionAvail());
UIWidgets::PaddedEnhancementCheckbox("Toggle modifier instead of holding", "gWalkSpeedToggle", true, false);
UIWidgets::EnhancementSliderFloat("Modifier 1: %d %%", "##WalkMod1", "gWalkModifierOne", 0.0f, 5.0f, "", 1.0f, true);
UIWidgets::EnhancementSliderFloat("Modifier 2: %d %%", "##WalkMod2", "gWalkModifierTwo", 0.0f, 5.0f, "", 1.0f, true);
SohImGui::EndGroupPanel();
}
UIWidgets::Spacer(0);
UIWidgets::PaddedEnhancementCheckbox("Allow the cursor to be on any slot", "gPauseAnyCursor");
DrawHelpIcon("Allows the cursor on the pause menu to be over any slot\nSimilar to Rando and Spaceworld 97");
UIWidgets::PaddedEnhancementCheckbox("Answer Navi Prompt with L Button", "gNaviOnL");
DrawHelpIcon("Speak to Navi with L but enter first-person camera with C-Up");
SohImGui::EndGroupPanel();
}
void DrawUI(bool& open) { void DrawUI(bool& open) {
if (!open) { if (!open) {
CVar_SetS32("gGameControlEditorEnabled", false); CVar_SetS32("gGameControlEditorEnabled", false);
@ -271,6 +317,8 @@ namespace GameControlEditor {
if (CurrentPort == 0) { if (CurrentPort == 0) {
DrawOcarinaControlPanel(); DrawOcarinaControlPanel();
DrawCameraControlPanel(); DrawCameraControlPanel();
DrawDpadControlPanel();
DrawMiscControlPanel();
} else { } else {
DrawCustomButtons(); DrawCustomButtons();
} }

View File

@ -347,18 +347,18 @@ CrowdControl::EffectResult CrowdControl::ExecuteEffect(std::string effectId, uin
if (dryRun == 0) CMD_EXECUTE(EFFECT_REMOVE_HEART_CONTAINER); if (dryRun == 0) CMD_EXECUTE(EFFECT_REMOVE_HEART_CONTAINER);
return EffectResult::Success; return EffectResult::Success;
} else if (effectId == EFFECT_FILL_MAGIC) { } else if (effectId == EFFECT_FILL_MAGIC) {
if (!gSaveContext.magicAcquired) { if (!gSaveContext.isMagicAcquired) {
return EffectResult::Failure; return EffectResult::Failure;
} }
if (gSaveContext.magic >= (gSaveContext.doubleMagic + 1) + 0x30) { if (gSaveContext.magic >= (gSaveContext.isDoubleMagicAcquired + 1) + 0x30) {
return EffectResult::Failure; return EffectResult::Failure;
} }
if (dryRun == 0) CMD_EXECUTE(EFFECT_FILL_MAGIC); if (dryRun == 0) CMD_EXECUTE(EFFECT_FILL_MAGIC);
return EffectResult::Success; return EffectResult::Success;
} else if (effectId == EFFECT_EMPTY_MAGIC) { } else if (effectId == EFFECT_EMPTY_MAGIC) {
if (!gSaveContext.magicAcquired || gSaveContext.magic <= 0) { if (!gSaveContext.isMagicAcquired || gSaveContext.magic <= 0) {
return EffectResult::Failure; return EffectResult::Failure;
} }

View File

@ -355,7 +355,7 @@ static bool EntranceHandler(std::shared_ptr<Ship::Console> Console, const std::v
gPlayState->nextEntranceIndex = entrance; gPlayState->nextEntranceIndex = entrance;
gPlayState->sceneLoadFlag = 0x14; gPlayState->sceneLoadFlag = 0x14;
gPlayState->fadeTransition = 11; gPlayState->fadeTransition = 11;
gSaveContext.nextTransition = 11; gSaveContext.nextTransitionType = 11;
} }
static bool VoidHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args) { static bool VoidHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args) {
@ -366,7 +366,7 @@ static bool VoidHandler(std::shared_ptr<Ship::Console> Console, const std::vecto
gPlayState->sceneLoadFlag = 0x14; gPlayState->sceneLoadFlag = 0x14;
gPlayState->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex; gPlayState->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex;
gPlayState->fadeTransition = 2; gPlayState->fadeTransition = 2;
gSaveContext.nextTransition = 2; gSaveContext.nextTransitionType = 2;
} else { } else {
SohImGui::GetConsole()->SendErrorMessage("gPlayState == nullptr"); SohImGui::GetConsole()->SendErrorMessage("gPlayState == nullptr");
return CMD_FAILED; return CMD_FAILED;
@ -379,7 +379,7 @@ static bool ReloadHandler(std::shared_ptr<Ship::Console> Console, const std::vec
gPlayState->nextEntranceIndex = gSaveContext.entranceIndex; gPlayState->nextEntranceIndex = gSaveContext.entranceIndex;
gPlayState->sceneLoadFlag = 0x14; gPlayState->sceneLoadFlag = 0x14;
gPlayState->fadeTransition = 11; gPlayState->fadeTransition = 11;
gSaveContext.nextTransition = 11; gSaveContext.nextTransitionType = 11;
} else { } else {
SohImGui::GetConsole()->SendErrorMessage("gPlayState == nullptr"); SohImGui::GetConsole()->SendErrorMessage("gPlayState == nullptr");
return CMD_FAILED; return CMD_FAILED;

View File

@ -341,11 +341,11 @@ void DrawInfoTab() {
ImGui::SliderScalar("Health", ImGuiDataType_S16, &gSaveContext.health, &healthMin, &healthMax); ImGui::SliderScalar("Health", ImGuiDataType_S16, &gSaveContext.health, &healthMin, &healthMax);
UIWidgets::InsertHelpHoverText("Current health. 16 units per full heart"); UIWidgets::InsertHelpHoverText("Current health. 16 units per full heart");
bool doubleDefense = gSaveContext.doubleDefense != 0; bool isDoubleDefenseAcquired = gSaveContext.isDoubleDefenseAcquired != 0;
if (ImGui::Checkbox("Double Defense", &doubleDefense)) { if (ImGui::Checkbox("Double Defense", &isDoubleDefenseAcquired)) {
gSaveContext.doubleDefense = doubleDefense; gSaveContext.isDoubleDefenseAcquired = isDoubleDefenseAcquired;
gSaveContext.inventory.defenseHearts = gSaveContext.inventory.defenseHearts =
gSaveContext.doubleDefense ? 20 : 0; // Set to get the border drawn in the UI gSaveContext.isDoubleDefenseAcquired ? 20 : 0; // Set to get the border drawn in the UI
} }
UIWidgets::InsertHelpHoverText("Is double defense unlocked?"); UIWidgets::InsertHelpHoverText("Is double defense unlocked?");
@ -361,30 +361,30 @@ void DrawInfoTab() {
if (ImGui::BeginCombo("Magic Level", magicName.c_str())) { if (ImGui::BeginCombo("Magic Level", magicName.c_str())) {
if (ImGui::Selectable("Double")) { if (ImGui::Selectable("Double")) {
gSaveContext.magicLevel = 2; gSaveContext.magicLevel = 2;
gSaveContext.magicAcquired = true; gSaveContext.isMagicAcquired = true;
gSaveContext.doubleMagic = true; gSaveContext.isDoubleMagicAcquired = true;
} }
if (ImGui::Selectable("Single")) { if (ImGui::Selectable("Single")) {
gSaveContext.magicLevel = 1; gSaveContext.magicLevel = 1;
gSaveContext.magicAcquired = true; gSaveContext.isMagicAcquired = true;
gSaveContext.doubleMagic = false; gSaveContext.isDoubleMagicAcquired = false;
} }
if (ImGui::Selectable("None")) { if (ImGui::Selectable("None")) {
gSaveContext.magicLevel = 0; gSaveContext.magicLevel = 0;
gSaveContext.magicAcquired = false; gSaveContext.isMagicAcquired = false;
gSaveContext.doubleMagic = false; gSaveContext.isDoubleMagicAcquired = false;
} }
ImGui::EndCombo(); ImGui::EndCombo();
} }
UIWidgets::InsertHelpHoverText("Current magic level"); UIWidgets::InsertHelpHoverText("Current magic level");
gSaveContext.unk_13F4 = gSaveContext.magicLevel * 0x30; // Set to get the bar drawn in the UI gSaveContext.magicCapacity = gSaveContext.magicLevel * 0x30; // Set to get the bar drawn in the UI
if (gSaveContext.magic > gSaveContext.unk_13F4) { if (gSaveContext.magic > gSaveContext.magicCapacity) {
gSaveContext.magic = gSaveContext.unk_13F4; // Clamp magic to new max gSaveContext.magic = gSaveContext.magicCapacity; // Clamp magic to new max
} }
const uint8_t magicMin = 0; const uint8_t magicMin = 0;
const uint8_t magicMax = gSaveContext.unk_13F4; const uint8_t magicMax = gSaveContext.magicCapacity;
ImGui::SetNextItemWidth(ImGui::GetFontSize() * 15); ImGui::SetNextItemWidth(ImGui::GetFontSize() * 15);
ImGui::SliderScalar("Magic", ImGuiDataType_S8, &gSaveContext.magic, &magicMin, &magicMax); ImGui::SliderScalar("Magic", ImGuiDataType_S8, &gSaveContext.magic, &magicMin, &magicMax);
UIWidgets::InsertHelpHoverText("Current magic. 48 units per magic level"); UIWidgets::InsertHelpHoverText("Current magic. 48 units per magic level");
@ -1392,7 +1392,7 @@ void DrawPlayerTab() {
const char* curTunic; const char* curTunic;
const char* curBoots; const char* curBoots;
switch (player->currentSwordItem) { switch (player->currentSwordItemId) {
case ITEM_SWORD_KOKIRI: case ITEM_SWORD_KOKIRI:
curSword = "Kokiri Sword"; curSword = "Kokiri Sword";
break; break;
@ -1521,17 +1521,17 @@ void DrawPlayerTab() {
ImGui::PushItemWidth(ImGui::GetFontSize() * 15); ImGui::PushItemWidth(ImGui::GetFontSize() * 15);
if (ImGui::BeginCombo("Sword", curSword)) { if (ImGui::BeginCombo("Sword", curSword)) {
if (ImGui::Selectable("None")) { if (ImGui::Selectable("None")) {
player->currentSwordItem = ITEM_NONE; player->currentSwordItemId = ITEM_NONE;
gSaveContext.equips.buttonItems[0] = ITEM_NONE; gSaveContext.equips.buttonItems[0] = ITEM_NONE;
Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_NONE); Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_NONE);
} }
if (ImGui::Selectable("Kokiri Sword")) { if (ImGui::Selectable("Kokiri Sword")) {
player->currentSwordItem = ITEM_SWORD_KOKIRI; player->currentSwordItemId = ITEM_SWORD_KOKIRI;
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_KOKIRI; gSaveContext.equips.buttonItems[0] = ITEM_SWORD_KOKIRI;
Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_KOKIRI); Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_KOKIRI);
} }
if (ImGui::Selectable("Master Sword")) { if (ImGui::Selectable("Master Sword")) {
player->currentSwordItem = ITEM_SWORD_MASTER; player->currentSwordItemId = ITEM_SWORD_MASTER;
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_MASTER; gSaveContext.equips.buttonItems[0] = ITEM_SWORD_MASTER;
Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_MASTER); Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_MASTER);
} }
@ -1540,20 +1540,20 @@ void DrawPlayerTab() {
if (gSaveContext.swordHealth < 8) { if (gSaveContext.swordHealth < 8) {
gSaveContext.swordHealth = 8; gSaveContext.swordHealth = 8;
} }
player->currentSwordItem = ITEM_SWORD_BGS; player->currentSwordItemId = ITEM_SWORD_BGS;
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_BGS; gSaveContext.equips.buttonItems[0] = ITEM_SWORD_BGS;
} else { } else {
if (gSaveContext.swordHealth < 8) { if (gSaveContext.swordHealth < 8) {
gSaveContext.swordHealth = 8; gSaveContext.swordHealth = 8;
} }
player->currentSwordItem = ITEM_SWORD_BGS; player->currentSwordItemId = ITEM_SWORD_BGS;
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_KNIFE; gSaveContext.equips.buttonItems[0] = ITEM_SWORD_KNIFE;
} }
Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_BGS); Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_BGS);
} }
if (ImGui::Selectable("Fishing Pole")) { if (ImGui::Selectable("Fishing Pole")) {
player->currentSwordItem = ITEM_FISHING_POLE; player->currentSwordItemId = ITEM_FISHING_POLE;
gSaveContext.equips.buttonItems[0] = ITEM_FISHING_POLE; gSaveContext.equips.buttonItems[0] = ITEM_FISHING_POLE;
Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_MASTER); Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_MASTER);
} }

View File

@ -4,6 +4,7 @@
#include <vector> #include <vector>
#include <variant> #include <variant>
#include <cstdint> #include <cstdint>
#include "soh/Enhancements/randomizer/randomizerTypes.h"
enum PresetEntryType { enum PresetEntryType {
PRESET_ENTRY_TYPE_S32, PRESET_ENTRY_TYPE_S32,
@ -551,19 +552,19 @@ const std::vector<PresetEntry> s6PresetEntries = {
PRESET_ENTRY_S32("gMMBunnyHood", 2), PRESET_ENTRY_S32("gMMBunnyHood", 2),
PRESET_ENTRY_S32("gRandomizeBigPoeTargetCount", 1), PRESET_ENTRY_S32("gRandomizeBigPoeTargetCount", 1),
PRESET_ENTRY_S32("gRandomizeCuccosToReturn", 4), PRESET_ENTRY_S32("gRandomizeCuccosToReturn", 4),
PRESET_ENTRY_S32("gRandomizeDoorOfTime", 2), PRESET_ENTRY_S32("gRandomizeDoorOfTime", RO_DOOROFTIME_OPEN),
PRESET_ENTRY_STRING("gRandomizeExcludedLocations", "48,"), PRESET_ENTRY_STRING("gRandomizeExcludedLocations", "48,"),
PRESET_ENTRY_S32("gRandomizeForest", 1), PRESET_ENTRY_S32("gRandomizeForest", RO_FOREST_CLOSED_DEKU),
PRESET_ENTRY_S32("gRandomizeGanonTrial", 0), PRESET_ENTRY_S32("gRandomizeGanonTrial", 0),
PRESET_ENTRY_S32("gRandomizeGerudoFortress", 1), PRESET_ENTRY_S32("gRandomizeGerudoFortress", RO_GF_FAST),
PRESET_ENTRY_S32("gRandomizeIceTraps", 0), PRESET_ENTRY_S32("gRandomizeIceTraps", RO_ICE_TRAPS_OFF),
PRESET_ENTRY_S32("gRandomizeKakarikoGate", 1), PRESET_ENTRY_S32("gRandomizeKakarikoGate", RO_KAK_GATE_OPEN),
PRESET_ENTRY_S32("gRandomizeMedallionCount", 6), PRESET_ENTRY_S32("gRandomizeMedallionCount", 6),
PRESET_ENTRY_S32("gRandomizeMqDungeons", 0), PRESET_ENTRY_S32("gRandomizeMqDungeons", 0),
PRESET_ENTRY_S32("gRandomizeRainbowBridge", 3), PRESET_ENTRY_S32("gRandomizeRainbowBridge", 3),
PRESET_ENTRY_S32("gRandomizeShuffleAdultTrade", 1), PRESET_ENTRY_S32("gRandomizeShuffleAdultTrade", 1),
PRESET_ENTRY_S32("gRandomizeShuffleDungeonReward", 0), PRESET_ENTRY_S32("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON),
PRESET_ENTRY_S32("gRandomizeShuffleGanonBossKey", 2), PRESET_ENTRY_S32("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_STARTWITH),
PRESET_ENTRY_S32("gRandomizeShuffleKokiriSword", 1), PRESET_ENTRY_S32("gRandomizeShuffleKokiriSword", 1),
PRESET_ENTRY_S32("gRandomizeSkipChildStealth", 1), PRESET_ENTRY_S32("gRandomizeSkipChildStealth", 1),
PRESET_ENTRY_S32("gRandomizeSkipChildZelda", 1), PRESET_ENTRY_S32("gRandomizeSkipChildZelda", 1),
@ -586,28 +587,28 @@ const std::vector<PresetEntry> hellModePresetEntries = {
PRESET_ENTRY_S32("gRandomizeBossKeysanity", 5), PRESET_ENTRY_S32("gRandomizeBossKeysanity", 5),
PRESET_ENTRY_S32("gRandomizeCompleteMaskQuest", 1), PRESET_ENTRY_S32("gRandomizeCompleteMaskQuest", 1),
PRESET_ENTRY_S32("gRandomizeCuccosToReturn", 1), PRESET_ENTRY_S32("gRandomizeCuccosToReturn", 1),
PRESET_ENTRY_S32("gRandomizeDoorOfTime", 2), PRESET_ENTRY_S32("gRandomizeDoorOfTime", RO_DOOROFTIME_OPEN),
PRESET_ENTRY_S32("gRandomizeEnableBombchuDrops", 1), PRESET_ENTRY_S32("gRandomizeEnableBombchuDrops", 1),
PRESET_ENTRY_S32("gRandomizeEnableGlitchCutscenes", 1), PRESET_ENTRY_S32("gRandomizeEnableGlitchCutscenes", 1),
PRESET_ENTRY_S32("gRandomizeForest", 2), PRESET_ENTRY_S32("gRandomizeForest", RO_FOREST_OPEN),
PRESET_ENTRY_S32("gRandomizeGanonTrial", 2), PRESET_ENTRY_S32("gRandomizeGanonTrial", 2),
PRESET_ENTRY_S32("gRandomizeGanonTrialCount", 6), PRESET_ENTRY_S32("gRandomizeGanonTrialCount", 6),
PRESET_ENTRY_S32("gRandomizeGerudoKeys", 3), PRESET_ENTRY_S32("gRandomizeGerudoKeys", 3),
PRESET_ENTRY_S32("gRandomizeGsExpectSunsSong", 1), PRESET_ENTRY_S32("gRandomizeGsExpectSunsSong", 1),
PRESET_ENTRY_S32("gRandomizeIceTraps", 4), PRESET_ENTRY_S32("gRandomizeIceTraps", RO_ICE_TRAPS_ONSLAUGHT),
PRESET_ENTRY_S32("gRandomizeItemPool", 1), PRESET_ENTRY_S32("gRandomizeItemPool", RO_ITEM_POOL_MINIMAL),
PRESET_ENTRY_S32("gRandomizeKakarikoGate", 1), PRESET_ENTRY_S32("gRandomizeKakarikoGate", RO_KAK_GATE_OPEN),
PRESET_ENTRY_S32("gRandomizeKeysanity", 5), PRESET_ENTRY_S32("gRandomizeKeysanity", RO_DUNGEON_ITEM_LOC_ANYWHERE),
PRESET_ENTRY_S32("gRandomizeLinksPocket", 3), PRESET_ENTRY_S32("gRandomizeLinksPocket", RO_LINKS_POCKET_NOTHING),
PRESET_ENTRY_S32("gRandomizeMqDungeons", 2), PRESET_ENTRY_S32("gRandomizeMqDungeons", 2),
PRESET_ENTRY_S32("gRandomizeRainbowBridge", 4), PRESET_ENTRY_S32("gRandomizeRainbowBridge", 4),
PRESET_ENTRY_S32("gRandomizeShopsanity", 5), PRESET_ENTRY_S32("gRandomizeShopsanity", 5),
PRESET_ENTRY_S32("gRandomizeShuffleAdultTrade", 1), PRESET_ENTRY_S32("gRandomizeShuffleAdultTrade", 1),
PRESET_ENTRY_S32("gRandomizeShuffleBeans", 1), PRESET_ENTRY_S32("gRandomizeShuffleBeans", 1),
PRESET_ENTRY_S32("gRandomizeShuffleCows", 1), PRESET_ENTRY_S32("gRandomizeShuffleCows", 1),
PRESET_ENTRY_S32("gRandomizeShuffleDungeonReward", 3), PRESET_ENTRY_S32("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_ANYWHERE),
PRESET_ENTRY_S32("gRandomizeShuffleFrogSongRupees", 1), PRESET_ENTRY_S32("gRandomizeShuffleFrogSongRupees", 1),
PRESET_ENTRY_S32("gRandomizeShuffleGanonBossKey", 10), PRESET_ENTRY_S32("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_LACS_DUNGEONS),
PRESET_ENTRY_S32("gRandomizeShuffleGerudoToken", 1), PRESET_ENTRY_S32("gRandomizeShuffleGerudoToken", 1),
PRESET_ENTRY_S32("gRandomizeShuffleKeyRings", 1), PRESET_ENTRY_S32("gRandomizeShuffleKeyRings", 1),
PRESET_ENTRY_S32("gRandomizeShuffleKokiriSword", 1), PRESET_ENTRY_S32("gRandomizeShuffleKokiriSword", 1),

View File

@ -2838,7 +2838,7 @@ void HintTable_Init() {
/*spanish*/ "Para aquel que se convierta en el héroe...&La puerta al futuro está a su disposición..." }, /*spanish*/ "Para aquel que se convierta en el héroe...&La puerta al futuro está a su disposición..." },
}); });
hintTable[CHILD_ALTAR_TEXT_END_DOTCLOSED] = HintText::Altar({ hintTable[CHILD_ALTAR_TEXT_END_DOTSONGONLY] = HintText::Altar({
// obscure text // obscure text
Text{ Text{
"Ye who may become a Hero...&Stand with the Ocarina and&play the Song of Time.", "Ye who may become a Hero...&Stand with the Ocarina and&play the Song of Time.",
@ -2846,7 +2846,7 @@ void HintTable_Init() {
/*spanish*/ "Para aquel que se convierta en el héroe...&Tome la ocarina y&entone la Canción del Tiempo." }, /*spanish*/ "Para aquel que se convierta en el héroe...&Tome la ocarina y&entone la Canción del Tiempo." },
}); });
hintTable[CHILD_ALTAR_TEXT_END_DOTINTENDED] = HintText::Altar({ hintTable[CHILD_ALTAR_TEXT_END_DOTCLOSED] = HintText::Altar({
// obscure text // obscure text
Text{ "Ye who may become a Hero...&Offer the spiritual stones and&play the Song of Time.", Text{ "Ye who may become a Hero...&Offer the spiritual stones and&play the Song of Time.",
/*french*/ /*french*/

View File

@ -555,13 +555,13 @@ static Text BuildDoorOfTimeText() {
itemObtained = "$o"; itemObtained = "$o";
doorOfTimeText = Hint(CHILD_ALTAR_TEXT_END_DOTOPEN).GetText(); doorOfTimeText = Hint(CHILD_ALTAR_TEXT_END_DOTOPEN).GetText();
} else if (OpenDoorOfTime.Is(OPENDOOROFTIME_CLOSED)) { } else if (OpenDoorOfTime.Is(OPENDOOROFTIME_SONGONLY)) {
itemObtained = "$c"; itemObtained = "$c";
doorOfTimeText = Hint(CHILD_ALTAR_TEXT_END_DOTCLOSED).GetText(); doorOfTimeText = Hint(CHILD_ALTAR_TEXT_END_DOTSONGONLY).GetText();
} else if (OpenDoorOfTime.Is(OPENDOOROFTIME_INTENDED)) { } else if (OpenDoorOfTime.Is(OPENDOOROFTIME_CLOSED)) {
itemObtained = "$i"; itemObtained = "$i";
doorOfTimeText = Hint(CHILD_ALTAR_TEXT_END_DOTINTENDED).GetText(); doorOfTimeText = Hint(CHILD_ALTAR_TEXT_END_DOTCLOSED).GetText();
} }
return Text()+itemObtained+doorOfTimeText; return Text()+itemObtained+doorOfTimeText;

View File

@ -1742,8 +1742,8 @@ typedef enum {
SPIRITUAL_STONE_TEXT_START, SPIRITUAL_STONE_TEXT_START,
CHILD_ALTAR_TEXT_END_DOTOPEN, CHILD_ALTAR_TEXT_END_DOTOPEN,
CHILD_ALTAR_TEXT_END_DOTSONGONLY,
CHILD_ALTAR_TEXT_END_DOTCLOSED, CHILD_ALTAR_TEXT_END_DOTCLOSED,
CHILD_ALTAR_TEXT_END_DOTINTENDED,
ADULT_ALTAR_TEXT_START, ADULT_ALTAR_TEXT_START,
ADULT_ALTAR_TEXT_END, ADULT_ALTAR_TEXT_END,

View File

@ -56,8 +56,8 @@ void AreaTable_Init_CastleTown() {
}, { }, {
//Exits //Exits
Entrance(TOT_ENTRANCE, {[]{return true;}}), Entrance(TOT_ENTRANCE, {[]{return true;}}),
Entrance(TOT_BEYOND_DOOR_OF_TIME, {[]{return OpenDoorOfTime.Is(OPENDOOROFTIME_OPEN) || (CanPlay(SongOfTime) && (OpenDoorOfTime.Is(OPENDOOROFTIME_CLOSED) || (HasAllStones && OcarinaOfTime)));}, Entrance(TOT_BEYOND_DOOR_OF_TIME, {[]{return OpenDoorOfTime.Is(OPENDOOROFTIME_OPEN) || (CanPlay(SongOfTime) && (OpenDoorOfTime.Is(OPENDOOROFTIME_SONGONLY) || (HasAllStones && OcarinaOfTime)));},
/*Glitched*/[]{return SongOfTime && OpenDoorOfTime.Is(OPENDOOROFTIME_CLOSED) && (CanDoGlitch(GlitchType::IndoorBombOI, GlitchDifficulty::ADVANCED) || /*Glitched*/[]{return SongOfTime && OpenDoorOfTime.Is(OPENDOOROFTIME_SONGONLY) && (CanDoGlitch(GlitchType::IndoorBombOI, GlitchDifficulty::ADVANCED) ||
((Bugs || Fish) && Bombs && (CanSurviveDamage || (Fairy && NumBottles >= 2)) && CanShield && CanDoGlitch(GlitchType::QPA, GlitchDifficulty::ADVANCED) && CanDoGlitch(GlitchType::RestrictedItems, GlitchDifficulty::NOVICE)));}}), ((Bugs || Fish) && Bombs && (CanSurviveDamage || (Fairy && NumBottles >= 2)) && CanShield && CanDoGlitch(GlitchType::QPA, GlitchDifficulty::ADVANCED) && CanDoGlitch(GlitchType::RestrictedItems, GlitchDifficulty::NOVICE)));}}),
}); });

View File

@ -63,9 +63,9 @@ string_view kakGateClosed = "The gate and the Happy Mask Shop both r
------------------------------*/ // ------------------------------*/ //
string_view doorOfTimeOpen = "The Door of Time starts opened instead of needing\n" string_view doorOfTimeOpen = "The Door of Time starts opened instead of needing\n"
"to play the Song of Time."; // "to play the Song of Time."; //
string_view doorOfTimeClosed = "Only an Ocarina and the Song of Time need to be\n"// string_view doorOfTimeSongOnly = "Only an Ocarina and the Song of Time need to be\n"//
"found to open the Door of Time."; // "found to open the Door of Time."; //
string_view doorOfTimeIntended = "The Ocarina of Time, the Song of Time, and\n" // string_view doorOfTimeClosed = "The Ocarina of Time, the Song of Time, and\n" //
"all Spiritual Stones need to be found to\n" // "all Spiritual Stones need to be found to\n" //
"open the Door of Time."; // "open the Door of Time."; //
/*------------------------------ // /*------------------------------ //

View File

@ -22,8 +22,8 @@ extern string_view kakGateOpen;
extern string_view kakGateClosed; extern string_view kakGateClosed;
extern string_view doorOfTimeOpen; extern string_view doorOfTimeOpen;
extern string_view doorOfTimeSongOnly;
extern string_view doorOfTimeClosed; extern string_view doorOfTimeClosed;
extern string_view doorOfTimeIntended;
extern string_view fountainNormal; extern string_view fountainNormal;
extern string_view fountainAdult; extern string_view fountainAdult;

View File

@ -55,7 +55,7 @@ namespace Settings {
Option RandomizeOpen = Option::Bool("Randomize Settings", {"No","Yes"}, {openRandomize}, OptionCategory::Toggle); Option RandomizeOpen = Option::Bool("Randomize Settings", {"No","Yes"}, {openRandomize}, OptionCategory::Toggle);
Option OpenForest = Option::U8 ("Forest", {"Closed", "Closed Deku", "Open"}, {forestClosed, forestClosedDeku, forestOpen}, OptionCategory::Setting, OPENFOREST_CLOSED); Option OpenForest = Option::U8 ("Forest", {"Closed", "Closed Deku", "Open"}, {forestClosed, forestClosedDeku, forestOpen}, OptionCategory::Setting, OPENFOREST_CLOSED);
Option OpenKakariko = Option::U8 ("Kakariko Gate", {"Closed", "Open"}, {kakGateClosed, kakGateOpen}); Option OpenKakariko = Option::U8 ("Kakariko Gate", {"Closed", "Open"}, {kakGateClosed, kakGateOpen});
Option OpenDoorOfTime = Option::U8 ("Door of Time", {"Closed", "Song only", "Open"}, {doorOfTimeIntended, doorOfTimeClosed, doorOfTimeOpen}); Option OpenDoorOfTime = Option::U8 ("Door of Time", {"Closed", "Song only", "Open"}, {doorOfTimeClosed, doorOfTimeSongOnly, doorOfTimeOpen});
Option ZorasFountain = Option::U8 ("Zora's Fountain", {"Closed", "Closed as child", "Open"}, {fountainNormal, fountainAdult, fountainOpen}); Option ZorasFountain = Option::U8 ("Zora's Fountain", {"Closed", "Closed as child", "Open"}, {fountainNormal, fountainAdult, fountainOpen});
Option GerudoFortress = Option::U8 ("Gerudo Fortress", {"Normal", "Fast", "Open"}, {gerudoNormal, gerudoFast, gerudoOpen}); Option GerudoFortress = Option::U8 ("Gerudo Fortress", {"Normal", "Fast", "Open"}, {gerudoNormal, gerudoFast, gerudoOpen});
Option Bridge = Option::U8 ("Rainbow Bridge", {"Vanilla", "Always open", "Stones", "Medallions", "Dungeon rewards", "Dungeons", "Tokens"}, {bridgeVanilla, bridgeOpen, bridgeStones, bridgeMedallions, bridgeRewards, bridgeDungeons, bridgeTokens}, OptionCategory::Setting, RAINBOWBRIDGE_VANILLA); Option Bridge = Option::U8 ("Rainbow Bridge", {"Vanilla", "Always open", "Stones", "Medallions", "Dungeon rewards", "Dungeons", "Tokens"}, {bridgeVanilla, bridgeOpen, bridgeStones, bridgeMedallions, bridgeRewards, bridgeDungeons, bridgeTokens}, OptionCategory::Setting, RAINBOWBRIDGE_VANILLA);
@ -1864,7 +1864,7 @@ namespace Settings {
//Adult is also not compatible with the following combination: //Adult is also not compatible with the following combination:
//DoT:Intended, ShuffleOcarinas:false, Logic:Glitchless //DoT:Intended, ShuffleOcarinas:false, Logic:Glitchless
if (OpenDoorOfTime.Is(OPENDOOROFTIME_INTENDED) && !ShuffleOcarinas && if (OpenDoorOfTime.Is(OPENDOOROFTIME_CLOSED) && !ShuffleOcarinas &&
Logic.Is(LOGIC_GLITCHLESS)) { Logic.Is(LOGIC_GLITCHLESS)) {
StartingAge.SetSelectedIndex(AGE_CHILD); StartingAge.SetSelectedIndex(AGE_CHILD);
StartingAge.Lock(); StartingAge.Lock();

View File

@ -44,8 +44,8 @@ typedef enum {
} OpenKakarikoSetting; } OpenKakarikoSetting;
typedef enum { typedef enum {
OPENDOOROFTIME_INTENDED,
OPENDOOROFTIME_CLOSED, OPENDOOROFTIME_CLOSED,
OPENDOOROFTIME_SONGONLY,
OPENDOOROFTIME_OPEN, OPENDOOROFTIME_OPEN,
} OpenDoorOfTimeSetting; } OpenDoorOfTimeSetting;

View File

@ -26,7 +26,7 @@ extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEn
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
@ -56,7 +56,7 @@ extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEnt
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
@ -72,7 +72,7 @@ extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEnt
gSPGrayscale(POLY_OPA_DISP++, false); gSPGrayscale(POLY_OPA_DISP++, false);
} }
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
@ -106,7 +106,7 @@ extern "C" void Randomizer_DrawKeyRing(PlayState* play, GetItemEntry* getItemEnt
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gDPSetGrayscaleColor(POLY_OPA_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255); gDPSetGrayscaleColor(POLY_OPA_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255);
gSPGrayscale(POLY_OPA_DISP++, true); gSPGrayscale(POLY_OPA_DISP++, true);
@ -140,7 +140,7 @@ extern "C" void Randomizer_DrawDoubleDefense(PlayState* play, GetItemEntry getIt
s32 pad; s32 pad;
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD);

View File

@ -598,16 +598,16 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
if(it.value() == "Closed") { if(it.value() == "Closed") {
gSaveContext.randoSettings[index].value = RO_FOREST_CLOSED; gSaveContext.randoSettings[index].value = RO_FOREST_CLOSED;
} else if(it.value() == "Open") { } else if(it.value() == "Open") {
gSaveContext.randoSettings[index].value = RO_FOREST_CLOSED_DEKU;
} else if(it.value() == "Closed Deku") {
gSaveContext.randoSettings[index].value = RO_FOREST_OPEN; gSaveContext.randoSettings[index].value = RO_FOREST_OPEN;
} else if(it.value() == "Closed Deku") {
gSaveContext.randoSettings[index].value = RO_FOREST_CLOSED_DEKU;
} }
break; break;
case RSK_KAK_GATE: case RSK_KAK_GATE:
if(it.value() == "Closed") { if(it.value() == "Closed") {
gSaveContext.randoSettings[index].value = RO_GENERIC_OFF; gSaveContext.randoSettings[index].value = RO_KAK_GATE_CLOSED;
} else if(it.value() == "Open") { } else if(it.value() == "Open") {
gSaveContext.randoSettings[index].value = RO_GENERIC_ON; gSaveContext.randoSettings[index].value = RO_KAK_GATE_OPEN;
} }
break; break;
case RSK_DOOR_OF_TIME: case RSK_DOOR_OF_TIME:
@ -1470,7 +1470,7 @@ ItemObtainability Randomizer::GetItemObtainabilityFromRandomizerGet(RandomizerGe
case RG_GERUDO_MEMBERSHIP_CARD: case RG_GERUDO_MEMBERSHIP_CARD:
return !CHECK_QUEST_ITEM(QUEST_GERUDO_CARD) ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE; return !CHECK_QUEST_ITEM(QUEST_GERUDO_CARD) ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
case RG_DOUBLE_DEFENSE: case RG_DOUBLE_DEFENSE:
return !gSaveContext.doubleDefense ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE; return !gSaveContext.isDoubleDefenseAcquired ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
case RG_GOLD_SKULLTULA_TOKEN: case RG_GOLD_SKULLTULA_TOKEN:
return gSaveContext.inventory.gsTokens < 100 ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE; return gSaveContext.inventory.gsTokens < 100 ? CAN_OBTAIN : CANT_OBTAIN_ALREADY_HAVE;
case RG_PROGRESSIVE_STRENGTH: case RG_PROGRESSIVE_STRENGTH:
@ -1927,7 +1927,9 @@ GetItemID Randomizer::GetItemIdFromRandomizerGet(RandomizerGet randoGet, GetItem
return (GetItemID)randoGet; return (GetItemID)randoGet;
} }
case RG_GANONS_CASTLE_BOSS_KEY: case RG_GANONS_CASTLE_BOSS_KEY:
if (GetRandoSettingValue(RSK_GANONS_BOSS_KEY) < 3) { if (GetRandoSettingValue(RSK_GANONS_BOSS_KEY) == RO_GANON_BOSS_KEY_VANILLA ||
GetRandoSettingValue(RSK_GANONS_BOSS_KEY) == RO_GANON_BOSS_KEY_OWN_DUNGEON ||
GetRandoSettingValue(RSK_GANONS_BOSS_KEY) == RO_GANON_BOSS_KEY_STARTWITH) {
return GI_KEY_BOSS; return GI_KEY_BOSS;
} else { } else {
return (GetItemID)randoGet; return (GetItemID)randoGet;
@ -1941,7 +1943,9 @@ GetItemID Randomizer::GetItemIdFromRandomizerGet(RandomizerGet randoGet, GetItem
case RG_BOTTOM_OF_THE_WELL_SMALL_KEY: case RG_BOTTOM_OF_THE_WELL_SMALL_KEY:
case RG_GERUDO_TRAINING_GROUNDS_SMALL_KEY: case RG_GERUDO_TRAINING_GROUNDS_SMALL_KEY:
case RG_GANONS_CASTLE_SMALL_KEY: case RG_GANONS_CASTLE_SMALL_KEY:
if (GetRandoSettingValue(RSK_KEYSANITY) < 3) { if (GetRandoSettingValue(RSK_KEYSANITY) == RO_DUNGEON_ITEM_LOC_STARTWITH ||
GetRandoSettingValue(RSK_KEYSANITY) == RO_DUNGEON_ITEM_LOC_VANILLA ||
GetRandoSettingValue(RSK_KEYSANITY) == RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) {
return GI_KEY_SMALL; return GI_KEY_SMALL;
} else { } else {
return (GetItemID)randoGet; return (GetItemID)randoGet;
@ -2138,10 +2142,12 @@ bool Randomizer::IsItemVanilla(RandomizerGet randoGet) {
} }
return true; return true;
case RG_GANONS_CASTLE_BOSS_KEY: case RG_GANONS_CASTLE_BOSS_KEY:
if (GetRandoSettingValue(RSK_GANONS_BOSS_KEY) > 2) { if (GetRandoSettingValue(RSK_GANONS_BOSS_KEY) == RO_GANON_BOSS_KEY_VANILLA ||
return false; GetRandoSettingValue(RSK_GANONS_BOSS_KEY) == RO_GANON_BOSS_KEY_OWN_DUNGEON ||
} GetRandoSettingValue(RSK_GANONS_BOSS_KEY) == RO_GANON_BOSS_KEY_STARTWITH) {
return true; return true;
}
return false;
case RG_DEKU_TREE_COMPASS: case RG_DEKU_TREE_COMPASS:
case RG_DODONGOS_CAVERN_COMPASS: case RG_DODONGOS_CAVERN_COMPASS:
case RG_JABU_JABUS_BELLY_COMPASS: case RG_JABU_JABUS_BELLY_COMPASS:
@ -2578,12 +2584,12 @@ void GenerateRandomizerImgui() {
std::unordered_map<RandomizerSettingKey, u8> cvarSettings; std::unordered_map<RandomizerSettingKey, u8> cvarSettings;
cvarSettings[RSK_LOGIC_RULES] = CVar_GetS32("gRandomizeLogicRules", 0); cvarSettings[RSK_LOGIC_RULES] = CVar_GetS32("gRandomizeLogicRules", 0);
cvarSettings[RSK_FOREST] = CVar_GetS32("gRandomizeForest", 0); cvarSettings[RSK_FOREST] = CVar_GetS32("gRandomizeForest", RO_FOREST_CLOSED);
cvarSettings[RSK_KAK_GATE] = CVar_GetS32("gRandomizeKakarikoGate", 0); cvarSettings[RSK_KAK_GATE] = CVar_GetS32("gRandomizeKakarikoGate", RO_KAK_GATE_CLOSED);
cvarSettings[RSK_DOOR_OF_TIME] = CVar_GetS32("gRandomizeDoorOfTime", 0); cvarSettings[RSK_DOOR_OF_TIME] = CVar_GetS32("gRandomizeDoorOfTime", RO_DOOROFTIME_CLOSED);
cvarSettings[RSK_ZORAS_FOUNTAIN] = CVar_GetS32("gRandomizeZorasFountain", 0); cvarSettings[RSK_ZORAS_FOUNTAIN] = CVar_GetS32("gRandomizeZorasFountain", 0);
cvarSettings[RSK_STARTING_AGE] = CVar_GetS32("gRandomizeStartingAge", 0); cvarSettings[RSK_STARTING_AGE] = CVar_GetS32("gRandomizeStartingAge", 0);
cvarSettings[RSK_GERUDO_FORTRESS] = CVar_GetS32("gRandomizeGerudoFortress", 0); cvarSettings[RSK_GERUDO_FORTRESS] = CVar_GetS32("gRandomizeGerudoFortress", RO_GF_NORMAL);
cvarSettings[RSK_RAINBOW_BRIDGE] = CVar_GetS32("gRandomizeRainbowBridge", 0); cvarSettings[RSK_RAINBOW_BRIDGE] = CVar_GetS32("gRandomizeRainbowBridge", 0);
cvarSettings[RSK_RAINBOW_BRIDGE_STONE_COUNT] = CVar_GetS32("gRandomizeStoneCount", 3); cvarSettings[RSK_RAINBOW_BRIDGE_STONE_COUNT] = CVar_GetS32("gRandomizeStoneCount", 3);
cvarSettings[RSK_RAINBOW_BRIDGE_MEDALLION_COUNT] = CVar_GetS32("gRandomizeMedallionCount", 6); cvarSettings[RSK_RAINBOW_BRIDGE_MEDALLION_COUNT] = CVar_GetS32("gRandomizeMedallionCount", 6);
@ -2601,7 +2607,7 @@ void GenerateRandomizerImgui() {
cvarSettings[RSK_STARTING_DEKU_SHIELD] = CVar_GetS32("gRandomizeStartingDekuShield", 0); cvarSettings[RSK_STARTING_DEKU_SHIELD] = CVar_GetS32("gRandomizeStartingDekuShield", 0);
cvarSettings[RSK_STARTING_SKULLTULA_TOKEN] = CVar_GetS32("gRandomizeStartingSkulltulaToken", 0); cvarSettings[RSK_STARTING_SKULLTULA_TOKEN] = CVar_GetS32("gRandomizeStartingSkulltulaToken", 0);
cvarSettings[RSK_STARTING_MAPS_COMPASSES] = CVar_GetS32("gRandomizeStartingMapsCompasses", 2); cvarSettings[RSK_STARTING_MAPS_COMPASSES] = CVar_GetS32("gRandomizeStartingMapsCompasses", 2);
cvarSettings[RSK_SHUFFLE_DUNGEON_REWARDS] = CVar_GetS32("gRandomizeShuffleDungeonReward", 0); cvarSettings[RSK_SHUFFLE_DUNGEON_REWARDS] = CVar_GetS32("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON);
cvarSettings[RSK_SHUFFLE_SONGS] = CVar_GetS32("gRandomizeShuffleSongs", 0); cvarSettings[RSK_SHUFFLE_SONGS] = CVar_GetS32("gRandomizeShuffleSongs", 0);
cvarSettings[RSK_SHUFFLE_TOKENS] = CVar_GetS32("gRandomizeShuffleTokens", 0); cvarSettings[RSK_SHUFFLE_TOKENS] = CVar_GetS32("gRandomizeShuffleTokens", 0);
cvarSettings[RSK_SHOPSANITY] = CVar_GetS32("gRandomizeShopsanity", 0); cvarSettings[RSK_SHOPSANITY] = CVar_GetS32("gRandomizeShopsanity", 0);
@ -2621,14 +2627,14 @@ void GenerateRandomizerImgui() {
cvarSettings[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD] = CVar_GetS32("gRandomizeShuffleGerudoToken", 0); cvarSettings[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD] = CVar_GetS32("gRandomizeShuffleGerudoToken", 0);
cvarSettings[RSK_SHUFFLE_FROG_SONG_RUPEES] = CVar_GetS32("gRandomizeShuffleFrogSongRupees", 0); cvarSettings[RSK_SHUFFLE_FROG_SONG_RUPEES] = CVar_GetS32("gRandomizeShuffleFrogSongRupees", 0);
cvarSettings[RSK_ITEM_POOL] = CVar_GetS32("gRandomizeItemPool", 1); cvarSettings[RSK_ITEM_POOL] = CVar_GetS32("gRandomizeItemPool", RO_ITEM_POOL_BALANCED);
cvarSettings[RSK_ICE_TRAPS] = CVar_GetS32("gRandomizeIceTraps", 1); cvarSettings[RSK_ICE_TRAPS] = CVar_GetS32("gRandomizeIceTraps", RO_ICE_TRAPS_NORMAL);
cvarSettings[RSK_GOSSIP_STONE_HINTS] = CVar_GetS32("gRandomizeGossipStoneHints", 1); cvarSettings[RSK_GOSSIP_STONE_HINTS] = CVar_GetS32("gRandomizeGossipStoneHints", 1);
cvarSettings[RSK_HINT_CLARITY] = CVar_GetS32("gRandomizeHintClarity", 2); cvarSettings[RSK_HINT_CLARITY] = CVar_GetS32("gRandomizeHintClarity", 2);
cvarSettings[RSK_HINT_DISTRIBUTION] = CVar_GetS32("gRandomizeHintDistribution", 1); cvarSettings[RSK_HINT_DISTRIBUTION] = CVar_GetS32("gRandomizeHintDistribution", 1);
cvarSettings[RSK_BLUE_FIRE_ARROWS] = CVar_GetS32("gRandomizeBlueFireArrows", 0); cvarSettings[RSK_BLUE_FIRE_ARROWS] = CVar_GetS32("gRandomizeBlueFireArrows", 0);
cvarSettings[RSK_SUNLIGHT_ARROWS] = CVar_GetS32("gRandomizeSunlightArrows", 0); cvarSettings[RSK_SUNLIGHT_ARROWS] = CVar_GetS32("gRandomizeSunlightArrows", 0);
cvarSettings[RSK_KEYSANITY] = CVar_GetS32("gRandomizeKeysanity", 2); cvarSettings[RSK_KEYSANITY] = CVar_GetS32("gRandomizeKeysanity", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
cvarSettings[RSK_GERUDO_KEYS] = CVar_GetS32("gRandomizeGerudoKeys", 0); cvarSettings[RSK_GERUDO_KEYS] = CVar_GetS32("gRandomizeGerudoKeys", 0);
cvarSettings[RSK_KEYRINGS] = CVar_GetS32("gRandomizeShuffleKeyRings", 0); cvarSettings[RSK_KEYRINGS] = CVar_GetS32("gRandomizeShuffleKeyRings", 0);
cvarSettings[RSK_KEYRINGS_RANDOM_COUNT] = CVar_GetS32("gRandomizeShuffleKeyRingsRandomCount", 8); cvarSettings[RSK_KEYRINGS_RANDOM_COUNT] = CVar_GetS32("gRandomizeShuffleKeyRingsRandomCount", 8);
@ -2641,7 +2647,7 @@ void GenerateRandomizerImgui() {
cvarSettings[RSK_KEYRINGS_GTG] = CVar_GetS32("gRandomizeShuffleKeyRingsGTG", 0); cvarSettings[RSK_KEYRINGS_GTG] = CVar_GetS32("gRandomizeShuffleKeyRingsGTG", 0);
cvarSettings[RSK_KEYRINGS_GANONS_CASTLE] = CVar_GetS32("gRandomizeShuffleKeyRingsGanonsCastle", 0); cvarSettings[RSK_KEYRINGS_GANONS_CASTLE] = CVar_GetS32("gRandomizeShuffleKeyRingsGanonsCastle", 0);
cvarSettings[RSK_BOSS_KEYSANITY] = CVar_GetS32("gRandomizeBossKeysanity", 2); cvarSettings[RSK_BOSS_KEYSANITY] = CVar_GetS32("gRandomizeBossKeysanity", 2);
cvarSettings[RSK_GANONS_BOSS_KEY] = CVar_GetS32("gRandomizeShuffleGanonBossKey", 1); cvarSettings[RSK_GANONS_BOSS_KEY] = CVar_GetS32("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA);
cvarSettings[RSK_LACS_STONE_COUNT] = CVar_GetS32("gRandomizeLacsStoneCount", 3); cvarSettings[RSK_LACS_STONE_COUNT] = CVar_GetS32("gRandomizeLacsStoneCount", 3);
cvarSettings[RSK_LACS_MEDALLION_COUNT] = CVar_GetS32("gRandomizeLacsMedallionCount", 6); cvarSettings[RSK_LACS_MEDALLION_COUNT] = CVar_GetS32("gRandomizeLacsMedallionCount", 6);
cvarSettings[RSK_LACS_REWARD_COUNT] = CVar_GetS32("gRandomizeLacsRewardCount", 9); cvarSettings[RSK_LACS_REWARD_COUNT] = CVar_GetS32("gRandomizeLacsRewardCount", 9);
@ -2670,8 +2676,9 @@ void GenerateRandomizerImgui() {
cvarSettings[RSK_SKULLS_SUNS_SONG] = CVar_GetS32("gRandomizeGsExpectSunsSong", 0); cvarSettings[RSK_SKULLS_SUNS_SONG] = CVar_GetS32("gRandomizeGsExpectSunsSong", 0);
// Link's Pocket has to have a dungeon reward if the other rewards are shuffled to end of dungeon. // Link's Pocket has to have a dungeon reward if the other rewards are shuffled to end of dungeon.
cvarSettings[RSK_LINKS_POCKET] = CVar_GetS32("gRandomizeShuffleDungeonReward", 0) != 0 ? cvarSettings[RSK_LINKS_POCKET] = CVar_GetS32("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON) != RO_DUNGEON_REWARDS_END_OF_DUNGEON ?
CVar_GetS32("gRandomizeLinksPocket", 0) : 0; CVar_GetS32("gRandomizeLinksPocket", RO_LINKS_POCKET_DUNGEON_REWARD) :
RO_LINKS_POCKET_DUNGEON_REWARD;
if (OTRGlobals::Instance->HasMasterQuest() && OTRGlobals::Instance->HasOriginal()) { if (OTRGlobals::Instance->HasMasterQuest() && OTRGlobals::Instance->HasOriginal()) {
// If both OTRs are loaded. // If both OTRs are loaded.
@ -2859,7 +2866,7 @@ void DrawRandoEditor(bool& open) {
"Open - The gate is always open. The happy mask shop " "Open - The gate is always open. The happy mask shop "
"will open immediately after obtaining Zelda's letter." "will open immediately after obtaining Zelda's letter."
); );
UIWidgets::EnhancementCombobox("gRandomizeKakarikoGate", randoKakarikoGate, 2, RO_GENERIC_DONT_SKIP); UIWidgets::EnhancementCombobox("gRandomizeKakarikoGate", randoKakarikoGate, 2, RO_KAK_GATE_CLOSED);
UIWidgets::PaddedSeparator(); UIWidgets::PaddedSeparator();
@ -2907,8 +2914,8 @@ void DrawRandoEditor(bool& open) {
//Disabled when Forest is set to Closed or under very specific conditions //Disabled when Forest is set to Closed or under very specific conditions
//RANDOTODO: Replace magic number checks with enums //RANDOTODO: Replace magic number checks with enums
bool disableRandoStartingAge = (CVar_GetS32("gRandomizeLogicRules", 0) == 0) && // glitchless logic bool disableRandoStartingAge = (CVar_GetS32("gRandomizeLogicRules", 0) == 0) && // glitchless logic
((CVar_GetS32("gRandomizeForest", 0) == 0) || // Closed Forest ((CVar_GetS32("gRandomizeForest", RO_FOREST_CLOSED) == RO_FOREST_CLOSED) ||
((CVar_GetS32("gRandomizeDoorOfTime", 0) == 0) && // Closed Door of Time ((CVar_GetS32("gRandomizeDoorOfTime", RO_DOOROFTIME_CLOSED) == RO_DOOROFTIME_CLOSED) &&
(CVar_GetS32("gRandomizeShuffleOcarinas", 0) == 0))); // ocarinas not shuffled (CVar_GetS32("gRandomizeShuffleOcarinas", 0) == 0))); // ocarinas not shuffled
const char* disableRandoStartingAgeText = "This option is disabled due to other options making the game unbeatable."; const char* disableRandoStartingAgeText = "This option is disabled due to other options making the game unbeatable.";
@ -3501,7 +3508,7 @@ void DrawRandoEditor(bool& open) {
); );
UIWidgets::EnhancementCombobox("gRandomizeShuffleGanonBossKey", randoShuffleGanonsBossKey, 12, RO_GANON_BOSS_KEY_VANILLA); UIWidgets::EnhancementCombobox("gRandomizeShuffleGanonBossKey", randoShuffleGanonsBossKey, 12, RO_GANON_BOSS_KEY_VANILLA);
ImGui::PopItemWidth(); ImGui::PopItemWidth();
switch (CVar_GetS32("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_OWN_DUNGEON)) { switch (CVar_GetS32("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA)) {
case RO_GANON_BOSS_KEY_LACS_MEDALLIONS: case RO_GANON_BOSS_KEY_LACS_MEDALLIONS:
ImGui::Dummy(ImVec2(0.0f, 0.0f)); ImGui::Dummy(ImVec2(0.0f, 0.0f));
UIWidgets::EnhancementSliderInt("Medallion Count: %d", "##RandoLacsMedallionCount", UIWidgets::EnhancementSliderInt("Medallion Count: %d", "##RandoLacsMedallionCount",
@ -3969,7 +3976,7 @@ void DrawRandoEditor(bool& open) {
ImGui::BeginChild("ChildStartingEquipment", ImVec2(0, -8)); ImGui::BeginChild("ChildStartingEquipment", ImVec2(0, -8));
// Don't display this option if Dungeon Rewards are Shuffled to End of Dungeon. // Don't display this option if Dungeon Rewards are Shuffled to End of Dungeon.
// TODO: Show this but disabled when we have options for disabled Comboboxes. // TODO: Show this but disabled when we have options for disabled Comboboxes.
if (CVar_GetS32("gRandomizeShuffleDungeonReward", 0) != 0) { if (CVar_GetS32("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON) != RO_DUNGEON_REWARDS_END_OF_DUNGEON) {
ImGui::Text(Settings::LinksPocketItem.GetName().c_str()); ImGui::Text(Settings::LinksPocketItem.GetName().c_str());
UIWidgets::EnhancementCombobox("gRandomizeLinksPocket", randoLinksPocket, 4, RO_LINKS_POCKET_DUNGEON_REWARD); UIWidgets::EnhancementCombobox("gRandomizeLinksPocket", randoLinksPocket, 4, RO_LINKS_POCKET_DUNGEON_REWARD);
UIWidgets::PaddedSeparator(); UIWidgets::PaddedSeparator();

View File

@ -1085,10 +1085,10 @@ typedef enum RandoOption {
RO_FOREST_CLOSED_DEKU, RO_FOREST_CLOSED_DEKU,
RO_FOREST_OPEN, RO_FOREST_OPEN,
//Door of Time settings (open, song only, closed) //Door of Time settings (closed, song only, open)
RO_DOOROFTIME_OPEN = 0, RO_DOOROFTIME_CLOSED = 0,
RO_DOOROFTIME_SONGONLY, RO_DOOROFTIME_SONGONLY,
RO_DOOROFTIME_CLOSED, RO_DOOROFTIME_OPEN,
//Zora's Fountain settings (closed, closed as child, open) //Zora's Fountain settings (closed, closed as child, open)
RO_ZF_CLOSED = 0, RO_ZF_CLOSED = 0,
@ -1105,9 +1105,13 @@ typedef enum RandoOption {
RO_GF_FAST, RO_GF_FAST,
RO_GF_OPEN, RO_GF_OPEN,
//Kakariko Gate settings (closed/open)
RO_KAK_GATE_CLOSED = 0,
RO_KAK_GATE_OPEN,
//Rainbow Bridge settings (always open, vanilla, stones, medallions, dungeon rewards, dungeons, tokens) //Rainbow Bridge settings (always open, vanilla, stones, medallions, dungeon rewards, dungeons, tokens)
RO_BRIDGE_VANILLA = 0, RO_BRIDGE_ALWAYS_OPEN = 0,
RO_BRIDGE_ALWAYS_OPEN, RO_BRIDGE_VANILLA,
RO_BRIDGE_STONES, RO_BRIDGE_STONES,
RO_BRIDGE_MEDALLIONS, RO_BRIDGE_MEDALLIONS,
RO_BRIDGE_DUNGEON_REWARDS, RO_BRIDGE_DUNGEON_REWARDS,
@ -1129,11 +1133,6 @@ typedef enum RandoOption {
RO_SCRUBS_EXPENSIVE, RO_SCRUBS_EXPENSIVE,
RO_SCRUBS_RANDOM, RO_SCRUBS_RANDOM,
//Shuffle Merchants settings (off, on w/o hints, on w/hints)
RO_MERCHANTS_OFF = 0,
RO_MERCHANTS_ON_NO_HINTS,
RO_MERCHANTS_ON_WITH_HINTS,
//Ammo drop settings (on, "on+bombchu", off) //Ammo drop settings (on, "on+bombchu", off)
RO_AMMO_DROPS_ON = 0, RO_AMMO_DROPS_ON = 0,
RO_AMMO_DROPS_ON_PLUS_BOMBCHU, RO_AMMO_DROPS_ON_PLUS_BOMBCHU,

View File

@ -938,10 +938,10 @@ void RandomizerCheckObjects::UpdateImGuiVisibility() {
((locationIt.rc != RC_GF_GERUDO_MEMBERSHIP_CARD) || CVar_GetS32("gRandomizeShuffleGerudoToken", 0)) && ((locationIt.rc != RC_GF_GERUDO_MEMBERSHIP_CARD) || CVar_GetS32("gRandomizeShuffleGerudoToken", 0)) &&
((locationIt.rcType != RCTYPE_FROG_SONG) || CVar_GetS32("gRandomizeShuffleFrogSongRupees", 0)) && ((locationIt.rcType != RCTYPE_FROG_SONG) || CVar_GetS32("gRandomizeShuffleFrogSongRupees", 0)) &&
((locationIt.rcType != RCTYPE_MAP_COMPASS) || CVar_GetS32("gRandomizeStartingMapsCompasses", 0) != 1) && // 1 is the value for "vanilla" maps/compasses ((locationIt.rcType != RCTYPE_MAP_COMPASS) || CVar_GetS32("gRandomizeStartingMapsCompasses", 0) != 1) && // 1 is the value for "vanilla" maps/compasses
((locationIt.rcType != RCTYPE_SMALL_KEY) || CVar_GetS32("gRandomizeKeysanity", 0) != 1) && // 1 is the value for "vanilla" small keys ((locationIt.rcType != RCTYPE_SMALL_KEY) || CVar_GetS32("gRandomizeKeysanity", RO_DUNGEON_ITEM_LOC_OWN_DUNGEON) != RO_DUNGEON_ITEM_LOC_VANILLA) &&
((locationIt.rcType != RCTYPE_GF_KEY) || CVar_GetS32("randoShuffleGerudoFortressKeys", 0) != 0) && // 0 is the value for "vanilla" gf keys ((locationIt.rcType != RCTYPE_GF_KEY) || CVar_GetS32("randoShuffleGerudoFortressKeys", 0) != 0) && // 0 is the value for "vanilla" gf keys
((locationIt.rcType != RCTYPE_BOSS_KEY) || CVar_GetS32("gRandomizeBossKeysanity", 0) != 1) && // 1 is the value for "vanilla" boss keys ((locationIt.rcType != RCTYPE_BOSS_KEY) || CVar_GetS32("gRandomizeBossKeysanity", 0) != 1) && // 1 is the value for "vanilla" boss keys
((locationIt.rcType != RCTYPE_GANON_BOSS_KEY) || CVar_GetS32("gRandomizeShuffleGanonBossKey", 0) != 0) && // 0 is the value for "vanilla" ganon's boss key ((locationIt.rcType != RCTYPE_GANON_BOSS_KEY) || CVar_GetS32("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA) != RO_GANON_BOSS_KEY_VANILLA)
((!RC_IS_CARPENTER(locationIt.rc) && locationIt.rc != RC_GF_GERUDO_MEMBERSHIP_CARD) || ((!RC_IS_CARPENTER(locationIt.rc) && locationIt.rc != RC_GF_GERUDO_MEMBERSHIP_CARD) ||
(CVar_GetS32("gRandomizeGerudoFortress", 0) == 2 && !RC_IS_CARPENTER(locationIt.rc) && locationIt.rc != RC_GF_GERUDO_MEMBERSHIP_CARD) || //2 is the value for "open" gerudo's fortress (CVar_GetS32("gRandomizeGerudoFortress", 0) == 2 && !RC_IS_CARPENTER(locationIt.rc) && locationIt.rc != RC_GF_GERUDO_MEMBERSHIP_CARD) || //2 is the value for "open" gerudo's fortress
(CVar_GetS32("gRandomizeGerudoFortress", 0) == 1 && (locationIt.rc == RC_GF_NORTH_F1_CARPENTER || locationIt.rc == RC_GF_GERUDO_MEMBERSHIP_CARD)) || //1 is the value for "fast" gerudo's fortress (CVar_GetS32("gRandomizeGerudoFortress", 0) == 1 && (locationIt.rc == RC_GF_NORTH_F1_CARPENTER || locationIt.rc == RC_GF_GERUDO_MEMBERSHIP_CARD)) || //1 is the value for "fast" gerudo's fortress

View File

@ -163,7 +163,7 @@ s16 Grotto_OverrideSpecialEntrance(s16 nextEntranceIndex) {
gSaveContext.respawnFlag = 2; gSaveContext.respawnFlag = 2;
nextEntranceIndex = grotto.entranceIndex; nextEntranceIndex = grotto.entranceIndex;
gPlayState->fadeTransition = 3; gPlayState->fadeTransition = 3;
gSaveContext.nextTransition = 3; gSaveContext.nextTransitionType = 3;
// Otherwise return 0x7FFF and let the game handle it // Otherwise return 0x7FFF and let the game handle it
} else { } else {
nextEntranceIndex = 0x7FFF; nextEntranceIndex = 0x7FFF;

View File

@ -307,48 +307,6 @@ namespace GameMenuBar {
UIWidgets::Spacer(0); UIWidgets::Spacer(0);
if (ImGui::BeginMenu("Controls")) {
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(12.0f, 6.0f));
ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0, 0));
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f);
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f));
float availableWidth = ImGui::GetContentRegionAvail().x;
if (ImGui::Button(
GetWindowButtonText("Customize Game Controls", CVar_GetS32("gGameControlEditorEnabled", 0)).c_str(),
ImVec2(availableWidth, 0)
)) {
bool currentValue = CVar_GetS32("gGameControlEditorEnabled", 0);
CVar_SetS32("gGameControlEditorEnabled", !currentValue);
SohImGui::RequestCvarSaveOnNextTick();
SohImGui::EnableWindow("Game Control Editor", CVar_GetS32("gGameControlEditorEnabled", 0));
}
ImGui::PopStyleVar(3);
ImGui::PopStyleColor(1);
UIWidgets::PaddedEnhancementCheckbox("D-pad Support on Pause Screen", "gDpadPause", true, false);
UIWidgets::Tooltip("Navigate Pause with the D-pad\nIf used with D-pad as Equip Items, you must hold C-Up to equip instead of navigate\n"
"To make the cursor only move a single space no matter how long a direction is held, manually set gDpadHoldChange to 0");
UIWidgets::PaddedEnhancementCheckbox("D-pad Support in Text Boxes", "gDpadText", true, false);
UIWidgets::Tooltip("Navigate choices in text boxes, shop item selection, and the file select / name entry screens with the D-pad\n"
"To make the cursor only move a single space during name entry no matter how long a direction is held, manually set gDpadHoldChange to 0");
UIWidgets::PaddedEnhancementCheckbox("D-pad as Equip Items", "gDpadEquips", true, false);
UIWidgets::Tooltip("Equip items and equipment on the D-pad\nIf used with D-pad on Pause Screen, you must hold C-Up to equip instead of navigate");
UIWidgets::PaddedEnhancementCheckbox("Allow the cursor to be on any slot", "gPauseAnyCursor", true, false);
UIWidgets::Tooltip("Allows the cursor on the pause menu to be over any slot\nSimilar to Rando and Spaceworld 97");
UIWidgets::PaddedEnhancementCheckbox("Answer Navi Prompt with L Button", "gNaviOnL", true, false);
UIWidgets::Tooltip("Speak to Navi with L but enter first-person camera with C-Up");
UIWidgets::PaddedEnhancementCheckbox("Enable walk speed modifiers", "gEnableWalkModify", true, false);
UIWidgets::Tooltip("Hold the assigned button to change the maximum walking speed\nTo change the assigned button, click Customize Game Controls");
if (CVar_GetS32("gEnableWalkModify", 0)) {
UIWidgets::PaddedEnhancementCheckbox("Toggle modifier instead of holding", "gWalkSpeedToggle", true, false);
UIWidgets::EnhancementSliderFloat("Modifier 1: %d %%", "##WalkMod1", "gWalkModifierOne", 0.0f, 5.0f, "", 1.0f, true);
UIWidgets::EnhancementSliderFloat("Modifier 2: %d %%", "##WalkMod2", "gWalkModifierTwo", 0.0f, 5.0f, "", 1.0f, true);
}
ImGui::EndMenu();
}
UIWidgets::Spacer(0);
if (ImGui::BeginMenu("Gameplay")) if (ImGui::BeginMenu("Gameplay"))
{ {
if (ImGui::BeginMenu("Time Savers")) if (ImGui::BeginMenu("Time Savers"))
@ -792,6 +750,14 @@ namespace GameMenuBar {
ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0, 0)); ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0, 0));
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f); ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f);
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f)); ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f));
if (ImGui::Button(GetWindowButtonText("Customize Game Controls", CVar_GetS32("gGameControlEditorEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f)))
{
bool currentValue = CVar_GetS32("gGameControlEditorEnabled", 0);
CVar_SetS32("gGameControlEditorEnabled", !currentValue);
SohImGui::RequestCvarSaveOnNextTick();
SohImGui::EnableWindow("Game Control Editor", CVar_GetS32("gGameControlEditorEnabled", 0));
}
if (ImGui::Button(GetWindowButtonText("Cosmetics Editor", CVar_GetS32("gCosmeticsEditorEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) if (ImGui::Button(GetWindowButtonText("Cosmetics Editor", CVar_GetS32("gCosmeticsEditorEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f)))
{ {
bool currentValue = CVar_GetS32("gCosmeticsEditorEnabled", 0); bool currentValue = CVar_GetS32("gCosmeticsEditorEnabled", 0);
@ -1237,10 +1203,14 @@ namespace GameMenuBar {
// Only disable the key colors checkbox when none of the keysanity settings are set to "Any Dungeon", "Overworld" or "Anywhere" // Only disable the key colors checkbox when none of the keysanity settings are set to "Any Dungeon", "Overworld" or "Anywhere"
bool disableKeyColors = true; bool disableKeyColors = true;
if (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_KEYSANITY) > 2 || if (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_KEYSANITY) == RO_DUNGEON_ITEM_LOC_ANY_DUNGEON ||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_KEYSANITY) == RO_DUNGEON_ITEM_LOC_OVERWORLD ||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_KEYSANITY) == RO_DUNGEON_ITEM_LOC_ANYWHERE ||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GERUDO_KEYS) > 0 || OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GERUDO_KEYS) > 0 ||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_BOSS_KEYSANITY) > 2 || OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_BOSS_KEYSANITY) > 2 ||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) > 2 || (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_VANILLA &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_OWN_DUNGEON &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_STARTWITH) ||
!gSaveContext.n64ddFlag) { !gSaveContext.n64ddFlag) {
disableKeyColors = false; disableKeyColors = false;
} }

View File

@ -385,9 +385,9 @@ void SaveManager::InitFileNormal() {
gSaveContext.rupees = 0; gSaveContext.rupees = 0;
gSaveContext.swordHealth = 0; gSaveContext.swordHealth = 0;
gSaveContext.naviTimer = 0; gSaveContext.naviTimer = 0;
gSaveContext.magicAcquired = 0; gSaveContext.isMagicAcquired = 0;
gSaveContext.doubleMagic = 0; gSaveContext.isDoubleMagicAcquired = 0;
gSaveContext.doubleDefense = 0; gSaveContext.isDoubleDefenseAcquired = 0;
gSaveContext.bgsFlag = 0; gSaveContext.bgsFlag = 0;
gSaveContext.ocarinaGameRoundNum = 0; gSaveContext.ocarinaGameRoundNum = 0;
for (int button = 0; button < ARRAY_COUNT(gSaveContext.childEquips.buttonItems); button++) { for (int button = 0; button < ARRAY_COUNT(gSaveContext.childEquips.buttonItems); button++) {
@ -483,15 +483,15 @@ void SaveManager::InitFileNormal() {
gSaveContext.infTable[flag] = 0; gSaveContext.infTable[flag] = 0;
} }
gSaveContext.worldMapAreaData = 0; gSaveContext.worldMapAreaData = 0;
gSaveContext.scarecrowCustomSongSet = 0; gSaveContext.scarecrowLongSongSet = 0;
for (int i = 0; i < ARRAY_COUNT(gSaveContext.scarecrowCustomSong); i++) { for (int i = 0; i < ARRAY_COUNT(gSaveContext.scarecrowLongSong); i++) {
gSaveContext.scarecrowCustomSong[i].noteIdx = 0; gSaveContext.scarecrowLongSong[i].noteIdx = 0;
gSaveContext.scarecrowCustomSong[i].unk_01 = 0; gSaveContext.scarecrowLongSong[i].unk_01 = 0;
gSaveContext.scarecrowCustomSong[i].unk_02 = 0; gSaveContext.scarecrowLongSong[i].unk_02 = 0;
gSaveContext.scarecrowCustomSong[i].volume = 0; gSaveContext.scarecrowLongSong[i].volume = 0;
gSaveContext.scarecrowCustomSong[i].vibrato = 0; gSaveContext.scarecrowLongSong[i].vibrato = 0;
gSaveContext.scarecrowCustomSong[i].tone = 0; gSaveContext.scarecrowLongSong[i].tone = 0;
gSaveContext.scarecrowCustomSong[i].semitone = 0; gSaveContext.scarecrowLongSong[i].semitone = 0;
} }
gSaveContext.scarecrowSpawnSongSet = 0; gSaveContext.scarecrowSpawnSongSet = 0;
for (int i = 0; i < ARRAY_COUNT(gSaveContext.scarecrowSpawnSong); i++) { for (int i = 0; i < ARRAY_COUNT(gSaveContext.scarecrowSpawnSong); i++) {
@ -534,9 +534,9 @@ void SaveManager::InitFileDebug() {
gSaveContext.rupees = 150; gSaveContext.rupees = 150;
gSaveContext.swordHealth = 8; gSaveContext.swordHealth = 8;
gSaveContext.naviTimer = 0; gSaveContext.naviTimer = 0;
gSaveContext.magicAcquired = 1; gSaveContext.isMagicAcquired = 1;
gSaveContext.doubleMagic = 0; gSaveContext.isDoubleMagicAcquired = 0;
gSaveContext.doubleDefense = 0; gSaveContext.isDoubleDefenseAcquired = 0;
gSaveContext.bgsFlag = 0; gSaveContext.bgsFlag = 0;
gSaveContext.ocarinaGameRoundNum = 0; gSaveContext.ocarinaGameRoundNum = 0;
for (int button = 0; button < ARRAY_COUNT(gSaveContext.childEquips.buttonItems); button++) { for (int button = 0; button < ARRAY_COUNT(gSaveContext.childEquips.buttonItems); button++) {
@ -794,9 +794,9 @@ void SaveManager::LoadBaseVersion1() {
SaveManager::Instance->LoadData("rupees", gSaveContext.rupees); SaveManager::Instance->LoadData("rupees", gSaveContext.rupees);
SaveManager::Instance->LoadData("swordHealth", gSaveContext.swordHealth); SaveManager::Instance->LoadData("swordHealth", gSaveContext.swordHealth);
SaveManager::Instance->LoadData("naviTimer", gSaveContext.naviTimer); SaveManager::Instance->LoadData("naviTimer", gSaveContext.naviTimer);
SaveManager::Instance->LoadData("magicAcquired", gSaveContext.magicAcquired); SaveManager::Instance->LoadData("isMagicAcquired", gSaveContext.isMagicAcquired);
SaveManager::Instance->LoadData("doubleMagic", gSaveContext.doubleMagic); SaveManager::Instance->LoadData("isDoubleMagicAcquired", gSaveContext.isDoubleMagicAcquired);
SaveManager::Instance->LoadData("doubleDefense", gSaveContext.doubleDefense); SaveManager::Instance->LoadData("isDoubleDefenseAcquired", gSaveContext.isDoubleDefenseAcquired);
SaveManager::Instance->LoadData("bgsFlag", gSaveContext.bgsFlag); SaveManager::Instance->LoadData("bgsFlag", gSaveContext.bgsFlag);
SaveManager::Instance->LoadData("ocarinaGameRoundNum", gSaveContext.ocarinaGameRoundNum); SaveManager::Instance->LoadData("ocarinaGameRoundNum", gSaveContext.ocarinaGameRoundNum);
SaveManager::Instance->LoadStruct("childEquips", []() { SaveManager::Instance->LoadStruct("childEquips", []() {
@ -892,9 +892,9 @@ void SaveManager::LoadBaseVersion1() {
SaveManager::Instance->LoadData("", gSaveContext.infTable[i]); SaveManager::Instance->LoadData("", gSaveContext.infTable[i]);
}); });
SaveManager::Instance->LoadData("worldMapAreaData", gSaveContext.worldMapAreaData); SaveManager::Instance->LoadData("worldMapAreaData", gSaveContext.worldMapAreaData);
SaveManager::Instance->LoadData("scarecrowCustomSongSet", gSaveContext.scarecrowCustomSongSet); SaveManager::Instance->LoadData("scarecrowLongSongSet", gSaveContext.scarecrowLongSongSet);
SaveManager::Instance->LoadArray("scarecrowCustomSong", sizeof(gSaveContext.scarecrowCustomSong), [](size_t i) { SaveManager::Instance->LoadArray("scarecrowLongSong", sizeof(gSaveContext.scarecrowLongSong), [](size_t i) {
SaveManager::Instance->LoadData("", ((u8*)&gSaveContext.scarecrowCustomSong)[i]); SaveManager::Instance->LoadData("", ((u8*)&gSaveContext.scarecrowLongSong)[i]);
}); });
SaveManager::Instance->LoadData("scarecrowSpawnSongSet", gSaveContext.scarecrowSpawnSongSet); SaveManager::Instance->LoadData("scarecrowSpawnSongSet", gSaveContext.scarecrowSpawnSongSet);
SaveManager::Instance->LoadArray("scarecrowSpawnSong", sizeof(gSaveContext.scarecrowSpawnSong), [](size_t i) { SaveManager::Instance->LoadArray("scarecrowSpawnSong", sizeof(gSaveContext.scarecrowSpawnSong), [](size_t i) {
@ -935,9 +935,9 @@ void SaveManager::LoadBaseVersion2() {
SaveManager::Instance->LoadData("rupees", gSaveContext.rupees); SaveManager::Instance->LoadData("rupees", gSaveContext.rupees);
SaveManager::Instance->LoadData("swordHealth", gSaveContext.swordHealth); SaveManager::Instance->LoadData("swordHealth", gSaveContext.swordHealth);
SaveManager::Instance->LoadData("naviTimer", gSaveContext.naviTimer); SaveManager::Instance->LoadData("naviTimer", gSaveContext.naviTimer);
SaveManager::Instance->LoadData("magicAcquired", gSaveContext.magicAcquired); SaveManager::Instance->LoadData("isMagicAcquired", gSaveContext.isMagicAcquired);
SaveManager::Instance->LoadData("doubleMagic", gSaveContext.doubleMagic); SaveManager::Instance->LoadData("isDoubleMagicAcquired", gSaveContext.isDoubleMagicAcquired);
SaveManager::Instance->LoadData("doubleDefense", gSaveContext.doubleDefense); SaveManager::Instance->LoadData("isDoubleDefenseAcquired", gSaveContext.isDoubleDefenseAcquired);
SaveManager::Instance->LoadData("bgsFlag", gSaveContext.bgsFlag); SaveManager::Instance->LoadData("bgsFlag", gSaveContext.bgsFlag);
SaveManager::Instance->LoadData("ocarinaGameRoundNum", gSaveContext.ocarinaGameRoundNum); SaveManager::Instance->LoadData("ocarinaGameRoundNum", gSaveContext.ocarinaGameRoundNum);
SaveManager::Instance->LoadStruct("childEquips", []() { SaveManager::Instance->LoadStruct("childEquips", []() {
@ -1048,16 +1048,16 @@ void SaveManager::LoadBaseVersion2() {
SaveManager::Instance->LoadData("", gSaveContext.infTable[i]); SaveManager::Instance->LoadData("", gSaveContext.infTable[i]);
}); });
SaveManager::Instance->LoadData("worldMapAreaData", gSaveContext.worldMapAreaData); SaveManager::Instance->LoadData("worldMapAreaData", gSaveContext.worldMapAreaData);
SaveManager::Instance->LoadData("scarecrowCustomSongSet", gSaveContext.scarecrowCustomSongSet); SaveManager::Instance->LoadData("scarecrowLongSongSet", gSaveContext.scarecrowLongSongSet);
SaveManager::Instance->LoadArray("scarecrowCustomSong", ARRAY_COUNT(gSaveContext.scarecrowCustomSong), [](size_t i) { SaveManager::Instance->LoadArray("scarecrowLongSong", ARRAY_COUNT(gSaveContext.scarecrowLongSong), [](size_t i) {
SaveManager::Instance->LoadStruct("", [&i]() { SaveManager::Instance->LoadStruct("", [&i]() {
SaveManager::Instance->LoadData("noteIdx", gSaveContext.scarecrowCustomSong[i].noteIdx); SaveManager::Instance->LoadData("noteIdx", gSaveContext.scarecrowLongSong[i].noteIdx);
SaveManager::Instance->LoadData("unk_01", gSaveContext.scarecrowCustomSong[i].unk_01); SaveManager::Instance->LoadData("unk_01", gSaveContext.scarecrowLongSong[i].unk_01);
SaveManager::Instance->LoadData("unk_02", gSaveContext.scarecrowCustomSong[i].unk_02); SaveManager::Instance->LoadData("unk_02", gSaveContext.scarecrowLongSong[i].unk_02);
SaveManager::Instance->LoadData("volume", gSaveContext.scarecrowCustomSong[i].volume); SaveManager::Instance->LoadData("volume", gSaveContext.scarecrowLongSong[i].volume);
SaveManager::Instance->LoadData("vibrato", gSaveContext.scarecrowCustomSong[i].vibrato); SaveManager::Instance->LoadData("vibrato", gSaveContext.scarecrowLongSong[i].vibrato);
SaveManager::Instance->LoadData("tone", gSaveContext.scarecrowCustomSong[i].tone); SaveManager::Instance->LoadData("tone", gSaveContext.scarecrowLongSong[i].tone);
SaveManager::Instance->LoadData("semitone", gSaveContext.scarecrowCustomSong[i].semitone); SaveManager::Instance->LoadData("semitone", gSaveContext.scarecrowLongSong[i].semitone);
}); });
}); });
SaveManager::Instance->LoadData("scarecrowSpawnSongSet", gSaveContext.scarecrowSpawnSongSet); SaveManager::Instance->LoadData("scarecrowSpawnSongSet", gSaveContext.scarecrowSpawnSongSet);
@ -1108,9 +1108,9 @@ void SaveManager::SaveBase() {
SaveManager::Instance->SaveData("rupees", gSaveContext.rupees); SaveManager::Instance->SaveData("rupees", gSaveContext.rupees);
SaveManager::Instance->SaveData("swordHealth", gSaveContext.swordHealth); SaveManager::Instance->SaveData("swordHealth", gSaveContext.swordHealth);
SaveManager::Instance->SaveData("naviTimer", gSaveContext.naviTimer); SaveManager::Instance->SaveData("naviTimer", gSaveContext.naviTimer);
SaveManager::Instance->SaveData("magicAcquired", gSaveContext.magicAcquired); SaveManager::Instance->SaveData("isMagicAcquired", gSaveContext.isMagicAcquired);
SaveManager::Instance->SaveData("doubleMagic", gSaveContext.doubleMagic); SaveManager::Instance->SaveData("isDoubleMagicAcquired", gSaveContext.isDoubleMagicAcquired);
SaveManager::Instance->SaveData("doubleDefense", gSaveContext.doubleDefense); SaveManager::Instance->SaveData("isDoubleDefenseAcquired", gSaveContext.isDoubleDefenseAcquired);
SaveManager::Instance->SaveData("bgsFlag", gSaveContext.bgsFlag); SaveManager::Instance->SaveData("bgsFlag", gSaveContext.bgsFlag);
SaveManager::Instance->SaveData("ocarinaGameRoundNum", gSaveContext.ocarinaGameRoundNum); SaveManager::Instance->SaveData("ocarinaGameRoundNum", gSaveContext.ocarinaGameRoundNum);
SaveManager::Instance->SaveStruct("childEquips", []() { SaveManager::Instance->SaveStruct("childEquips", []() {
@ -1217,16 +1217,16 @@ void SaveManager::SaveBase() {
SaveManager::Instance->SaveData("", gSaveContext.infTable[i]); SaveManager::Instance->SaveData("", gSaveContext.infTable[i]);
}); });
SaveManager::Instance->SaveData("worldMapAreaData", gSaveContext.worldMapAreaData); SaveManager::Instance->SaveData("worldMapAreaData", gSaveContext.worldMapAreaData);
SaveManager::Instance->SaveData("scarecrowCustomSongSet", gSaveContext.scarecrowCustomSongSet); SaveManager::Instance->SaveData("scarecrowLongSongSet", gSaveContext.scarecrowLongSongSet);
SaveManager::Instance->SaveArray("scarecrowCustomSong", ARRAY_COUNT(gSaveContext.scarecrowCustomSong), [](size_t i) { SaveManager::Instance->SaveArray("scarecrowLongSong", ARRAY_COUNT(gSaveContext.scarecrowLongSong), [](size_t i) {
SaveManager::Instance->SaveStruct("", [&i]() { SaveManager::Instance->SaveStruct("", [&i]() {
SaveManager::Instance->SaveData("noteIdx", gSaveContext.scarecrowCustomSong[i].noteIdx); SaveManager::Instance->SaveData("noteIdx", gSaveContext.scarecrowLongSong[i].noteIdx);
SaveManager::Instance->SaveData("unk_01", gSaveContext.scarecrowCustomSong[i].unk_01); SaveManager::Instance->SaveData("unk_01", gSaveContext.scarecrowLongSong[i].unk_01);
SaveManager::Instance->SaveData("unk_02", gSaveContext.scarecrowCustomSong[i].unk_02); SaveManager::Instance->SaveData("unk_02", gSaveContext.scarecrowLongSong[i].unk_02);
SaveManager::Instance->SaveData("volume", gSaveContext.scarecrowCustomSong[i].volume); SaveManager::Instance->SaveData("volume", gSaveContext.scarecrowLongSong[i].volume);
SaveManager::Instance->SaveData("vibrato", gSaveContext.scarecrowCustomSong[i].vibrato); SaveManager::Instance->SaveData("vibrato", gSaveContext.scarecrowLongSong[i].vibrato);
SaveManager::Instance->SaveData("tone", gSaveContext.scarecrowCustomSong[i].tone); SaveManager::Instance->SaveData("tone", gSaveContext.scarecrowLongSong[i].tone);
SaveManager::Instance->SaveData("semitone", gSaveContext.scarecrowCustomSong[i].semitone); SaveManager::Instance->SaveData("semitone", gSaveContext.scarecrowLongSong[i].semitone);
}); });
}); });
SaveManager::Instance->SaveData("scarecrowSpawnSongSet", gSaveContext.scarecrowSpawnSongSet); SaveManager::Instance->SaveData("scarecrowSpawnSongSet", gSaveContext.scarecrowSpawnSongSet);
@ -1600,9 +1600,9 @@ void CopyV0Save(SaveContext_v0& src, SaveContext& dst) {
dst.rupees = src.rupees; dst.rupees = src.rupees;
dst.swordHealth = src.swordHealth; dst.swordHealth = src.swordHealth;
dst.naviTimer = src.naviTimer; dst.naviTimer = src.naviTimer;
dst.magicAcquired = src.magicAcquired; dst.isMagicAcquired = src.magicAcquired;
dst.doubleMagic = src.doubleMagic; dst.isDoubleMagicAcquired = src.doubleMagic;
dst.doubleDefense = src.doubleDefense; dst.isDoubleDefenseAcquired = src.doubleDefense;
dst.bgsFlag = src.bgsFlag; dst.bgsFlag = src.bgsFlag;
dst.ocarinaGameRoundNum = src.ocarinaGameRoundNum; dst.ocarinaGameRoundNum = src.ocarinaGameRoundNum;
for (size_t i = 0; i < ARRAY_COUNT(src.childEquips.buttonItems); i++) { for (size_t i = 0; i < ARRAY_COUNT(src.childEquips.buttonItems); i++) {
@ -1680,8 +1680,8 @@ void CopyV0Save(SaveContext_v0& src, SaveContext& dst) {
dst.infTable[i] = src.infTable[i]; dst.infTable[i] = src.infTable[i];
} }
dst.worldMapAreaData = src.worldMapAreaData; dst.worldMapAreaData = src.worldMapAreaData;
dst.scarecrowCustomSongSet = src.scarecrowCustomSongSet; dst.scarecrowLongSongSet = src.scarecrowCustomSongSet;
memcpy(&dst.scarecrowCustomSong[0], &src.scarecrowCustomSong[0], sizeof(src.scarecrowCustomSong)); memcpy(&dst.scarecrowLongSong[0], &src.scarecrowCustomSong[0], sizeof(src.scarecrowCustomSong));
dst.scarecrowSpawnSongSet = src.scarecrowSpawnSongSet; dst.scarecrowSpawnSongSet = src.scarecrowSpawnSongSet;
memcpy(&dst.scarecrowSpawnSong[0], &src.scarecrowSpawnSong[0], sizeof(src.scarecrowSpawnSong)); memcpy(&dst.scarecrowSpawnSong[0], &src.scarecrowSpawnSong[0], sizeof(src.scarecrowSpawnSong));
dst.horseData.scene = src.horseData.scene; dst.horseData.scene = src.horseData.scene;

View File

@ -132,7 +132,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!", "Du erhältst ein %rHerzgefäß%w! Du&hast insgesamt %r{{heartContainerCount}}%w Gefäße&gesammelt!",
"Vous obtenez un %rRécipient de&coeur%w! Vous avez&collecté %r{{heartContainerCount}}%w récipients en tout!" "Vous obtenez un %rCoeur&d'Energie%w! Vous en avez&collecté %r{{heartContainerCount}}%w en tout!"
} }
); );
CustomMessageManager::Instance->CreateGetItemMessage( CustomMessageManager::Instance->CreateGetItemMessage(
@ -141,7 +141,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!", "Du erhältst ein %rHerzteil%w! Du hast&insgesamt %r{{heartPieceCount}}%w Teile&gesammelt!",
"Vous obtenez un %rMorceau de&coeur%w! Vous avez&collecté %r{{heartPieceCount}}%w morceaux en tout!" "Vous obtenez un %rQuart de&Coeur%w! Vous en avez collecté&%r{{heartPieceCount}}%w en tout!"
} }
); );
} }

View File

@ -381,8 +381,8 @@ void GameState_Update(GameState* gameState) {
// Inf Magic // Inf Magic
if (CVar_GetS32("gInfiniteMagic", 0) != 0) { if (CVar_GetS32("gInfiniteMagic", 0) != 0) {
if (gSaveContext.magicAcquired && gSaveContext.magic != (gSaveContext.doubleMagic + 1) * 0x30) { if (gSaveContext.isMagicAcquired && gSaveContext.magic != (gSaveContext.isDoubleMagicAcquired + 1) * 0x30) {
gSaveContext.magic = (gSaveContext.doubleMagic + 1) * 0x30; gSaveContext.magic = (gSaveContext.isDoubleMagicAcquired + 1) * 0x30;
} }
} }
@ -440,7 +440,7 @@ void GameState_Update(GameState* gameState) {
gPlayState->nextEntranceIndex = gSaveContext.entranceIndex; gPlayState->nextEntranceIndex = gSaveContext.entranceIndex;
gPlayState->sceneLoadFlag = 0x14; gPlayState->sceneLoadFlag = 0x14;
gPlayState->fadeTransition = 11; gPlayState->fadeTransition = 11;
gSaveContext.nextTransition = 11; gSaveContext.nextTransitionType = 11;
warped = true; warped = true;
if (gPlayState->linkAgeOnLoad == 1) { if (gPlayState->linkAgeOnLoad == 1) {
gPlayState->linkAgeOnLoad = 0; gPlayState->linkAgeOnLoad = 0;
@ -451,7 +451,7 @@ void GameState_Update(GameState* gameState) {
} }
if (gPlayState) { if (gPlayState) {
if (warped && gPlayState->sceneLoadFlag != 0x0014 && gSaveContext.nextTransition == 255) { if (warped && gPlayState->sceneLoadFlag != 0x0014 && gSaveContext.nextTransitionType == 255) {
GET_PLAYER(gPlayState)->actor.shape.rot.y = playerYaw; GET_PLAYER(gPlayState)->actor.shape.rot.y = playerYaw;
GET_PLAYER(gPlayState)->actor.world.pos = playerPos; GET_PLAYER(gPlayState)->actor.world.pos = playerPos;
warped = false; warped = false;

View File

@ -95,7 +95,7 @@ void ActorShadow_Draw(Actor* actor, Lights* lights, PlayState* play, Gfx* dlist,
if (temp1 >= -50.0f && temp1 < 500.0f) { if (temp1 >= -50.0f && temp1 < 500.0f) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C); POLY_OPA_DISP = Gfx_SetupDL(POLY_OPA_DISP, 0x2C);
gDPSetCombineLERP(POLY_OPA_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0, gDPSetCombineLERP(POLY_OPA_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0,
COMBINED); COMBINED);
@ -202,7 +202,7 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* lights, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C); POLY_OPA_DISP = Gfx_SetupDL(POLY_OPA_DISP, 0x2C);
actor->shape.feetFloorFlags = 0; actor->shape.feetFloorFlags = 0;
@ -465,7 +465,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) {
func_8002BE64(targetCtx, targetCtx->unk_4C, spBC.x, spBC.y, spBC.z); func_8002BE64(targetCtx, targetCtx->unk_4C, spBC.x, spBC.y, spBC.z);
if ((!(player->stateFlags1 & 0x40)) || (actor != player->unk_664)) { if ((!(player->stateFlags1 & 0x40)) || (actor != player->unk_664)) {
OVERLAY_DISP = Gfx_CallSetupDL(OVERLAY_DISP, 0x39); OVERLAY_DISP = Gfx_SetupDL(OVERLAY_DISP, 0x39);
for (spB0 = 0, spAC = targetCtx->unk_4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) { for (spB0 = 0, spAC = targetCtx->unk_4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) {
entry = &targetCtx->arr_50[spAC]; entry = &targetCtx->arr_50[spAC];
@ -509,7 +509,7 @@ void func_8002C124(TargetContext* targetCtx, PlayState* play) {
FrameInterpolation_RecordOpenChild(actor, 1); FrameInterpolation_RecordOpenChild(actor, 1);
NaviColor* naviColor = &sNaviColorList[actor->category]; NaviColor* naviColor = &sNaviColorList[actor->category];
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x7); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x7);
Matrix_Translate(actor->focus.pos.x, actor->focus.pos.y + (actor->targetArrowOffset * actor->scale.y) + 17.0f, Matrix_Translate(actor->focus.pos.x, actor->focus.pos.y + (actor->targetArrowOffset * actor->scale.y) + 17.0f,
actor->focus.pos.z, MTXMODE_NEW); actor->focus.pos.z, MTXMODE_NEW);
@ -1105,7 +1105,7 @@ void TitleCard_Draw(PlayState* play, TitleCardContext* titleCtx) {
} }
// WORLD_OVERLAY_DISP Goes over POLY_XLU_DISP but under POLY_KAL_DISP // WORLD_OVERLAY_DISP Goes over POLY_XLU_DISP but under POLY_KAL_DISP
WORLD_OVERLAY_DISP = func_80093808(WORLD_OVERLAY_DISP); WORLD_OVERLAY_DISP = Gfx_SetupDL_52NoCD(WORLD_OVERLAY_DISP);
gDPSetPrimColor(WORLD_OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensityR, (u8)titleCtx->intensityG, (u8)titleCtx->intensityB, gDPSetPrimColor(WORLD_OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensityR, (u8)titleCtx->intensityG, (u8)titleCtx->intensityB,
(u8)titleCtx->alpha); (u8)titleCtx->alpha);
@ -1423,7 +1423,7 @@ s32 func_8002DF38(PlayState* play, Actor* actor, u8 csMode) {
player->csMode = csMode; player->csMode = csMode;
player->unk_448 = actor; player->unk_448 = actor;
player->unk_46A = 0; player->doorBgCamIndex = 0;
return true; return true;
} }
@ -1432,7 +1432,7 @@ s32 func_8002DF54(PlayState* play, Actor* actor, u8 csMode) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
func_8002DF38(play, actor, csMode); func_8002DF38(play, actor, csMode);
player->unk_46A = 1; player->doorBgCamIndex = 1;
return true; return true;
} }
@ -2384,7 +2384,7 @@ void Actor_DrawFaroresWindPointer(PlayState* play) {
(((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].roomIndex) == play->roomCtx.curRoom.num)) { (((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].roomIndex) == play->roomCtx.curRoom.num)) {
f32 scale = 0.025f * ratio; f32 scale = 0.025f * ratio;
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x19); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x19);
Matrix_Translate(((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.x), Matrix_Translate(((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.x),
((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y) + yOffset, ((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y) + yOffset,
@ -3969,7 +3969,7 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C); POLY_OPA_DISP = Gfx_SetupDL(POLY_OPA_DISP, 0x2C);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, alpha); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, alpha);
@ -4344,7 +4344,7 @@ void func_80034BA0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overr
PostLimbDraw postLimbDraw, Actor* actor, s16 alpha) { PostLimbDraw postLimbDraw, Actor* actor, s16 alpha) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gDPPipeSync(POLY_OPA_DISP++); gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, alpha); gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, alpha);
@ -4361,7 +4361,7 @@ void func_80034CC4(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overr
PostLimbDraw postLimbDraw, Actor* actor, s16 alpha) { PostLimbDraw postLimbDraw, Actor* actor, s16 alpha) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, alpha); gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, alpha);
@ -4529,7 +4529,7 @@ void func_800355B8(PlayState* play, Vec3f* pos) {
u8 func_800355E4(PlayState* play, Collider* collider) { u8 func_800355E4(PlayState* play, Collider* collider) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
if ((collider->acFlags & AC_TYPE_PLAYER) && (player->swordState != 0) && (player->swordAnimation == 0x16)) { if ((collider->acFlags & AC_TYPE_PLAYER) && (player->swordState != 0) && (player->meleeWeaponAnimation == 0x16)) {
return true; return true;
} else { } else {
return false; return false;

View File

@ -3,7 +3,7 @@
void Gfx_DrawDListOpa(PlayState* play, Gfx* dlist) { void Gfx_DrawDListOpa(PlayState* play, Gfx* dlist) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, dlist); gSPDisplayList(POLY_OPA_DISP++, dlist);
@ -14,7 +14,7 @@ void Gfx_DrawDListOpa(PlayState* play, Gfx* dlist) {
void Gfx_DrawDListXlu(PlayState* play, Gfx* dlist) { void Gfx_DrawDListXlu(PlayState* play, Gfx* dlist) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, dlist); gSPDisplayList(POLY_XLU_DISP++, dlist);

View File

@ -14,6 +14,6 @@ void SaveContext_Init(void) {
gSaveContext.nextDayTime = 0xFFFF; gSaveContext.nextDayTime = 0xFFFF;
gSaveContext.skyboxTime = 0; gSaveContext.skyboxTime = 0;
gSaveContext.dogIsLost = true; gSaveContext.dogIsLost = true;
gSaveContext.nextTransition = 0xFF; gSaveContext.nextTransitionType = 0xFF;
gSaveContext.unk_13EE = 50; gSaveContext.unk_13EE = 50;
} }

View File

@ -69,7 +69,7 @@ void DebugDisplay_DrawObjects(PlayState* play) {
void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, void* texture, PlayState* play) { void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, void* texture, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80094678(play->state.gfxCtx); Gfx_SetupDL_47Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a);
@ -91,7 +91,7 @@ void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, void* texture, PlayStat
void DebugDisplay_DrawPolygon(DebugDispObject* dispObj, void* dlist, PlayState* play) { void DebugDisplay_DrawPolygon(DebugDispObject* dispObj, void* dlist, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_8009435C(play->state.gfxCtx); Gfx_SetupDL_4Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, dispObj->color.r, dispObj->color.g, dispObj->color.b, dispObj->color.a);

View File

@ -562,7 +562,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
csCtx->state = CS_STATE_UNSKIPPABLE_EXEC; csCtx->state = CS_STATE_UNSKIPPABLE_EXEC;
Audio_SetCutsceneFlag(0); Audio_SetCutsceneFlag(0);
gSaveContext.unk_1410 = 1; gSaveContext.cutsceneTransitionControl = 1;
osSyncPrintf("\n分岐先指定!!=[%d]番", cmd->base); // "Future fork designation=No. [%d]" osSyncPrintf("\n分岐先指定!!=[%d]番", cmd->base); // "Future fork designation=No. [%d]"
@ -635,7 +635,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
play->nextEntranceIndex = 0x02CA; play->nextEntranceIndex = 0x02CA;
play->sceneLoadFlag = 0x14; play->sceneLoadFlag = 0x14;
play->fadeTransition = 3; play->fadeTransition = 3;
gSaveContext.nextTransition = 3; gSaveContext.nextTransitionType = 3;
} }
break; break;
case 9: case 9:
@ -665,7 +665,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
play->nextEntranceIndex = 0x010E; play->nextEntranceIndex = 0x010E;
play->sceneLoadFlag = 0x14; play->sceneLoadFlag = 0x14;
play->fadeTransition = 2; play->fadeTransition = 2;
gSaveContext.nextTransition = 2; gSaveContext.nextTransitionType = 2;
break; break;
case 14: case 14:
play->nextEntranceIndex = 0x0457; play->nextEntranceIndex = 0x0457;
@ -695,7 +695,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
play->nextEntranceIndex = 0x0324; play->nextEntranceIndex = 0x0324;
play->sceneLoadFlag = 0x14; play->sceneLoadFlag = 0x14;
play->fadeTransition = 2; play->fadeTransition = 2;
gSaveContext.nextTransition = 2; gSaveContext.nextTransitionType = 2;
break; break;
case 19: case 19:
play->nextEntranceIndex = 0x013D; play->nextEntranceIndex = 0x013D;
@ -853,7 +853,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
play->nextEntranceIndex = 0x01ED; play->nextEntranceIndex = 0x01ED;
play->sceneLoadFlag = 0x14; play->sceneLoadFlag = 0x14;
play->fadeTransition = 15; play->fadeTransition = 15;
gSaveContext.nextTransition = 15; gSaveContext.nextTransitionType = 15;
break; break;
case 49: case 49:
play->nextEntranceIndex = 0x058C; play->nextEntranceIndex = 0x058C;
@ -985,7 +985,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
play->sceneLoadFlag = 0x14; play->sceneLoadFlag = 0x14;
gSaveContext.cutsceneIndex = 0xFFF4; gSaveContext.cutsceneIndex = 0xFFF4;
play->fadeTransition = 2; play->fadeTransition = 2;
gSaveContext.nextTransition = 2; gSaveContext.nextTransitionType = 2;
break; break;
case 71: case 71:
gSaveContext.equips.equipment |= 0x0100; gSaveContext.equips.equipment |= 0x0100;
@ -1003,7 +1003,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
play->sceneLoadFlag = 0x14; play->sceneLoadFlag = 0x14;
gSaveContext.cutsceneIndex = 0xFFF0; gSaveContext.cutsceneIndex = 0xFFF0;
play->fadeTransition = 2; play->fadeTransition = 2;
gSaveContext.nextTransition = 2; gSaveContext.nextTransitionType = 2;
break; break;
case 73: case 73:
play->linkAgeOnLoad = 1; play->linkAgeOnLoad = 1;
@ -1017,7 +1017,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
play->sceneLoadFlag = 0x14; play->sceneLoadFlag = 0x14;
gSaveContext.cutsceneIndex = 0xFFF3; gSaveContext.cutsceneIndex = 0xFFF3;
play->fadeTransition = 3; play->fadeTransition = 3;
gSaveContext.nextTransition = 3; gSaveContext.nextTransitionType = 3;
break; break;
case 75: case 75:
play->linkAgeOnLoad = 1; play->linkAgeOnLoad = 1;
@ -1109,7 +1109,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
play->nextEntranceIndex = 0x0610; play->nextEntranceIndex = 0x0610;
play->sceneLoadFlag = 0x14; play->sceneLoadFlag = 0x14;
play->fadeTransition = 3; play->fadeTransition = 3;
gSaveContext.nextTransition = 3; gSaveContext.nextTransitionType = 3;
} }
break; break;
case 97: case 97:
@ -1122,27 +1122,27 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
play->nextEntranceIndex = 0x0580; play->nextEntranceIndex = 0x0580;
play->sceneLoadFlag = 0x14; play->sceneLoadFlag = 0x14;
play->fadeTransition = 3; play->fadeTransition = 3;
gSaveContext.nextTransition = 3; gSaveContext.nextTransitionType = 3;
} }
break; break;
case 98: case 98:
play->nextEntranceIndex = 0x0564; play->nextEntranceIndex = 0x0564;
play->sceneLoadFlag = 0x14; play->sceneLoadFlag = 0x14;
play->fadeTransition = 3; play->fadeTransition = 3;
gSaveContext.nextTransition = 3; gSaveContext.nextTransitionType = 3;
break; break;
case 99: case 99:
play->nextEntranceIndex = 0x0608; play->nextEntranceIndex = 0x0608;
play->sceneLoadFlag = 0x14; play->sceneLoadFlag = 0x14;
play->fadeTransition = 2; play->fadeTransition = 2;
gSaveContext.nextTransition = 2; gSaveContext.nextTransitionType = 2;
break; break;
case 100: case 100:
play->nextEntranceIndex = 0x00EE; play->nextEntranceIndex = 0x00EE;
gSaveContext.cutsceneIndex = 0xFFF8; gSaveContext.cutsceneIndex = 0xFFF8;
play->sceneLoadFlag = 0x14; play->sceneLoadFlag = 0x14;
play->fadeTransition = 3; play->fadeTransition = 3;
gSaveContext.nextTransition = 3; gSaveContext.nextTransitionType = 3;
break; break;
case 101: case 101:
play->nextEntranceIndex = 0x01F5; play->nextEntranceIndex = 0x01F5;
@ -1248,7 +1248,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
play->nextEntranceIndex = 0x0594; play->nextEntranceIndex = 0x0594;
play->sceneLoadFlag = 0x14; play->sceneLoadFlag = 0x14;
play->fadeTransition = 2; play->fadeTransition = 2;
gSaveContext.nextTransition = 2; gSaveContext.nextTransitionType = 2;
break; break;
case 116: case 116:
if (gSaveContext.eventChkInf[12] & 0x100) { if (gSaveContext.eventChkInf[12] & 0x100) {
@ -1260,7 +1260,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
play->sceneLoadFlag = 0x14; play->sceneLoadFlag = 0x14;
play->fadeTransition = 3; play->fadeTransition = 3;
} }
gSaveContext.nextTransition = 3; gSaveContext.nextTransitionType = 3;
break; break;
case 117: case 117:
gSaveContext.gameMode = 3; gSaveContext.gameMode = 3;
@ -1275,7 +1275,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = 0x0517; gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = 0x0517;
Play_TriggerVoidOut(play); Play_TriggerVoidOut(play);
gSaveContext.respawnFlag = -2; gSaveContext.respawnFlag = -2;
gSaveContext.nextTransition = 2; gSaveContext.nextTransitionType = 2;
break; break;
case 119: case 119:
gSaveContext.dayTime = 0x8000; gSaveContext.dayTime = 0x8000;
@ -1357,7 +1357,7 @@ void Cutscene_Command_TransitionFX(PlayState* play, CutsceneContext* csCtx, CsCm
} }
break; break;
case 9: case 9:
gSaveContext.unk_1410 = 1; gSaveContext.cutsceneTransitionControl = 1;
break; break;
case 10: case 10:
case 11: case 11:
@ -1371,7 +1371,7 @@ void Cutscene_Command_TransitionFX(PlayState* play, CutsceneContext* csCtx, CsCm
} }
break; break;
case 12: case 12:
gSaveContext.unk_1410 = 255.0f - (155.0f * temp); gSaveContext.cutsceneTransitionControl = 255.0f - (155.0f * temp);
break; break;
case 13: case 13:
play->envCtx.screenFillColor[0] = 0; play->envCtx.screenFillColor[0] = 0;

View File

@ -484,13 +484,13 @@ void GetItem_DrawJewel(PlayState* play, s16 drawId) {
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 2599), gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_demo_effect.c", 2599),
G_MTX_NOPUSH | G_MTX_LOAD); G_MTX_NOPUSH | G_MTX_LOAD);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
// func_8002ED80(&this->actor, play, 0); // func_8002ED80(&this->actor, play, 0);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 128, primXluColor[0], primXluColor[1], primXluColor[2], 255); gDPSetPrimColor(POLY_XLU_DISP++, 0, 128, primXluColor[0], primXluColor[1], primXluColor[2], 255);
gDPSetEnvColor(POLY_XLU_DISP++, envXluColor[0], envXluColor[1], envXluColor[2], 255); gDPSetEnvColor(POLY_XLU_DISP++, envXluColor[0], envXluColor[1], envXluColor[2], 255);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
// func_8002EBCC(&this->actor, play, 0); // func_8002EBCC(&this->actor, play, 0);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 128, primOpaColor[0], primOpaColor[1], primOpaColor[2], 255); gDPSetPrimColor(POLY_OPA_DISP++, 0, 128, primOpaColor[0], primOpaColor[1], primOpaColor[2], 255);
gDPSetEnvColor(POLY_OPA_DISP++, envOpaColor[0], envOpaColor[1], envOpaColor[2], 255); gDPSetEnvColor(POLY_OPA_DISP++, envOpaColor[0], envOpaColor[1], envOpaColor[2], 255);
@ -506,7 +506,7 @@ void GetItem_DrawMaskOrBombchu(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093BA8(play->state.gfxCtx); Gfx_SetupDL_26Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
@ -519,7 +519,7 @@ void GetItem_DrawSoldOut(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 5); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 5);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
@ -532,12 +532,12 @@ void GetItem_DrawBlueFire(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08, gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0),
0 * (play->state.frames * 0), 16, 32, 1, 1 * (play->state.frames * 1), 0 * (play->state.frames * 0), 16, 32, 1, 1 * (play->state.frames * 1),
@ -558,12 +558,12 @@ void GetItem_DrawPoes(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
@ -587,12 +587,12 @@ void GetItem_DrawFairy(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
@ -615,7 +615,7 @@ void GetItem_DrawMirrorShield(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, gSPSegment(POLY_OPA_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0) % 256, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0) % 256,
1 * (play->state.frames * 2) % 256, 64, 64, 1, 1 * (play->state.frames * 2) % 256, 64, 64, 1,
@ -625,7 +625,7 @@ void GetItem_DrawMirrorShield(PlayState* play, s16 drawId) {
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
@ -638,12 +638,12 @@ void GetItem_DrawSkullToken(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08, gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0),
1 * -(play->state.frames * 5), 32, 32, 1, 0 * (play->state.frames * 0), 1 * -(play->state.frames * 5), 32, 32, 1, 0 * (play->state.frames * 0),
@ -660,7 +660,7 @@ void GetItem_DrawEggOrMedallion(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093BA8(play->state.gfxCtx); Gfx_SetupDL_26Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
@ -674,12 +674,12 @@ void GetItem_DrawCompass(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 5); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 5);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
@ -692,7 +692,7 @@ void GetItem_DrawPotion(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, gSPSegment(POLY_OPA_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, -1 * (play->state.frames * 1), Gfx_TwoTexScroll(play->state.gfxCtx, 0, -1 * (play->state.frames * 1),
1 * (play->state.frames * 1), 32, 32, 1, -1 * (play->state.frames * 1), 1 * (play->state.frames * 1), 32, 32, 1, -1 * (play->state.frames * 1),
@ -704,7 +704,7 @@ void GetItem_DrawPotion(PlayState* play, s16 drawId) {
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[2]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[2]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[3]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[3]);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[4]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[4]);
@ -718,7 +718,7 @@ void GetItem_DrawGoronSword(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, gSPSegment(POLY_OPA_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 1), Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 1),
0 * (play->state.frames * 1), 32, 32, 1, 0 * (play->state.frames * 1), 0 * (play->state.frames * 1), 32, 32, 1, 0 * (play->state.frames * 1),
@ -735,7 +735,7 @@ void GetItem_DrawDekuNuts(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, gSPSegment(POLY_OPA_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 6), Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 6),
1 * (play->state.frames * 6), 32, 32, 1, 1 * (play->state.frames * 6), 1 * (play->state.frames * 6), 32, 32, 1, 1 * (play->state.frames * 6),
@ -752,7 +752,7 @@ void GetItem_DrawRecoveryHeart(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08, gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 1), Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 1),
1 * -(play->state.frames * 3), 32, 32, 1, 0 * (play->state.frames * 1), 1 * -(play->state.frames * 3), 32, 32, 1, 0 * (play->state.frames * 1),
@ -769,7 +769,7 @@ void GetItem_DrawFish(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08, gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0), Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0 * (play->state.frames * 0),
1 * (play->state.frames * 1), 32, 32, 1, 0 * (play->state.frames * 0), 1 * (play->state.frames * 1), 32, 32, 1, 0 * (play->state.frames * 0),
@ -786,7 +786,7 @@ void GetItem_DrawOpa0(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
@ -799,12 +799,12 @@ void GetItem_DrawOpa0Xlu1(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
@ -830,7 +830,7 @@ void GetItem_DrawGenericMusicNote(PlayState* play, s16 drawId) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, __FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, __FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD);
gDPSetGrayscaleColor(POLY_XLU_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255); gDPSetGrayscaleColor(POLY_XLU_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255);
gSPGrayscale(POLY_XLU_DISP++, true); gSPGrayscale(POLY_XLU_DISP++, true);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
gSPGrayscale(POLY_XLU_DISP++, false); gSPGrayscale(POLY_XLU_DISP++, false);
@ -842,7 +842,7 @@ void GetItem_DrawXlu01(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
@ -856,13 +856,13 @@ void GetItem_DrawOpa10Xlu2(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
@ -875,12 +875,12 @@ void GetItem_DrawMagicArrow(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[1]);
@ -894,7 +894,7 @@ void GetItem_DrawMagicSpell(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08, gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 2), Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 2),
1 * -(play->state.frames * 6), 32, 32, 1, 1 * (play->state.frames * 1), 1 * -(play->state.frames * 6), 32, 32, 1, 1 * (play->state.frames * 1),
@ -913,7 +913,7 @@ void GetItem_DrawOpa1023(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
@ -929,13 +929,13 @@ void GetItem_DrawOpa10Xlu32(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]);
@ -951,13 +951,13 @@ void GetItem_DrawSmallRupee(PlayState* play, s16 drawId) {
Matrix_Scale(0.7f, 0.7f, 0.7f, MTXMODE_APPLY); Matrix_Scale(0.7f, 0.7f, 0.7f, MTXMODE_APPLY);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[3]);
@ -971,7 +971,7 @@ void GetItem_DrawScale(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08, gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 2), Gfx_TwoTexScroll(play->state.gfxCtx, 0, 1 * (play->state.frames * 2),
-1 * (play->state.frames * 2), 64, 64, 1, 1 * (play->state.frames * 4), -1 * (play->state.frames * 2), 64, 64, 1, 1 * (play->state.frames * 4),
@ -991,13 +991,13 @@ void GetItem_DrawBulletBag(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[0]);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]); gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[2]);
@ -1012,7 +1012,7 @@ void GetItem_DrawWallet(PlayState* play, s16 drawId) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]); gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].dlists[1]);

View File

@ -589,7 +589,7 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3
void EffectBlure_SetupSmooth(EffectBlure* this, GraphicsContext* gfxCtx) { void EffectBlure_SetupSmooth(EffectBlure* this, GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x26);
CLOSE_DISPS(gfxCtx); CLOSE_DISPS(gfxCtx);
} }
@ -923,7 +923,7 @@ void EffectBlure_DrawSmooth(EffectBlure* this2, GraphicsContext* gfxCtx) {
void EffectBlure_SetupSimple(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) { void EffectBlure_SetupSimple(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) {
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x26);
CLOSE_DISPS(gfxCtx); CLOSE_DISPS(gfxCtx);
} }
@ -932,7 +932,7 @@ void EffectBlure_SetupSimpleAlt(GraphicsContext* gfxCtx, EffectBlure* this, Vtx*
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x26);
gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE); gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE);
gDPSetTextureLUT(POLY_XLU_DISP++, G_TT_NONE); gDPSetTextureLUT(POLY_XLU_DISP++, G_TT_NONE);
@ -1162,7 +1162,7 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) {
if (this->numElements != 0) { if (this->numElements != 0) {
if (this->flags == 0) { if (this->flags == 0) {
func_800942F0(gfxCtx); Gfx_SetupDL_38Xlu(gfxCtx);
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);
vtx = Graph_Alloc(gfxCtx, sizeof(Vtx[32])); vtx = Graph_Alloc(gfxCtx, sizeof(Vtx[32]));

View File

@ -160,7 +160,7 @@ void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);
if (this != NULL) { if (this != NULL) {
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x26);
gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE); gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE);
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);

View File

@ -161,7 +161,7 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) {
if (this != NULL) { if (this != NULL) {
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x26);
gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE); gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE);
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);

View File

@ -66,7 +66,7 @@ void EffectSs_DrawGEffect(PlayState* play, EffectSs* this, void* texture) {
if (mtx != NULL) { if (mtx != NULL) {
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(texture)); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(texture));
func_80094C50(gfxCtx); Gfx_SetupDL_61Xlu(gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rgPrimColorR, this->rgPrimColorG, this->rgPrimColorB, gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rgPrimColorR, this->rgPrimColorG, this->rgPrimColorB,
this->rgPrimColorA); this->rgPrimColorA);
gDPSetEnvColor(POLY_XLU_DISP++, this->rgEnvColorR, this->rgEnvColorG, this->rgEnvColorB, this->rgEnvColorA); gDPSetEnvColor(POLY_XLU_DISP++, this->rgEnvColorR, this->rgEnvColorG, this->rgEnvColorB, this->rgEnvColorA);

View File

@ -54,7 +54,7 @@ u32 ElfMessage_CheckCondition(ElfMessage* msg) {
return ((msg->byte0 & 1) == 1) == return ((msg->byte0 & 1) == 1) ==
(CHECK_QUEST_ITEM(msg->byte3 - ITEM_MEDALLION_FOREST + QUEST_MEDALLION_FOREST) != 0); (CHECK_QUEST_ITEM(msg->byte3 - ITEM_MEDALLION_FOREST + QUEST_MEDALLION_FOREST) != 0);
case (ELF_MSG_CONDITION_MAGIC << 4): case (ELF_MSG_CONDITION_MAGIC << 4):
return ((msg->byte0 & 1) == 1) == (((void)0, gSaveContext.magicAcquired) != 0); return ((msg->byte0 & 1) == 1) == (((void)0, gSaveContext.isMagicAcquired) != 0);
} }
} }

View File

@ -349,7 +349,7 @@ void EnAObj_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
if (type >= A_OBJ_MAX) { if (type >= A_OBJ_MAX) {
type = A_OBJ_BOULDER_FRAGMENT; type = A_OBJ_BOULDER_FRAGMENT;

View File

@ -1363,7 +1363,7 @@ void EnItem00_DrawRupee(EnItem00* this, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
func_8002EBCC(&this->actor, play, 0); func_8002EBCC(&this->actor, play, 0);
if (this->actor.params <= ITEM00_RUPEE_RED) { if (this->actor.params <= ITEM00_RUPEE_RED) {
@ -1407,7 +1407,7 @@ void EnItem00_DrawCollectible(EnItem00* this, PlayState* play) {
texIndex -= 3; texIndex -= 3;
} }
POLY_OPA_DISP = func_800946E4(POLY_OPA_DISP); POLY_OPA_DISP = Gfx_SetupDL_66(POLY_OPA_DISP);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sItemDropTex[texIndex])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sItemDropTex[texIndex]));
@ -1427,13 +1427,13 @@ void EnItem00_DrawHeartContainer(EnItem00* this, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
func_8002EBCC(&this->actor, play, 0); func_8002EBCC(&this->actor, play, 0);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, gHeartPieceExteriorDL); gSPDisplayList(POLY_OPA_DISP++, gHeartPieceExteriorDL);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
func_8002ED80(&this->actor, play, 0); func_8002ED80(&this->actor, play, 0);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);
@ -1456,7 +1456,7 @@ void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
func_8002ED80(&this->actor, play, 0); func_8002ED80(&this->actor, play, 0);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_MODELVIEW | G_MTX_LOAD); G_MTX_MODELVIEW | G_MTX_LOAD);

View File

@ -51,16 +51,16 @@ void TransitionFade_Update(void* thisx, s32 updateRate) {
break; break;
case 1: case 1:
this->fadeTimer += updateRate; this->fadeTimer += updateRate;
if (this->fadeTimer >= gSaveContext.fadeDuration) { if (this->fadeTimer >= gSaveContext.transFadeDuration) {
this->fadeTimer = gSaveContext.fadeDuration; this->fadeTimer = gSaveContext.transFadeDuration;
this->isDone = 1; this->isDone = 1;
} }
if (!gSaveContext.fadeDuration) { if (!gSaveContext.transFadeDuration) {
// "Divide by 0! Zero is included in ZCommonGet fade_speed" // "Divide by 0! Zero is included in ZCommonGet fade_speed"
osSyncPrintf(VT_COL(RED, WHITE) "0除算! ZCommonGet fade_speed に0がはいってる" VT_RST); osSyncPrintf(VT_COL(RED, WHITE) "0除算! ZCommonGet fade_speed に0がはいってる" VT_RST);
} }
alpha = (255.0f * this->fadeTimer) / ((void)0, gSaveContext.fadeDuration); alpha = (255.0f * this->fadeTimer) / ((void)0, gSaveContext.transFadeDuration);
this->fadeColor.a = (this->fadeDirection != 0) ? 255 - alpha : alpha; this->fadeColor.a = (this->fadeDirection != 0) ? 255 - alpha : alpha;
break; break;
case 2: case 2:

View File

@ -67,14 +67,14 @@ void TransitionWipe_Update(void* thisx, s32 updateRate) {
u8 unk1419; u8 unk1419;
if (this->direction != 0) { if (this->direction != 0) {
unk1419 = gSaveContext.unk_1419; unk1419 = gSaveContext.transWipeSpeed;
this->texY += (unk1419 * 3) / updateRate; this->texY += (unk1419 * 3) / updateRate;
if (this->texY >= 0x264) { if (this->texY >= 0x264) {
this->texY = 0x264; this->texY = 0x264;
this->isDone = 1; this->isDone = 1;
} }
} else { } else {
unk1419 = gSaveContext.unk_1419; unk1419 = gSaveContext.transWipeSpeed;
this->texY -= (unk1419 * 3) / updateRate; this->texY -= (unk1419 * 3) / updateRate;
if (this->texY < 0x14E) { if (this->texY < 0x14E) {
this->texY = 0x14D; this->texY = 0x14D;

View File

@ -15,7 +15,7 @@ void KaleidoSetup_Update(PlayState* play) {
if (pauseCtx->state == 0 && pauseCtx->debugState == 0 && play->gameOverCtx.state == GAMEOVER_INACTIVE && if (pauseCtx->state == 0 && pauseCtx->debugState == 0 && play->gameOverCtx.state == GAMEOVER_INACTIVE &&
play->sceneLoadFlag == 0 && play->transitionMode == 0 && gSaveContext.cutsceneIndex < 0xFFF0 && play->sceneLoadFlag == 0 && play->transitionMode == 0 && gSaveContext.cutsceneIndex < 0xFFF0 &&
gSaveContext.nextCutsceneIndex < 0xFFF0 && !Play_InCsMode(play) && gSaveContext.nextCutsceneIndex < 0xFFF0 && !Play_InCsMode(play) &&
play->shootingGalleryStatus <= 1 && gSaveContext.unk_13F0 != 8 && gSaveContext.unk_13F0 != 9 && play->shootingGalleryStatus <= 1 && gSaveContext.magicState != 8 && gSaveContext.magicState != 9 &&
(play->sceneNum != SCENE_BOWLING || !Flags_GetSwitch(play, 0x38))) { (play->sceneNum != SCENE_BOWLING || !Flags_GetSwitch(play, 0x38))) {
if (CVar_GetS32("gCheatEasyPauseBufferFrameAdvance", 0) == 2 && !CHECK_BTN_ALL(input->press.button, BTN_START)) { if (CVar_GetS32("gCheatEasyPauseBufferFrameAdvance", 0) == 2 && !CHECK_BTN_ALL(input->press.button, BTN_START)) {

View File

@ -295,7 +295,7 @@ void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused)
sLightningFlashAlpha = 0; sLightningFlashAlpha = 0;
gSaveContext.unk_1410 = 0; gSaveContext.cutsceneTransitionControl = 0;
envCtx->adjAmbientColor[0] = envCtx->adjAmbientColor[1] = envCtx->adjAmbientColor[2] = envCtx->adjLight1Color[0] = envCtx->adjAmbientColor[0] = envCtx->adjAmbientColor[1] = envCtx->adjAmbientColor[2] = envCtx->adjLight1Color[0] =
envCtx->adjLight1Color[1] = envCtx->adjLight1Color[2] = envCtx->adjFogColor[0] = envCtx->adjFogColor[1] = envCtx->adjLight1Color[1] = envCtx->adjLight1Color[2] = envCtx->adjFogColor[0] = envCtx->adjFogColor[1] =
@ -326,7 +326,7 @@ void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused)
play->envCtx.unk_F2[0] = 0; play->envCtx.unk_F2[0] = 0;
if (gSaveContext.unk_13C3 != 0) { if (gSaveContext.retainWeatherMode != 0) {
if (((void)0, gSaveContext.sceneSetupIndex) < 4) { if (((void)0, gSaveContext.sceneSetupIndex) < 4) {
switch (gWeatherMode) { switch (gWeatherMode) {
case 1: case 1:
@ -378,7 +378,7 @@ void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused)
D_8011FB38 = 0; D_8011FB38 = 0;
D_8011FB34 = 0; D_8011FB34 = 0;
gSkyboxBlendingEnabled = false; gSkyboxBlendingEnabled = false;
gSaveContext.unk_13C3 = 0; gSaveContext.retainWeatherMode = 0;
R_ENV_LIGHT1_DIR(0) = 80; R_ENV_LIGHT1_DIR(0) = 80;
R_ENV_LIGHT1_DIR(1) = 80; R_ENV_LIGHT1_DIR(1) = 80;
R_ENV_LIGHT1_DIR(2) = 80; R_ENV_LIGHT1_DIR(2) = 80;
@ -1350,7 +1350,7 @@ void Environment_DrawSunAndMoon(PlayState* play) {
scale = (color * 2.0f) + 10.0f; scale = (color * 2.0f) + 10.0f;
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD);
func_80093AD0(play->state.gfxCtx); Gfx_SetupDL_54Opa(play->state.gfxCtx);
static Vtx vertices[] = { static Vtx vertices[] = {
VTX(-31, -31, 0, 0, 0, 255, 255, 255, 255), VTX(-31, -31, 0, 0, 0, 255, 255, 255, 255),
@ -1388,7 +1388,7 @@ void Environment_DrawSunAndMoon(PlayState* play) {
if (alpha > 0.0f) { if (alpha > 0.0f) {
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD); gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD);
func_8009398C(play->state.gfxCtx); Gfx_SetupDL_51Opa(play->state.gfxCtx);
gDPPipeSync(POLY_OPA_DISP++); gDPPipeSync(POLY_OPA_DISP++);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 240, 255, 180, alpha); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 240, 255, 180, alpha);
gDPSetEnvColor(POLY_OPA_DISP++, 80, 70, 20, alpha); gDPSetEnvColor(POLY_OPA_DISP++, 80, 70, 20, alpha);
@ -1581,7 +1581,7 @@ void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View
if (screenFillAlpha != 0) { if (screenFillAlpha != 0) {
if (alphaScale > 0.0f) { if (alphaScale > 0.0f) {
POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP); POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
alpha = colorIntensity / 10.0f; alpha = colorIntensity / 10.0f;
alpha = CLAMP_MAX(alpha, 1.0f); alpha = CLAMP_MAX(alpha, 1.0f);
@ -1664,7 +1664,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx)
if (play->envCtx.unk_EE[1]) { if (play->envCtx.unk_EE[1]) {
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 150, 255, 255, 30); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 150, 255, 255, 30);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 20); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 20);
} }
// draw rain drops // draw rain drops
@ -1708,7 +1708,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx)
FrameInterpolation_RecordOpenChild("Droplet Ring", i); FrameInterpolation_RecordOpenChild("Droplet Ring", i);
if (!firstDone) { if (!firstDone) {
func_80093D84(gfxCtx); Gfx_SetupDL_25Xlu(gfxCtx);
gDPSetEnvColor(POLY_XLU_DISP++, 155, 155, 155, 0); gDPSetEnvColor(POLY_XLU_DISP++, 155, 155, 155, 0);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 120); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 120);
firstDone++; firstDone++;
@ -1768,7 +1768,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_800938B4(play->state.gfxCtx); Gfx_SetupDL_57Opa(play->state.gfxCtx);
alpha = (1000 - play->lightCtx.fogNear) * 0.02f; alpha = (1000 - play->lightCtx.fogNear) * 0.02f;
@ -1790,7 +1790,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) {
if (play->envCtx.customSkyboxFilter) { if (play->envCtx.customSkyboxFilter) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_800938B4(play->state.gfxCtx); Gfx_SetupDL_57Opa(play->state.gfxCtx);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, play->envCtx.skyboxFilterColor[0], gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, play->envCtx.skyboxFilterColor[0],
play->envCtx.skyboxFilterColor[1], play->envCtx.skyboxFilterColor[2], play->envCtx.skyboxFilterColor[1], play->envCtx.skyboxFilterColor[2],
play->envCtx.skyboxFilterColor[3]); play->envCtx.skyboxFilterColor[3]);
@ -1803,7 +1803,7 @@ void Environment_DrawSkyboxFilters(PlayState* play) {
void Environment_DrawLightningFlash(PlayState* play, u8 red, u8 green, u8 blue, u8 alpha) { void Environment_DrawLightningFlash(PlayState* play, u8 red, u8 green, u8 blue, u8 alpha) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_800938B4(play->state.gfxCtx); Gfx_SetupDL_57Opa(play->state.gfxCtx);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, red, green, blue, alpha); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, red, green, blue, alpha);
gDPFillRectangle(POLY_OPA_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1); gDPFillRectangle(POLY_OPA_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
@ -1977,7 +1977,7 @@ void Environment_DrawLightning(PlayState* play, s32 unused) {
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(lightningTextures[sLightningBolts[i].textureIndex])); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(lightningTextures[sLightningBolts[i].textureIndex]));
func_80094C50(play->state.gfxCtx); Gfx_SetupDL_61Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, SEG_ADDR(1, 0), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPMatrix(POLY_XLU_DISP++, SEG_ADDR(1, 0), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gEffLightningDL); gSPDisplayList(POLY_XLU_DISP++, gEffLightningDL);
} }
@ -2252,7 +2252,7 @@ void Environment_FillScreen(GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue,
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);
if (drawFlags & FILL_SCREEN_OPA) { if (drawFlags & FILL_SCREEN_OPA) {
POLY_OPA_DISP = func_800937C0(POLY_OPA_DISP); POLY_OPA_DISP = Gfx_SetupDL_57(POLY_OPA_DISP);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, red, green, blue, alpha); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, red, green, blue, alpha);
gDPSetAlphaDither(POLY_OPA_DISP++, G_AD_DISABLE); gDPSetAlphaDither(POLY_OPA_DISP++, G_AD_DISABLE);
gDPSetColorDither(POLY_OPA_DISP++, G_CD_DISABLE); gDPSetColorDither(POLY_OPA_DISP++, G_CD_DISABLE);
@ -2260,7 +2260,7 @@ void Environment_FillScreen(GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue,
} }
if (drawFlags & FILL_SCREEN_XLU) { if (drawFlags & FILL_SCREEN_XLU) {
POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP); POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, red, green, blue, alpha); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, red, green, blue, alpha);
if ((u32)alpha == 255) { if ((u32)alpha == 255) {
@ -2420,7 +2420,7 @@ void Environment_DrawSandstorm(PlayState* play, u8 sandstormState) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
POLY_XLU_DISP = func_80093F34(POLY_XLU_DISP); POLY_XLU_DISP = Gfx_SetupDL_64(POLY_XLU_DISP);
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_NOISE); gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_NOISE);
gDPSetColorDither(POLY_XLU_DISP++, G_CD_NOISE); gDPSetColorDither(POLY_XLU_DISP++, G_CD_NOISE);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, primColor.r, primColor.g, primColor.b, play->envCtx.sandstormPrimA); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, primColor.r, primColor.g, primColor.b, play->envCtx.sandstormPrimA);
@ -2531,7 +2531,7 @@ void Environment_WarpSongLeave(PlayState* play) {
play->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_RETURN].entranceIndex; play->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_RETURN].entranceIndex;
play->sceneLoadFlag = 0x14; play->sceneLoadFlag = 0x14;
play->fadeTransition = 3; play->fadeTransition = 3;
gSaveContext.nextTransition = 3; gSaveContext.nextTransitionType = 3;
switch (play->nextEntranceIndex) { switch (play->nextEntranceIndex) {
case 0x147: case 0x147:

View File

@ -594,14 +594,14 @@ void HealthMeter_Draw(PlayState* play) {
if ((ddHeartCountMinusOne < 0) || (i > ddHeartCountMinusOne)) { if ((ddHeartCountMinusOne < 0) || (i > ddHeartCountMinusOne)) {
if (curCombineModeSet != 1) { if (curCombineModeSet != 1) {
curCombineModeSet = 1; curCombineModeSet = 1;
func_80094520(gfxCtx); Gfx_SetupDL_39Overlay(gfxCtx);
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE,
0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
} }
} else { } else {
if (curCombineModeSet != 3) { if (curCombineModeSet != 3) {
curCombineModeSet = 3; curCombineModeSet = 3;
func_80094520(gfxCtx); Gfx_SetupDL_39Overlay(gfxCtx);
gDPSetCombineLERP(OVERLAY_DISP++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, gDPSetCombineLERP(OVERLAY_DISP++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
0, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); 0, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
} }
@ -632,14 +632,14 @@ void HealthMeter_Draw(PlayState* play) {
if ((ddHeartCountMinusOne < 0) || (i > ddHeartCountMinusOne)) { if ((ddHeartCountMinusOne < 0) || (i > ddHeartCountMinusOne)) {
if (curCombineModeSet != 2) { if (curCombineModeSet != 2) {
curCombineModeSet = 2; curCombineModeSet = 2;
func_80094A14(gfxCtx); Gfx_SetupDL_42Overlay(gfxCtx);
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE,
0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
} }
} else { } else {
if (curCombineModeSet != 4) { if (curCombineModeSet != 4) {
curCombineModeSet = 4; curCombineModeSet = 4;
func_80094A14(gfxCtx); Gfx_SetupDL_42Overlay(gfxCtx);
gDPSetCombineLERP(OVERLAY_DISP++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, gDPSetCombineLERP(OVERLAY_DISP++, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
0, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0); 0, ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0);
} }

View File

@ -616,7 +616,7 @@ void Minimap_DrawCompassIcons(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
if (play->interfaceCtx.minimapAlpha >= 0xAA) { if (play->interfaceCtx.minimapAlpha >= 0xAA) {
func_80094A14(play->state.gfxCtx); Gfx_SetupDL_42Overlay(play->state.gfxCtx);
//Player current position (yellow arrow) //Player current position (yellow arrow)
gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@ -749,7 +749,7 @@ void Minimap_Draw(PlayState* play) {
case SCENE_HAKADANCH: case SCENE_HAKADANCH:
case SCENE_ICE_DOUKUTO: case SCENE_ICE_DOUKUTO:
if (!R_MINIMAP_DISABLED) { if (!R_MINIMAP_DISABLED) {
func_80094520(play->state.gfxCtx); Gfx_SetupDL_39Overlay(play->state.gfxCtx);
gDPSetCombineLERP(OVERLAY_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0, gDPSetCombineLERP(OVERLAY_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0,
TEXEL0, 0, PRIMITIVE, 0); TEXEL0, 0, PRIMITIVE, 0);
@ -788,7 +788,7 @@ void Minimap_Draw(PlayState* play) {
if (CHECK_DUNGEON_ITEM(DUNGEON_COMPASS, mapIndex)) { if (CHECK_DUNGEON_ITEM(DUNGEON_COMPASS, mapIndex)) {
Minimap_DrawCompassIcons(play); // Draw icons for the player spawn and current position Minimap_DrawCompassIcons(play); // Draw icons for the player spawn and current position
func_80094520(play->state.gfxCtx); Gfx_SetupDL_39Overlay(play->state.gfxCtx);
MapMark_Draw(play); MapMark_Draw(play);
} }
} }
@ -826,7 +826,7 @@ void Minimap_Draw(PlayState* play) {
case SCENE_SPOT20: case SCENE_SPOT20:
case SCENE_GANON_TOU: case SCENE_GANON_TOU:
if (!R_MINIMAP_DISABLED) { if (!R_MINIMAP_DISABLED) {
func_80094520(play->state.gfxCtx); Gfx_SetupDL_39Overlay(play->state.gfxCtx);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
if (CVar_GetS32("gHudColors", 1) == 2) {//Overworld minimap if (CVar_GetS32("gHudColors", 1) == 2) {//Overworld minimap

View File

@ -2210,11 +2210,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->msgMode >= MSGMODE_TEXT_BOX_GROWING && msgCtx->msgMode < MSGMODE_TEXT_CLOSING && msgCtx->msgMode >= MSGMODE_TEXT_BOX_GROWING && msgCtx->msgMode < MSGMODE_TEXT_CLOSING &&
msgCtx->textBoxType < TEXTBOX_TYPE_NONE_BOTTOM) { msgCtx->textBoxType < TEXTBOX_TYPE_NONE_BOTTOM) {
Message_SetView(&msgCtx->view); Message_SetView(&msgCtx->view);
func_8009457C(&gfx); Gfx_SetupDL_39Ptr(&gfx);
Message_DrawTextBox(play, &gfx); Message_DrawTextBox(play, &gfx);
} }
func_8009457C(&gfx); Gfx_SetupDL_39Ptr(&gfx);
gDPSetAlphaCompare(gfx++, G_AC_NONE); gDPSetAlphaCompare(gfx++, G_AC_NONE);
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
@ -2917,7 +2917,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
// "Recording complete" // "Recording complete"
osSyncPrintf("録音終了!!!!!!!!! message->info->status=%d \n", osSyncPrintf("録音終了!!!!!!!!! message->info->status=%d \n",
msgCtx->ocarinaStaff->state); msgCtx->ocarinaStaff->state);
gSaveContext.scarecrowCustomSongSet = true; gSaveContext.scarecrowLongSongSet = true;
} }
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8); &D_801333E8);
@ -2930,10 +2930,10 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
osSyncPrintf("録音終了!!!!!!!!!録音終了\n"); osSyncPrintf("録音終了!!!!!!!!!録音終了\n");
osSyncPrintf(VT_FGCOL(YELLOW)); osSyncPrintf(VT_FGCOL(YELLOW));
osSyncPrintf("\n====================================================================\n"); osSyncPrintf("\n====================================================================\n");
memcpy(gSaveContext.scarecrowCustomSong, gScarecrowCustomSongPtr, memcpy(gSaveContext.scarecrowLongSong, gScarecrowCustomSongPtr,
sizeof(gSaveContext.scarecrowCustomSong)); sizeof(gSaveContext.scarecrowLongSong));
for (i = 0; i < ARRAY_COUNT(gSaveContext.scarecrowCustomSong); i++) { for (i = 0; i < ARRAY_COUNT(gSaveContext.scarecrowLongSong); i++) {
osSyncPrintf("%d, ", gSaveContext.scarecrowCustomSong[i]); osSyncPrintf("%d, ", gSaveContext.scarecrowLongSong[i]);
} }
osSyncPrintf(VT_RST); osSyncPrintf(VT_RST);
osSyncPrintf("\n====================================================================\n"); osSyncPrintf("\n====================================================================\n");
@ -3176,7 +3176,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->msgMode >= MSGMODE_OCARINA_PLAYING && msgCtx->msgMode < MSGMODE_TEXT_AWAIT_NEXT && if (msgCtx->msgMode >= MSGMODE_OCARINA_PLAYING && msgCtx->msgMode < MSGMODE_TEXT_AWAIT_NEXT &&
msgCtx->ocarinaAction != OCARINA_ACTION_FREE_PLAY && msgCtx->ocarinaAction != OCARINA_ACTION_CHECK_NOWARP) { msgCtx->ocarinaAction != OCARINA_ACTION_FREE_PLAY && msgCtx->ocarinaAction != OCARINA_ACTION_CHECK_NOWARP) {
func_8009457C(&gfx); Gfx_SetupDL_39Ptr(&gfx);
gDPSetCombineLERP(gfx++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, gDPSetCombineLERP(gfx++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE,
ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
@ -3310,7 +3310,7 @@ void Message_Draw(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
watchVar = gSaveContext.scarecrowCustomSongSet; watchVar = gSaveContext.scarecrowLongSongSet;
Message_DrawDebugVariableChanged(&watchVar, play->state.gfxCtx); Message_DrawDebugVariableChanged(&watchVar, play->state.gfxCtx);
if (BREG(0) != 0 && play->msgCtx.textId != 0) { if (BREG(0) != 0 && play->msgCtx.textId != 0) {
plusOne = Graph_GfxPlusOne(polyOpaP = POLY_OPA_DISP); plusOne = Graph_GfxPlusOne(polyOpaP = POLY_OPA_DISP);

View File

@ -987,7 +987,7 @@ void func_80083108(PlayState* play) {
} }
Interface_ChangeAlpha(50); Interface_ChangeAlpha(50);
} else if ((player->stateFlags1 & 0x00200000) || (player->stateFlags2 & 0x00040000)) { } else if ((player->stateFlags1 & 0x00200000) || (player->stateFlags2 & PLAYER_STATE2_CRAWLING)) {
if (gSaveContext.buttonStatus[0] != BTN_DISABLED) { if (gSaveContext.buttonStatus[0] != BTN_DISABLED) {
gSaveContext.buttonStatus[0] = BTN_DISABLED; gSaveContext.buttonStatus[0] = BTN_DISABLED;
gSaveContext.buttonStatus[1] = BTN_DISABLED; gSaveContext.buttonStatus[1] = BTN_DISABLED;
@ -2222,7 +2222,7 @@ u8 Item_Give(PlayState* play, u8 item) {
PerformAutosave(play, item); PerformAutosave(play, item);
return item; return item;
} else if (item == ITEM_MAGIC_SMALL) { } else if (item == ITEM_MAGIC_SMALL) {
if (gSaveContext.unk_13F0 != 10) { if (gSaveContext.magicState != 10) {
if (play != NULL) { if (play != NULL) {
Magic_Fill(play); Magic_Fill(play);
} }
@ -2241,7 +2241,7 @@ u8 Item_Give(PlayState* play, u8 item) {
PerformAutosave(play, item); PerformAutosave(play, item);
return item; return item;
} else if (item == ITEM_MAGIC_LARGE) { } else if (item == ITEM_MAGIC_LARGE) {
if (gSaveContext.unk_13F0 != 10) { if (gSaveContext.magicState != 10) {
if (play != NULL) { if (play != NULL) {
Magic_Fill(play); Magic_Fill(play);
} }
@ -2365,16 +2365,16 @@ u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) {
slot = SLOT(item); slot = SLOT(item);
if (item == RG_MAGIC_SINGLE) { if (item == RG_MAGIC_SINGLE) {
gSaveContext.magicAcquired = true; gSaveContext.isMagicAcquired = true;
gSaveContext.unk_13F6 = 0x30; gSaveContext.magicFillTarget = 0x30;
Magic_Fill(play); Magic_Fill(play);
return RG_NONE; return RG_NONE;
} else if (item == RG_MAGIC_DOUBLE) { } else if (item == RG_MAGIC_DOUBLE) {
if (!gSaveContext.magicAcquired) { if (!gSaveContext.isMagicAcquired) {
gSaveContext.magicAcquired = true; gSaveContext.isMagicAcquired = true;
} }
gSaveContext.doubleMagic = true; gSaveContext.isDoubleMagicAcquired = true;
gSaveContext.unk_13F6 = 0x60; gSaveContext.magicFillTarget = 0x60;
gSaveContext.magicLevel = 0; gSaveContext.magicLevel = 0;
Magic_Fill(play); Magic_Fill(play);
return RG_NONE; return RG_NONE;
@ -2389,7 +2389,7 @@ u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) {
} }
if (item == RG_DOUBLE_DEFENSE) { if (item == RG_DOUBLE_DEFENSE) {
gSaveContext.doubleDefense = true; gSaveContext.isDoubleDefenseAcquired = true;
gSaveContext.inventory.defenseHearts = 20; gSaveContext.inventory.defenseHearts = 20;
gSaveContext.healthAccumulator = 0x140; gSaveContext.healthAccumulator = 0x140;
return RG_NONE; return RG_NONE;
@ -3063,7 +3063,7 @@ s32 Health_ChangeBy(PlayState* play, s16 healthChange) {
// clang-format off // clang-format off
if (healthChange > 0) { Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &D_801333D4, 4, if (healthChange > 0) { Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8); &D_801333E0, &D_801333E0, &D_801333E8);
} else if ((gSaveContext.doubleDefense != 0) && (healthChange < 0)) { } else if ((gSaveContext.isDoubleDefenseAcquired != 0) && (healthChange < 0)) {
healthChange >>= 1; healthChange >>= 1;
osSyncPrintf("ハート減少半分!!=%d\n", healthChange); // "Heart decrease halved!!%d" osSyncPrintf("ハート減少半分!!=%d\n", healthChange); // "Heart decrease halved!!%d"
} }
@ -3220,29 +3220,29 @@ void Inventory_ChangeAmmo(s16 item, s16 ammoChange) {
} }
void Magic_Fill(PlayState* play) { void Magic_Fill(PlayState* play) {
if (gSaveContext.magicAcquired) { if (gSaveContext.isMagicAcquired) {
gSaveContext.unk_13F2 = gSaveContext.unk_13F0; gSaveContext.prevMagicState = gSaveContext.magicState;
gSaveContext.unk_13F6 = (gSaveContext.doubleMagic + 1) * 0x30; gSaveContext.magicFillTarget = (gSaveContext.isDoubleMagicAcquired + 1) * 0x30;
gSaveContext.unk_13F0 = 9; gSaveContext.magicState = 9;
} }
} }
void func_800876C8(PlayState* play) { void func_800876C8(PlayState* play) {
if ((gSaveContext.unk_13F0 != 8) && (gSaveContext.unk_13F0 != 9)) { if ((gSaveContext.magicState != 8) && (gSaveContext.magicState != 9)) {
if (gSaveContext.unk_13F0 == 10) { if (gSaveContext.magicState == 10) {
gSaveContext.unk_13F2 = gSaveContext.unk_13F0; gSaveContext.prevMagicState = gSaveContext.magicState;
} }
gSaveContext.unk_13F0 = 5; gSaveContext.magicState = 5;
} }
} }
s32 func_80087708(PlayState* play, s16 arg1, s16 arg2) { s32 func_80087708(PlayState* play, s16 arg1, s16 arg2) {
if (!gSaveContext.magicAcquired) { if (!gSaveContext.isMagicAcquired) {
return 0; return 0;
} }
if ((arg2 != 5) && (gSaveContext.magic - arg1) < 0) { if ((arg2 != 5) && (gSaveContext.magic - arg1) < 0) {
if (gSaveContext.unk_13F4 != 0) { if (gSaveContext.magicCapacity != 0) {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
} }
return 0; return 0;
@ -3251,66 +3251,66 @@ s32 func_80087708(PlayState* play, s16 arg1, s16 arg2) {
switch (arg2) { switch (arg2) {
case 0: case 0:
case 2: case 2:
if ((gSaveContext.unk_13F0 == 0) || (gSaveContext.unk_13F0 == 7)) { if ((gSaveContext.magicState == 0) || (gSaveContext.magicState == 7)) {
if (gSaveContext.unk_13F0 == 7) { if (gSaveContext.magicState == 7) {
play->actorCtx.lensActive = false; play->actorCtx.lensActive = false;
} }
gSaveContext.unk_13F8 = gSaveContext.magic - arg1; gSaveContext.magicTarget = gSaveContext.magic - arg1;
gSaveContext.unk_13F0 = 1; gSaveContext.magicState = 1;
return 1; return 1;
} else { } else {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
return 0; return 0;
} }
case 1: case 1:
if ((gSaveContext.unk_13F0 == 0) || (gSaveContext.unk_13F0 == 7)) { if ((gSaveContext.magicState == 0) || (gSaveContext.magicState == 7)) {
if (gSaveContext.unk_13F0 == 7) { if (gSaveContext.magicState == 7) {
play->actorCtx.lensActive = false; play->actorCtx.lensActive = false;
} }
gSaveContext.unk_13F8 = gSaveContext.magic - arg1; gSaveContext.magicTarget = gSaveContext.magic - arg1;
gSaveContext.unk_13F0 = 6; gSaveContext.magicState = 6;
return 1; return 1;
} else { } else {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
return 0; return 0;
} }
case 3: case 3:
if (gSaveContext.unk_13F0 == 0) { if (gSaveContext.magicState == 0) {
if (gSaveContext.magic != 0) { if (gSaveContext.magic != 0) {
play->interfaceCtx.unk_230 = 80; play->interfaceCtx.unk_230 = 80;
gSaveContext.unk_13F0 = 7; gSaveContext.magicState = 7;
return 1; return 1;
} else { } else {
return 0; return 0;
} }
} else { } else {
if (gSaveContext.unk_13F0 == 7) { if (gSaveContext.magicState == 7) {
return 1; return 1;
} else { } else {
return 0; return 0;
} }
} }
case 4: case 4:
if ((gSaveContext.unk_13F0 == 0) || (gSaveContext.unk_13F0 == 7)) { if ((gSaveContext.magicState == 0) || (gSaveContext.magicState == 7)) {
if (gSaveContext.unk_13F0 == 7) { if (gSaveContext.magicState == 7) {
play->actorCtx.lensActive = false; play->actorCtx.lensActive = false;
} }
gSaveContext.unk_13F8 = gSaveContext.magic - arg1; gSaveContext.magicTarget = gSaveContext.magic - arg1;
gSaveContext.unk_13F0 = 4; gSaveContext.magicState = 4;
return 1; return 1;
} else { } else {
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
return 0; return 0;
} }
case 5: case 5:
if (gSaveContext.unk_13F4 >= gSaveContext.magic) { if (gSaveContext.magicCapacity >= gSaveContext.magic) {
gSaveContext.unk_13F8 = gSaveContext.magic + arg1; gSaveContext.magicTarget = gSaveContext.magic + arg1;
if (gSaveContext.unk_13F8 >= gSaveContext.unk_13F4) { if (gSaveContext.magicTarget >= gSaveContext.magicCapacity) {
gSaveContext.unk_13F8 = gSaveContext.unk_13F4; gSaveContext.magicTarget = gSaveContext.magicCapacity;
} }
gSaveContext.unk_13F0 = 10; gSaveContext.magicState = 10;
return 1; return 1;
} }
break; break;
@ -3359,23 +3359,23 @@ void Interface_UpdateMagicBar(PlayState* play) {
s16 borderChangeB; s16 borderChangeB;
s16 temp; s16 temp;
switch (gSaveContext.unk_13F0) { switch (gSaveContext.magicState) {
case 8: case 8:
temp = gSaveContext.magicLevel * 0x30; temp = gSaveContext.magicLevel * 0x30;
if (gSaveContext.unk_13F4 != temp) { if (gSaveContext.magicCapacity != temp) {
if (gSaveContext.unk_13F4 < temp) { if (gSaveContext.magicCapacity < temp) {
gSaveContext.unk_13F4 += 8; gSaveContext.magicCapacity += 8;
if (gSaveContext.unk_13F4 > temp) { if (gSaveContext.magicCapacity > temp) {
gSaveContext.unk_13F4 = temp; gSaveContext.magicCapacity = temp;
} }
} else { } else {
gSaveContext.unk_13F4 -= 8; gSaveContext.magicCapacity -= 8;
if (gSaveContext.unk_13F4 <= temp) { if (gSaveContext.magicCapacity <= temp) {
gSaveContext.unk_13F4 = temp; gSaveContext.magicCapacity = temp;
} }
} }
} else { } else {
gSaveContext.unk_13F0 = 9; gSaveContext.magicState = 9;
} }
break; break;
@ -3388,31 +3388,31 @@ void Interface_UpdateMagicBar(PlayState* play) {
} }
// "Storage MAGIC_NOW=%d (%d)" // "Storage MAGIC_NOW=%d (%d)"
osSyncPrintf("蓄電 MAGIC_NOW=%d (%d)\n", gSaveContext.magic, gSaveContext.unk_13F6); osSyncPrintf("蓄電 MAGIC_NOW=%d (%d)\n", gSaveContext.magic, gSaveContext.magicFillTarget);
if (gSaveContext.magic >= gSaveContext.unk_13F6) { if (gSaveContext.magic >= gSaveContext.magicFillTarget) {
gSaveContext.magic = gSaveContext.unk_13F6; gSaveContext.magic = gSaveContext.magicFillTarget;
gSaveContext.unk_13F0 = gSaveContext.unk_13F2; gSaveContext.magicState = gSaveContext.prevMagicState;
gSaveContext.unk_13F2 = 0; gSaveContext.prevMagicState = 0;
} }
break; break;
case 1: case 1:
sMagicBorderRatio = 2; sMagicBorderRatio = 2;
gSaveContext.unk_13F0 = 2; gSaveContext.magicState = 2;
break; break;
case 2: case 2:
gSaveContext.magic -= 2; gSaveContext.magic -= 2;
if (gSaveContext.magic <= 0) { if (gSaveContext.magic <= 0) {
gSaveContext.magic = 0; gSaveContext.magic = 0;
gSaveContext.unk_13F0 = 3; gSaveContext.magicState = 3;
if (CVar_GetS32("gHudColors", 1) == 2) { if (CVar_GetS32("gHudColors", 1) == 2) {
sMagicBorder = CVar_GetRGB("gCCMagicBorderNormPrim", sMagicBorder_ori); sMagicBorder = CVar_GetRGB("gCCMagicBorderNormPrim", sMagicBorder_ori);
} else { } else {
sMagicBorder = sMagicBorder_ori; sMagicBorder = sMagicBorder_ori;
} }
} else if (gSaveContext.magic == gSaveContext.unk_13F8) { } else if (gSaveContext.magic == gSaveContext.magicTarget) {
gSaveContext.unk_13F0 = 3; gSaveContext.magicState = 3;
if (CVar_GetS32("gHudColors", 1) == 2) { if (CVar_GetS32("gHudColors", 1) == 2) {
sMagicBorder = CVar_GetRGB("gCCMagicBorderNormPrim", sMagicBorder_ori); sMagicBorder = CVar_GetRGB("gCCMagicBorderNormPrim", sMagicBorder_ori);
} else { } else {
@ -3464,7 +3464,7 @@ void Interface_UpdateMagicBar(PlayState* play) {
} else { } else {
sMagicBorder = sMagicBorder_ori; sMagicBorder = sMagicBorder_ori;
} }
gSaveContext.unk_13F0 = 0; gSaveContext.magicState = 0;
break; break;
case 7: case 7:
@ -3484,7 +3484,7 @@ void Interface_UpdateMagicBar(PlayState* play) {
play->actorCtx.lensActive = false; play->actorCtx.lensActive = false;
Audio_PlaySoundGeneral(NA_SE_SY_GLASSMODE_OFF, &D_801333D4, 4, &D_801333E0, &D_801333E0, Audio_PlaySoundGeneral(NA_SE_SY_GLASSMODE_OFF, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8); &D_801333E8);
gSaveContext.unk_13F0 = 0; gSaveContext.magicState = 0;
if (CVar_GetS32("gHudColors", 1) == 2) { if (CVar_GetS32("gHudColors", 1) == 2) {
sMagicBorder = CVar_GetRGB("gCCMagicBorderNormPrim", sMagicBorder_ori); sMagicBorder = CVar_GetRGB("gCCMagicBorderNormPrim", sMagicBorder_ori);
} else { } else {
@ -3539,15 +3539,15 @@ void Interface_UpdateMagicBar(PlayState* play) {
case 10: case 10:
gSaveContext.magic += 4; gSaveContext.magic += 4;
Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); Audio_PlaySoundGeneral(NA_SE_SY_GAUGE_UP - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (gSaveContext.magic >= gSaveContext.unk_13F8) { if (gSaveContext.magic >= gSaveContext.magicTarget) {
gSaveContext.magic = gSaveContext.unk_13F8; gSaveContext.magic = gSaveContext.magicTarget;
gSaveContext.unk_13F0 = gSaveContext.unk_13F2; gSaveContext.magicState = gSaveContext.prevMagicState;
gSaveContext.unk_13F2 = 0; gSaveContext.prevMagicState = 0;
} }
break; break;
default: default:
gSaveContext.unk_13F0 = 0; gSaveContext.magicState = 0;
break; break;
} }
} }
@ -3557,7 +3557,7 @@ void Interface_DrawLineupTick(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80094520(play->state.gfxCtx); Gfx_SetupDL_39Overlay(play->state.gfxCtx);
gDPSetEnvColor(OVERLAY_DISP++, 255, 255, 255, 255); gDPSetEnvColor(OVERLAY_DISP++, 255, 255, 255, 255);
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, 255); gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, 255);
@ -3652,7 +3652,7 @@ void Interface_DrawMagicBar(PlayState* play) {
rMagicFillX = rMagicFillX_original; rMagicFillX = rMagicFillX_original;
} }
func_80094520(play->state.gfxCtx); Gfx_SetupDL_39Overlay(play->state.gfxCtx);
if (CVar_GetS32("gHudColors", 1) == 2) {//Original game add color there so to prevent miss match we make it all white :) if (CVar_GetS32("gHudColors", 1) == 2) {//Original game add color there so to prevent miss match we make it all white :)
gDPSetEnvColor(OVERLAY_DISP++, 255, 255, 255, 255); gDPSetEnvColor(OVERLAY_DISP++, 255, 255, 255, 255);
@ -3663,13 +3663,13 @@ void Interface_DrawMagicBar(PlayState* play) {
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gMagicMeterEndTex, 8, 16, PosX_Start, magicBarY, 8, 16, 1 << 10, 1 << 10); OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gMagicMeterEndTex, 8, 16, PosX_Start, magicBarY, 8, 16, 1 << 10, 1 << 10);
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gMagicMeterMidTex, 24, 16, PosX_MidEnd, magicBarY, gSaveContext.unk_13F4, 16, 1 << 10, 1 << 10); OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gMagicMeterMidTex, 24, 16, PosX_MidEnd, magicBarY, gSaveContext.magicCapacity, 16, 1 << 10, 1 << 10);
gDPLoadTextureBlock(OVERLAY_DISP++, gMagicMeterEndTex, G_IM_FMT_IA, G_IM_SIZ_8b, 8, 16, 0, gDPLoadTextureBlock(OVERLAY_DISP++, gMagicMeterEndTex, G_IM_FMT_IA, G_IM_SIZ_8b, 8, 16, 0,
G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 3, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 3, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPWideTextureRectangle(OVERLAY_DISP++, ((rMagicBarX + gSaveContext.unk_13F4) + 8) << 2, magicBarY << 2, gSPWideTextureRectangle(OVERLAY_DISP++, ((rMagicBarX + gSaveContext.magicCapacity) + 8) << 2, magicBarY << 2,
((rMagicBarX + gSaveContext.unk_13F4) + 16) << 2, (magicBarY + 16) << 2, G_TX_RENDERTILE, ((rMagicBarX + gSaveContext.magicCapacity) + 16) << 2, (magicBarY + 16) << 2, G_TX_RENDERTILE,
256, 0, 1 << 10, 1 << 10); 256, 0, 1 << 10, 1 << 10);
gDPPipeSync(OVERLAY_DISP++); gDPPipeSync(OVERLAY_DISP++);
@ -3677,7 +3677,7 @@ void Interface_DrawMagicBar(PlayState* play) {
ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, PRIMITIVE); ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, PRIMITIVE);
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255); gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255);
if (gSaveContext.unk_13F0 == 4) { if (gSaveContext.magicState == 4) {
// Yellow part of the bar indicating the amount of magic to be subtracted // Yellow part of the bar indicating the amount of magic to be subtracted
if (CVar_GetS32("gHudColors", 1) == 2) { if (CVar_GetS32("gHudColors", 1) == 2) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCMagicUsePrim", magicbar_yellow).r, CVar_GetRGB("gCCMagicUsePrim", magicbar_yellow).g, CVar_GetRGB("gCCMagicUsePrim", magicbar_yellow).b, interfaceCtx->magicAlpha); gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCMagicUsePrim", magicbar_yellow).r, CVar_GetRGB("gCCMagicUsePrim", magicbar_yellow).g, CVar_GetRGB("gCCMagicUsePrim", magicbar_yellow).b, interfaceCtx->magicAlpha);
@ -3702,7 +3702,7 @@ void Interface_DrawMagicBar(PlayState* play) {
} }
gSPWideTextureRectangle(OVERLAY_DISP++, rMagicFillX << 2, (magicBarY + 3) << 2, gSPWideTextureRectangle(OVERLAY_DISP++, rMagicFillX << 2, (magicBarY + 3) << 2,
(rMagicFillX + gSaveContext.unk_13F8) << 2, (magicBarY + 10) << 2, G_TX_RENDERTILE, (rMagicFillX + gSaveContext.magicTarget) << 2, (magicBarY + 10) << 2, G_TX_RENDERTILE,
0, 0, 1 << 10, 1 << 10); 0, 0, 1 << 10, 1 << 10);
} else { } else {
// Fill the whole bar with the normal magic color // Fill the whole bar with the normal magic color
@ -4164,7 +4164,7 @@ void Interface_DrawItemButtons(PlayState* play) {
if ((gSaveContext.unk_13EA == 1) || (gSaveContext.unk_13EA == 2) || (gSaveContext.unk_13EA == 5)) { if ((gSaveContext.unk_13EA == 1) || (gSaveContext.unk_13EA == 2) || (gSaveContext.unk_13EA == 5)) {
temp = 0; temp = 0;
} else if ((player->stateFlags1 & 0x00200000) || (func_8008F2F8(play) == 4) || } else if ((player->stateFlags1 & 0x00200000) || (func_8008F2F8(play) == 4) ||
(player->stateFlags2 & 0x00040000)) { (player->stateFlags2 & PLAYER_STATE2_CRAWLING)) {
temp = 70; temp = 70;
} else { } else {
temp = interfaceCtx->healthAlpha; temp = interfaceCtx->healthAlpha;
@ -4995,7 +4995,7 @@ void Interface_Draw(PlayState* play) {
HealthMeter_Draw(play); HealthMeter_Draw(play);
} }
func_80094520(play->state.gfxCtx); Gfx_SetupDL_39Overlay(play->state.gfxCtx);
if (fullUi) { if (fullUi) {
// Rupee Icon // Rupee Icon
@ -5194,7 +5194,7 @@ void Interface_Draw(PlayState* play) {
Interface_DrawLineupTick(play); Interface_DrawLineupTick(play);
} }
if (fullUi || gSaveContext.unk_13F0 > 0) { if (fullUi || gSaveContext.magicState > 0) {
Interface_DrawMagicBar(play); Interface_DrawMagicBar(play);
} }
@ -5204,7 +5204,7 @@ void Interface_Draw(PlayState* play) {
func_8002C124(&play->actorCtx.targetCtx, play); // Draw Z-Target func_8002C124(&play->actorCtx.targetCtx, play); // Draw Z-Target
} }
func_80094520(play->state.gfxCtx); Gfx_SetupDL_39Overlay(play->state.gfxCtx);
if (fullUi) { if (fullUi) {
Interface_DrawItemButtons(play); Interface_DrawItemButtons(play);
@ -5431,7 +5431,7 @@ void Interface_Draw(PlayState* play) {
} }
// A Button // A Button
func_80094A14(play->state.gfxCtx); Gfx_SetupDL_42Overlay(play->state.gfxCtx);
const Color_RGB8 A_Button_Colors = {R_A_BTN_COLOR(0), R_A_BTN_COLOR(1), R_A_BTN_COLOR(2)}; const Color_RGB8 A_Button_Colors = {R_A_BTN_COLOR(0), R_A_BTN_COLOR(1), R_A_BTN_COLOR(2)};
s16 X_Margins_BtnA; s16 X_Margins_BtnA;
s16 Y_Margins_BtnA; s16 Y_Margins_BtnA;
@ -5513,7 +5513,7 @@ void Interface_Draw(PlayState* play) {
if ((pauseCtx->state == 6) && (pauseCtx->unk_1E4 == 3)) { if ((pauseCtx->state == 6) && (pauseCtx->unk_1E4 == 3)) {
// Inventory Equip Effects // Inventory Equip Effects
gSPSegment(OVERLAY_DISP++, 0x08, pauseCtx->iconItemSegment); gSPSegment(OVERLAY_DISP++, 0x08, pauseCtx->iconItemSegment);
func_80094A14(play->state.gfxCtx); Gfx_SetupDL_42Overlay(play->state.gfxCtx);
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM); gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM);
gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
@ -5559,7 +5559,7 @@ void Interface_Draw(PlayState* play) {
gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0); gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0);
} }
func_80094520(play->state.gfxCtx); Gfx_SetupDL_39Overlay(play->state.gfxCtx);
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) { if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) {
if (gSaveContext.minigameState != 1) { if (gSaveContext.minigameState != 1) {
@ -6367,15 +6367,15 @@ void Interface_Update(PlayState* play) {
(msgCtx->msgMode == MSGMODE_NONE) && (play->sceneLoadFlag == 0) && (msgCtx->msgMode == MSGMODE_NONE) && (play->sceneLoadFlag == 0) &&
(play->gameOverCtx.state == GAMEOVER_INACTIVE) && (play->transitionMode == 0) && (play->gameOverCtx.state == GAMEOVER_INACTIVE) && (play->transitionMode == 0) &&
((play->csCtx.state == CS_STATE_IDLE) || !Player_InCsMode(play))) { ((play->csCtx.state == CS_STATE_IDLE) || !Player_InCsMode(play))) {
if ((gSaveContext.magicAcquired != 0) && (gSaveContext.magicLevel == 0)) { if ((gSaveContext.isMagicAcquired != 0) && (gSaveContext.magicLevel == 0)) {
gSaveContext.magicLevel = gSaveContext.doubleMagic + 1; gSaveContext.magicLevel = gSaveContext.isDoubleMagicAcquired + 1;
gSaveContext.unk_13F0 = 8; gSaveContext.magicState = 8;
osSyncPrintf(VT_FGCOL(YELLOW)); osSyncPrintf(VT_FGCOL(YELLOW));
osSyncPrintf("魔法スター─────ト!!!!!!!!!\n"); // "Magic Start!!!!!!!!!" osSyncPrintf("魔法スター─────ト!!!!!!!!!\n"); // "Magic Start!!!!!!!!!"
osSyncPrintf("MAGIC_MAX=%d\n", gSaveContext.magicLevel); osSyncPrintf("MAGIC_MAX=%d\n", gSaveContext.magicLevel);
osSyncPrintf("MAGIC_NOW=%d\n", gSaveContext.magic); osSyncPrintf("MAGIC_NOW=%d\n", gSaveContext.magic);
osSyncPrintf("Z_MAGIC_NOW_NOW=%d\n", gSaveContext.unk_13F6); osSyncPrintf("Z_MAGIC_NOW_NOW=%d\n", gSaveContext.magicFillTarget);
osSyncPrintf("Z_MAGIC_NOW_MAX=%d\n", gSaveContext.unk_13F4); osSyncPrintf("Z_MAGIC_NOW_MAX=%d\n", gSaveContext.magicCapacity);
osSyncPrintf(VT_RST); osSyncPrintf(VT_RST);
} }
@ -6463,18 +6463,18 @@ void Interface_Update(PlayState* play) {
if ((gSaveContext.dayTime >= 0x4555) && (gSaveContext.dayTime < 0xC001)) { if ((gSaveContext.dayTime >= 0x4555) && (gSaveContext.dayTime < 0xC001)) {
gSaveContext.nextDayTime = 0; gSaveContext.nextDayTime = 0;
play->fadeTransition = 4; play->fadeTransition = 4;
gSaveContext.nextTransition = 2; gSaveContext.nextTransitionType = 2;
play->unk_11DE9 = 1; play->unk_11DE9 = 1;
} else { } else {
gSaveContext.nextDayTime = 0x8001; gSaveContext.nextDayTime = 0x8001;
play->fadeTransition = 5; play->fadeTransition = 5;
gSaveContext.nextTransition = 3; gSaveContext.nextTransitionType = 3;
play->unk_11DE9 = 1; play->unk_11DE9 = 1;
} }
if (play->sceneNum == SCENE_SPOT13) { if (play->sceneNum == SCENE_SPOT13) {
play->fadeTransition = 14; play->fadeTransition = 14;
gSaveContext.nextTransition = 14; gSaveContext.nextTransitionType = 14;
} }
gSaveContext.respawnFlag = -2; gSaveContext.respawnFlag = -2;

View File

@ -214,7 +214,7 @@ void GivePlayerRandoRewardSongOfTime(PlayState* play, RandomizerCheck check) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
if (gSaveContext.entranceIndex == 0x050F && player != NULL && !Player_InBlockingCsMode(play, player) && if (gSaveContext.entranceIndex == 0x050F && player != NULL && !Player_InBlockingCsMode(play, player) &&
!Flags_GetTreasure(play, 0x1F) && gSaveContext.nextTransition == 0xFF && !gSaveContext.pendingIceTrapCount) { !Flags_GetTreasure(play, 0x1F) && gSaveContext.nextTransitionType == 0xFF && !gSaveContext.pendingIceTrapCount) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_SONG_OF_TIME); GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(check, RG_SONG_OF_TIME);
GiveItemEntryWithoutActor(play, getItemEntry); GiveItemEntryWithoutActor(play, getItemEntry);
player->pendingFlag.flagID = 0x1F; player->pendingFlag.flagID = 0x1F;
@ -343,27 +343,27 @@ void GivePlayerRandoRewardZeldaLightArrowsGift(PlayState* play, RandomizerCheck
u8 meetsRequirements = 0; u8 meetsRequirements = 0;
switch (Randomizer_GetSettingValue(RSK_GANONS_BOSS_KEY)) { switch (Randomizer_GetSettingValue(RSK_GANONS_BOSS_KEY)) {
case 7: case RO_GANON_BOSS_KEY_LACS_MEDALLIONS:
if (CheckMedallionCount() >= Randomizer_GetSettingValue(RSK_LACS_MEDALLION_COUNT)) { if (CheckMedallionCount() >= Randomizer_GetSettingValue(RSK_LACS_MEDALLION_COUNT)) {
meetsRequirements = true; meetsRequirements = true;
} }
break; break;
case 8: case RO_GANON_BOSS_KEY_LACS_STONES:
if (CheckStoneCount() >= Randomizer_GetSettingValue(RSK_LACS_STONE_COUNT)) { if (CheckStoneCount() >= Randomizer_GetSettingValue(RSK_LACS_STONE_COUNT)) {
meetsRequirements = true; meetsRequirements = true;
} }
break; break;
case 9: case RO_GANON_BOSS_KEY_LACS_REWARDS:
if ((CheckMedallionCount() + CheckStoneCount()) >= Randomizer_GetSettingValue(RSK_LACS_REWARD_COUNT)) { if ((CheckMedallionCount() + CheckStoneCount()) >= Randomizer_GetSettingValue(RSK_LACS_REWARD_COUNT)) {
meetsRequirements = true; meetsRequirements = true;
} }
break; break;
case 10: case RO_GANON_BOSS_KEY_LACS_DUNGEONS:
if (CheckDungeonCount() >= Randomizer_GetSettingValue(RSK_LACS_DUNGEON_COUNT)) { if (CheckDungeonCount() >= Randomizer_GetSettingValue(RSK_LACS_DUNGEON_COUNT)) {
meetsRequirements = true; meetsRequirements = true;
} }
break; break;
case 11: case RO_GANON_BOSS_KEY_LACS_TOKENS:
if (gSaveContext.inventory.gsTokens >= Randomizer_GetSettingValue(RSK_LACS_TOKEN_COUNT)) { if (gSaveContext.inventory.gsTokens >= Randomizer_GetSettingValue(RSK_LACS_TOKEN_COUNT)) {
meetsRequirements = true; meetsRequirements = true;
} }
@ -556,7 +556,7 @@ void Play_Init(GameState* thisx) {
if (CVar_GetS32("gSceneTransitions", 255)!= 255){ if (CVar_GetS32("gSceneTransitions", 255)!= 255){
play->transitionMode = CVar_GetS32("gSceneTransitions", 0); play->transitionMode = CVar_GetS32("gSceneTransitions", 0);
gSaveContext.nextTransition = CVar_GetS32("gSceneTransitions", 0); gSaveContext.nextTransitionType = CVar_GetS32("gSceneTransitions", 0);
play->fadeTransition = CVar_GetS32("gSceneTransitions", 0); play->fadeTransition = CVar_GetS32("gSceneTransitions", 0);
} }
@ -571,12 +571,12 @@ void Play_Init(GameState* thisx) {
play->unk_11DE9 = 0; play->unk_11DE9 = 0;
if (gSaveContext.gameMode != 1) { if (gSaveContext.gameMode != 1) {
if (gSaveContext.nextTransition == 0xFF) { if (gSaveContext.nextTransitionType == 0xFF) {
play->fadeTransition = play->fadeTransition =
(gEntranceTable[((void)0, gSaveContext.entranceIndex) + tempSetupIndex].field >> 7) & 0x7F; // Fade In (gEntranceTable[((void)0, gSaveContext.entranceIndex) + tempSetupIndex].field >> 7) & 0x7F; // Fade In
} else { } else {
play->fadeTransition = gSaveContext.nextTransition; play->fadeTransition = gSaveContext.nextTransitionType;
gSaveContext.nextTransition = 0xFF; gSaveContext.nextTransitionType = 0xFF;
} }
} else { } else {
play->fadeTransition = 6; play->fadeTransition = 6;
@ -704,9 +704,9 @@ void Play_Update(PlayState* play) {
if (CHECK_BTN_ALL(input[0].press.button, BTN_A)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_A]++;} if (CHECK_BTN_ALL(input[0].press.button, BTN_A)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_A]++;}
if (CHECK_BTN_ALL(input[0].press.button, BTN_B)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_B]++;} if (CHECK_BTN_ALL(input[0].press.button, BTN_B)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_B]++;}
if (CHECK_BTN_ALL(input[0].press.button, BTN_CUP)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_CUP]++;} if (CHECK_BTN_ALL(input[0].press.button, BTN_CUP)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_CUP]++;}
if (CHECK_BTN_ALL(input[0].press.button, BTN_CRIGHT)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_CLEFT]++;} if (CHECK_BTN_ALL(input[0].press.button, BTN_CRIGHT)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_CRIGHT]++;}
if (CHECK_BTN_ALL(input[0].press.button, BTN_CLEFT)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_CDOWN]++;} if (CHECK_BTN_ALL(input[0].press.button, BTN_CLEFT)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_CLEFT]++;}
if (CHECK_BTN_ALL(input[0].press.button, BTN_CDOWN)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_CRIGHT]++;} if (CHECK_BTN_ALL(input[0].press.button, BTN_CDOWN)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_CDOWN]++;}
if (CHECK_BTN_ALL(input[0].press.button, BTN_DUP)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_DUP]++;} if (CHECK_BTN_ALL(input[0].press.button, BTN_DUP)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_DUP]++;}
if (CHECK_BTN_ALL(input[0].press.button, BTN_DRIGHT)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_DRIGHT]++;} if (CHECK_BTN_ALL(input[0].press.button, BTN_DRIGHT)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_DRIGHT]++;}
if (CHECK_BTN_ALL(input[0].press.button, BTN_DDOWN)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_DDOWN]++;} if (CHECK_BTN_ALL(input[0].press.button, BTN_DDOWN)) {gSaveContext.sohStats.count[COUNT_BUTTON_PRESSES_DDOWN]++;}
@ -777,21 +777,21 @@ void Play_Update(PlayState* play) {
play->transitionCtx.transitionType | 0x80); play->transitionCtx.transitionType | 0x80);
} }
gSaveContext.unk_1419 = 14; gSaveContext.transWipeSpeed = 14;
if ((play->transitionCtx.transitionType == 8) || if ((play->transitionCtx.transitionType == 8) ||
(play->transitionCtx.transitionType == 9)) { (play->transitionCtx.transitionType == 9)) {
gSaveContext.unk_1419 = 28; gSaveContext.transWipeSpeed = 28;
} }
gSaveContext.fadeDuration = 60; gSaveContext.transFadeDuration = 60;
if ((play->transitionCtx.transitionType == 4) || if ((play->transitionCtx.transitionType == 4) ||
(play->transitionCtx.transitionType == 5)) { (play->transitionCtx.transitionType == 5)) {
gSaveContext.fadeDuration = 20; gSaveContext.transFadeDuration = 20;
} else if ((play->transitionCtx.transitionType == 6) || } else if ((play->transitionCtx.transitionType == 6) ||
(play->transitionCtx.transitionType == 7)) { (play->transitionCtx.transitionType == 7)) {
gSaveContext.fadeDuration = 150; gSaveContext.transFadeDuration = 150;
} else if (play->transitionCtx.transitionType == 17) { } else if (play->transitionCtx.transitionType == 17) {
gSaveContext.fadeDuration = 2; gSaveContext.transFadeDuration = 2;
} }
if ((play->transitionCtx.transitionType == 3) || if ((play->transitionCtx.transitionType == 3) ||
@ -954,7 +954,7 @@ void Play_Update(PlayState* play) {
break; break;
case 11: case 11:
if (gSaveContext.unk_1410 != 0) { if (gSaveContext.cutsceneTransitionControl != 0) {
play->transitionMode = 3; play->transitionMode = 3;
} }
break; break;
@ -1029,9 +1029,9 @@ void Play_Update(PlayState* play) {
break; break;
case 17: case 17:
if (gSaveContext.unk_1410 != 0) { if (gSaveContext.cutsceneTransitionControl != 0) {
play->envCtx.screenFillColor[3] = gSaveContext.unk_1410; play->envCtx.screenFillColor[3] = gSaveContext.cutsceneTransitionControl;
if (gSaveContext.unk_1410 < 0x65) { if (gSaveContext.cutsceneTransitionControl < 0x65) {
gTrnsnUnkState = 0; gTrnsnUnkState = 0;
R_UPDATE_RATE = 3; R_UPDATE_RATE = 3;
play->sceneLoadFlag = 0; play->sceneLoadFlag = 0;
@ -1369,7 +1369,7 @@ void Play_Draw(PlayState* play) {
gSPSegment(POLY_XLU_DISP++, 0x02, play->sceneSegment); gSPSegment(POLY_XLU_DISP++, 0x02, play->sceneSegment);
gSPSegment(OVERLAY_DISP++, 0x02, play->sceneSegment); gSPSegment(OVERLAY_DISP++, 0x02, play->sceneSegment);
func_80095248(gfxCtx, 0, 0, 0); Gfx_SetupFrame(gfxCtx, 0, 0, 0);
if ((HREG(80) != 10) || (HREG(82) != 0)) { if ((HREG(80) != 10) || (HREG(82) != 0)) {
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
@ -2177,11 +2177,11 @@ void Play_PerformSave(PlayState* play) {
gSaveContext.savedSceneNum = play->sceneNum; gSaveContext.savedSceneNum = play->sceneNum;
if (gSaveContext.temporaryWeapon) { if (gSaveContext.temporaryWeapon) {
gSaveContext.equips.buttonItems[0] = ITEM_NONE; gSaveContext.equips.buttonItems[0] = ITEM_NONE;
GET_PLAYER(play)->currentSwordItem = ITEM_NONE; GET_PLAYER(play)->currentSwordItemId = ITEM_NONE;
Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_NONE); Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_NONE);
Save_SaveFile(); Save_SaveFile();
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_KOKIRI; gSaveContext.equips.buttonItems[0] = ITEM_SWORD_KOKIRI;
GET_PLAYER(play)->currentSwordItem = ITEM_SWORD_KOKIRI; GET_PLAYER(play)->currentSwordItemId = ITEM_SWORD_KOKIRI;
Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_KOKIRI); Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_KOKIRI);
} else { } else {
Save_SaveFile(); Save_SaveFile();

View File

@ -332,7 +332,7 @@ void Player_SetBootData(PlayState* play, Player* this) {
s32 Player_InBlockingCsMode(PlayState* play, Player* this) { s32 Player_InBlockingCsMode(PlayState* play, Player* this) {
return (this->stateFlags1 & 0x20000080) || (this->csMode != 0) || (play->sceneLoadFlag == 0x14) || return (this->stateFlags1 & 0x20000080) || (this->csMode != 0) || (play->sceneLoadFlag == 0x14) ||
(this->stateFlags1 & 1) || (this->stateFlags3 & 0x80) || (this->stateFlags1 & 1) || (this->stateFlags3 & 0x80) ||
((gSaveContext.unk_13F0 != 0) && (Player_ActionToMagicSpell(this, this->itemActionParam) >= 0)); ((gSaveContext.magicState != 0) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0));
} }
s32 Player_InCsMode(PlayState* play) { s32 Player_InCsMode(PlayState* play) {
@ -361,8 +361,8 @@ s32 Player_ActionToModelGroup(Player* this, s32 actionParam) {
void Player_SetModelsForHoldingShield(Player* this) { void Player_SetModelsForHoldingShield(Player* this) {
if ((this->stateFlags1 & 0x400000) && if ((this->stateFlags1 & 0x400000) &&
((this->itemActionParam < 0) || (this->itemActionParam == this->heldItemActionParam))) { ((this->itemAction < 0) || (this->itemAction == this->heldItemAction))) {
if ((CVar_GetS32("gShieldTwoHanded", 0) && (this->heldItemActionParam != PLAYER_AP_STICK) || if ((CVar_GetS32("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_STICK) ||
!Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) { !Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) {
this->rightHandType = 10; this->rightHandType = 10;
this->rightHandDLists = &sPlayerDListGroups[10][gSaveContext.linkAge]; this->rightHandDLists = &sPlayerDListGroups[10][gSaveContext.linkAge];
@ -373,7 +373,7 @@ void Player_SetModelsForHoldingShield(Player* this) {
} }
this->sheathDLists = &sPlayerDListGroups[this->sheathType][gSaveContext.linkAge]; this->sheathDLists = &sPlayerDListGroups[this->sheathType][gSaveContext.linkAge];
this->modelAnimType = 2; this->modelAnimType = 2;
this->itemActionParam = -1; this->itemAction = -1;
} }
} }
} }
@ -408,8 +408,8 @@ void Player_SetModelGroup(Player* this, s32 modelGroup) {
} }
void func_8008EC70(Player* this) { void func_8008EC70(Player* this) {
this->itemActionParam = this->heldItemActionParam; this->itemAction = this->heldItemAction;
Player_SetModelGroup(this, Player_ActionToModelGroup(this, this->heldItemActionParam)); Player_SetModelGroup(this, Player_ActionToModelGroup(this, this->heldItemAction));
this->unk_6AD = 0; this->unk_6AD = 0;
} }
@ -418,8 +418,8 @@ void Player_SetEquipmentData(PlayState* play, Player* this) {
this->currentShield = CUR_EQUIP_VALUE(EQUIP_SHIELD); this->currentShield = CUR_EQUIP_VALUE(EQUIP_SHIELD);
this->currentTunic = CUR_EQUIP_VALUE(EQUIP_TUNIC) - 1; this->currentTunic = CUR_EQUIP_VALUE(EQUIP_TUNIC) - 1;
this->currentBoots = CUR_EQUIP_VALUE(EQUIP_BOOTS) - 1; this->currentBoots = CUR_EQUIP_VALUE(EQUIP_BOOTS) - 1;
this->currentSwordItem = B_BTN_ITEM; this->currentSwordItemId = B_BTN_ITEM;
Player_SetModelGroup(this, Player_ActionToModelGroup(this, this->heldItemActionParam)); Player_SetModelGroup(this, Player_ActionToModelGroup(this, this->heldItemAction));
Player_SetBootData(play, this); Player_SetBootData(play, this);
} }
} }
@ -429,10 +429,10 @@ void Player_UpdateBottleHeld(PlayState* play, Player* this, s32 item, s32 action
if (item != ITEM_BOTTLE) { if (item != ITEM_BOTTLE) {
this->heldItemId = item; this->heldItemId = item;
this->heldItemActionParam = actionParam; this->heldItemAction = actionParam;
} }
this->itemActionParam = actionParam; this->itemAction = actionParam;
} }
void func_8008EDF0(Player* this) { void func_8008EDF0(Player* this) {
@ -478,8 +478,8 @@ s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 y
Vec3f diff; Vec3f diff;
s32 pad; s32 pad;
if ((this->heldItemActionParam == PLAYER_AP_STICK) && (this->unk_860 != 0)) { if ((this->heldItemAction == PLAYER_IA_STICK) && (this->unk_860 != 0)) {
Math_Vec3f_Diff(&this->swordInfo[0].tip, pos, &diff); Math_Vec3f_Diff(&this->meleeWeaponInfo[0].tip, pos, &diff);
return ((SQ(diff.x) + SQ(diff.z)) <= SQ(xzRange)) && (0.0f <= diff.y) && (diff.y <= yRange); return ((SQ(diff.x) + SQ(diff.z)) <= SQ(xzRange)) && (0.0f <= diff.y) && (diff.y <= yRange);
} else { } else {
return false; return false;
@ -525,7 +525,7 @@ s32 Player_HasMirrorShieldSetToDraw(PlayState* play) {
} }
s32 Player_ActionToMagicSpell(Player* this, s32 actionParam) { s32 Player_ActionToMagicSpell(Player* this, s32 actionParam) {
s32 magicSpell = actionParam - PLAYER_AP_MAGIC_SPELL_15; s32 magicSpell = actionParam - PLAYER_IA_MAGIC_SPELL_15;
if ((magicSpell >= 0) && (magicSpell < 6)) { if ((magicSpell >= 0) && (magicSpell < 6)) {
return magicSpell; return magicSpell;
@ -535,7 +535,7 @@ s32 Player_ActionToMagicSpell(Player* this, s32 actionParam) {
} }
s32 Player_HoldsHookshot(Player* this) { s32 Player_HoldsHookshot(Player* this) {
return (this->heldItemActionParam == PLAYER_AP_HOOKSHOT) || (this->heldItemActionParam == PLAYER_AP_LONGSHOT); return (this->heldItemAction == PLAYER_IA_HOOKSHOT) || (this->heldItemAction == PLAYER_IA_LONGSHOT);
} }
s32 func_8008F128(Player* this) { s32 func_8008F128(Player* this) {
@ -543,7 +543,7 @@ s32 func_8008F128(Player* this) {
} }
s32 Player_ActionToSword(s32 actionParam) { s32 Player_ActionToSword(s32 actionParam) {
s32 sword = actionParam - PLAYER_AP_FISHING_POLE; s32 sword = actionParam - PLAYER_IA_FISHING_POLE;
if ((sword > 0) && (sword < 6)) { if ((sword > 0) && (sword < 6)) {
return sword; return sword;
@ -553,11 +553,11 @@ s32 Player_ActionToSword(s32 actionParam) {
} }
s32 Player_GetSwordHeld(Player* this) { s32 Player_GetSwordHeld(Player* this) {
return Player_ActionToSword(this->heldItemActionParam); return Player_ActionToSword(this->heldItemAction);
} }
s32 Player_HoldsTwoHandedWeapon(Player* this) { s32 Player_HoldsTwoHandedWeapon(Player* this) {
if ((this->heldItemActionParam >= PLAYER_AP_SWORD_BGS) && (this->heldItemActionParam <= PLAYER_AP_HAMMER)) { if ((this->heldItemAction >= PLAYER_IA_SWORD_BGS) && (this->heldItemAction <= PLAYER_IA_HAMMER)) {
return 1; return 1;
} else { } else {
return 0; return 0;
@ -565,11 +565,11 @@ s32 Player_HoldsTwoHandedWeapon(Player* this) {
} }
s32 Player_HoldsBrokenKnife(Player* this) { s32 Player_HoldsBrokenKnife(Player* this) {
return (this->heldItemActionParam == PLAYER_AP_SWORD_BGS) && (gSaveContext.swordHealth <= 0.0f); return (this->heldItemAction == PLAYER_IA_SWORD_BGS) && (gSaveContext.swordHealth <= 0.0f);
} }
s32 Player_ActionToBottle(Player* this, s32 actionParam) { s32 Player_ActionToBottle(Player* this, s32 actionParam) {
s32 bottle = actionParam - PLAYER_AP_BOTTLE; s32 bottle = actionParam - PLAYER_IA_BOTTLE;
if ((bottle >= 0) && (bottle < 13)) { if ((bottle >= 0) && (bottle < 13)) {
return bottle; return bottle;
@ -579,11 +579,11 @@ s32 Player_ActionToBottle(Player* this, s32 actionParam) {
} }
s32 Player_GetBottleHeld(Player* this) { s32 Player_GetBottleHeld(Player* this) {
return Player_ActionToBottle(this, this->heldItemActionParam); return Player_ActionToBottle(this, this->heldItemAction);
} }
s32 Player_ActionToExplosive(Player* this, s32 actionParam) { s32 Player_ActionToExplosive(Player* this, s32 actionParam) {
s32 explosive = actionParam - PLAYER_AP_BOMB; s32 explosive = actionParam - PLAYER_IA_BOMB;
if ((explosive >= 0) && (explosive < 2)) { if ((explosive >= 0) && (explosive < 2)) {
return explosive; return explosive;
@ -593,14 +593,14 @@ s32 Player_ActionToExplosive(Player* this, s32 actionParam) {
} }
s32 Player_GetExplosiveHeld(Player* this) { s32 Player_GetExplosiveHeld(Player* this) {
return Player_ActionToExplosive(this, this->heldItemActionParam); return Player_ActionToExplosive(this, this->heldItemAction);
} }
s32 func_8008F2BC(Player* this, s32 actionParam) { s32 func_8008F2BC(Player* this, s32 actionParam) {
s32 sword = 0; s32 sword = 0;
if (actionParam != PLAYER_AP_LAST_USED) { if (actionParam != PLAYER_IA_LAST_USED) {
sword = actionParam - PLAYER_AP_SWORD_MASTER; sword = actionParam - PLAYER_IA_SWORD_MASTER;
if ((sword < 0) || (sword >= 3)) { if ((sword < 0) || (sword >= 3)) {
goto return_neg; goto return_neg;
} }
@ -857,7 +857,7 @@ void func_8008F87C(PlayState* play, Player* this, SkelAnime* skelAnime, Vec3f* p
s32 temp3; s32 temp3;
if ((this->actor.scale.y >= 0.0f) && !(this->stateFlags1 & 0x80) && if ((this->actor.scale.y >= 0.0f) && !(this->stateFlags1 & 0x80) &&
(Player_ActionToMagicSpell(this, this->itemActionParam) < 0)) { (Player_ActionToMagicSpell(this, this->itemAction) < 0)) {
s32 pad; s32 pad;
sp7C = D_80126058[gSaveContext.linkAge]; sp7C = D_80126058[gSaveContext.linkAge];
@ -931,7 +931,7 @@ s32 func_8008FCC8(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s
if (limbIndex == PLAYER_LIMB_ROOT) { if (limbIndex == PLAYER_LIMB_ROOT) {
D_80160014 = this->leftHandType; D_80160014 = this->leftHandType;
D_80160018 = this->rightHandType; D_80160018 = this->rightHandType;
D_80160000 = &this->swordInfo[2].base; D_80160000 = &this->meleeWeaponInfo[2].base;
if (!LINK_IS_ADULT) { if (!LINK_IS_ADULT) {
if (!(this->skelAnime.moveFlags & 4) || (this->skelAnime.moveFlags & 1)) { if (!(this->skelAnime.moveFlags & 4) || (this->skelAnime.moveFlags & 1)) {
@ -1157,15 +1157,15 @@ void func_800906D4(PlayState* play, Player* this, Vec3f* newTipPos) {
Matrix_MultVec3f(&D_801260A4[1], &newBasePos[1]); Matrix_MultVec3f(&D_801260A4[1], &newBasePos[1]);
Matrix_MultVec3f(&D_801260A4[2], &newBasePos[2]); Matrix_MultVec3f(&D_801260A4[2], &newBasePos[2]);
if (func_80090480(play, NULL, &this->swordInfo[0], &newTipPos[0], &newBasePos[0]) && if (func_80090480(play, NULL, &this->meleeWeaponInfo[0], &newTipPos[0], &newBasePos[0]) &&
!(this->stateFlags1 & 0x400000)) { !(this->stateFlags1 & 0x400000)) {
EffectBlure_AddVertex(Effect_GetByIndex(this->swordEffectIndex), &this->swordInfo[0].tip, EffectBlure_AddVertex(Effect_GetByIndex(this->meleeWeaponEffectIndex), &this->meleeWeaponInfo[0].tip,
&this->swordInfo[0].base); &this->meleeWeaponInfo[0].base);
} }
if ((this->swordState > 0) && ((this->swordAnimation < 0x18) || (this->stateFlags2 & 0x20000))) { if ((this->swordState > 0) && ((this->meleeWeaponAnimation < 0x18) || (this->stateFlags2 & 0x20000))) {
func_80090480(play, &this->swordQuads[0], &this->swordInfo[1], &newTipPos[1], &newBasePos[1]); func_80090480(play, &this->meleeWeaponQuads[0], &this->meleeWeaponInfo[1], &newTipPos[1], &newBasePos[1]);
func_80090480(play, &this->swordQuads[1], &this->swordInfo[2], &newTipPos[2], &newBasePos[2]); func_80090480(play, &this->meleeWeaponQuads[1], &this->meleeWeaponInfo[2], &newTipPos[2], &newBasePos[2]);
} }
} }
@ -1240,7 +1240,7 @@ void Player_DrawHookshotReticle(PlayState* play, Player* this, f32 arg2) {
if (BgCheck_AnyLineTest3(&play->colCtx, &sp8C, &sp80, &sp74, &sp9C, 1, 1, 1, 1, &bgId)) { if (BgCheck_AnyLineTest3(&play->colCtx, &sp8C, &sp80, &sp74, &sp9C, 1, 1, 1, 1, &bgId)) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
WORLD_OVERLAY_DISP = Gfx_CallSetupDL(WORLD_OVERLAY_DISP, 0x07); WORLD_OVERLAY_DISP = Gfx_SetupDL(WORLD_OVERLAY_DISP, 0x07);
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &sp74, &sp68, &sp64); SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &sp74, &sp68, &sp64);
@ -1321,7 +1321,7 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void
Math_Vec3f_Copy(&this->leftHandPos, D_80160000); Math_Vec3f_Copy(&this->leftHandPos, D_80160000);
if (this->itemActionParam == PLAYER_AP_STICK) { if (this->itemAction == PLAYER_IA_STICK) {
Vec3f sp124[3]; Vec3f sp124[3];
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
@ -1330,10 +1330,10 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void
D_80126080.x = this->unk_85C * 5000.0f; D_80126080.x = this->unk_85C * 5000.0f;
func_80090A28(this, sp124); func_80090A28(this, sp124);
if (this->swordState != 0) { if (this->swordState != 0) {
EffectBlure_ChangeType(Effect_GetByIndex(this->swordEffectIndex), 7); // default sword type EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), 7); // default sword type
func_800906D4(play, this, sp124); func_800906D4(play, this, sp124);
} else { } else {
Math_Vec3f_Copy(&this->swordInfo[0].tip, &sp124[0]); Math_Vec3f_Copy(&this->meleeWeaponInfo[0].tip, &sp124[0]);
} }
} }
@ -1354,15 +1354,15 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void
} else { } else {
D_80126080.x = sSwordLengths[Player_GetSwordHeld(this)]; D_80126080.x = sSwordLengths[Player_GetSwordHeld(this)];
if (CVar_GetS32("gSeperateSwords", 0) != 0) if (CVar_GetS32("gSeperateSwords", 0) != 0)
EffectBlure_ChangeType(Effect_GetByIndex(this->swordEffectIndex), sSwordTypes[Player_GetSwordHeld(this)]); EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), sSwordTypes[Player_GetSwordHeld(this)]);
else else
EffectBlure_ChangeType(Effect_GetByIndex(this->swordEffectIndex),1); //default sword type EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex),1); //default sword type
} }
func_80090A28(this, spE4); func_80090A28(this, spE4);
func_800906D4(play, this, spE4); func_800906D4(play, this, spE4);
} else if ((*dList != NULL) && (this->leftHandType == 7)) { } else if ((*dList != NULL) && (this->leftHandType == 7)) {
Color_RGB8* bottleColor = &sBottleColors[Player_ActionToBottle(this, this->itemActionParam)]; Color_RGB8* bottleColor = &sBottleColors[Player_ActionToBottle(this, this->itemAction)];
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
@ -1451,8 +1451,8 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void
} }
if (this->actor.scale.y >= 0.0f) { if (this->actor.scale.y >= 0.0f) {
if ((this->heldItemActionParam == PLAYER_AP_HOOKSHOT) || if ((this->heldItemAction == PLAYER_IA_HOOKSHOT) ||
(this->heldItemActionParam == PLAYER_AP_LONGSHOT)) { (this->heldItemAction == PLAYER_IA_LONGSHOT)) {
Matrix_MultVec3f(&D_80126184, &this->unk_3C8); Matrix_MultVec3f(&D_80126184, &this->unk_3C8);
if (heldActor != NULL) { if (heldActor != NULL) {
@ -1468,7 +1468,7 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void
if (func_8002DD78(this) != 0) { if (func_8002DD78(this) != 0) {
Matrix_Translate(500.0f, 300.0f, 0.0f, MTXMODE_APPLY); Matrix_Translate(500.0f, 300.0f, 0.0f, MTXMODE_APPLY);
Player_DrawHookshotReticle( Player_DrawHookshotReticle(
play, this, (this->heldItemActionParam == PLAYER_AP_HOOKSHOT) ? 38600.0f : 77600.0f); play, this, (this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f);
} }
} }
} }

View File

@ -33,8 +33,8 @@ void PreNMI_Draw(PreNMIContext* this) {
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x00, NULL); gSPSegment(POLY_OPA_DISP++, 0x00, NULL);
func_80095248(gfxCtx, 0, 0, 0); Gfx_SetupFrame(gfxCtx, 0, 0, 0);
func_800940B0(gfxCtx); Gfx_SetupDL_36Opa(gfxCtx);
gDPSetFillColor(POLY_OPA_DISP++, (GPACK_RGBA5551(255, 255, 255, 1) << 16) | GPACK_RGBA5551(255, 255, 255, 1)); gDPSetFillColor(POLY_OPA_DISP++, (GPACK_RGBA5551(255, 255, 255, 1) << 16) | GPACK_RGBA5551(255, 255, 255, 1));
gDPFillRectangle(POLY_OPA_DISP++, 0, this->timer + 100, SCREEN_WIDTH - 1, this->timer + 100); gDPFillRectangle(POLY_OPA_DISP++, 0, this->timer + 100, SCREEN_WIDTH - 1, this->timer + 100);

File diff suppressed because it is too large Load Diff

View File

@ -49,7 +49,7 @@ void func_80095AB4(PlayState* play, Room* room, u32 flags) {
if (flags & 2) { if (flags & 2) {
func_8003435C(&D_801270A0, play); func_8003435C(&D_801270A0, play);
gSPSegment(POLY_XLU_DISP++, 0x03, room->segment); gSPSegment(POLY_XLU_DISP++, 0x03, room->segment);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
} }
@ -109,7 +109,7 @@ void func_80095D04(PlayState* play, Room* room, u32 flags) {
if (flags & 2) { if (flags & 2) {
func_8003435C(&D_801270A0, play); func_8003435C(&D_801270A0, play);
//gSPSegment(POLY_XLU_DISP++, 0x03, room->segment); //gSPSegment(POLY_XLU_DISP++, 0x03, room->segment);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
} }
@ -356,7 +356,7 @@ void func_80096680(PlayState* play, Room* room, u32 flags) {
gSPSegment(POLY_OPA_DISP++, 0x03, room->segment); gSPSegment(POLY_OPA_DISP++, 0x03, room->segment);
if (sp94) { if (sp94) {
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, polygonDlist->opa); gSPDisplayList(POLY_OPA_DISP++, polygonDlist->opa);
} }
@ -383,7 +383,7 @@ void func_80096680(PlayState* play, Room* room, u32 flags) {
if (sp90) { if (sp90) {
gSPSegment(POLY_XLU_DISP++, 0x03, room->segment); gSPSegment(POLY_XLU_DISP++, 0x03, room->segment);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, polygonDlist->xlu); gSPDisplayList(POLY_XLU_DISP++, polygonDlist->xlu);
} }
@ -458,7 +458,7 @@ void func_80096B6C(PlayState* play, Room* room, u32 flags) {
gSPSegment(POLY_OPA_DISP++, 0x03, room->segment); gSPSegment(POLY_OPA_DISP++, 0x03, room->segment);
if (sp90) { if (sp90) {
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_OPA_DISP++, polygonDlist->opa); gSPDisplayList(POLY_OPA_DISP++, polygonDlist->opa);
} }
@ -484,7 +484,7 @@ void func_80096B6C(PlayState* play, Room* room, u32 flags) {
if (sp8C) { if (sp8C) {
gSPSegment(POLY_XLU_DISP++, 0x03, room->segment); gSPSegment(POLY_XLU_DISP++, 0x03, room->segment);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(POLY_XLU_DISP++, polygonDlist->xlu); gSPDisplayList(POLY_XLU_DISP++, polygonDlist->xlu);
} }

View File

@ -16,7 +16,7 @@ void Sample_Draw(SampleContext* this) {
gSPSegment(POLY_OPA_DISP++, 0x00, NULL); gSPSegment(POLY_OPA_DISP++, 0x00, NULL);
gSPSegment(POLY_OPA_DISP++, 0x01, this->staticSegment); gSPSegment(POLY_OPA_DISP++, 0x01, this->staticSegment);
func_80095248(gfxCtx, 0, 0, 0); Gfx_SetupFrame(gfxCtx, 0, 0, 0);
view->flags = 1 | 2 | 4; view->flags = 1 | 2 | 4;
func_800AAA50(view, 15); func_800AAA50(view, 15);
@ -29,7 +29,7 @@ void Sample_Draw(SampleContext* this) {
} }
POLY_OPA_DISP = Gfx_SetFog2(POLY_OPA_DISP, 255, 255, 255, 0, 0, 0); POLY_OPA_DISP = Gfx_SetFog2(POLY_OPA_DISP, 255, 255, 255, 0, 0, 0);
func_80093D18(gfxCtx); Gfx_SetupDL_25Opa(gfxCtx);
gDPSetCycleType(POLY_OPA_DISP++, G_CYC_1CYCLE); gDPSetCycleType(POLY_OPA_DISP++, G_CYC_1CYCLE);
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); gDPSetRenderMode(POLY_OPA_DISP++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);

View File

@ -97,7 +97,7 @@ void GiveLinkDekuNuts(int howManyNuts) {
} }
void GiveLinksPocketItem() { void GiveLinksPocketItem() {
if (Randomizer_GetSettingValue(RSK_LINKS_POCKET) < 3) { if (Randomizer_GetSettingValue(RSK_LINKS_POCKET) != RO_LINKS_POCKET_NOTHING) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LINKS_POCKET, RG_NONE); GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LINKS_POCKET, RG_NONE);
if (getItemEntry.modIndex == MOD_NONE) { if (getItemEntry.modIndex == MOD_NONE) {
@ -217,14 +217,14 @@ void Sram_OpenSave() {
gSaveContext.health = 0x30; gSaveContext.health = 0x30;
} }
if (gSaveContext.scarecrowCustomSongSet) { if (gSaveContext.scarecrowLongSongSet) {
osSyncPrintf(VT_FGCOL(BLUE)); osSyncPrintf(VT_FGCOL(BLUE));
osSyncPrintf("\n====================================================================\n"); osSyncPrintf("\n====================================================================\n");
memcpy(gScarecrowCustomSongPtr, gSaveContext.scarecrowCustomSong, sizeof(gSaveContext.scarecrowCustomSong)); memcpy(gScarecrowCustomSongPtr, gSaveContext.scarecrowLongSong, sizeof(gSaveContext.scarecrowLongSong));
ptr = (u8*)gScarecrowCustomSongPtr; ptr = (u8*)gScarecrowCustomSongPtr;
for (i = 0; i < ARRAY_COUNT(gSaveContext.scarecrowCustomSong); i++, ptr++) { for (i = 0; i < ARRAY_COUNT(gSaveContext.scarecrowLongSong); i++, ptr++) {
osSyncPrintf("%d, ", *ptr); osSyncPrintf("%d, ", *ptr);
} }
@ -372,15 +372,15 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
int openForest = Randomizer_GetSettingValue(RSK_FOREST); int openForest = Randomizer_GetSettingValue(RSK_FOREST);
switch (openForest) { switch (openForest) {
case 0: // closed case RO_FOREST_CLOSED:
break; break;
case 1: // open case RO_FOREST_CLOSED_DEKU:
Flags_SetEventChkInf(7);
break;
case RO_FOREST_OPEN:
Flags_SetEventChkInf(7); Flags_SetEventChkInf(7);
gSaveContext.eventChkInf[0] |= 0x10; gSaveContext.eventChkInf[0] |= 0x10;
break; break;
case 2: // closed deku
Flags_SetEventChkInf(7);
break;
} }
int startingAge = Randomizer_GetSettingValue(RSK_STARTING_AGE); int startingAge = Randomizer_GetSettingValue(RSK_STARTING_AGE);
@ -399,16 +399,13 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
int doorOfTime = Randomizer_GetSettingValue(RSK_DOOR_OF_TIME); int doorOfTime = Randomizer_GetSettingValue(RSK_DOOR_OF_TIME);
switch (doorOfTime) { switch (doorOfTime) {
case 0: // open case RO_DOOROFTIME_OPEN:
gSaveContext.eventChkInf[4] |= 0x800; gSaveContext.eventChkInf[4] |= 0x800;
break; break;
} }
int kakGate = Randomizer_GetSettingValue(RSK_KAK_GATE); if (Randomizer_GetSettingValue(RSK_KAK_GATE) == RO_KAK_GATE_OPEN) {
switch (kakGate) {
case 1: // open
gSaveContext.infTable[7] |= 0x40; gSaveContext.infTable[7] |= 0x40;
break;
} }
if(Randomizer_GetSettingValue(RSK_STARTING_KOKIRI_SWORD)) Item_Give(NULL, ITEM_SWORD_KOKIRI); if(Randomizer_GetSettingValue(RSK_STARTING_KOKIRI_SWORD)) Item_Give(NULL, ITEM_SWORD_KOKIRI);
@ -476,8 +473,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
GiveLinkRupees(9001); GiveLinkRupees(9001);
} }
// "Start with" == 0 for Keysanity if(Randomizer_GetSettingValue(RSK_KEYSANITY) == RO_DUNGEON_ITEM_LOC_STARTWITH) {
if(Randomizer_GetSettingValue(RSK_KEYSANITY) == 0) {
// TODO: If master quest there are different key counts // TODO: If master quest there are different key counts
gSaveContext.inventory.dungeonKeys[SCENE_BMORI1] = FOREST_TEMPLE_SMALL_KEY_MAX; // Forest gSaveContext.inventory.dungeonKeys[SCENE_BMORI1] = FOREST_TEMPLE_SMALL_KEY_MAX; // Forest
gSaveContext.sohStats.dungeonKeys[SCENE_BMORI1] = FOREST_TEMPLE_SMALL_KEY_MAX; // Forest gSaveContext.sohStats.dungeonKeys[SCENE_BMORI1] = FOREST_TEMPLE_SMALL_KEY_MAX; // Forest
@ -506,8 +502,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
gSaveContext.inventory.dungeonItems[SCENE_HAKADAN] |= 1; // Shadow gSaveContext.inventory.dungeonItems[SCENE_HAKADAN] |= 1; // Shadow
} }
// "Start with" == 2 for Ganon's Boss Key if(Randomizer_GetSettingValue(RSK_GANONS_BOSS_KEY) == RO_GANON_BOSS_KEY_STARTWITH) {
if(Randomizer_GetSettingValue(RSK_GANONS_BOSS_KEY) == 2) {
gSaveContext.inventory.dungeonItems[SCENE_GANON] |= 1; gSaveContext.inventory.dungeonItems[SCENE_GANON] |= 1;
} }
@ -539,8 +534,8 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
// skip verbose lake owl, skip to "i'm on my way back to the castle" // skip verbose lake owl, skip to "i'm on my way back to the castle"
gSaveContext.infTable[25] |= 0x20; gSaveContext.infTable[25] |= 0x20;
// fast gerudo fortress if (Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == RO_GF_FAST ||
if (Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == 1 || Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == 2) { Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == RO_GF_OPEN) {
gSaveContext.eventChkInf[9] |= 2; gSaveContext.eventChkInf[9] |= 2;
gSaveContext.eventChkInf[9] |= 4; gSaveContext.eventChkInf[9] |= 4;
gSaveContext.eventChkInf[9] |= 8; gSaveContext.eventChkInf[9] |= 8;
@ -558,8 +553,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
gSaveContext.sceneFlags[12].collect |= (1 << 0x0F); gSaveContext.sceneFlags[12].collect |= (1 << 0x0F);
} }
// open gerudo fortress if (Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == RO_GF_OPEN) {
if (Randomizer_GetSettingValue(RSK_GERUDO_FORTRESS) == 2) {
gSaveContext.eventChkInf[9] |= 1; gSaveContext.eventChkInf[9] |= 1;
gSaveContext.sceneFlags[12].swch |= (1 << 0x01); gSaveContext.sceneFlags[12].swch |= (1 << 0x01);
gSaveContext.sceneFlags[12].swch |= (1 << 0x05); gSaveContext.sceneFlags[12].swch |= (1 << 0x05);

View File

@ -604,7 +604,7 @@ void Skybox_Setup(PlayState* play, SkyboxContext* skyboxCtx, s16 skyboxId) {
{ {
case SKYBOX_NORMAL_SKY: case SKYBOX_NORMAL_SKY:
phi_v1 = 0; phi_v1 = 0;
if (gSaveContext.unk_13C3 != 0 && gSaveContext.sceneSetupIndex < 4 && gWeatherMode > 0 && if (gSaveContext.retainWeatherMode != 0 && gSaveContext.sceneSetupIndex < 4 && gWeatherMode > 0 &&
gWeatherMode < 6) { gWeatherMode < 6) {
phi_v1 = 1; phi_v1 = 1;
} }

View File

@ -17,7 +17,7 @@ void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyb
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);
FrameInterpolation_RecordOpenChild(NULL, FrameInterpolation_GetCameraEpoch()); FrameInterpolation_RecordOpenChild(NULL, FrameInterpolation_GetCameraEpoch());
func_800945A0(gfxCtx); Gfx_SetupDL_40Opa(gfxCtx);
//gsSPShaderTest(POLY_OPA_DISP++); //gsSPShaderTest(POLY_OPA_DISP++);

View File

@ -85,7 +85,7 @@ void ArmsHook_Wait(ArmsHook* this, PlayState* play) {
if (this->actor.parent == NULL) { if (this->actor.parent == NULL) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
// get correct timer length for hookshot or longshot // get correct timer length for hookshot or longshot
s32 length = (player->heldItemActionParam == PLAYER_AP_HOOKSHOT) ? 13 : 26; s32 length = (player->heldItemAction == PLAYER_IA_HOOKSHOT) ? 13 : 26;
ArmsHook_SetupAction(this, ArmsHook_Shoot); ArmsHook_SetupAction(this, ArmsHook_Shoot);
func_8002D9A4(&this->actor, 20.0f); func_8002D9A4(&this->actor, 20.0f);
@ -121,7 +121,7 @@ s32 ArmsHook_CheckForCancel(ArmsHook* this) {
Player* player = (Player*)this->actor.parent; Player* player = (Player*)this->actor.parent;
if (Player_HoldsHookshot(player)) { if (Player_HoldsHookshot(player)) {
if ((player->itemActionParam != player->heldItemActionParam) || (player->actor.flags & ACTOR_FLAG_8) || if ((player->itemAction != player->heldItemAction) || (player->actor.flags & ACTOR_FLAG_8) ||
((player->stateFlags1 & 0x4000080))) { ((player->stateFlags1 & 0x4000080))) {
this->timer = 0; this->timer = 0;
ArmsHook_DetachHookFromActor(this); ArmsHook_DetachHookFromActor(this);
@ -320,7 +320,7 @@ void ArmsHook_Draw(Actor* thisx, PlayState* play) {
} }
func_80090480(play, &this->collider, &this->hookInfo, &sp6C, &sp60); func_80090480(play, &this->collider, &this->hookInfo, &sp6C, &sp60);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gLinkAdultHookshotTipDL); gSPDisplayList(POLY_OPA_DISP++, gLinkAdultHookshotTipDL);

View File

@ -215,7 +215,7 @@ void ArrowFire_Draw(Actor* thisx, PlayState* play2) {
// Draw red effect over the screen when arrow hits // Draw red effect over the screen when arrow hits
if (this->unk_15C > 0) { if (this->unk_15C > 0) {
POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP); POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
if (CVar_GetS32("gUseArrowsCol", 0)) { if (CVar_GetS32("gUseArrowsCol", 0)) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, gDPSetPrimColor(POLY_XLU_DISP++, 0, 0,
(s32)(Arrow_env.r * this->unk_15C) & 0xFF, (s32)(Arrow_env.r * this->unk_15C) & 0xFF,
@ -232,7 +232,7 @@ void ArrowFire_Draw(Actor* thisx, PlayState* play2) {
} }
// Draw fire on the arrow // Draw fire on the arrow
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
if (CVar_GetS32("gUseArrowsCol", 0)) { if (CVar_GetS32("gUseArrowsCol", 0)) {
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, Arrow_col.r, Arrow_col.g, Arrow_col.b, this->alpha); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, Arrow_col.r, Arrow_col.g, Arrow_col.b, this->alpha);
gDPSetEnvColor(POLY_XLU_DISP++, Arrow_env.r, Arrow_env.g, Arrow_env.b, 128); gDPSetEnvColor(POLY_XLU_DISP++, Arrow_env.r, Arrow_env.g, Arrow_env.b, 128);

View File

@ -213,7 +213,7 @@ void ArrowIce_Draw(Actor* thisx, PlayState* play) {
// Draw blue effect over the screen when arrow hits // Draw blue effect over the screen when arrow hits
if (this->unk_164 > 0) { if (this->unk_164 > 0) {
POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP); POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
if (CVar_GetS32("gUseArrowsCol", 0)) { if (CVar_GetS32("gUseArrowsCol", 0)) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, gDPSetPrimColor(POLY_XLU_DISP++, 0, 0,
(s32)(Arrow_env.r * this->unk_164) & 0xFF, (s32)(Arrow_env.r * this->unk_164) & 0xFF,
@ -230,7 +230,7 @@ void ArrowIce_Draw(Actor* thisx, PlayState* play) {
} }
// Draw ice on the arrow // Draw ice on the arrow
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
if (CVar_GetS32("gUseArrowsCol", 0)) { if (CVar_GetS32("gUseArrowsCol", 0)) {
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, Arrow_col.r, Arrow_col.g, Arrow_col.b, this->alpha); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, Arrow_col.r, Arrow_col.g, Arrow_col.b, this->alpha);
gDPSetEnvColor(POLY_XLU_DISP++, Arrow_env.r, Arrow_env.g, Arrow_env.b, 128); gDPSetEnvColor(POLY_XLU_DISP++, Arrow_env.r, Arrow_env.g, Arrow_env.b, 128);

View File

@ -211,7 +211,7 @@ void ArrowLight_Draw(Actor* thisx, PlayState* play) {
// Draw yellow effect over the screen when arrow hits // Draw yellow effect over the screen when arrow hits
if (this->unk_164 > 0) { if (this->unk_164 > 0) {
POLY_XLU_DISP = func_800937C0(POLY_XLU_DISP); POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
if (CVar_GetS32("gUseArrowsCol", 0)) { if (CVar_GetS32("gUseArrowsCol", 0)) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, gDPSetPrimColor(POLY_XLU_DISP++, 0, 0,
(s32)(Arrow_env.r * this->unk_164) & 0xFF, (s32)(Arrow_env.r * this->unk_164) & 0xFF,
@ -228,7 +228,7 @@ void ArrowLight_Draw(Actor* thisx, PlayState* play) {
} }
// Draw light on the arrow // Draw light on the arrow
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
if (CVar_GetS32("gUseArrowsCol", 0)) { if (CVar_GetS32("gUseArrowsCol", 0)) {
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, Arrow_col.r, Arrow_col.g, Arrow_col.b, this->alpha); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, Arrow_col.r, Arrow_col.g, Arrow_col.b, this->alpha);
gDPSetEnvColor(POLY_XLU_DISP++, Arrow_env.r, Arrow_env.g, Arrow_env.b, 128); gDPSetEnvColor(POLY_XLU_DISP++, Arrow_env.r, Arrow_env.g, Arrow_env.b, 128);

View File

@ -203,7 +203,7 @@ void BgBowlWall_Draw(Actor* thisx, PlayState* play2) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x8, gSPSegment(POLY_OPA_DISP++, 0x8,
Gfx_TexScroll(play->state.gfxCtx, 0, -2 * (frames = play->state.frames), 16, 16)); Gfx_TexScroll(play->state.gfxCtx, 0, -2 * (frames = play->state.frames), 16, 16));
gDPPipeSync(POLY_OPA_DISP++); gDPPipeSync(POLY_OPA_DISP++);

View File

@ -343,7 +343,7 @@ void BgBreakwall_Draw(Actor* thisx, PlayState* play) {
if (this->bombableWallDList != NULL) { if (this->bombableWallDList != NULL) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, this->bombableWallDList); gSPDisplayList(POLY_OPA_DISP++, this->bombableWallDList);

View File

@ -312,7 +312,7 @@ void BgDodoago_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
if (Flags_GetEventChkInf(0xB0)) { if (Flags_GetEventChkInf(0xB0)) {
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gDodongoLowerJawDL); gSPDisplayList(POLY_OPA_DISP++, gDodongoLowerJawDL);

View File

@ -209,12 +209,12 @@ void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) {
} }
if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) { if (play->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
if (!gSaveContext.magicAcquired && (this->fountainType != FAIRY_UPGRADE_MAGIC)) { if (!gSaveContext.isMagicAcquired && (this->fountainType != FAIRY_UPGRADE_MAGIC)) {
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
return; return;
} }
} else { } else {
if (!gSaveContext.magicAcquired) { if (!gSaveContext.isMagicAcquired) {
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
return; return;
} }
@ -253,7 +253,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) {
} else { } else {
switch (this->fountainType) { switch (this->fountainType) {
case FAIRY_UPGRADE_MAGIC: case FAIRY_UPGRADE_MAGIC:
if (!gSaveContext.magicAcquired || BREG(2)) { if (!gSaveContext.isMagicAcquired || BREG(2)) {
// "Spin Attack speed UP" // "Spin Attack speed UP"
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 回転切り速度UP ☆☆☆☆☆ \n" VT_RST); osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 回転切り速度UP ☆☆☆☆☆ \n" VT_RST);
this->givingSpell = true; this->givingSpell = true;
@ -261,7 +261,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) {
} }
break; break;
case FAIRY_UPGRADE_DOUBLE_MAGIC: case FAIRY_UPGRADE_DOUBLE_MAGIC:
if (!gSaveContext.doubleMagic) { if (!gSaveContext.isDoubleMagicAcquired) {
// "Magic Meter doubled" // "Magic Meter doubled"
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 魔法ゲージメーター倍増 ☆☆☆☆☆ \n" VT_RST); osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 魔法ゲージメーター倍増 ☆☆☆☆☆ \n" VT_RST);
this->givingSpell = true; this->givingSpell = true;
@ -269,7 +269,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) {
} }
break; break;
case FAIRY_UPGRADE_HALF_DAMAGE: case FAIRY_UPGRADE_HALF_DAMAGE:
if (!gSaveContext.doubleDefense) { if (!gSaveContext.isDoubleDefenseAcquired) {
// "Damage halved" // "Damage halved"
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ ダメージ半減 ☆☆☆☆☆ \n" VT_RST); osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ ダメージ半減 ☆☆☆☆☆ \n" VT_RST);
this->givingSpell = true; this->givingSpell = true;
@ -495,7 +495,7 @@ void BgDyYoseizo_HealPlayer_NoReward(BgDyYoseizo* this, PlayState* play) {
this->refillTimer = 200; this->refillTimer = 200;
} }
if (((gSaveContext.healthCapacity == gSaveContext.health) && (gSaveContext.magic == gSaveContext.unk_13F4)) || if (((gSaveContext.healthCapacity == gSaveContext.health) && (gSaveContext.magic == gSaveContext.magicCapacity)) ||
(this->refillTimer == 1)) { (this->refillTimer == 1)) {
this->healingTimer--; this->healingTimer--;
if (this->healingTimer == 90) { if (this->healingTimer == 90) {
@ -738,21 +738,21 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) {
switch (actionIndex) { switch (actionIndex) {
case FAIRY_UPGRADE_MAGIC: case FAIRY_UPGRADE_MAGIC:
gSaveContext.magicAcquired = true; gSaveContext.isMagicAcquired = true;
gSaveContext.unk_13F6 = 0x30; gSaveContext.magicFillTarget = 0x30;
Interface_ChangeAlpha(9); Interface_ChangeAlpha(9);
break; break;
case FAIRY_UPGRADE_DOUBLE_MAGIC: case FAIRY_UPGRADE_DOUBLE_MAGIC:
if (!gSaveContext.magicAcquired) { if (!gSaveContext.isMagicAcquired) {
gSaveContext.magicAcquired = true; gSaveContext.isMagicAcquired = true;
} }
gSaveContext.doubleMagic = true; gSaveContext.isDoubleMagicAcquired = true;
gSaveContext.unk_13F6 = 0x60; gSaveContext.magicFillTarget = 0x60;
gSaveContext.magicLevel = 0; gSaveContext.magicLevel = 0;
Interface_ChangeAlpha(9); Interface_ChangeAlpha(9);
break; break;
case FAIRY_UPGRADE_HALF_DAMAGE: case FAIRY_UPGRADE_HALF_DAMAGE:
gSaveContext.doubleDefense = true; gSaveContext.isDoubleDefenseAcquired = true;
Interface_ChangeAlpha(9); Interface_ChangeAlpha(9);
break; break;
} }
@ -780,8 +780,8 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) {
itemPos.x, itemPos.y, itemPos.z, 0, 0, 0, sExItemTypes[actionIndex]); itemPos.x, itemPos.y, itemPos.z, 0, 0, 0, sExItemTypes[actionIndex]);
if (this->item != NULL) { if (this->item != NULL) {
if (gSaveContext.magicAcquired == 0) { if (gSaveContext.isMagicAcquired == 0) {
gSaveContext.magicAcquired = 1; gSaveContext.isMagicAcquired = 1;
} else { } else {
Magic_Fill(play); Magic_Fill(play);
} }
@ -922,7 +922,7 @@ void BgDyYoseizo_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
if (this->actionFunc != BgDyYoseizo_Vanish) { if (this->actionFunc != BgDyYoseizo_Vanish) {
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeState])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeState]));
@ -1038,7 +1038,7 @@ void BgDyYoseizo_ParticleDraw(BgDyYoseizo* this, PlayState* play) {
s16 i; s16 i;
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
for (i = 0; i < 200; i++, particle++) { for (i = 0; i < 200; i++, particle++) {
FrameInterpolation_RecordOpenChild(particle, particle->epoch); FrameInterpolation_RecordOpenChild(particle, particle->epoch);

View File

@ -276,7 +276,7 @@ void BgGanonOtyuka_Draw(Actor* thisx, PlayState* play) {
actor = actor->next; actor = actor->next;
} }
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPDisplayList(POLY_OPA_DISP++, sPlatformMaterialDL); gSPDisplayList(POLY_OPA_DISP++, sPlatformMaterialDL);
actor = play->actorCtx.actorLists[ACTORCAT_PROP].head; actor = play->actorCtx.actorLists[ACTORCAT_PROP].head;
@ -330,7 +330,7 @@ void BgGanonOtyuka_Draw(Actor* thisx, PlayState* play) {
actor = actor->next; actor = actor->next;
} }
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
actor = play->actorCtx.actorLists[ACTORCAT_PROP].head; actor = play->actorCtx.actorLists[ACTORCAT_PROP].head;
while (actor != NULL) { while (actor != NULL) {
if (actor->id == ACTOR_BG_GANON_OTYUKA) { if (actor->id == ACTOR_BG_GANON_OTYUKA) {

View File

@ -46,7 +46,7 @@ void BgGateShutter_Init(Actor* thisx, PlayState* play) {
this->somePos.z = thisx->world.pos.z; this->somePos.z = thisx->world.pos.z;
if (((gSaveContext.infTable[7] & 0x40) || if (((gSaveContext.infTable[7] & 0x40) ||
(!gSaveContext.n64ddFlag && (gSaveContext.eventChkInf[4] & 0x20)) || (!gSaveContext.n64ddFlag && (gSaveContext.eventChkInf[4] & 0x20)) ||
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_KAK_GATE))) && (gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_KAK_GATE) == RO_KAK_GATE_OPEN))) &&
(play->sceneNum == SCENE_SPOT01)) { (play->sceneNum == SCENE_SPOT01)) {
thisx->world.pos.x = -89.0f; thisx->world.pos.x = -89.0f;
thisx->world.pos.z = -1375.0f; thisx->world.pos.z = -1375.0f;
@ -128,7 +128,7 @@ void BgGateShutter_Update(Actor* thisx, PlayState* play) {
void BgGateShutter_Draw(Actor* thisx, PlayState* play) { void BgGateShutter_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -159,7 +159,7 @@ void BgGjyoBridge_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 8, gSPSegment(POLY_XLU_DISP++, 8,
Gfx_TexScroll(play->state.gfxCtx, play->gameplayFrames & 127, Gfx_TexScroll(play->state.gfxCtx, play->gameplayFrames & 127,

View File

@ -140,7 +140,7 @@ void BgGndFiremeiro_Update(Actor* thisx, PlayState* play) {
void BgGndFiremeiro_Draw(Actor* thisx, PlayState* play) { void BgGndFiremeiro_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_800943C8(play->state.gfxCtx); Gfx_SetupDL_37Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -200,7 +200,7 @@ void BgGndSoulmeiro_Draw(Actor* thisx, PlayState* play) {
switch (params) { switch (params) {
case 0: case 0:
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, dLists[params]); gSPDisplayList(POLY_XLU_DISP++, dLists[params]);

View File

@ -150,8 +150,8 @@ void BgHaka_Update(Actor* thisx, PlayState* play) {
void BgHaka_Draw(Actor* thisx, PlayState* play) { void BgHaka_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -317,7 +317,7 @@ void BgHakaGate_DrawFlame(BgHakaGate* this, PlayState* play) {
if (this->vFlameScale > 0) { if (this->vFlameScale > 0) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08, gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0,
(this->vScrollTimer * -20) & 0x1FF, 0x20, 0x80)); (this->vScrollTimer * -20) & 0x1FF, 0x20, 0x80));
@ -348,7 +348,7 @@ void BgHakaGate_Draw(Actor* thisx, PlayState* play) {
if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_7)) { if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_7)) {
Gfx_DrawDListXlu(play, object_haka_objects_DL_00F1B0); Gfx_DrawDListXlu(play, object_haka_objects_DL_00F1B0);
} else { } else {
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
if (thisx->params == BGHAKAGATE_FLOOR) { if (thisx->params == BGHAKAGATE_FLOOR) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
Matrix_Get(&currentMtxF); Matrix_Get(&currentMtxF);

View File

@ -199,7 +199,7 @@ void BgHakaShip_Draw(Actor* thisx, PlayState* play) {
f32 angleTemp; f32 angleTemp;
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
if (this->dyna.actor.params == 0) { if (this->dyna.actor.params == 0) {
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -231,7 +231,7 @@ void BgHakaTubo_DrawFlameCircle(BgHakaTubo* this, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y + 235.0f, this->dyna.actor.world.pos.z, Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y + 235.0f, this->dyna.actor.world.pos.z,
MTXMODE_NEW); MTXMODE_NEW);
Matrix_RotateY(this->dyna.actor.shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY); Matrix_RotateY(this->dyna.actor.shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);

View File

@ -113,7 +113,7 @@ void BgHakaWater_Draw(Actor* thisx, PlayState* play) {
s32 pad2; s32 pad2;
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
if (this->isLowered) { if (this->isLowered) {
temp = this->actor.world.pos.y - this->actor.home.pos.y; temp = this->actor.world.pos.y - this->actor.home.pos.y;

View File

@ -509,7 +509,7 @@ void BgHeavyBlock_Draw(Actor* thisx, PlayState* play) {
Matrix_MultVec3f(&D_80884EC8, &thisx->world.pos); Matrix_MultVec3f(&D_80884EC8, &thisx->world.pos);
Matrix_MultVec3f(&D_80884ED4, &thisx->home.pos); Matrix_MultVec3f(&D_80884ED4, &thisx->home.pos);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -243,7 +243,7 @@ void BgHidanCurtain_Draw(Actor* thisx, PlayState* play) {
BgHidanCurtain* this = (BgHidanCurtain*)thisx; BgHidanCurtain* this = (BgHidanCurtain*)thisx;
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 220, 0, this->alpha); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 220, 0, this->alpha);

View File

@ -127,7 +127,7 @@ void BgHidanDalm_Wait(BgHidanDalm* this, PlayState* play) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
if ((this->collider.base.acFlags & AC_HIT) && !Player_InCsMode(play) && if ((this->collider.base.acFlags & AC_HIT) && !Player_InCsMode(play) &&
(player->swordAnimation == 22 || player->swordAnimation == 23)) { (player->meleeWeaponAnimation == 22 || player->meleeWeaponAnimation == 23)) {
this->collider.base.acFlags &= ~AC_HIT; this->collider.base.acFlags &= ~AC_HIT;
if ((this->collider.elements[0].info.bumperFlags & BUMP_HIT) || if ((this->collider.elements[0].info.bumperFlags & BUMP_HIT) ||
(this->collider.elements[1].info.bumperFlags & BUMP_HIT)) { (this->collider.elements[1].info.bumperFlags & BUMP_HIT)) {

View File

@ -204,7 +204,7 @@ void BgHidanFirewall_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x14); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x14);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sFireballTexs[this->unk_150])); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sFireballTexs[this->unk_150]));
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x01, 255, 255, 0, 150); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x01, 255, 255, 0, 150);

View File

@ -253,7 +253,7 @@ void BgHidanFwbig_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gEffUnknown4Tex)); gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gEffUnknown4Tex));

View File

@ -397,7 +397,7 @@ void BgHidanHamstep_Update(Actor* thisx, PlayState* play) {
void BgHidanHamstep_Draw(Actor* thisx, PlayState* play) { void BgHidanHamstep_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -153,7 +153,7 @@ void BgHidanKousi_Update(Actor* thisx, PlayState* play) {
void BgHidanKousi_Draw(Actor* thisx, PlayState* play) { void BgHidanKousi_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -326,7 +326,7 @@ void BgHidanKowarerukabe_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -355,7 +355,7 @@ void func_8088BC40(PlayState* play, BgHidanRock* this) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x14); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x14);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x01, 255, 255, 0, 150); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x01, 255, 255, 0, 150);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 255); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 255);

View File

@ -231,14 +231,14 @@ void BgHidanRsekizou_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gFireTempleSpinningFlamethrowerDL); gSPDisplayList(POLY_OPA_DISP++, gFireTempleSpinningFlamethrowerDL);
Matrix_MtxFCopy(&mf, &gMtxFClear); Matrix_MtxFCopy(&mf, &gMtxFClear);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x14); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x14);
// Strange original code. Add || 1 for frame interpolation to get correct. // Strange original code. Add || 1 for frame interpolation to get correct.
if ((s16)((Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) - this->dyna.actor.shape.rot.y) - 0x2E6C) >= 0 || 1) { if ((s16)((Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) - this->dyna.actor.shape.rot.y) - 0x2E6C) >= 0 || 1) {

View File

@ -396,7 +396,7 @@ void BgHidanSekizou_Draw(Actor* thisx, PlayState* play2) {
s32 sp6C[4]; s32 sp6C[4];
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (this->dyna.actor.params == 0) { if (this->dyna.actor.params == 0) {
@ -404,7 +404,7 @@ void BgHidanSekizou_Draw(Actor* thisx, PlayState* play2) {
} else { } else {
gSPDisplayList(POLY_OPA_DISP++, gFireTempleStationaryFlamethrowerTallDL); gSPDisplayList(POLY_OPA_DISP++, gFireTempleStationaryFlamethrowerTallDL);
} }
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x14); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x14);
if (this->dyna.actor.params == 0) { if (this->dyna.actor.params == 0) {
if (this->unk_168[0] > 0) { if (this->unk_168[0] > 0) {
if ((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) - this->dyna.actor.shape.rot.y) >= 0) { if ((s16)(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) - this->dyna.actor.shape.rot.y) >= 0) {

View File

@ -280,7 +280,7 @@ void BgHidanSima_Draw(Actor* thisx, PlayState* play) {
BgHidanSima* this = (BgHidanSima*)thisx; BgHidanSima* this = (BgHidanSima*)thisx;
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (this->dyna.actor.params == 0) { if (this->dyna.actor.params == 0) {
@ -288,7 +288,7 @@ void BgHidanSima_Draw(Actor* thisx, PlayState* play) {
} else { } else {
gSPDisplayList(POLY_OPA_DISP++, gFireTempleStonePlatform2DL); gSPDisplayList(POLY_OPA_DISP++, gFireTempleStonePlatform2DL);
if (this->actionFunc == func_8088E7A8) { if (this->actionFunc == func_8088E7A8) {
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x14); POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, 0x14);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 1, 255, 255, 0, 150); gDPSetPrimColor(POLY_XLU_DISP++, 0, 1, 255, 255, 0, 150);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 255); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 255);
POLY_XLU_DISP = func_8088EB54(play, this, POLY_XLU_DISP); POLY_XLU_DISP = func_8088EB54(play, this, POLY_XLU_DISP);

View File

@ -447,7 +447,7 @@ void BgIceShelter_Draw(Actor* thisx, PlayState* play2) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -106,7 +106,7 @@ void BgInGate_Update(Actor* thisx, PlayState* play) {
void BgInGate_Draw(Actor* thisx, PlayState* play) { void BgInGate_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);

View File

@ -213,7 +213,7 @@ void BgJyaBigmirror_DrawLightBeam(Actor* thisx, PlayState* play) {
Actor* lift; Actor* lift;
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
lift = Actor_Find(&play->actorCtx, ACTOR_BG_JYA_LIFT, ACTORCAT_BG); lift = Actor_Find(&play->actorCtx, ACTOR_BG_JYA_LIFT, ACTORCAT_BG);
if (lift != NULL) { if (lift != NULL) {
this->liftHeight = lift->world.pos.y; this->liftHeight = lift->world.pos.y;

View File

@ -66,7 +66,7 @@ void BgJyaBlock_Update(Actor* thisx, PlayState* play) {
void BgJyaBlock_Draw(Actor* thisx, PlayState* play) { void BgJyaBlock_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gPushBlockGrayTex)); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gPushBlockGrayTex));
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),

View File

@ -198,7 +198,7 @@ void BgJyaBombchuiwa_Update(Actor* thisx, PlayState* play) {
void BgJyaBombchuiwa_DrawRock(PlayState* play) { void BgJyaBombchuiwa_DrawRock(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gBombchuiwa2DL); gSPDisplayList(POLY_XLU_DISP++, gBombchuiwa2DL);
@ -209,7 +209,7 @@ void BgJyaBombchuiwa_DrawLight(Actor* thisx, PlayState* play) {
BgJyaBombchuiwa* this = (BgJyaBombchuiwa*)thisx; BgJyaBombchuiwa* this = (BgJyaBombchuiwa*)thisx;
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, CLAMP_MAX((u32)(this->lightRayIntensity * 153.0f), 153)); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, CLAMP_MAX((u32)(this->lightRayIntensity * 153.0f), 153));

View File

@ -531,7 +531,7 @@ void BgJyaCobra_Update(Actor* thisx, PlayState* play2) {
void func_80896CB4(PlayState* play) { void func_80896CB4(PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gCobra2DL); gSPDisplayList(POLY_XLU_DISP++, gCobra2DL);
@ -544,7 +544,7 @@ void func_80896D78(BgJyaCobra* this, PlayState* play) {
Vec3s sp44; Vec3s sp44;
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
sp44.x = D_80897308[this->dyna.actor.params & 3] + this->dyna.actor.shape.rot.x; sp44.x = D_80897308[this->dyna.actor.params & 3] + this->dyna.actor.shape.rot.x;
sp44.y = this->dyna.actor.shape.rot.y; sp44.y = this->dyna.actor.shape.rot.y;
@ -568,7 +568,7 @@ void BgJyaCobra_DrawShadow(BgJyaCobra* this, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80094044(play->state.gfxCtx); Gfx_SetupDL_44Xlu(play->state.gfxCtx);
if (params == 0) { if (params == 0) {
sp64.x = this->dyna.actor.world.pos.x - 50.0f; sp64.x = this->dyna.actor.world.pos.x - 50.0f;

View File

@ -301,7 +301,7 @@ static void* sLeftSideCrumbles[] = {
void BgJyaMegami_DrawFace(BgJyaMegami* this, PlayState* play) { void BgJyaMegami_DrawFace(BgJyaMegami* this, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRightSideCrumbles[this->crumbleIndex])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRightSideCrumbles[this->crumbleIndex]));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sLeftSideCrumbles[this->crumbleIndex])); gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sLeftSideCrumbles[this->crumbleIndex]));
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
@ -324,7 +324,7 @@ void BgJyaMegami_DrawExplode(BgJyaMegami* this, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
for (i = 0; i < ARRAY_COUNT(this->pieces); i++) { for (i = 0; i < ARRAY_COUNT(this->pieces); i++) {
piece = &this->pieces[i]; piece = &this->pieces[i];

View File

@ -124,7 +124,7 @@ void BgMenkuriEye_Draw(Actor* thisx, PlayState* play) {
s32 pad; s32 pad;
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
func_80093D84(play->state.gfxCtx); Gfx_SetupDL_25Xlu(play->state.gfxCtx);
if (Flags_GetSwitch(play, this->actor.params)) { if (Flags_GetSwitch(play, this->actor.params)) {
gDPSetEnvColor(POLY_XLU_DISP++, 200, 0, 0, 255); gDPSetEnvColor(POLY_XLU_DISP++, 200, 0, 0, 255);
} else if (this->framesUntilDisable == -1) { } else if (this->framesUntilDisable == -1) {

View File

@ -508,7 +508,7 @@ void BgMizuBwall_Draw(Actor* thisx, PlayState* play2) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);
frames = play->gameplayFrames; frames = play->gameplayFrames;
func_80093D18(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, gSPSegment(POLY_OPA_DISP++, 0x08,
Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, 1 * frames, 0, 0x20, 0x20, 1, 0, 0, 0x20, 0x20, 0, Gfx_TwoTexScrollEnvColor(play->state.gfxCtx, 0, 1 * frames, 0, 0x20, 0x20, 1, 0, 0, 0x20, 0x20, 0,
0, 0, this->scrollAlpha1)); 0, 0, this->scrollAlpha1));

Some files were not shown because too many files have changed in this diff Show More