mirror of https://github.com/zeldaret/mm.git
ovl_Obj_Hsstump NON_MATCHING matched (#185)
* Everything matches but func_80BDABCC * Better names, still stuck on func_80BDABCC * Some cleanup * Add param macros and document not matching * format * PR suggestions * Bring over data to c file * Retry Jenkins * Retry Jenkins take 2 * PR suggestions for comments * PR comments * Matched ObjHsStump_Appear
This commit is contained in:
parent
cbe2d5a24a
commit
52d36d7373
|
@ -8247,11 +8247,7 @@ SECTIONS
|
||||||
build/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.o(.text)
|
build/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.o(.text)
|
||||||
build/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.o(.data)
|
build/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.o(.data)
|
||||||
build/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.o(.rodata)
|
build/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump.o(.rodata)
|
||||||
#ifdef NON_MATCHING
|
build/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump_overlay.o(.ovl)
|
||||||
build/src/overlays/actors/ovl_Obj_HsStump/z_obj_hsstump_overlay.o(.ovl)
|
|
||||||
#else
|
|
||||||
build/asm/overlays/ovl_Obj_HsStump_rodata.o(.rodata)
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
SegmentEnd = .;
|
SegmentEnd = .;
|
||||||
SegmentSize = SegmentEnd - SegmentStart;
|
SegmentSize = SegmentEnd - SegmentStart;
|
||||||
|
|
|
@ -34,7 +34,7 @@ static InitChainEntry sInitChain[] = {
|
||||||
ICHAIN_VEC3F_DIV1000(scale, 180, ICHAIN_STOP),
|
ICHAIN_VEC3F_DIV1000(scale, 180, ICHAIN_STOP),
|
||||||
};
|
};
|
||||||
|
|
||||||
Vec3f iceSmokeAccel = { 0.0f, 0.0f, 0.0f }; // Readd as static when possible
|
static Vec3f iceSmokeAccel = { 0.0f, 0.0f, 0.0f };
|
||||||
|
|
||||||
void ObjHsStump_Init(Actor* thisx, GlobalContext* globalCtx) {
|
void ObjHsStump_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
ObjHsStump* this = THIS;
|
ObjHsStump* this = THIS;
|
||||||
|
@ -77,20 +77,7 @@ void ObjHsStump_SetupAppear(ObjHsStump* this, GlobalContext* globalCtx) {
|
||||||
this->actionFunc = ObjHsStump_Appear;
|
this->actionFunc = ObjHsStump_Appear;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NON_MATCHING
|
|
||||||
// Correct instructions, but they are all out of order in the (this->framesAppeared) < 11 branch
|
|
||||||
// Loop looks fine, it's everything before
|
|
||||||
void ObjHsStump_Appear(ObjHsStump* this, GlobalContext* globalCtx) {
|
void ObjHsStump_Appear(ObjHsStump* this, GlobalContext* globalCtx) {
|
||||||
s16 i;
|
|
||||||
f32 angle;
|
|
||||||
s16 numDirections;
|
|
||||||
Vec3f iceSmokePosOffset;
|
|
||||||
Vec3f iceSmokeVelOffset;
|
|
||||||
s16 offsetAngle;
|
|
||||||
Vec3f iceSmokeVel;
|
|
||||||
f32 angleBAMS;
|
|
||||||
Vec3f iceSmokePos;
|
|
||||||
|
|
||||||
if (this->framesAppeared >= 0) {
|
if (this->framesAppeared >= 0) {
|
||||||
Math_SmoothStepToF(&this->rotFactor, 0.0f, 1.0f, this->framesAppeared + 18.0f, 0.01f);
|
Math_SmoothStepToF(&this->rotFactor, 0.0f, 1.0f, this->framesAppeared + 18.0f, 0.01f);
|
||||||
this->dyna.actor.shape.rot.x = (Math_SinS(this->rotAngle) * this->rotFactor) + this->dyna.actor.home.rot.x;
|
this->dyna.actor.shape.rot.x = (Math_SinS(this->rotAngle) * this->rotFactor) + this->dyna.actor.home.rot.x;
|
||||||
|
@ -99,16 +86,29 @@ void ObjHsStump_Appear(ObjHsStump* this, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
if (this->framesAppeared < 11) {
|
if (this->framesAppeared < 11) {
|
||||||
if (this->framesAppeared == 0) {
|
if (this->framesAppeared == 0) {
|
||||||
iceSmokePosOffset.x = iceSmokeVelOffset.x = 1.0f;
|
s32 i;
|
||||||
iceSmokePosOffset.y = iceSmokeVelOffset.y = 0.5f;
|
f32 angle;
|
||||||
iceSmokePosOffset.z = iceSmokeVelOffset.z = 0.0f;
|
s16 numDirections = 4;
|
||||||
|
Vec3f iceSmokePosOffset;
|
||||||
|
Vec3f iceSmokeVelOffset;
|
||||||
|
s16 offsetAngle;
|
||||||
|
Vec3f iceSmokeVel;
|
||||||
|
f32 angleBinary;
|
||||||
|
Vec3f iceSmokePos;
|
||||||
|
|
||||||
|
iceSmokePosOffset.x = 1.0f;
|
||||||
|
iceSmokePosOffset.y = 0.5f;
|
||||||
|
iceSmokePosOffset.z = 0.0f;
|
||||||
|
iceSmokeVelOffset.x = 1.0f;
|
||||||
|
iceSmokeVelOffset.y = 0.5f;
|
||||||
|
iceSmokeVelOffset.z = 0.0f;
|
||||||
|
|
||||||
numDirections = 4;
|
|
||||||
angle = 360.0f / numDirections;
|
angle = 360.0f / numDirections;
|
||||||
angleBAMS = angle * (0x10000 / 360.0f);
|
i = angle * (0x10000 / 360.0f);
|
||||||
|
angleBinary = i;
|
||||||
|
|
||||||
for (i = 0; i < numDirections; i++) {
|
for (i = 0; i < numDirections; i++) {
|
||||||
offsetAngle = i * angleBAMS;
|
offsetAngle = i * angleBinary;
|
||||||
Lib_Vec3f_TranslateAndRotateY(&this->dyna.actor.world.pos, offsetAngle, &iceSmokePosOffset,
|
Lib_Vec3f_TranslateAndRotateY(&this->dyna.actor.world.pos, offsetAngle, &iceSmokePosOffset,
|
||||||
&iceSmokePos);
|
&iceSmokePos);
|
||||||
Lib_Vec3f_TranslateAndRotateY(&D_801D15B0, offsetAngle, &iceSmokeVelOffset, &iceSmokeVel);
|
Lib_Vec3f_TranslateAndRotateY(&D_801D15B0, offsetAngle, &iceSmokeVelOffset, &iceSmokeVel);
|
||||||
|
@ -127,9 +127,6 @@ void ObjHsStump_Appear(ObjHsStump* this, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
this->framesAppeared++;
|
this->framesAppeared++;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_Obj_HsStump_0x80BDAA30/ObjHsStump_Appear.asm")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void ObjHsStump_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
void ObjHsStump_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
ObjHsStump* this = THIS;
|
ObjHsStump* this = THIS;
|
||||||
|
|
Loading…
Reference in New Issue