Decomp EnMb (#445)

* Fixed upstream

* Initial commit

* Matched init but broke something else

* All fixed.  Matched Init OK

* Progress

* Lots of progress

* Progress

* progress

* Progress

* progress

* fix struct size

* commit

* progress

* progress

* add comment

* merge master

* fix undefined syms

* progress

* progress

* progress

* Progress

* progress

* Finish

* Remove asm

* Clean up

* Delete some ASM

* Fix spec

* Update z_en_mb.h

* Match a few more and move func_80AA7938 to non equivilent

* asm

* no more non equiv

* matched

* asm

* review

Co-authored-by: Louis <5883445+louist103@users.noreply.github.com>
Co-authored-by: fig <fig02srl@gmail.com>
This commit is contained in:
louist103
2020-12-03 19:25:36 -05:00
committed by GitHub
parent b8ecf7cae4
commit e455a24876
56 changed files with 1405 additions and 3981 deletions
+2 -2
View File
@@ -4077,7 +4077,7 @@ void func_80035844(Vec3f* arg0, Vec3f* arg1, s16* arg2, s32 arg3) {
/**
* Spawns En_Part (Dissipating Flames) actor as a child of the given actor.
*/
EnPart* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3, s32 arg4, s32 unused,
EnPart* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3, s32 timer, s16* unused,
GlobalContext* globalCtx, s16 params, s32 arg8) {
EnPart* spawnedEnPart;
@@ -4089,7 +4089,7 @@ EnPart* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3,
spawnedEnPart->actor.speedXZ = arg3[0];
spawnedEnPart->displayList = arg8;
spawnedEnPart->action = 2;
spawnedEnPart->timer = arg4;
spawnedEnPart->timer = timer;
spawnedEnPart->rotZ = arg3[1];
spawnedEnPart->rotZSpeed = arg3[2];
return spawnedEnPart;
+6 -6
View File
@@ -193,8 +193,8 @@ void EnDh_Wait(EnDh* this, GlobalContext* globalCtx) {
}
void EnDh_SetupWalk(EnDh* this) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_06003A8C, 1.0f, 0.0f,
SkelAnime_GetFrameCount(&D_06003A8C) - 3.0f, 0, -6.0f);
SkelAnime_ChangeAnim(&this->skelAnime, &D_06003A8C, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06003A8C) - 3.0f, 0,
-6.0f);
this->curAction = DH_WALK;
this->timer = 300;
this->actor.speedXZ = 1.0f;
@@ -286,12 +286,12 @@ void EnDh_Attack(EnDh* this, GlobalContext* globalCtx) {
break;
case 3:
if ((this->actor.xzDistFromLink <= 100.0f) && (func_8002E084(&this->actor, 60 * 0x10000 / 360) != 0)) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_06004658, 1.0f, 20.0f,
SkelAnime_GetFrameCount(&D_06004658), 2, -6.0f);
SkelAnime_ChangeAnim(&this->skelAnime, &D_06004658, 1.0f, 20.0f, SkelAnime_GetFrameCount(&D_06004658),
2, -6.0f);
this->actionState = 0;
} else {
SkelAnime_ChangeAnim(&this->skelAnime, &D_06004658, -1.0f,
SkelAnime_GetFrameCount(&D_06004658), 0.0f, 2, -4.0f);
SkelAnime_ChangeAnim(&this->skelAnime, &D_06004658, -1.0f, SkelAnime_GetFrameCount(&D_06004658), 0.0f,
2, -4.0f);
this->actionState++;
this->collider2.base.atFlags = this->collider2.list[0].body.toucherFlags = 0;
this->collider2.list[0].body.toucher.flags = this->collider2.list[0].body.toucher.damage = 0;
+1 -2
View File
@@ -98,8 +98,7 @@ void func_80A3D838(EnGm* this, GlobalContext* globalCtx) {
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600FEF0, NULL, this->limbDrawTable,
this->transitionDrawTable, 18);
gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->objGmBankIndex].segment);
SkelAnime_ChangeAnim(&this->skelAnime, &D_060002B8, 1.0f, 0.0f,
SkelAnime_GetFrameCount(&D_060002B8), 0, 0.0f);
SkelAnime_ChangeAnim(&this->skelAnime, &D_060002B8, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_060002B8), 0, 0.0f);
this->actor.draw = EnGm_Draw;
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder_Set3(globalCtx, &this->collider, &this->actor, &sCylinderInit);
File diff suppressed because it is too large Load Diff
+29 -1
View File
@@ -6,9 +6,37 @@
struct EnMb;
typedef void (*EnMbActionFunc)(struct EnMb*, GlobalContext*);
typedef struct EnMb {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x3C0];
/* 0x014C */ Vec3s bodyPartsPos[10];
/* 0x0188 */ u8 unk_188;
/* 0x018C */ SkelAnime skelAnime;
/* 0x01D0 */ Vec3s limbDrawTable[28];
/* 0x0278 */ Vec3s transitionDrawTable[28];
/* 0x0320 */ s32 unk_320;
/* 0x0324 */ EnMbActionFunc actionFunc;
/* 0x0328 */ s16 unk_328;
/* 0x032A */ s16 unk_32A;
/* 0x032C */ s16 soundTimer;
/* 0x032E */ s16 unk_32E;
/* 0x0330 */ s16 unk_330;
/* 0x0332 */ s16 unk_332;
/* 0x0334 */ s16 attackParams;
/* 0x0338 */ Vec3f effSpawnPos;
/* 0x0344 */ Vec3f waypointPos;
/* 0x0350 */ char unk_34A[0xC];
/* 0x035C */ s8 waypoint;
/* 0x035D */ s8 path;
/* 0x035E */ s8 direction;
/* 0x035F */ s8 unk_35F;
/* 0x0360 */ f32 unk_360;
/* 0x0364 */ f32 unk_364;
/* 0x0368 */ ColliderCylinder collider1;
/* 0x03B4 */ ColliderQuad collider2;
/* 0x0434 */ ColliderTris collider3;
/* 0x0454 */ ColliderTrisItem collider3Items[2];
} EnMb; // size = 0x050C
extern const ActorInit En_Mb_InitVars;