1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-25 08:21:22 +00:00

Merge branch 'main' into meta_new_assets_2025

This commit is contained in:
Dragorn421 2025-02-05 19:21:41 +01:00
commit f70a07f8cf
No known key found for this signature in database
GPG key ID: 381AEBAF3D429335
71 changed files with 6590 additions and 14549 deletions

View file

@ -41,7 +41,7 @@
* DPad-Down disables sending fault pages over osSyncPrintf.
*/
#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-eu-mq-dbg:144 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160" \
"gc-us-mq:160"
"gc-us-mq:160 ique-cn:160"
#include "global.h"
#include "alloca.h"

View file

@ -5,7 +5,7 @@
extern uintptr_t gSegments[NUM_SEGMENTS];
#pragma increment_block_number "gc-eu:252 gc-eu-mq:252 gc-jp:252 gc-jp-ce:252 gc-jp-mq:252 gc-us:252 gc-us-mq:252" \
"ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
"ique-cn:252 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
extern struct PreNmiBuff* gAppNmiBufferPtr;
extern struct Scheduler gScheduler;
@ -24,7 +24,7 @@ extern struct IrqMgr gIrqMgr;
#endif
#pragma increment_block_number "gc-eu:144 gc-eu-mq:144 gc-jp:144 gc-jp-ce:144 gc-jp-mq:144 gc-us:144 gc-us-mq:144" \
"ntsc-1.0:122 ntsc-1.1:122 ntsc-1.2:122 pal-1.0:120 pal-1.1:120"
"ique-cn:128 ntsc-1.0:122 ntsc-1.1:122 ntsc-1.2:122 pal-1.0:120 pal-1.1:120"
extern u8 _buffersSegmentEnd[];

View file

