ovl_En_Ma4 matched and mostly documented (#199)

* First pass

* limbdraw

* another one

* lots of stuff

* stuff

* big one

* func_80ABEB6C

* The NON_MATCHING that matches in reality

* "Fix" some cases

* Fix merge issues

* fix func_80ABF254

* match a pair

* func_80ABF7C8

* func_80ABE1C4

* func_80ABF354

* func_80ABF534

* Import data

* Limb fixes

* Minor renames

* Fix merge issues

* A few renames

* Rename half the functions

* More renames

* More renaming

* documentation finished

* Format

* fix typo

* whoops

* Fix merge issues

* Update src/overlays/actors/ovl_En_Ma4/z_en_ma4.h

Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>

* Update src/overlays/actors/ovl_En_Ma4/z_en_ma4.h

Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>

* Update src/overlays/actors/ovl_En_Ma4/z_en_ma4.h

Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>

* Update src/overlays/actors/ovl_En_Ma4/z_en_ma4.c

Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>

* Update src/overlays/actors/ovl_En_Ma4/z_en_ma4.c

Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>

* Update src/overlays/actors/ovl_En_Ma4/z_en_ma4.c

Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>

* Update src/overlays/actors/ovl_En_Ma4/z_en_ma4.c

Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>

* Update variables names

Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
This commit is contained in:
Anghelo Carvajal
2021-07-13 21:49:05 -04:00
committed by GitHub
parent 5453731f4e
commit 5fcd494a7a
16 changed files with 1246 additions and 192 deletions
+1 -1
View File
@@ -316,7 +316,7 @@ void Scene_HeaderCmdLightList(GlobalContext* globalCtx, SceneCmd* cmd) {
// SceneTableEntry Header Command 0x0D: Path List
void Scene_HeaderCmdPathList(GlobalContext* globalCtx, SceneCmd* cmd) {
globalCtx->setupPathList = (void*)Lib_SegmentedToVirtual(cmd->pathList.segment);
globalCtx->setupPathList = (Path*)Lib_SegmentedToVirtual(cmd->pathList.segment);
}
// SceneTableEntry Header Command 0x0E: Transition Actor List
+1 -1
View File
@@ -39,7 +39,7 @@ void func_80143148(SkyboxContext* skyboxCtx, s32 arg1) {
#ifdef NON_MATCHING
// Matches besides rodata, since rodata is not merged into the asm in code files yet.
void func_801431E8(GameState* gamestate, SkyboxContext* skyboxCtx, s16 skyType) {
GlobalContext* globalCtx = (GlobalContext*)state;
GlobalContext* globalCtx = (GlobalContext*)gamestate;
u32 size;
void* offset;
s32 pad;
File diff suppressed because it is too large Load Diff
+26 -4
View File
@@ -2,15 +2,37 @@
#define Z_EN_MA4_H
#include <global.h>
#include "overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.h"
struct EnMa4;
typedef void (*EnMa4ActionFunc)(struct EnMa4*, GlobalContext*);
typedef struct EnMa4 {
/* 0x000 */ Actor actor;
/* 0x144 */ char unk_144[0x1F4];
/* 0x338 */ s16 unk338; // modified by EnPoFusen
/* 0x33A */ char unk33A[0x6];
/* 0x144 */ SkelAnime skelAnime;
/* 0x188 */ EnMa4ActionFunc actionFunc;
/* 0x18C */ ColliderCylinder collider;
/* 0x1D8 */ struct_800BD888_arg1 unk_1D8;
/* 0x200 */ Vec3s* pathPoints;
/* 0x204 */ Vec3s limbDrawTable[MA1_LIMB_MAX];
/* 0x28E */ UNK_TYPE1 unk28E[0x6];
/* 0x294 */ Vec3s transitionDrawTable[MA1_LIMB_MAX];
/* 0x31E */ UNK_TYPE1 unk31E[0x6];
/* 0x324 */ s16 pathIndex;
/* 0x326 */ s16 pathPointsCount;
/* 0x328 */ UNK_TYPE1 unk_328[0x2];
/* 0x32A */ s16 blinkTimer;
/* 0x33C */ s16 overrideEyeTexIndex;
/* 0x32E */ s16 eyeTexIndex;
/* 0x330 */ s16 mouthTexIndex;
/* 0x332 */ s16 type;
/* 0x334 */ u16 unk_334; // set but not used
/* 0x336 */ s16 state;
/* 0x338 */ s16 poppedBalloonCounter; // modified by EnPoFusen
/* 0x33A */ s16 hasBow;
/* 0x33C */ s16 animTimer;
/* 0x33E */ u16 textId;
} EnMa4; // size = 0x340
extern const ActorInit En_Ma4_InitVars;
+40 -39
View File
@@ -1,6 +1,6 @@
/*
* File: z_en_ma_yto.c
* Overlay: ovl_En_Ma_Yto
* File: z_en_ma_yts.c
* Overlay: ovl_En_Ma_Yts
* Description: Romani. As oposed as EnMa4, this actor is used in conjunction of another actor, like EnMaYto.
*/
@@ -111,17 +111,26 @@ static CollisionCheckInfoInit2 sColChkInfoInit2 = {
0, 0, 0, 0, MASS_IMMOVABLE,
};
static struct_80B8E1A8 D_80B8E1A8[] = {
{ &D_06009E58, 1.0f, 0, 0.0f }, { &D_06009E58, 1.0f, 0, -6.0f }, { &D_06018948, 1.0f, 2, 0.0f },
{ &D_06018948, 1.0f, 2, -6.0f }, { &D_0601B76C, 1.0f, 0, 0.0f }, { &D_0601B76C, 1.0f, 0, -6.0f },
{ &D_06007328, 1.0f, 0, 0.0f }, { &D_06007328, 1.0f, 0, -6.0f }, { &D_06014088, 1.0f, 0, 0.0f },
{ &D_06014088, 1.0f, 0, -6.0f }, { &D_06002A8C, 1.0f, 0, 0.0f }, { &D_06002A8C, 1.0f, 0, -6.0f },
{ &D_06015B7C, 1.0f, 0, 0.0f }, { &D_06015B7C, 1.0f, 0, -6.0f }, { &D_06007D98, 1.0f, 0, 0.0f },
{ &D_06007D98, 1.0f, 0, -6.0f }, { &D_0600852C, 1.0f, 0, 0.0f }, { &D_0600852C, 1.0f, 0, -6.0f },
{ &D_06008F6C, 1.0f, 0, 0.0f }, { &D_06008F6C, 1.0f, 0, -6.0f }, { &D_060180DC, 1.0f, 2, 0.0f },
{ &D_060180DC, 1.0f, 2, -6.0f },
static struct_80B8E1A8 sAnimationInfo[] = {
{ &D_06009E58, 1.0f, 0, 0.0f }, { &D_06009E58, 1.0f, 0, -6.0f }, // Idle anim
{ &D_06018948, 1.0f, 2, 0.0f }, { &D_06018948, 1.0f, 2, -6.0f }, // Starts holding hands anim
{ &D_0601B76C, 1.0f, 0, 0.0f }, { &D_0601B76C, 1.0f, 0, -6.0f }, // Holnding hands anim
{ &D_06007328, 1.0f, 0, 0.0f }, { &D_06007328, 1.0f, 0, -6.0f }, // Walking anim
{ &D_06014088, 1.0f, 0, 0.0f }, { &D_06014088, 1.0f, 0, -6.0f }, //
{ &D_06002A8C, 1.0f, 0, 0.0f }, { &D_06002A8C, 1.0f, 0, -6.0f }, // Looking around anim
{ &D_06015B7C, 1.0f, 0, 0.0f }, { &D_06015B7C, 1.0f, 0, -6.0f }, // Shoot arrow anim
{ &D_06007D98, 1.0f, 0, 0.0f }, { &D_06007D98, 1.0f, 0, -6.0f }, // Sitting anim
{ &D_0600852C, 1.0f, 0, 0.0f }, { &D_0600852C, 1.0f, 0, -6.0f }, // Sitting traumatized anim
{ &D_06008F6C, 1.0f, 0, 0.0f }, { &D_06008F6C, 1.0f, 0, -6.0f }, // Sitting sad anim
{ &D_060180DC, 1.0f, 2, 0.0f }, { &D_060180DC, 1.0f, 2, -6.0f }, // Turns around anim
};
void EnMaYts_ChangeAnim(EnMaYts* this, s32 index) {
SkelAnime_ChangeAnim(&this->skelAnime, sAnimationInfo[index].animationSeg, 1.0f, 0.0f,
SkelAnime_GetFrameCount(&sAnimationInfo[index].animationSeg->common),
sAnimationInfo[index].mode, sAnimationInfo[index].transitionRate);
}
static void* sMouthTextures[] = {
D_060127C8,
D_06012BC8,
@@ -133,14 +142,6 @@ static void* sEyeTextures[] = {
D_0600FFC8, D_060107C8, D_06010FC8, D_060117C8, D_06011FC8,
};
static u16 D_80B8E32C = 99;
void EnMaYts_ChangeAnim(EnMaYts* this, s32 index) {
SkelAnime_ChangeAnim(&this->skelAnime, D_80B8E1A8[index].animationSeg, 1.0f, 0.0f,
SkelAnime_GetFrameCount(&D_80B8E1A8[index].animationSeg->common), D_80B8E1A8[index].mode,
D_80B8E1A8[index].transitionRate);
}
void func_80B8D12C(EnMaYts* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
s16 flag = this->unk_32C == 2 ? true : false;
@@ -158,12 +159,12 @@ void func_80B8D12C(EnMaYts* this, GlobalContext* globalCtx) {
void EnMaYts_InitAnimation(EnMaYts* this, GlobalContext* globalCtx) {
switch (this->type) {
case EN_NA_YTS_TYPE_BARN:
case MA_YTS_TYPE_BARN:
this->actor.targetMode = 0;
EnMaYts_ChangeAnim(this, 0);
break;
case EN_NA_YTS_TYPE_SITTING:
case MA_YTS_TYPE_SITTING:
this->actor.targetMode = 6;
// Day 1 or "Winning" the alien invasion
if (CURRENT_DAY == 1 || (gSaveContext.weekEventReg[0x16] & 1)) {
@@ -173,13 +174,13 @@ void EnMaYts_InitAnimation(EnMaYts* this, GlobalContext* globalCtx) {
}
break;
case EN_NA_YTS_TYPE_SLEEPING:
case MA_YTS_TYPE_SLEEPING:
this->actor.targetMode = 0;
this->actor.draw = EnMaYts_DrawSleeping;
EnMaYts_ChangeAnim(this, 0);
break;
case EN_NA_YTS_TYPE_ENDCREDITS:
case MA_YTS_TYPE_ENDCREDITS:
this->actor.targetMode = 0;
EnMaYts_ChangeAnim(this, 0);
break;
@@ -192,7 +193,7 @@ void EnMaYts_InitAnimation(EnMaYts* this, GlobalContext* globalCtx) {
s32 EnMaYts_CheckValidSpawn(EnMaYts* this, GlobalContext* globalCtx) {
switch (this->type) {
case EN_NA_YTS_TYPE_SITTING:
case MA_YTS_TYPE_SITTING:
switch (CURRENT_DAY) {
case 1:
break;
@@ -213,7 +214,7 @@ s32 EnMaYts_CheckValidSpawn(EnMaYts* this, GlobalContext* globalCtx) {
}
break;
case EN_NA_YTS_TYPE_BARN:
case MA_YTS_TYPE_BARN:
// Failing the alien invasion
if (!(gSaveContext.weekEventReg[0x16] & 1)) {
return false;
@@ -222,14 +223,14 @@ s32 EnMaYts_CheckValidSpawn(EnMaYts* this, GlobalContext* globalCtx) {
}
break;
case EN_NA_YTS_TYPE_SLEEPING:
case MA_YTS_TYPE_SLEEPING:
// "Winning" the alien invasion
if (gSaveContext.weekEventReg[0x16] & 1) {
return false;
}
break;
case EN_NA_YTS_TYPE_ENDCREDITS:
case MA_YTS_TYPE_ENDCREDITS:
break;
}
@@ -246,14 +247,14 @@ void EnMaYts_Init(Actor* thisx, GlobalContext* globalCtx) {
}
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 18.0f);
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06013928, NULL, this->limbDrawTbl, this->transitionDrawTbl,
OBJECT_MA1_LIMB_TABLE_COUNT);
MA1_LIMB_MAX);
EnMaYts_InitAnimation(this, globalCtx);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0x16), &sColChkInfoInit2);
if (this->type == EN_NA_YTS_TYPE_SLEEPING) {
if (this->type == MA_YTS_TYPE_SLEEPING) {
this->collider.dim.radius = 40;
}
@@ -264,7 +265,7 @@ void EnMaYts_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_200 = 0;
this->blinkTimer = 0;
if (this->type == EN_NA_YTS_TYPE_ENDCREDITS) {
if (this->type == MA_YTS_TYPE_ENDCREDITS) {
this->hasBow = true;
} else {
this->hasBow = false;
@@ -282,7 +283,7 @@ void EnMaYts_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_32C = 2;
}
if (this->type == EN_NA_YTS_TYPE_ENDCREDITS) {
if (this->type == MA_YTS_TYPE_ENDCREDITS) {
this->overrideEyeTexIndex = 0;
this->eyeTexIndex = 0;
this->mouthTexIndex = 0;
@@ -317,7 +318,7 @@ void EnMaYts_StartDialogue(EnMaYts* this, GlobalContext* globalCtx) {
s16 sp26 = this->actor.shape.rot.y - this->actor.yawTowardsPlayer;
if (func_800B84D0(&this->actor, globalCtx)) { // if (Actor_IsTalking)
if (!(gSaveContext.playerForm == 4)) { // PLAYER_FORM != HUMAN_FORM
if (!(gSaveContext.playerForm == PLAYER_FORM_HUMAN)) {
if (!(gSaveContext.weekEventReg[0x41] & 0x80)) {
// Saying to non-human Link: "Cremia went to town."
gSaveContext.weekEventReg[0x41] |= 0x80;
@@ -399,11 +400,11 @@ void EnMaYts_SetupEndCreditsHandler(EnMaYts* this) {
this->actionFunc = EnMaYts_EndCreditsHandler;
}
static u16 D_80B8E32C = 99;
void EnMaYts_EndCreditsHandler(EnMaYts* this, GlobalContext* globalCtx) {
u32 actionIndex;
if (func_800EE29C(globalCtx, 0x78) != 0) {
actionIndex = func_800EE200(globalCtx, 0x78);
u32 actionIndex = func_800EE200(globalCtx, 0x78);
if (globalCtx->csCtx.frames == globalCtx->csCtx.npcActions[actionIndex]->startFrame) {
if (globalCtx->csCtx.npcActions[actionIndex]->unk0 != D_80B8E32C) {
D_80B8E32C = globalCtx->csCtx.npcActions[actionIndex]->unk0;
@@ -526,13 +527,13 @@ s32 EnMaYts_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
EnMaYts* this = THIS;
Vec3s sp4;
if (limbIndex == OBJECT_MA1_LIMB_HAIR_TOP) {
if (limbIndex == MA1_LIMB_HEAD) {
sp4 = this->unk_1D8.unk_08;
rot->x += sp4.y;
if ((this->skelAnime.animCurrentSeg == &D_06009E58) || (this->skelAnime.animCurrentSeg == &D_06007D98)) {
rot->z += sp4.x;
}
} else if (limbIndex == OBJECT_MA1_LIMB_HEAD) {
} else if (limbIndex == MA1_LIMB_TORSO) {
sp4 = this->unk_1D8.unk_0E;
rot->x += sp4.y;
rot->z += sp4.x;
@@ -544,9 +545,9 @@ s32 EnMaYts_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
void EnMaYts_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
EnMaYts* this = THIS;
if (limbIndex == OBJECT_MA1_LIMB_HAIR_TOP) {
if (limbIndex == MA1_LIMB_HEAD) {
SysMatrix_GetStateTranslation(&this->actor.focus.pos);
} else if (limbIndex == OBJECT_MA1_LIMB_ARM_RIGHT) {
} else if (limbIndex == MA1_LIMB_HAND_LEFT) {
if (this->hasBow == true) {
OPEN_DISPS(globalCtx->state.gfxCtx);
gSPDisplayList(POLY_OPA_DISP++, D_060003B0);
+35 -34
View File
@@ -8,30 +8,31 @@ struct EnMaYts;
typedef void (*EnMaYtsActionFunc)(struct EnMaYts*, GlobalContext*);
// Limbs of OBJECT_MA1
#define OBJECT_MA1_LIMB_TABLE_COUNT 23
typedef enum {
/* 00 */ OBJECT_MA1_LIMB_00,
/* 01 */ OBJECT_MA1_LIMB_PELVIS,
/* 02 */ OBJECT_MA1_LIMB_TIGHT_LEFT,
/* 03 */ OBJECT_MA1_LIMB_LEG_LEFT,
/* 04 */ OBJECT_MA1_LIMB_FOOT_LEFT,
/* 05 */ OBJECT_MA1_LIMB_TIGHT_RIGHT,
/* 06 */ OBJECT_MA1_LIMB_LEG_RIGHT,
/* 07 */ OBJECT_MA1_LIMB_FOOT_RIGHT,
/* 08 */ OBJECT_MA1_LIMB_DRESS_0,
/* 09 */ OBJECT_MA1_LIMB_DRESS_1,
/* 10 */ OBJECT_MA1_LIMB_DRESS_2,
/* 11 */ OBJECT_MA1_LIMB_DRESS_3,
/* 12 */ OBJECT_MA1_LIMB_TORSO,
/* 13 */ OBJECT_MA1_LIMB_HEAD,
/* 14 */ OBJECT_MA1_LIMB_HAIR_TOP,
/* 15 */ OBJECT_MA1_LIMB_HAIR_BOTTOM,
/* 16 */ OBJECT_MA1_LIMB_ARM_LEFT,
/* 17 */ OBJECT_MA1_LIMB_FOREARM_LEFT,
/* 18 */ OBJECT_MA1_LIMB_HAND_LEFT,
/* 19 */ OBJECT_MA1_LIMB_ARM_RIGHT,
/* 20 */ OBJECT_MA1_LIMB_FOREARM_RIGHT,
/* 21 */ OBJECT_MA1_LIMB_HAND_RIGHT
/* 00 */ MA1_LIMB_NONE,
/* 01 */ MA1_LIMB_ROOT,
/* 02 */ MA1_LIMB_PELVIS,
/* 03 */ MA1_LIMB_TIGHT_LEFT,
/* 04 */ MA1_LIMB_LEG_LEFT,
/* 05 */ MA1_LIMB_FOOT_LEFT,
/* 06 */ MA1_LIMB_TIGHT_RIGHT,
/* 07 */ MA1_LIMB_LEG_RIGHT,
/* 08 */ MA1_LIMB_FOOT_RIGHT,
/* 09 */ MA1_LIMB_DRESS_0,
/* 00 */ MA1_LIMB_DRESS_1,
/* 11 */ MA1_LIMB_DRESS_2,
/* 12 */ MA1_LIMB_DRESS_3,
/* 13 */ MA1_LIMB_TORSO,
/* 14 */ MA1_LIMB_HEAD,
/* 15 */ MA1_LIMB_HAIR_TOP,
/* 16 */ MA1_LIMB_HAIR_BOTTOM,
/* 17 */ MA1_LIMB_ARM_LEFT,
/* 18 */ MA1_LIMB_FOREARM_LEFT,
/* 19 */ MA1_LIMB_HAND_LEFT,
/* 20 */ MA1_LIMB_ARM_RIGHT,
/* 21 */ MA1_LIMB_FOREARM_RIGHT,
/* 22 */ MA1_LIMB_HAND_RIGHT,
/* 23 */ MA1_LIMB_MAX
} ObjectMa1Limbs;
typedef struct EnMaYts {
@@ -41,9 +42,9 @@ typedef struct EnMaYts {
/* 0x18C */ ColliderCylinder collider;
/* 0x1D8 */ struct_800BD888_arg1 unk_1D8;
/* 0x200 */ s32 unk_200; // Set, but not used
/* 0x204 */ Vec3s limbDrawTbl[OBJECT_MA1_LIMB_TABLE_COUNT];
/* 0x204 */ Vec3s limbDrawTbl[MA1_LIMB_MAX];
/* 0x28E */ char unk_28E[0x6];
/* 0x294 */ Vec3s transitionDrawTbl[OBJECT_MA1_LIMB_TABLE_COUNT];
/* 0x294 */ Vec3s transitionDrawTbl[MA1_LIMB_MAX];
/* 0x31E */ char unk_31E[0x8];
/* 0x326 */ s16 blinkTimer;
/* 0x328 */ s16 overrideEyeTexIndex; // If non-zero, then this index will be used instead of eyeTexIndex
@@ -60,20 +61,20 @@ typedef struct EnMaYts {
extern const ActorInit En_Ma_Yts_InitVars;
typedef enum {
/* 0 */ EN_NA_YTS_TYPE_BARN,
/* 1 */ EN_NA_YTS_TYPE_SITTING,
/* 2 */ EN_NA_YTS_TYPE_SLEEPING,
/* 3 */ EN_NA_YTS_TYPE_ENDCREDITS
/* 0 */ MA_YTS_TYPE_BARN,
/* 1 */ MA_YTS_TYPE_SITTING,
/* 2 */ MA_YTS_TYPE_SLEEPING,
/* 3 */ MA_YTS_TYPE_ENDCREDITS
} EnMaYtsType;
#define EN_MA_YTS_PARSE_TYPE(actor) (((actor->params)&0xF000) >> 12)
#define EN_MA_YTS_PARSE_TYPE(actor) ((((actor)->params)&0xF000) >> 12)
#define EN_MA_YTS_PARAM(enMaYtsType) ((enMaYtsType) << 12)
/**
* EN_NA_YTS_TYPE_BARN: In the barn, accompanying Cremia. Cremia's actor will handle her dialogue if spoken to.
* EN_NA_YTS_TYPE_SITTING: Having dinner or looking after the ranch.
* EN_NA_YTS_TYPE_SLEEPING: Sleeping. Can be seen in the second night in her house if the player failed the alien invasion.
* EN_NA_YTS_TYPE_ENDCREDITS: Used in the end credits sequence.
* MA_YTS_TYPE_BARN: In the barn, accompanying Cremia. Cremia's actor will handle her dialogue if spoken to.
* MA_YTS_TYPE_SITTING: Having dinner or looking after the ranch.
* MA_YTS_TYPE_SLEEPING: Sleeping. Can be seen in the second night in her house if the player failed the alien invasion.
* MA_YTS_TYPE_ENDCREDITS: Used in the end credits sequence.
*/
#endif // Z_EN_MA_YTS_H
@@ -1,3 +1,9 @@
/*
* File: z_en_po_fusen.c
* Overlay: ovl_En_Po_Fusen
* Description: Romani Ranch - Poe Balloon
*/
#include "z_en_po_fusen.h"
#include "overlays/actors/ovl_En_Ma4/z_en_ma4.h"
@@ -66,7 +72,7 @@ void EnPoFusen_Init(Actor* thisx, GlobalContext* globalCtx) {
EnPoFusen* this = THIS;
f32 heightTemp;
this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 0.00700000021607;
this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 0.007f;
this->actor.targetMode = 6;
this->actor.colChkInfo.damageTable = &sDamageTable;
@@ -133,7 +139,7 @@ u16 EnPoFusen_CheckParent(EnPoFusen* this, GlobalContext* globalCtx) {
}
u16 EnPoFusen_CheckCollision(EnPoFusen* this, GlobalContext* globalCtx) {
if ((u32)this->actionFunc == (u32)EnPoFusen_IdleFuse) {
if (this->actionFunc == EnPoFusen_IdleFuse) {
return 0;
}
@@ -191,13 +197,13 @@ void EnPoFusen_Idle(EnPoFusen* this, GlobalContext* globalCtx) {
this->actor.shape.shadowAlpha = (shadowAlphaTmp > f255) ? (u8)f255 : (u8)shadowAlphaTmp;
}
void EnPoFusen_IncrementMalonPop(EnPoFusen* this) {
void EnPoFusen_IncrementRomaniPop(EnPoFusen* this) {
Actor* parent = this->actor.parent;
EnMa4* romani;
if ((parent != 0) && (parent->id == ACTOR_EN_MA4)) {
if ((parent != NULL) && (parent->id == ACTOR_EN_MA4)) {
romani = (EnMa4*)parent;
romani->unk338++;
romani->poppedBalloonCounter++;
}
this->actor.draw = NULL;
@@ -222,7 +228,7 @@ void EnPoFusen_InitFuse(EnPoFusen* this) {
void EnPoFusen_IdleFuse(EnPoFusen* this, GlobalContext* globalCtx) {
EnPoFusen_Idle(this, globalCtx);
if (this->fuse-- == 0) {
EnPoFusen_IncrementMalonPop(this);
EnPoFusen_IncrementRomaniPop(this);
}
}
@@ -230,7 +236,7 @@ void EnPoFusen_Update(Actor* thisx, GlobalContext* globalCtx) {
EnPoFusen* this = THIS;
this->actionFunc(this, globalCtx);
if (EnPoFusen_CheckCollision(this, globalCtx) != 0) {
EnPoFusen_IncrementMalonPop(this);
EnPoFusen_IncrementRomaniPop(this);
}
}
@@ -246,10 +252,10 @@ s32 EnPoFusen_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL
s16 xRot;
if (limbIndex == 2) {
zScale = (Math_CosS(this->randScaleChange) * 0.0799999982119f) + 1.0f;
zScale = (Math_CosS(this->randScaleChange) * 0.08f) + 1.0f;
xScale = zScale;
if (!zScale) {}
yScale = (Math_SinS(this->randScaleChange) * 0.0799999982119f) + 1.0f;
yScale = (Math_SinS(this->randScaleChange) * 0.08f) + 1.0f;
yScale = yScale * yScale;
xRot = ((Math_SinS(this->randXZRotChange) * 2730.0f));
zRot = ((Math_CosS(this->randXZRotChange) * 2730.0f));