En_Niw (Cucco) (#191)

* EnNiw: Rebase of WIP to work on collsion

init almost matches

EnNiw: WIP

EnNiw: running low, and too many not-matches for my liking

EnNiw: WIP 3

* EnNiw: update to master

* EnNiw: fix late rodata

* wtf is going on

* EnNiw: update is a thing, glad I'm doing it last

* EnNiw: likely branch mysery

* EnNiw: a horrible little draw function

* EnNiw: nope, feather draw still fucked

* EnNiw: fixing merge issues with master

* EnNiw: update is no longer non-matching

* EnNiw: cleaning/docs

* EnNiw: cleaning/docs 3

* EnNiw: more docs 4

* EnNiw: OKs again now that data was removed

* EnNiw: Docs and cleaning 5

* EnNiw: Docs and cleaning 6

* EnNiw: Docs/cleaning and changed a function and that changed a bunch ugh

* EnNiw: format and make check

* EnNiw: data re-merged, and matches

* EnNiw: forgot about these

* EnNiw: another attempt at feather draw, still not even close

* Multiple: now that we know the last paramter is a flag, change all to hex

* Player: fix wrong padding

* EnNiw

parameter name consistency

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_Niw/z_en_niw.c

REG

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_Niw/z_en_niw.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_Niw/z_en_niw.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_Niw/z_en_niw.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_Niw/z_en_niw.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_Niw/z_en_niw.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_Niw/z_en_niw.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_Niw/z_en_niw.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_Niw/z_en_niw.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_Niw/z_en_niw.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_Niw/z_en_niw.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Update src/overlays/actors/ovl_En_Niw/z_en_niw.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* EnNiw: Likely suggestions first

easy suggestions first, then I'll attempt the stuff I'm not sure will match

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* EnNiw: compiling again

* EnNiw: more suggestions added

* EnNiw: last of minor changes

* EnNiw: shorten overly long float

* EnNiw: feather counts as define

* EnNiw: add c file description

* EnNiw: Some Suggested Changes

Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl>

* EnNiw: more suggestions

* EnNiw: More suggestions

Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl>

* EnNiw: moved OPEN_DISPS to contentional location, still not close

* BgIcicle/EnSb: renamed func_800B78B8 to Actor_UpdateBgCheckInfo

Co-authored-by: isghj8 <isghj8@gmail.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl>
This commit is contained in:
Isghj
2021-07-01 19:20:34 -07:00
committed by GitHub
parent 0f1027fae1
commit abef65a6db
31 changed files with 1172 additions and 85 deletions
+12 -6
View File
@@ -242,8 +242,8 @@ void Actor_TitleCardContextInit(GlobalContext* globalCtx, TitleCardContext* titl
titleCardCtx->alpha = 0;
}
void Actor_TitleCardCreate(GlobalContext* globalCtx, TitleCardContext* titleCardCtx, u32 texture, s16 param_4, s16 param_5,
u8 param_6, u8 param_7) {
void Actor_TitleCardCreate(GlobalContext* globalCtx, TitleCardContext* titleCardCtx, u32 texture, s16 param_4,
s16 param_5, u8 param_6, u8 param_7) {
titleCardCtx->texture = texture;
titleCardCtx->unk4 = param_4;
titleCardCtx->unk6 = param_5;
@@ -568,7 +568,7 @@ s32 Actor_IsActorFacingActorAndWithinRange(Actor* actor, Actor* other, f32 range
#pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800B7678.asm")
#pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800B78B8.asm")
#pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//Actor_UpdateBgCheckInfo.asm")
#pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800B7E04.asm")
@@ -624,9 +624,9 @@ s32 Actor_IsActorFacingActorAndWithinRange(Actor* actor, Actor* other, f32 range
u32 Actor_HasParent(Actor* actor, GlobalContext* globalCtx) {
if (actor->parent != NULL) {
return 1;
return true;
} else {
return 0;
return false;
}
}
@@ -638,7 +638,13 @@ u32 Actor_HasParent(Actor* actor, GlobalContext* globalCtx) {
#pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800B8BD0.asm")
#pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800B8BFC.asm")
s32 Actor_HasNoParent(Actor* actor, GlobalContext* globalCtx) {
if (!actor->parent) {
return true;
} else {
return false;
}
}
#pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800B8C20.asm")
+1 -1
View File
@@ -461,7 +461,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->actor.gravity != 0.0f) {
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
func_800B78B8(globalCtx, &this->actor, 20.0f, 15.0f, 15.0f, 0x1D);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 15.0f, 15.0f, 0x1D);
if (this->actor.floorHeight <= -32000.0f) {
Actor_MarkForDeath(&this->actor);
@@ -186,7 +186,7 @@ void BgIcicle_Fall(BgIcicle* this, GlobalContext* globalCtx) {
} else {
Actor_SetVelocityAndMoveYRotationAndGravity(&this->dyna.actor);
this->dyna.actor.world.pos.y += 40.0f;
func_800B78B8(globalCtx, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
Actor_UpdateBgCheckInfo(globalCtx, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
this->dyna.actor.world.pos.y -= 40.0f;
CollisionCheck_SetAT(globalCtx, &globalCtx->colCheckCtx, &this->collider.base);
}
+1 -1
View File
@@ -90,7 +90,7 @@ void DmNb_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
func_800B78B8(globalCtx, &this->actor, 30.0f, 12.0f, 0.0f, 4);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 30.0f, 12.0f, 0.0f, 0x4);
}
void DmNb_UnkActorDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* actor) {
@@ -72,7 +72,7 @@ void EnEndingHero_Update(Actor* thisx, GlobalContext* globalCtx) {
}
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
func_800B78B8(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
}
static UNK_PTR D_80C1E970[] = { D_06007350, D_06009590, D_06009F90, D_0600A790, D_0600AB90 };
@@ -57,7 +57,7 @@ void EnEndingHero2_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
func_800B78B8(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
}
void EnEndingHero2_Draw(Actor* thisx, GlobalContext* globalCtx) {
@@ -57,7 +57,7 @@ void EnEndingHero3_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
func_800B78B8(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
}
void EnEndingHero3_Draw(Actor* thisx, GlobalContext* globalCtx) {
@@ -57,7 +57,7 @@ void EnEndingHero4_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
func_800B78B8(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
}
void EnEndingHero4_Draw(Actor* thisx, GlobalContext* globalCtx) {
@@ -64,7 +64,7 @@ void EnEndingHero5_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
func_800B78B8(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
}
Gfx* D_80C23BF0[] = { D_060070C0, D_06006FB0, D_06006E80, D_06006D70, D_0600A390 };
+1 -1
View File
@@ -329,7 +329,7 @@ void EnFg_Update(Actor* thisx, GlobalContext* globalCtx) {
if (1) {}
if (!flagSet) {
this->actionFunc(this, globalCtx);
func_800B78B8(globalCtx, &this->actor, BASE_REG(16, 0), BASE_REG(16, 1), 0.0f, 5);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, BASE_REG(16, 0), BASE_REG(16, 1), 0.0f, 0x5);
}
}
@@ -430,7 +430,8 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, GlobalContext* globalCtx)
func_800BDC5C(&this->skelAnime, animations, GINKO_FLOORSMACKING);
func_801518B0(globalCtx, 0x476, &this->actor);
this->curTextId = 0x476; // you dont have enough deposited to withdrawl
} else if (D_801C1E2C[CUR_UPG_VALUE(UPG_WALLET)] < (globalCtx->msgCtx.bankRupeesSelected + gSaveContext.rupees)) {
} else if (D_801C1E2C[CUR_UPG_VALUE(UPG_WALLET)] <
(globalCtx->msgCtx.bankRupeesSelected + gSaveContext.rupees)) {
// check if wallet is big enough
play_sound(NA_SE_SY_ERROR);
func_801518B0(globalCtx, 0x475, &this->actor);
+1 -1
View File
@@ -1479,7 +1479,7 @@ void EnIn_Update(Actor* thisx, GlobalContext* globalCtx) {
this->unk4AC &= ~0x40;
}
this->actionFunc(this, globalCtx);
func_800B78B8(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 0x4);
func_808F3414(this, globalCtx);
func_808F32A0(this, globalCtx);
}
@@ -257,7 +257,7 @@ void EnMaYts_Init(Actor* thisx, GlobalContext* globalCtx) {
this->collider.dim.radius = 40;
}
func_800B78B8(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 0x4);
Actor_SetScale(&this->actor, 0.01f);
this->unk_1D8.unk_00 = 0;
@@ -591,7 +591,7 @@ void EnMinifrog_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
func_800B78B8(globalCtx, &this->actor, 25.0f, 12.0f, 0.0f, 0x1D);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 25.0f, 12.0f, 0.0f, 0x1D);
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colCheckCtx, &this->collider.base);
this->actor.focus.rot.y = this->actor.shape.rot.y;
File diff suppressed because it is too large Load Diff
+84 -2
View File
@@ -5,11 +5,93 @@
struct EnNiw;
typedef void (*EnNiwActionFunc)(struct EnNiw*, GlobalContext*);
typedef struct {
/* 0x0000 */ u8 isEnabled;
/* 0x0004 */ Vec3f pos;
/* 0x0010 */ Vec3f vel;
/* 0x001C */ Vec3f accel;
/* 0x0028 */ s16 life;
/* 0x002A */ s16 zRotStart;
/* 0x002C */ f32 scale;
/* 0x0030 */ f32 zRot;
/* 0x0034 */ u8 timer;
} EnNiwFeather; // size = 0x38
#define ENNIW_LIMBCOUNT 16
#define ENNIW_FEATHERCOUNT 20
typedef struct EnNiw {
/* 0x000 */ Actor actor;
/* 0x144 */ char unk_144[0x678];
/* 0x144 */ SkelAnime skelanime;
/* 0x188 */ Vec3s limbDrawTbl[ENNIW_LIMBCOUNT];
/* 0x1E8 */ Vec3s transitionDrawtable[ENNIW_LIMBCOUNT];
/* 0x248 */ EnNiwActionFunc actionFunc;
/* 0x24C */ s16 unkTimer24C;
/* 0x24E */ s16 unkTimer24E;
/* 0x250 */ s16 unkTimer250;
/* 0x252 */ s16 unkTimer252;
/* 0x254 */ s16 unkTimer254;
/* 0x256 */ s16 sfxTimer1;
/* 0x258 */ s16 flutterSfxTimer;
/* 0x25A */ s16 unusedTimer25A;
/* 0x25C */ s16 yawTimer; // every 70 frames rechecks yawToPlayer
/* 0x25E */ s16 unusedTimer25E;
/* 0x260 */ s16 unkTimer260;
/* 0x264 */ f32 unk264[10];
/* 0x28C */ s16 unusedCounter28C;
/* 0x28E */ s16 unknownState28E;
/* 0x290 */ s16 unk290;
/* 0x292 */ s16 unk292;
/* 0x294 */ s16 pad294;
/* 0x296 */ s16 unk296;
/* 0x298 */ s16 unk298;
/* 0x29C */ s16 unk29A;
/* 0x29C */ u16 unk29C;
/* 0x29E */ s16 unk29E;
/* 0x2A0 */ s16 isStormActive;
/* 0x2A2 */ s16 niwType;
/* 0x2A4 */ Vec3f unk2A4;
/* 0x2B0 */ Vec3f unk2B0;
/* 0x2BC */ Vec3f unk2BC;
/* 0x2C8 */ f32 limb7Rotz;
/* 0x2CC */ f32 limb7Roty;
/* 0x2D0 */ f32 limb7Rotx;
/* 0x2D4 */ f32 limbBRotz;
/* 0x2D8 */ f32 limbBRoty;
/* 0x2DC */ f32 limbBRotx;
/* 0x2E0 */ f32 limbDRot;
/* 0x2E4 */ f32 limbFRot;
/* 0x2E8 */ s16 yawTowardsPlayer;
/* 0x2EA */ s16 unk2EA;
/* 0x2EC */ s16 unk2EC;
/* 0x2EE */ UNK_TYPE1 pad2EE[0x6];
/* 0x2F4 */ f32 unusedFloat2F4;
/* 0x2F8 */ f32 unusedFloat2F8;
/* 0x2FC */ f32 unusedFloat2FC;
/* 0x300 */ f32 unk300;
/* 0x304 */ f32 unk304;
/* 0x308 */ f32 unk308;
/* 0x30C */ s32 pad30C;
/* 0x310 */ ColliderCylinder collider;
/* 0x35C */ EnNiwFeather feathers[ENNIW_FEATHERCOUNT];
} EnNiw; // size = 0x7BC
extern const ActorInit En_Niw_InitVars;
// in init, any value below zero becomes zero
// however, in vanilla, only 0xFFFF (-1) exists
#define ENNIW_TYPE_VANILLA 0xFFFF
#define ENNIW_TYPE_REGULAR 0
#define ENNIW_TYPE_UNK1 1
#define ENNIW_TYPE_UNK2 2
// the attacking cuccos are not here, they are a different actor:
// ovl_En_Attack_Niw
extern FlexSkeletonHeader D_06002530;
extern AnimationHeader D_060000E8;
// feather display list?
extern Gfx D_060023B0[];
extern Gfx D_06002428[];
#endif // Z_EN_NIW_H
@@ -128,7 +128,7 @@ void EnNutsball_Update(Actor* thisx, GlobalContext* globalCtx) {
Actor_SetVelocityAndMoveXYRotation(&this->actor);
Math_Vec3f_Copy(&worldPos, &this->actor.world.pos);
func_800B78B8(globalCtx, &this->actor, 10.0f, 5.0f, 10.0f, 7);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 10.0f, 5.0f, 10.0f, 0x7);
if (this->actor.bgCheckFlags & 8) {
if (func_800C9A4C(&globalCtx2->colCtx, this->actor.wallPoly, this->actor.wallBgId) & 0x30) {
@@ -1314,7 +1314,7 @@ void EnPametfrog_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->actor.gravity < -0.1f) {
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
arg3 = this->actionFunc == EnPametfrog_FallInAir ? 3.0f : 15.0f;
func_800B78B8(globalCtx, &this->actor, 25.0f, arg3, 3.0f, 0x1F);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 25.0f, arg3, 3.0f, 0x1F);
} else if (this->freezeTimer == 0) {
Actor_SetVelocityAndMoveXYRotation(&this->actor);
this->actor.floorHeight = this->actor.world.pos.y;
@@ -77,7 +77,7 @@ void EnPoFusen_Init(Actor* thisx, GlobalContext* globalCtx) {
this->collider.dim.worldSphere.radius = 40;
SkelAnime_InitSV(globalCtx, &this->anime, &D_060024F0, &D_06000040, this->limbDrawTbl, this->transitionDrawTbl, 10);
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 25.0f);
func_800B78B8(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 0x4);
if (EnPoFusen_CheckParent(this, globalCtx) == 0) {
Actor_MarkForDeath(&this->actor);
+1 -1
View File
@@ -345,7 +345,7 @@ void EnSb_Update(Actor* thisx, GlobalContext* globalCtx) {
Actor_SetHeight(&this->actor, 20.0f);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
this->actionFunc(this, globalCtx);
func_800B78B8(globalCtx, &this->actor, 20.0f, 25.0f, 20.0f, 5);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 25.0f, 20.0f, 5);
EnSb_UpdateDamage(this, globalCtx);
if (player->stateFlags1 & 0x8000000) {
Collider_UpdateCylinder(&this->actor, &this->collider);
@@ -55,7 +55,7 @@ void EnTanron6_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
func_800B78B8(globalCtx, &this->actor, 10.0f, 40.0f, 40.0f, 0x1D);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 10.0f, 40.0f, 40.0f, 0x1D);
}
void EnTanron6_Draw(Actor* thisx, GlobalContext* globalCtx) {
@@ -94,7 +94,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actor.gravity = -1.0f;
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
func_800B78B8(globalCtx, &this->actor, 30.0f, 20.0f, 70.0f, 0x05);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 30.0f, 20.0f, 70.0f, 0x05);
if (this->framesUntilNextState == 0) {
remainingFrames = 0;
@@ -305,7 +305,7 @@ void EnTuboTrap_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
func_800B78B8(globalCtx, &this->actor, 12.0f, 10.0f, 20.0f, 0x1F);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 12.0f, 10.0f, 20.0f, 0x1F);
Actor_SetHeight(&this->actor, 0.0f);
if (this->actor.projectedPos.z < 811.0f) {
@@ -493,9 +493,9 @@ void EnWeatherTag_Update(Actor* thisx, GlobalContext* globalCtx) {
u16 oldTime;
this->actionFunc(this, globalCtx);
if ((globalCtx->actorCtx.unk5 & 2) && (globalCtx->msgCtx.unk11F22 != 0) &&
(globalCtx->msgCtx.unk11F04 == 0x5E6) && (!FrameAdvance_IsEnabled(globalCtx)) && (globalCtx->unk18875 == 0) &&
(ActorCutscene_GetCurrentIndex() == -1) && (globalCtx->csCtx.state == 0)) {
if ((globalCtx->actorCtx.unk5 & 2) && (globalCtx->msgCtx.unk11F22 != 0) && (globalCtx->msgCtx.unk11F04 == 0x5E6) &&
(!FrameAdvance_IsEnabled(globalCtx)) && (globalCtx->unk18875 == 0) && (ActorCutscene_GetCurrentIndex() == -1) &&
(globalCtx->csCtx.state == 0)) {
oldTime = gSaveContext.time;
gSaveContext.time = (u16)REG(0xF) + oldTime; // cast req
@@ -155,7 +155,7 @@ void ObjGhaka_Init(Actor* thisx, GlobalContext* globalCtx) {
BcCheck3_BgActorInit(&this->dyna, 1);
BgCheck_RelocateMeshHeader(&D_06003CD0, &colHeader);
this->dyna.bgId = BgCheck_AddActorMesh(globalCtx, &globalCtx->colCtx.dyna, &this->dyna, colHeader);
func_800B78B8(globalCtx, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
Actor_UpdateBgCheckInfo(globalCtx, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 0x4);
if (this->dyna.actor.floorPoly == 0) {
Actor_MarkForDeath(&this->dyna.actor);
}
@@ -243,7 +243,7 @@ void func_80926B40(ObjKibako* this) {
void func_80926B54(ObjKibako* this, GlobalContext* globalCtx) {
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
func_800B78B8(globalCtx, &this->actor, 18.0f, 15.0f, 0.0f, 0x45);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 18.0f, 15.0f, 0.0f, 0x45);
if (Object_IsLoaded(&globalCtx->objectCtx, this->bankIndex)) {
this->actor.draw = ObjKibako_Draw;
this->actor.objBankIndex = this->bankIndex;
@@ -281,7 +281,7 @@ void ObjKibako_Idle(ObjKibako* this, GlobalContext* globalCtx) {
} else {
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
func_809262BC(this);
func_800B78B8(globalCtx, &this->actor, 18.0f, 15.0f, 0.0f, 0x45);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 18.0f, 15.0f, 0.0f, 0x45);
if (!(this->collider.base.ocFlags1 & 8) && (this->actor.xzDistToPlayer > 28.0f)) {
this->collider.base.ocFlags1 |= 8;
}
@@ -320,7 +320,7 @@ void ObjKibako_Held(ObjKibako* this, GlobalContext* globalCtx) {
s32 sp2C;
func_80926394(this, globalCtx);
if (func_800B8BFC(&this->actor, globalCtx)) {
if (Actor_HasNoParent(&this->actor, globalCtx)) {
this->actor.room = globalCtx->roomContext.currRoom.num;
if (fabsf(this->actor.speedXZ) < 0.1f) {
ObjKibako_SetupIdle(this);
@@ -331,7 +331,7 @@ void ObjKibako_Held(ObjKibako* this, GlobalContext* globalCtx) {
ObjKibako_SetupThrown(this);
this->actor.flags &= ~0x4000000;
}
func_800B78B8(globalCtx, &this->actor, 18.0f, 15.0f, 0.0f, 0x45);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 18.0f, 15.0f, 0.0f, 0x45);
} else {
pos.x = this->actor.world.pos.x;
pos.y = this->actor.world.pos.y + 20.0f;
@@ -386,7 +386,7 @@ void ObjKibako_Thrown(ObjKibako* this, GlobalContext* globalCtx) {
Math_StepToS(&D_8092738C, D_80927388, 0xA0);
this->actor.shape.rot.x = (s16)(this->actor.shape.rot.x + D_80927384);
this->actor.shape.rot.y = (s16)(this->actor.shape.rot.y + D_8092738C);
func_800B78B8(globalCtx, &this->actor, 18.0f, 15.0f, 0.0f, 0x45);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 18.0f, 15.0f, 0.0f, 0x45);
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colCheckCtx, &this->collider.base);
CollisionCheck_SetAT(globalCtx, &globalCtx->colCheckCtx, &this->collider.base);