summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Overton <tom-overton@users.noreply.github.com>2026-02-09 03:00:10 -0800
committerGitHub <noreply@github.com>2026-02-09 08:00:10 -0300
commit25e34ec140e92201408dd5c95e8a51fe152fc829 (patch)
tree5e4e95e757173dbd2b47558365df8648470b599f
parentad7a80cb8f3531e88bcafe928a12bee4fea0ec53 (diff)
Match `Bg_Dblue_Balance` for JP 1.1 (#1853)
* Match `Bg_Dblue_Balance` for JP 1.1 * Respond to review
-rw-r--r--src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c31
-rw-r--r--src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.h5
2 files changed, 36 insertions, 0 deletions
diff --git a/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c b/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c
index 6de7ee17f..a1fa4b52e 100644
--- a/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c
+++ b/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c
@@ -292,12 +292,14 @@ void func_80B8296C(PlayState* play, Vec3f* arg1, f32 arg2) {
}
}
+#if MM_VERSION >= N64_US
bool func_80B82B00(s16 arg0, s16 arg1, s16 arg2) {
if (arg0 < arg1) {
return (arg0 < arg2 && arg1 >= arg2);
}
return (arg0 < arg2 || arg1 >= arg2);
}
+#endif
void BgDblueBalance_Init(Actor* thisx, PlayState* play) {
s32 pad;
@@ -548,7 +550,9 @@ void func_80B8330C(Actor* thisx, PlayState* play) {
}
void func_80B83344(BgDblueBalance* this) {
+#if MM_VERSION >= N64_US
this->unk_178 = 0;
+#endif
this->actionFunc = func_80B8335C;
}
@@ -560,13 +564,18 @@ void func_80B8335C(BgDblueBalance* this, PlayState* play) {
}
void func_80B833A8(BgDblueBalance* this) {
+#if MM_VERSION >= N64_US
this->unk_186 = 0;
this->unk_187 = 0;
+#else
+ this->unk_17E_jp = 0;
+#endif
this->actionFunc = func_80B833C4;
}
void func_80B833C4(BgDblueBalance* this, PlayState* play) {
Actor* thisx = &this->dyna.actor;
+#if MM_VERSION >= N64_US
s32 sp28 = false;
s16 sp26;
s16 sp24;
@@ -611,6 +620,28 @@ void func_80B833C4(BgDblueBalance* this, PlayState* play) {
thisx->shape.rot.x = this->unk_184;
func_80B83344(this);
}
+#else
+ if (this->isSwitchFlagSet) {
+ if (!this->isSwitchFlagSet2 && (this->unk_17F == 0)) {
+ this->unk_17F = 1;
+ }
+
+ if (this->unk_178 >= 0x50) {
+ this->unk_178 -= 5;
+ this->unk_17E_jp = 0;
+ } else if (this->unk_17E_jp < 10) {
+ this->unk_178 -= 10;
+ this->unk_17E_jp++;
+ } else {
+ func_80B83344(this);
+ }
+ } else {
+ Math_StepToS(&this->unk_178, 0x1F4, 4);
+ }
+
+ thisx->shape.rot.x += this->unk_178;
+ func_80B8264C(this);
+#endif
}
void func_80B83518(Actor* thisx, PlayState* play) {
diff --git a/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.h b/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.h
index 4c16a1cb8..a4c7e5ed4 100644
--- a/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.h
+++ b/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.h
@@ -31,15 +31,20 @@ typedef struct BgDblueBalance {
/* 0x17A */ s16 unk_17A;
/* 0x17C */ s8 unk_17C;
/* 0x17D */ s8 unk_17D;
+#if MM_VERSION < N64_US
+ /* 0x17E */ s8 unk_17E_jp;
+#endif
/* 0x17E */ s8 unk_17E;
/* 0x17F */ s8 unk_17F;
/* 0x180 */ s8 isSwitchPressed;
/* 0x181 */ s8 isHeavySwitchPressed;
/* 0x182 */ s8 unk_182;
/* 0x183 */ u8 unk_183;
+#if MM_VERSION >= N64_US
/* 0x184 */ s16 unk_184;
/* 0x186 */ s8 unk_186;
/* 0x187 */ s8 unk_187;
+#endif
/* 0x188 */ BgDblueBalanceStruct unk_188[8];
/* 0x228 */ f32 unk_228;
} BgDblueBalance; // size = 0x22C