mirror of https://github.com/zeldaret/mm.git
Match `Bg_Dblue_Balance` for JP 1.1 (#1853)
* Match `Bg_Dblue_Balance` for JP 1.1 * Respond to review
This commit is contained in:
parent
ad7a80cb8f
commit
25e34ec140
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue