From c028db03b47f8b38bc2a1b87569fd7fae0ea9067 Mon Sep 17 00:00:00 2001 From: Tharo <17233964+Thar0@users.noreply.github.com> Date: Tue, 4 Feb 2025 11:55:04 +0000 Subject: Finish matching ique-cn (#2451) * git subrepo clone git@github.com:Thar0/com-plugin.git tools/com-plugin subrepo: subdir: "tools/com-plugin" merged: "e8543312d" upstream: origin: "git@github.com:Thar0/com-plugin.git" branch: "main" commit: "e8543312d" git-subrepo: version: "0.4.6" origin: "https://github.com/ingydotnet/git-subrepo" commit: "110b9eb" * ique-cn OK * Review suggestions * Most suggestions * git subrepo pull tools/com-plugin subrepo: subdir: "tools/com-plugin" merged: "81595ed1c" upstream: origin: "git@github.com:Thar0/com-plugin.git" branch: "main" commit: "81595ed1c" git-subrepo: version: "0.4.6" origin: "https://github.com/ingydotnet/git-subrepo" commit: "110b9eb" * Fix other versions --- src/code/fault_gc.c | 2 +- src/code/main.c | 4 ++-- src/code/sys_math3d.c | 2 +- src/code/z_actor.c | 9 ++++++--- src/code/z_camera.c | 4 ++-- src/code/z_collision_check.c | 4 ++-- src/code/z_common_data.c | 4 ++++ src/code/z_debug.c | 2 +- src/code/z_kaleido_scope_call.c | 2 +- src/code/z_kankyo.c | 4 ++-- src/code/z_message.c | 2 ++ 11 files changed, 24 insertions(+), 15 deletions(-) (limited to 'src/code') diff --git a/src/code/fault_gc.c b/src/code/fault_gc.c index 59f95d17f..5a85d03eb 100644 --- a/src/code/fault_gc.c +++ b/src/code/fault_gc.c @@ -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" diff --git a/src/code/main.c b/src/code/main.c index cce2e666e..d31f7cd21 100644 --- a/src/code/main.c +++ b/src/code/main.c @@ -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[]; diff --git a/src/code/sys_math3d.c b/src/code/sys_math3d.c index fc37a98c6..54ae8741e 100644 --- a/src/code/sys_math3d.c +++ b/src/code/sys_math3d.c @@ -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, diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 37a370557..f59a996e6 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -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 diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 6689670e1..dda1f5ea3 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -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; diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index aa83c5e53..8af30ac7f 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -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; diff --git a/src/code/z_common_data.c b/src/code/z_common_data.c index f571cb1a6..d5322bbd4 100644 --- a/src/code/z_common_data.c +++ b/src/code/z_common_data.c @@ -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; diff --git a/src/code/z_debug.c b/src/code/z_debug.c index d94e79e83..c4333f787 100644 --- a/src/code/z_debug.c +++ b/src/code/z_debug.c @@ -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; diff --git a/src/code/z_kaleido_scope_call.c b/src/code/z_kaleido_scope_call.c index ab25188a0..994c5ac20 100644 --- a/src/code/z_kaleido_scope_call.c +++ b/src/code/z_kaleido_scope_call.c @@ -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" diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c index f18650f0a..85e1e1ab6 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -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; diff --git a/src/code/z_message.c b/src/code/z_message.c index 41b849825..a2c275b8e 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -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; -- cgit v1.2.3