@ -5,7 +5,7 @@
#include "macros.h"
#include "sys_math3d.h"
#pragma increment_block_number "gc-eu:97 gc-eu-mq:97 gc-jp:97 gc-jp-ce:97 gc-jp-mq:97 gc-us:97 gc-us-mq:97" \
#pragma increment_block_number "gc-eu:97 gc-eu-mq:97 gc-jp:97 gc-jp-ce:97 gc-jp-mq:97 gc-us:97 gc-us-mq:97 ique-cn:97" \
"ntsc-1.0:80 ntsc-1.1:80 ntsc-1.2:79 pal-1.0:80 pal-1.1:80"
s32 Math3D_LineVsLineClosestTwoPoints(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB,

View file

@ -15,8 +15,8 @@
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
static CollisionPoly* sCurCeilingPoly;
static s32 sCurCeilingBgId;
CollisionPoly* sCurCeilingPoly;
s32 sCurCeilingBgId;
#if DEBUG_FEATURES
#define ACTOR_DEBUG_PRINTF \
@ -265,7 +265,10 @@ typedef struct AttentionColor {
/* 0x04 */ Color_RGBA8 secondary; // Used for Navi's outer color
} AttentionColor; // size = 0x8
AttentionColor sAttentionColors[ACTORCAT_MAX + 1] = {
// Needs to be static to work around an EGCS codegen bug in Attention_SetNaviState on iQue builds.
// If this isn't static, accessing the element at offset 4 into the struct (secondary.r) will not
// be offset correctly in the compiled code.
static AttentionColor sAttentionColors[ACTORCAT_MAX + 1] = {
{ { 0, 255, 0, 255 }, { 0, 255, 0, 0 } }, // ACTORCAT_SWITCH
{ { 0, 255, 0, 255 }, { 0, 255, 0, 0 } }, // ACTORCAT_BG
{ { 255, 255, 255, 255 }, { 0, 0, 255, 0 } }, // ACTORCAT_PLAYER

View file

@ -5,7 +5,7 @@
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
"ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
s16 Camera_RequestSettingImpl(Camera* camera, s16 requestedSetting, s16 flags);
s32 Camera_RequestModeImpl(Camera* camera, s16 requestedMode, u8 forceModeChange);
@ -3639,7 +3639,7 @@ s32 Camera_KeepOn3(Camera* camera) {
}
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.0:124 ntsc-1.1:124 ntsc-1.2:124 pal-1.0:122 pal-1.1:122"
"ique-cn:128 ntsc-1.0:124 ntsc-1.1:124 ntsc-1.2:124 pal-1.0:122 pal-1.1:122"
s32 Camera_KeepOn4(Camera* camera) {
static Vec3f D_8015BD50;

View file

@ -16,7 +16,7 @@
#include "z_lib.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.0:96 ntsc-1.1:96 ntsc-1.2:96 pal-1.0:96 pal-1.1:96"
"ique-cn:128 ntsc-1.0:96 ntsc-1.1:96 ntsc-1.2:96 pal-1.0:96 pal-1.1:96"
typedef s32 (*ColChkResetFunc)(PlayState*, Collider*);
typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*);
@ -2225,7 +2225,7 @@ void CollisionCheck_ATTrisVsACCyl(PlayState* play, CollisionCheckContext* colChk
}
#pragma increment_block_number "gc-eu:252 gc-eu-mq:252 gc-jp:252 gc-jp-ce:252 gc-jp-mq:252 gc-us:252 gc-us-mq:252" \
"ntsc-1.0:252 ntsc-1.1:252 ntsc-1.2:252 pal-1.0:252 pal-1.1:252"
"ique-cn:252 ntsc-1.0:252 ntsc-1.1:252 ntsc-1.2:252 pal-1.0:252 pal-1.1:252"
void CollisionCheck_ATCylVsACQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) {
static TriNorm tri1;

View file

@ -6,6 +6,10 @@
"ntsc-1.0:176 ntsc-1.1:176 ntsc-1.2:176 pal-1.0:160 pal-1.1:160"
ALIGNED(16) SaveContext gSaveContext;
#if PLATFORM_IQUE
// Unknown bss padding, placed here for matching
char sUnknownBssPadding[0x20];
#endif
u32 D_8015FA88;
u32 D_8015FA8C;

View file

@ -13,7 +13,7 @@ typedef struct InputCombo {
} InputCombo; // size = 0x4
#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160 gc-us-mq:160" \
"ntsc-1.0:160 ntsc-1.1:160 ntsc-1.2:160 pal-1.0:160 pal-1.1:160"
"ique-cn:128 ntsc-1.0:160 ntsc-1.1:160 ntsc-1.2:160 pal-1.0:160 pal-1.1:160"
RegEditor* gRegEditor;

View file

@ -1,5 +1,5 @@
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:192 pal-1.1:192"
"ique-cn:192 ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:192 pal-1.1:192"
#include "global.h"
#include "terminal.h"

View file

@ -1,5 +1,5 @@
#pragma increment_block_number "gc-eu:208 gc-eu-mq:208 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.0:208 ntsc-1.1:208 ntsc-1.2:208 pal-1.0:220 pal-1.1:220"
"ique-cn:192 ntsc-1.0:208 ntsc-1.1:208 ntsc-1.2:208 pal-1.0:220 pal-1.1:220"
#include "global.h"
#include "ultra64.h"
@ -215,7 +215,7 @@ s16 sSunDepthTestX;
s16 sSunDepthTestY;
#pragma increment_block_number "gc-eu:240 gc-eu-mq:240 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224 gc-us-mq:224" \
"ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:240 pal-1.1:240"
"ique-cn:224 ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:240 pal-1.1:240"
LightNode* sNGameOverLightNode;
LightInfo sNGameOverLightInfo;

View file

@ -4129,6 +4129,8 @@ void Message_Update(PlayState* play) {
};
#if OOT_VERSION < GC_US
static s32 sUnknown = 0;
#elif PLATFORM_IQUE
static u16 sUnknown = 0;
#endif
static char D_80153D74 = 0;
MessageContext* msgCtx = &play->msgCtx;

View file

@ -4,7 +4,9 @@ OSPifRam __osContPifRam;
u8 __osContLastCmd;
u8 __osMaxControllers; // always 4
#ifndef BBPLAYER
OSTimer __osEepromTimer;
#endif
OSMesgQueue __osEepromTimerMsgQueue;
OSMesg __osEepromTimerMsg;

View file

@ -1,7 +1,7 @@
#include "global.h"
u32 __osPiAccessQueueEnabled = false;
OSMesg piAccessBuf[1];
static OSMesg piAccessBuf[1];
OSMesgQueue __osPiAccessQueue;
void __osPiCreateAccessQueue(void) {

View file

@ -6,11 +6,10 @@ OSDevMgr __osPiDevMgr = { 0 };
OSPiHandle __Dom1SpeedParam;
OSPiHandle __Dom2SpeedParam;
OSThread piThread;
STACK(piStackThread, 0x1000);
OSMesgQueue piEventQueue;
OSMesg piEventBuf[2];
OSThread __osThreadSave;
static OSThread piThread;
static STACK(piThreadStack, 0x1000);
static OSMesgQueue piEventQueue;
static OSMesg piEventBuf[2];
OSPiHandle* __osPiTable = NULL;
OSPiHandle* __osCurrentHandle[] = {
@ -47,7 +46,7 @@ void osCreatePiManager(OSPri pri, OSMesgQueue* cmdQueue, OSMesg* cmdBuf, s32 cmd
__osPiDevMgr.dma = __osPiRawStartDma;
__osPiDevMgr.edma = __osEPiRawStartDma;
osCreateThread(&piThread, 0, __osDevMgrMain, (void*)&__osPiDevMgr, STACK_TOP(piStackThread), pri);
osCreateThread(&piThread, 0, __osDevMgrMain, (void*)&__osPiDevMgr, STACK_TOP(piThreadStack), pri);
osStartThread(&piThread);
__osRestoreInt(prevInt);

View file

@ -1,6 +1,6 @@
#include "global.h"
OSMesg siAccessBuf[1];
static OSMesg siAccessBuf[1];
OSMesgQueue __osSiAccessQueue;
u32 __osSiAccessQueueEnabled = false;

View file

@ -2,12 +2,12 @@
#include "stack.h"
#include "ultra64/internal.h"
OSThread viThread;
STACK(viThreadStack, 0x1000);
OSMesgQueue viEventQueue;
OSMesg viEventBuf[5];
OSIoMesg viRetraceMsg;
OSIoMesg viCounterMsg;
static OSThread viThread;
static STACK(viThreadStack, 0x1000);
static OSMesgQueue viEventQueue;
static OSMesg viEventBuf[5];
static OSIoMesg viRetraceMsg;
static OSIoMesg viCounterMsg;
OSDevMgr __osViDevMgr = { 0 };
u32 __additional_scanline = 0;

View file

@ -0,0 +1,3 @@
#include "ultra64.h"
OSThread __osThreadSave;

View file

@ -125,22 +125,22 @@ static ColliderCylinderInit sLightBallCylinderInit = {
static u8 D_808E4C58[] = { 0, 12, 10, 12, 14, 16, 12, 14, 16, 12, 14, 16, 12, 14, 16, 10, 16, 14 };
static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f };
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.0:0" \
"ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ique-cn:0" \
"ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
static EnGanonMant* sCape;
// TODO: There's probably a way to match BSS ordering with less padding by spreading the variables out and moving
// data around. It would be easier if we had more options for controlling BSS ordering in debug.
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
"ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
static s32 sSeed1;
static s32 sSeed2;
static s32 sSeed3;
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
"ique-cn:192 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
static BossGanon* sGanondorf;

View file

@ -7,7 +7,7 @@
#include "assets/objects/object_toki_objects/object_toki_objects.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
"ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED)

View file

@ -14,8 +14,8 @@
#include "assets/scenes/dungeons/ice_doukutu/ice_doukutu_scene.h"
#include "terminal.h"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.0:0" \
"ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ique-cn:128" \
"ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
@ -1397,7 +1397,7 @@ void func_80B3F3D8(void) {
}
#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64" \
"ntsc-1.0:64 ntsc-1.1:64 ntsc-1.2:64 pal-1.0:64 pal-1.1:64"
"ique-cn:128 ntsc-1.0:64 ntsc-1.1:64 ntsc-1.2:64 pal-1.0:64 pal-1.1:64"
void EnXc_PlayDiveSFX(Vec3f* src, PlayState* play) {
static Vec3f D_80B42DA0;

View file

@ -454,7 +454,6 @@ static f32 sFishGroupAngle1;
static f32 sFishGroupAngle2;
static f32 sFishGroupAngle3;
static FishingEffect sEffects[FISHING_EFFECT_COUNT];
static Vec3f sStreamSfxProjectedPos;
void Fishing_SetColliderElement(s32 index, ColliderJntSph* collider, Vec3f* pos, f32 scale) {
collider->elements[index].dim.worldSphere.center.x = pos->x;
@ -5139,6 +5138,7 @@ static Vec3s sSinkingLureLocations[] = {
};
void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
static Vec3f sStreamSfxProjectedPos;
PlayState* play = play2;
Fishing* this = (Fishing*)thisx;
Vec3f multiVecSrc;

View file

@ -332,21 +332,21 @@ void Player_Action_CsAction(Player* this, PlayState* play);
// .bss part 1
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.0:64 ntsc-1.1:64 ntsc-1.2:64 pal-1.0:64 pal-1.1:64"
"ique-cn:128 ntsc-1.0:64 ntsc-1.1:64 ntsc-1.2:64 pal-1.0:64 pal-1.1:64"
static s32 D_80858AA0;
// TODO: There's probably a way to match BSS ordering with less padding by spreading the variables out and moving
// data around. It would be easier if we had more options for controlling BSS ordering in debug.
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192"
"ique-cn:128 ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192"
static s32 sSavedCurrentMask;
static Vec3f sInteractWallCheckResult;
static Input* sControlInput;
#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
"ique-cn:192 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
// .data

View file

@ -1140,7 +1140,7 @@ static s16 sQuestItemFlags[] = {
QUEST_MEDALLION_WATER, QUEST_MEDALLION_SPIRIT, QUEST_MEDALLION_SHADOW, QUEST_MEDALLION_LIGHT,
};
#if OOT_NTSC && OOT_VERSION < GC_JP_CE
#if (OOT_NTSC && OOT_VERSION < GC_JP_CE) || PLATFORM_IQUE
static void* sSaveXTextures[] = { gFileSelSaveXJPNTex, gFileSelSaveXENGTex };
#endif

File diff suppressed because it is too large Load diff

View file

@ -902,9 +902,14 @@ static void* sPromptChoiceTexs[][2] = {
#endif
};
//! @bug On the iQue version, kaleido bss is reported to be just 0x10 bytes large in the relocation section. This is
//! likely due to not counting the size of COMMON symbols in the overlay. sPlayerPreRender was likely originally
//! non-static, but we make it static here to match the bss order and patch the relocation section later in the build
//! as our relocation generator does count COMMON symbols.
static u8 D_808321A8[5];
static PreRender sPlayerPreRender;
static void* sPreRenderCvg;
void* sPreRenderCvg;
void KaleidoScope_SetupPlayerPreRender(PlayState* play) {
Gfx* gfx;