Bigslime OK and Documented (#361)

* git subrepo pull tools/asm-differ --force

subrepo:
  subdir:   "tools/asm-differ"
  merged:   "d218cdf0"
upstream:
  origin:   "https://github.com/simonlindholm/asm-differ.git"
  branch:   "main"
  commit:   "d218cdf0"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* git subrepo pull tools/graphovl --force

subrepo:
  subdir:   "tools/graphovl"
  merged:   "f5fe93d7"
upstream:
  origin:   "https://github.com/AngheloAlf/graphovl.git"
  branch:   "master"
  commit:   "f5fe93d7"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* git subrepo pull tools/ZAPD --force

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "e7a8a48c"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "e7a8a48c"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* Bring Bigslime over from old branch

* Format

* Improve docs

* format

* More cleanup

* Fix Zero Vectors Name

* Improve docs

* Spelling/Grammar

* Small typo

* Extra space

* Fix zapd merge conflict

* tab

* Fix remaining names

* format

* Better documentation

* format

* fix

* Add names to identity matrices

* Minor Cleanup

* easier to read comments

* Another touch-up

* Missed a spot

* one more...

* typo

* Another typo

* Fix merge master, fix EnBigslime_ApplyDamageEffectBigslime

* PR Feedback

* Fix variable

* Add in gZeroVec3f in new prs

* Fix gZeroVec3f

* gZeroVec3f

* PR Feedback, move lots of static data inside functions

* Use z_actor decomp of `func_800BE680` for better macro name

* Naming gone wrong, but fixed now

* Fix dList

* Add an extra line of docs about shadows for a function

* dList -> shadowDList

* Next round of PR feedback

* Document object file, still need to double check some

* Small cleanup

* Improve and fix many docs, unname unknown material texture

* format

* Oops

* Clean up blobs from object file

* Aha! I finally get what's going on

* Remove Bigslime undefined_syms

* Remove more undefined symbols

Co-authored-by: Angie <angheloalf95@gmail.com>
This commit is contained in:
engineer124
2021-12-27 15:24:45 +11:00
committed by GitHub
parent 5455cbc0c8
commit f19571dfcd
58 changed files with 3472 additions and 711 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ void func_800E992C(GlobalContext* globalCtx, s32 arg1) {
OPEN_DISPS(globalCtx->state.gfxCtx);
func_8012C560(globalCtx->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, &D_801D1DE0, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, func_800E99B0(globalCtx->state.gfxCtx, arg1));
CLOSE_DISPS(globalCtx->state.gfxCtx);
+2 -2
View File
@@ -807,7 +807,7 @@ void EffectBlure_DrawSimpleVertices(GraphicsContext* gfxCtx, EffectBlure* this,
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPVertex(POLY_XLU_DISP++, &vtx[j], 4, 0);
gSP2Triangles(POLY_XLU_DISP++, 0, 1, 3, 0, 0, 3, 2, 0);
gSPMatrix(POLY_XLU_DISP++, &D_801D1DE0, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
}
}
@@ -934,7 +934,7 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx);
gSPMatrix(POLY_XLU_DISP++, &D_801D1DE0, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (this->numElements != 0) {
if (this->flags == 0) {
+1 -1
View File
@@ -145,7 +145,7 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx);
if (this != NULL) {
gSPMatrix(POLY_XLU_DISP++, &D_801D1DE0, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26);
gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE);
+1 -1
View File
@@ -228,7 +228,7 @@ void EffectTireMark_Draw(void* thisx, GraphicsContext* gfxCtx) {
vtx = GRAPH_ALLOC(gfxCtx, ALIGN16(this->numElements * sizeof(Vtx[2])));
if (vtx != NULL) {
gSPMatrix(POLY_OPA_DISP++, &D_801D1DE0, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPMatrix(POLY_OPA_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP++, 0x2C);
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_PASS, G_RM_ZB_CLD_SURF2);
+2 -2
View File
@@ -590,7 +590,7 @@ extern Vec3f D_801AE3E0;
void func_800B2364(GlobalContext* globalCtx, Vec3f* pos, Gfx* dList) {
Vec3f posVec = D_801AE3E0;
EffectSsHahen_Spawn(globalCtx, pos, &D_801D15B0, &posVec, 1, 5, 1, 10, dList);
EffectSsHahen_Spawn(globalCtx, pos, &gZeroVec3f, &posVec, 1, 5, 1, 10, dList);
}
// EffectSsStick Spawn Functions
@@ -1032,7 +1032,7 @@ void EffectSsDeadDs_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity,
}
void func_800B31BC(GlobalContext* globalCtx, Vec3f* pos, s16 scale, s16 scaleStep, s16 alpha, s32 life) {
EffectSsDeadDs_Spawn(globalCtx, pos, &D_801D15B0, &D_801D15B0, scale, scaleStep, alpha, life);
EffectSsDeadDs_Spawn(globalCtx, pos, &gZeroVec3f, &gZeroVec3f, scale, scaleStep, alpha, life);
}
// EffectSsIceSmoke Spawn Functions
+2 -2
View File
@@ -18,14 +18,14 @@ void Room_DrawType0Mesh(GlobalContext* globalCtx, Room* room, u32 flags) {
func_800BCBF4(&D_801C1D10, globalCtx);
gSPSegment(gfxCtx->polyOpa.p++, 0x03, room->segment);
func_8012C268(globalCtx);
gSPMatrix(gfxCtx->polyOpa.p++, &D_801D1DE0, G_MTX_MODELVIEW | G_MTX_LOAD);
gSPMatrix(gfxCtx->polyOpa.p++, &gIdentityMtx, G_MTX_MODELVIEW | G_MTX_LOAD);
}
if (flags & 2) {
func_800BCC68(&D_801C1D10, globalCtx);
gSPSegment(gfxCtx->polyXlu.p++, 0x03, room->segment);
func_8012C2DC(globalCtx->state.gfxCtx);
gSPMatrix(gfxCtx->polyXlu.p++, &D_801D1DE0, G_MTX_MODELVIEW | G_MTX_LOAD);
gSPMatrix(gfxCtx->polyXlu.p++, &gIdentityMtx, G_MTX_MODELVIEW | G_MTX_LOAD);
}
mesh = &room->mesh->type0;
@@ -133,7 +133,7 @@ void BgGoronOyu_SpawnParticles(BgGoronOyu* this, GlobalContext* globalCtx) {
if (BgCheck_EntityRaycastFloor2(globalCtx, &globalCtx->colCtx, &poly, &pos1) < this->waterBoxPos.y) {
pos1.y = this->waterBoxPos.y + 10.0f;
EffectSsIceSmoke_Spawn(globalCtx, &pos1, &vel1, &D_801D15B0, scale);
EffectSsIceSmoke_Spawn(globalCtx, &pos1, &vel1, &gZeroVec3f, scale);
}
pos2.x = (Rand_ZeroOne() * this->waterBoxXLength) + this->waterBoxPos.x;
pos2.y = this->waterBoxPos.y + 100.0f;
@@ -145,7 +145,7 @@ void BgGoronOyu_SpawnParticles(BgGoronOyu* this, GlobalContext* globalCtx) {
if (BgCheck_EntityRaycastFloor2(globalCtx, &globalCtx->colCtx, &poly, &pos2) < this->waterBoxPos.y) {
pos2.y = this->waterBoxPos.y + 10.0f;
EffectSsIceSmoke_Spawn(globalCtx, &pos2, &vel2, &D_801D15B0, scale);
EffectSsIceSmoke_Spawn(globalCtx, &pos2, &vel2, &gZeroVec3f, scale);
}
}
}
@@ -362,7 +362,7 @@ void func_80A9B554(BgHakuginPost* this, GlobalContext* globalCtx, BgHakuginPostU
spA0.x = Math_SinS(val) * temp_f20 + spB8.x;
spA0.y = (Rand_ZeroOne() * 1.2f - 0.1f) * spE4 + spB8.y;
spA0.z = Math_CosS(val) * temp_f20 + spB8.z;
func_800B0E48(globalCtx, &spA0, &D_801D15B0, &D_80A9D8EC, &D_80A9D8E4, &D_80A9D8E8,
func_800B0E48(globalCtx, &spA0, &gZeroVec3f, &D_80A9D8EC, &D_80A9D8E4, &D_80A9D8E8,
(Rand_Next() >> 0x1A) + 0x82, (Rand_Next() >> 0x1A) + 0x6E);
}
@@ -149,7 +149,7 @@ void BgKin2Fence_SpawnEyeSparkles(BgKin2Fence* this, GlobalContext* globalCtx, s
for (i = 0; i < 2; i++) {
Matrix_MultiplyVector3fByState(&eyeSparkleSpawnPositions[mask][i], &sp58);
EffectSsKiraKira_SpawnDispersed(globalCtx, &sp58, &D_801D15B0, &D_801D15B0, &primColor, &envColor, 6000, -10);
EffectSsKiraKira_SpawnDispersed(globalCtx, &sp58, &gZeroVec3f, &gZeroVec3f, &primColor, &envColor, 6000, -10);
}
}
+2 -2
View File
@@ -555,8 +555,8 @@ void func_809DA460(Boss02Effects* effects, Vec3f* vec) {
if ((effects->unk_24 == 0) || (effects->unk_24 == 3)) {
effects->unk_24 = 4;
effects->unk_00 = *vec;
Math_Vec3f_Copy(&effects->unk_0C, &D_801D15B0);
Math_Vec3f_Copy(&effects->unk_18, &D_801D15B0);
Math_Vec3f_Copy(&effects->unk_0C, &gZeroVec3f);
Math_Vec3f_Copy(&effects->unk_18, &gZeroVec3f);
effects->unk_2C = 0xFF;
effects->unk_34 = 0.0f;
break;
@@ -200,8 +200,8 @@ void EnBaguo_Idle(EnBaguo* this, GlobalContext* globalCtx) {
yaw = this->actor.yawTowardsPlayer - this->actor.world.rot.y;
absoluteYaw = ABS_ALT(yaw);
Math_Vec3f_Copy(&this->targetRotation, &D_801D15B0);
Math_Vec3f_Copy(&this->currentRotation, &D_801D15B0);
Math_Vec3f_Copy(&this->targetRotation, &gZeroVec3f);
Math_Vec3f_Copy(&this->currentRotation, &gZeroVec3f);
if (absoluteYaw < 0x2000) {
this->targetRotation.x = 2000.0f;
} else {
@@ -707,13 +707,13 @@ void EnBigpo_BurnAwayDeath(EnBigpo* this, GlobalContext* globalCtx) {
// not sure what we're turning this into, but its based on the timer
modifiedTimer = ((f32)((this->idleTimer * 10) + 80) * 1.4000001f);
func_800B3030(globalCtx, &tempVec, &D_80B6506C, &D_801D15B0, modifiedTimer, 0, 2);
func_800B3030(globalCtx, &tempVec, &D_80B6506C, &gZeroVec3f, modifiedTimer, 0, 2);
tempVec.x = (2.0f * this->actor.world.pos.x) - tempVec.x;
tempVec.z = (2.0f * this->actor.world.pos.z) - tempVec.z;
func_800B3030(globalCtx, &tempVec, &D_80B6506C, &D_801D15B0, modifiedTimer, 0, 2);
func_800B3030(globalCtx, &tempVec, &D_80B6506C, &gZeroVec3f, modifiedTimer, 0, 2);
tempVec.x = this->actor.world.pos.x;
tempVec.z = this->actor.world.pos.z;
func_800B3030(globalCtx, &tempVec, &D_80B6506C, &D_801D15B0, modifiedTimer, 0, 2);
func_800B3030(globalCtx, &tempVec, &D_80B6506C, &gZeroVec3f, modifiedTimer, 0, 2);
} else if (this->idleTimer >= 28) {
EnBigpo_SetupLanternDrop(this, globalCtx);
@@ -1378,7 +1378,7 @@ void EnBigpo_DrawLantern(Actor* thisx, GlobalContext* globalCtx) {
magnitude2 = (magnitude > 1.0f) ? (20.0f / magnitude) : (20.0f);
Math_Vec3f_Scale(&vec1, magnitude2);
} else {
Math_Vec3f_Copy(&vec1, &D_801D15B0);
Math_Vec3f_Copy(&vec1, &gZeroVec3f);
}
{
File diff suppressed because it is too large Load Diff
@@ -63,7 +63,7 @@ typedef struct EnBigslime {
u8 minislimeCounter;
u8 numGekkoMeleeAttacks; // The Gekko will melee-attack link at 1-3 times at each position while engulfed in bigslime
};
/* 0x02B4 */ u8 iceShardAlpha;
/* 0x02B4 */ u8 shockwaveAlpha;
/* 0x02B5 */ u8 gekkoDrawEffect;
/* 0x02B6 */ s16 gekkoYaw;
/* 0x02B8 */ s16 cutscene;
@@ -95,16 +95,16 @@ typedef struct EnBigslime {
};
/* 0x02C2 */ s16 ceilingDropTimer; // Bigslime is still during this timer and shakes before dropping
/* 0x02C4 */ s16 numGekkoPosGrabPlayer; // The Gekko will melee-attack link at 6 positions while engulfed in bigslime
/* 0x02C6 */ s16 camId;
/* 0x02C8 */ s16 cameraYawGrabPlayer;
/* 0x02C6 */ s16 subCamId;
/* 0x02C8 */ s16 subCamYawGrabPlayer;
/* 0x02CA */ s16 rotation; // is always 0, used in Matrix_RotateY
/* 0x02CC */ s16 itemDropTimer; // items only drop when zero, Set to 40 then decrements, prevents itemDrop spam
/* 0x02CE */ Vec3s gekkoRot;
/* 0x02D4 */ Vec3f gekkoPosOffset; // Used when Bigslime grabs link
/* 0x02E0 */ Vec3f gekkoProjectedPos;
/* 0x02EC */ union {
Vec3f iceShardRefPos;
Vec3f eyeDistToFrog; // Used to zoom into frogs as Gekko despawns/Frog spawns
Vec3f frozenPos;
Vec3f subCamDistToFrog; // Used to zoom into frogs as Gekko despawns/Frog spawns
};
/* 0x02F8 */ Vec3f limbPos[12];
/* 0x0388 */ f32 unk_388; // used as arg to func_800BE680
@@ -114,14 +114,14 @@ typedef struct EnBigslime {
/* 0x0398 */ f32 vtxSurfacePerturbation[BIGSLIME_NUM_VTX];
/* 0x0620 */ f32 vtxScaleX;
/* 0x0624 */ f32 vtxScaleZ;
/* 0x0628 */ f32 iceShardScale;
/* 0x0628 */ f32 shockwaveScale;
/* 0x062C */ ColliderCylinder gekkoCollider;
/* 0x0678 */ ColliderCylinder bigslimeCollider[BIGSLIME_NUM_RING_FACES];
/* 0x0A14 */ EnMinislime* minislime[MINISLIME_NUM_SPAWN];
/* 0x0A44 */ EnMinislime* minislimeToThrow;
/* 0x0A48 */ AnimatedMaterial* bigslimeFrozenTex;
/* 0x0A4C */ AnimatedMaterial* minislimeFrozenTex;
/* 0x0A50 */ AnimatedMaterial* iceShardTex;
/* 0x0A48 */ AnimatedMaterial* bigslimeFrozenTexAnim;
/* 0x0A4C */ AnimatedMaterial* minislimeFrozenTexAnim;
/* 0x0A50 */ AnimatedMaterial* iceShardTexAnim;
/* 0x0A54 */ EnBigslimeIceShardEffect iceShardEffect[BIGSLIME_NUM_ICE_SHARD]; // 312 = 162 (bigslime) + 10 * 15 (minislime)
} EnBigslime; // size = 0x3634
+1 -1
View File
@@ -591,7 +591,7 @@ s32 func_80B3F598(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
}
if (limbIndex == 11) {
Matrix_MultiplyVector3fByState(&D_801D15B0, &this->unk_1E4);
Matrix_MultiplyVector3fByState(&gZeroVec3f, &this->unk_1E4);
}
if (limbIndex == 10) {
@@ -547,7 +547,7 @@ void func_808BE4D4(EnDekunuts* this, GlobalContext* globalCtx) {
sp40.x = this->actor.world.pos.x;
sp40.y = this->actor.world.pos.y + 18.0f;
sp40.z = this->actor.world.pos.z;
EffectSsDeadDb_Spawn(globalCtx, &sp40, &D_801D15B0, &D_801D15B0, &D_808BEF90, &D_808BEF94, 200, 0, 13);
EffectSsDeadDb_Spawn(globalCtx, &sp40, &gZeroVec3f, &gZeroVec3f, &D_808BEF90, &D_808BEF94, 200, 0, 13);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 11, NA_SE_EN_EXTINCT);
sp40.y = this->actor.world.pos.y + 10.0f;
EffectSsHahen_SpawnBurst(globalCtx, &sp40, 3.0f, 0, 12, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
@@ -1475,7 +1475,7 @@ void func_8089DC84(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
sp4C.x -= sp48->mf[3][0];
sp4C.y -= sp48->mf[3][1];
sp4C.z -= sp48->mf[3][2];
EffectSsDFire_Spawn(globalCtx, &this->unk_34C, &sp4C, &D_801D15B0, 30, 22, 255 - (sp58 * 20), 20, 3, 8);
EffectSsDFire_Spawn(globalCtx, &this->unk_34C, &sp4C, &gZeroVec3f, 30, 22, 255 - (sp58 * 20), 20, 3, 8);
this->unk_292 = this->unk_290;
}
}
+3 -3
View File
@@ -47,7 +47,7 @@ void func_80A4FDD0(EnDnbParticle* particle, EnDnb* this, s16* alloc, s32 idx) {
particle->unk_00 = sp1C;
particle->unk_0C = sp1C;
particle->unk_24 = Math_Vec3f_Yaw(&this->dyna.actor.world.pos, &sp1C);
particle->unk_18 = D_801D15BC;
particle->unk_18 = gZeroVec3s;
}
s32 func_80A4FEBC(EnDnbParticle* particle, f32 arg1) {
@@ -76,7 +76,7 @@ void func_80A4FFE8(EnDnbParticle* particle, s16 arg1) {
particle->unk_1E.x = (Rand_ZeroOne() - 0.5f) * 400.0f;
particle->unk_1E.y = (Rand_ZeroOne() - 0.5f) * 400.0f;
particle->unk_1E.z = (Rand_ZeroOne() - 0.5f) * 400.0f;
particle->unk_18 = D_801D15BC;
particle->unk_18 = gZeroVec3s;
particle->unk_30 = 40.0f;
particle->unk_2C = 0.0f;
particle->unk_26 = arg1;
@@ -86,7 +86,7 @@ void func_80A4FFE8(EnDnbParticle* particle, s16 arg1) {
s32 func_80A500F8(EnDnb* this) {
static Vec3f D_80A50CB0 = { 0.0f, 0.0f, 1000.0f };
Actor* actor = &this->dyna.actor;
Vec3f spA8 = D_801D15B0;
Vec3f spA8 = gZeroVec3f;
Vec3f sp9C;
s32 i;
f32 temp_f20;
+2 -2
View File
@@ -283,7 +283,7 @@ s32 func_80A51A78(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
void func_80A51AA4(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
EnDnk* this = THIS;
MtxF sp5C;
Vec3f sp50 = D_801D15B0;
Vec3f sp50 = gZeroVec3f;
Vec3f sp44;
Vec3s sp3C;
@@ -359,7 +359,7 @@ s32 func_80A51D78(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
void func_80A51DA4(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
EnDnk* this = THIS;
MtxF sp5C;
Vec3f sp50 = D_801D15B0;
Vec3f sp50 = gZeroVec3f;
Vec3f sp44;
Vec3s sp3C;
+1 -1
View File
@@ -435,7 +435,7 @@ s32 func_80B3D974(s16 arg0, s16 arg1, Vec3f* arg2, Vec3s* arg3, s32 arg4, s32 ar
Vec3s sp6C;
MtxF sp2C;
Matrix_MultiplyVector3fByState(&D_801D15B0, &sp74);
Matrix_MultiplyVector3fByState(&gZeroVec3f, &sp74);
Matrix_CopyCurrentState(&sp2C);
func_8018219C(&sp2C, &sp6C, 0);
*arg2 = sp74;
+7 -7
View File
@@ -284,11 +284,11 @@ s32 func_8092CCEC(EnDns* this, GlobalContext* globalCtx) {
Math_Vec3f_Copy(&sp30, &this->actor.world.pos);
Math_Vec3f_Copy(&sp3C, &player->actor.world.pos);
this->unk_2D6 = Math_Vec3f_Yaw(&D_801D15B0, &sp3C);
this->unk_2D4 = Math_Vec3f_Yaw(&D_801D15B0, &sp30);
this->unk_2EC = Math_Vec3f_DistXZ(&sp30, &D_801D15B0);
sp2E = Math_Vec3f_Yaw(&D_801D15B0, &sp3C);
sp2E -= Math_Vec3f_Yaw(&D_801D15B0, &sp30);
this->unk_2D6 = Math_Vec3f_Yaw(&gZeroVec3f, &sp3C);
this->unk_2D4 = Math_Vec3f_Yaw(&gZeroVec3f, &sp30);
this->unk_2EC = Math_Vec3f_DistXZ(&sp30, &gZeroVec3f);
sp2E = Math_Vec3f_Yaw(&gZeroVec3f, &sp3C);
sp2E -= Math_Vec3f_Yaw(&gZeroVec3f, &sp30);
this->unk_2D8 = (Rand_ZeroOne() * 182.0f) + 182.0f;
this->unk_2D8 = (sp2E > 0) ? this->unk_2D8 : -this->unk_2D8;
this->unk_2D0 = 0x28;
@@ -413,7 +413,7 @@ void EnDns_DoNothing(EnDns* this, GlobalContext* globalCtx) {
void func_8092D330(EnDns* this, GlobalContext* globalCtx) {
s32 pad;
Vec3f sp30 = D_801D15B0;
Vec3f sp30 = gZeroVec3f;
s16 temp = this->unk_2D6 - this->unk_2D4;
if (ABS_ALT(temp) < 0xC16) {
@@ -549,7 +549,7 @@ s32 func_8092D954(s16 arg0, s16 arg1, Vec3f* arg2, Vec3s* arg3, s32 arg4, s32 ar
Vec3s sp6C;
MtxF sp2C;
Matrix_MultiplyVector3fByState(&D_801D15B0, &sp74);
Matrix_MultiplyVector3fByState(&gZeroVec3f, &sp74);
Matrix_CopyCurrentState(&sp2C);
func_8018219C(&sp2C, &sp6C, 0);
*arg2 = sp74;
@@ -384,7 +384,7 @@ void func_80876930(EnDodongo* this, GlobalContext* globalCtx, Vec3f* arg2) {
sp88.z = randPlusMinusPoint5Scaled(temp3) + arg2->z;
D_8087933C.x = randPlusMinusPoint5Scaled(2.0f);
D_8087933C.z = randPlusMinusPoint5Scaled(2.0f);
func_800B0DE0(globalCtx, &sp88, &D_801D15B0, &D_8087933C, sp80, sp7C, temp1, temp2);
func_800B0DE0(globalCtx, &sp88, &gZeroVec3f, &D_8087933C, sp80, sp7C, temp1, temp2);
}
}
@@ -780,13 +780,13 @@ void func_80877E60(EnDodongo* this, GlobalContext* globalCtx) {
sp5E = this->unk_334 * 50.0f;
sp5C = this->unk_334 * 5.0f;
Math_Vec3f_Copy(&sp64, &this->unk_348[0]);
func_800B0DE0(globalCtx, &sp64, &D_801D15B0, &D_80879360, &D_8087936C, &D_8087936C, sp5E, sp5C);
func_800B0DE0(globalCtx, &sp64, &gZeroVec3f, &D_80879360, &D_8087936C, &D_8087936C, sp5E, sp5C);
sp64.x -= Math_CosS(this->actor.shape.rot.y) * 6.0f * this->unk_334;
sp64.z += Math_SinS(this->actor.shape.rot.y) * 6.0f * this->unk_334;
func_800B0DE0(globalCtx, &sp64, &D_801D15B0, &D_80879360, &D_8087936C, &D_8087936C, sp5E, sp5C);
func_800B0DE0(globalCtx, &sp64, &gZeroVec3f, &D_80879360, &D_8087936C, &D_8087936C, sp5E, sp5C);
sp64.x = (2.0f * this->unk_348[0].x) - sp64.x;
sp64.z = (2.0f * this->unk_348[0].z) - sp64.z;
func_800B0DE0(globalCtx, &sp64, &D_801D15B0, &D_80879360, &D_8087936C, &D_8087936C, sp5E, sp5C);
func_800B0DE0(globalCtx, &sp64, &gZeroVec3f, &D_80879360, &D_8087936C, &D_8087936C, sp5E, sp5C);
}
}
@@ -1069,11 +1069,11 @@ void EnFish2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
}
if (limbIndex == 14) {
Matrix_MultiplyVector3fByState(&D_801D15B0, &this->unk_318);
Matrix_MultiplyVector3fByState(&gZeroVec3f, &this->unk_318);
}
if (limbIndex == 17) {
Matrix_MultiplyVector3fByState(&D_801D15B0, &this->unk_300);
Matrix_MultiplyVector3fByState(&gZeroVec3f, &this->unk_300);
}
Collider_UpdateSpheres(limbIndex, &this->collider);
@@ -461,10 +461,10 @@ void func_808D14DC(EnFloormas* this, GlobalContext* globalCtx) {
sp28.x = Math_SinS(this->actor.shape.rot.y + 0x6000) * 7.0f;
sp28.z = Math_CosS(this->actor.shape.rot.y + 0x6000) * 7.0f;
func_800B1210(globalCtx, &sp34, &sp28, &D_801D15B0, 0x1C2, 0x64);
func_800B1210(globalCtx, &sp34, &sp28, &gZeroVec3f, 0x1C2, 0x64);
sp28.x = Math_SinS(this->actor.shape.rot.y - 0x6000) * 7.0f;
sp28.z = Math_CosS(this->actor.shape.rot.y - 0x6000) * 7.0f;
func_800B1210(globalCtx, &sp34, &sp28, &D_801D15B0, 0x1C2, 0x64);
func_800B1210(globalCtx, &sp34, &sp28, &gZeroVec3f, 0x1C2, 0x64);
func_800B9010(&this->actor, NA_SE_EN_FLOORMASTER_SLIDING - SFX_FLAG);
}
@@ -682,7 +682,7 @@ void func_808D1ED4(EnFloormas* this, GlobalContext* globalCtx) {
sp34.x = this->actor.world.pos.x;
sp34.y = this->actor.world.pos.y + 15.0f;
sp34.z = this->actor.world.pos.z;
func_800B3030(globalCtx, &sp34, &D_801D15B0, &D_801D15B0, 150, -10, 2);
func_800B3030(globalCtx, &sp34, &gZeroVec3f, &gZeroVec3f, 150, -10, 2);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 11, NA_SE_EN_EXTINCT);
this->actionFunc = func_808D1F7C;
}
+3 -3
View File
@@ -1408,7 +1408,7 @@ s32 func_8095097C(EnGm* this, GlobalContext* globalCtx) {
func_8013AF00(sp7C, 3, this->unk_234->count + 3);
if (!(this->unk_3A4 & 8)) {
sp58 = D_801D15B0;
sp58 = gZeroVec3f;
func_8013B6B0(this->unk_234, &this->unk_244, &this->unk_254, this->unk_24C, this->unk_248, &this->unk_250, sp7C,
&sp58, this->unk_3C4);
func_8013B878(globalCtx, this->unk_234, this->unk_250, &sp58);
@@ -1427,7 +1427,7 @@ s32 func_8095097C(EnGm* this, GlobalContext* globalCtx) {
sp58 = this->actor.world.pos;
}
this->unk_238 = D_801D15B0;
this->unk_238 = gZeroVec3f;
if (func_8013B6B0(this->unk_234, &this->unk_244, &this->unk_254, this->unk_24C, this->unk_248, &this->unk_250, sp7C,
&this->unk_238, this->unk_3C4)) {
@@ -1705,7 +1705,7 @@ void func_809514BC(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
CLOSE_DISPS(globalCtx->state.gfxCtx);
if (limbIndex == 9) {
Matrix_MultiplyVector3fByState(&D_801D15B0, &sp30);
Matrix_MultiplyVector3fByState(&gZeroVec3f, &sp30);
Math_Vec3f_ToVec3s(&this->colliderSphere.dim.worldSphere.center, &sp30);
}
}
@@ -221,7 +221,6 @@ extern Gfx D_06000720[];
extern Gfx D_06000080[];
extern s32 D_801BDA9C;
extern Vec3s D_801D15BC;
const ActorInit En_Invadepoh_InitVars = {
ACTOR_EN_INVADEPOH,
@@ -2568,7 +2567,7 @@ void func_80B48620(Actor* thisx, GlobalContext* globalCtx) {
this->actor.update = func_80B4873C;
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06013928, &D_06009E58, this->jointTable, this->morphTable,
23);
func_80B45C04(&this->behaviorInfo, D_80B4EA90, 6, D_80B4EB00, 2, &D_801D15BC, 5000, 0.05f, 0.3f, 0.12f);
func_80B45C04(&this->behaviorInfo, D_80B4EA90, 6, D_80B4EB00, 2, &gZeroVec3s, 5000, 0.05f, 0.3f, 0.12f);
Animation_PlayLoop(&this->skelAnime, &D_06009E58);
func_80B482D4(this);
}
@@ -2636,7 +2635,7 @@ void func_80B48948(EnInvadepoh* this) {
this->actionTimer = Rand_S16Offset(150, 150);
if (rand < 0.5f) {
this->rand = 0;
Math_Vec3s_Copy(&substruct->unk26, &D_801D15BC);
Math_Vec3s_Copy(&substruct->unk26, &gZeroVec3s);
substruct->unk30 = 0.1f;
substruct->unk2C = 1000;
} else if (rand < 0.75f) {
@@ -2702,7 +2701,7 @@ void func_80B48AD4(EnInvadepoh* this, GlobalContext* globalCtx) {
if (temp_v1_3 != this->rand) {
this->rand = temp_v1_3;
if (this->rand == 0) {
Math_Vec3s_Copy(&substruct->unk26, &D_801D15BC);
Math_Vec3s_Copy(&substruct->unk26, &gZeroVec3s);
substruct->unk30 = 0.07f;
} else if (this->rand == 1) {
substruct->unk26.x = Rand_S16Offset(1000, 1000);
@@ -2772,7 +2771,7 @@ void func_80B48FB0(Actor* thisx, GlobalContext* globalCtx) {
this->actor.textId = 0x3330;
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06013928, &D_06009E58, this->jointTable, this->morphTable,
23);
func_80B45C04(&this->behaviorInfo, D_80B4EA90, 6, D_80B4EB00, 2, &D_801D15BC, 100, 0.03, 0.3, 0.03);
func_80B45C04(&this->behaviorInfo, D_80B4EA90, 6, D_80B4EB00, 2, &gZeroVec3s, 100, 0.03, 0.3, 0.03);
func_80B444F4(this, globalCtx);
EnInvadepoh_SetPathPointToWorldPos(this, 0);
func_800B4AEC(globalCtx, &this->actor, 50.0f);
@@ -3124,7 +3123,7 @@ void func_80B49F88(Actor* thisx, GlobalContext* globalCtx) {
func_80B44F58();
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06013928, &D_06014088, this->jointTable, this->morphTable,
23);
func_80B45C04(&this->behaviorInfo, D_80B4EA90, 1, D_80B4EB00, 1, &D_801D15BC, 100, 0.03, 0.3, 0.03);
func_80B45C04(&this->behaviorInfo, D_80B4EA90, 1, D_80B4EB00, 1, &gZeroVec3s, 100, 0.03, 0.3, 0.03);
func_80B44540(this, globalCtx);
func_80B44570(this);
func_80B44C24(this, globalCtx);
@@ -3355,7 +3354,7 @@ void func_80B4A9C8(Actor* thisx, GlobalContext* globalCtx) {
func_80B44F58();
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06013928, &D_06014088, this->jointTable, this->morphTable,
23);
func_80B45C04(&this->behaviorInfo, D_80B4EA90, 1, D_80B4EB00, 1, &D_801D15BC, 100, 0.03f, 0.3f, 0.03f);
func_80B45C04(&this->behaviorInfo, D_80B4EA90, 1, D_80B4EB00, 1, &gZeroVec3s, 100, 0.03f, 0.3f, 0.03f);
func_80B44620(this, globalCtx);
if ((sp38 < CLOCK_TIME(2, 15)) || (sp38 >= CLOCK_TIME(6, 0))) {
this->pathIndex = 0;
@@ -3532,7 +3531,7 @@ void func_80B4B0C4(Actor* thisx, GlobalContext* globalCtx) {
23);
Animation_MorphToLoop(&this->skelAnime, &D_06009E58, 0.0f);
substruct = &this->behaviorInfo;
func_80B45C04(&this->behaviorInfo, D_80B4EA90, 1, D_80B4EB00, 3, &D_801D15BC, 2000, 0.08f, 0.3f, 0.03f);
func_80B45C04(&this->behaviorInfo, D_80B4EA90, 1, D_80B4EB00, 3, &gZeroVec3s, 2000, 0.08f, 0.3f, 0.03f);
substruct->unk30 = 0.08f;
substruct->unk2C = 0x7D0;
func_800B4AEC(globalCtx, &this->actor, 50.0f);
@@ -3685,7 +3684,7 @@ void func_80B4B8BC(Actor* thisx, GlobalContext* globalCtx) {
Actor_SetObjectSegment(globalCtx, &this->actor);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_060080F0, &D_060021C8, this->jointTable, this->morphTable,
13);
func_80B45C04(&this->behaviorInfo, 0, 0, 0, 0, &D_801D15BC, 3000, 0.1f, 0.0f, 0.0f);
func_80B45C04(&this->behaviorInfo, 0, 0, 0, 0, &gZeroVec3s, 3000, 0.1f, 0.0f, 0.0f);
func_80B44664(this, globalCtx);
EnInvadepoh_SetPathPointToWorldPos(this, 0);
func_800B4AEC(globalCtx, &this->actor, 50.0f);
@@ -3919,7 +3918,7 @@ void func_80B4C3A0(Actor* thisx, GlobalContext* globalCtx) {
func_80B44FEC();
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06015C28, &D_06016720, this->jointTable, this->morphTable,
22);
func_80B45C04(&this->behaviorInfo, D_80B4EBDC, 1, D_80B4EC08, 0, &D_801D15BC, 100, 0.03f, 0.3f, 0.03f);
func_80B45C04(&this->behaviorInfo, D_80B4EBDC, 1, D_80B4EC08, 0, &gZeroVec3s, 100, 0.03f, 0.3f, 0.03f);
this->actor.textId = 0x33CD;
if (currentTime < 0xD5A0) {
this->unk304 = -0x8000;
@@ -4140,7 +4139,7 @@ void func_80B4CE54(Actor* thisx, GlobalContext* globalCtx) {
func_80B44F58();
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06013928, &D_06014088, this->jointTable, this->morphTable,
23);
func_80B45C04(&this->behaviorInfo, D_80B4EA90, 1, D_80B4EB00, 3, &D_801D15BC, 100, 0.03f, 0.3f, 0.03f);
func_80B45C04(&this->behaviorInfo, D_80B4EA90, 1, D_80B4EB00, 3, &gZeroVec3s, 100, 0.03f, 0.3f, 0.03f);
func_80B446D0(this, globalCtx);
this->actor.world.rot.y = this->actor.shape.rot.y;
func_80B44700(this);
@@ -1157,8 +1157,7 @@ void EnKakasi_LimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
EnKakasi* this = (EnKakasi*)actor;
if (limbIndex == 4) {
// what is D_801D15B0 ? we didn't have to define it, we store the output though
Matrix_MultiplyVector3fByState(&D_801D15B0, &this->unk1BC);
Matrix_MultiplyVector3fByState(&gZeroVec3f, &this->unk1BC);
}
}
@@ -215,7 +215,7 @@ void EnMinislime_AddIceSmokeEffect(EnMinislime* this, GlobalContext* globalCtx)
vel.x = randPlusMinusPoint5Scaled(1.5f);
vel.z = randPlusMinusPoint5Scaled(1.5f);
vel.y = 2.0f;
EffectSsIceSmoke_Spawn(globalCtx, &pos, &vel, &D_801D15B0, 500);
EffectSsIceSmoke_Spawn(globalCtx, &pos, &vel, &gZeroVec3f, 500);
}
void EnMinislime_SetupDisappear(EnMinislime* this) {
@@ -219,7 +219,7 @@ s32 func_80A68C5C(Vec3f* arg0, Vec3f* arg1) {
f32 temp_f0 = Math3D_Vec3fMagnitude(arg0);
if (temp_f0 < 0.005f) {
Math_Vec3f_Copy(arg0, &D_801D15B0);
Math_Vec3f_Copy(arg0, &gZeroVec3f);
return false;
} else {
arg1->x = arg0->x * (1.0f / temp_f0);
@@ -1095,7 +1095,7 @@ void func_80A6B0D8(EnMushi2* this, GlobalContext* globalCtx) {
sp48.x = (this->unk_328.x * -0.6f) + (this->unk_31C.x * 0.1f);
sp48.y = (this->unk_328.y * -0.6f) + (this->unk_31C.y * 0.1f);
sp48.z = (this->unk_328.z * -0.6f) + (this->unk_31C.z * 0.1f);
func_800B0E48(globalCtx, &this->actor.world.pos, &sp48, &D_801D15B0, &D_80A6B984[sp44], &D_80A6B98C[sp44],
func_800B0E48(globalCtx, &this->actor.world.pos, &sp48, &gZeroVec3f, &D_80A6B984[sp44], &D_80A6B98C[sp44],
(Rand_ZeroOne() * 5.0f) + 8.0f, (Rand_ZeroOne() * 5.0f) + 8.0f);
}
@@ -7,6 +7,7 @@
#include "z_en_pametfrog.h"
#include "overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "objects/object_bigslime/object_bigslime.h"
#define FLAGS 0x00000035
@@ -65,28 +66,6 @@ void EnPametfrog_SnapperSpawn(EnPametfrog* this, GlobalContext* globalCtx);
void EnPametfrog_SetupTransitionGekkoSnapper(EnPametfrog* this, GlobalContext* globalCtx);
void EnPametfrog_TransitionGekkoSnapper(EnPametfrog* this, GlobalContext* globalCtx);
extern AnimationHeader D_06000994; // Begin Rear on Snapper
extern AnimationHeader D_06001B08; // Call Snapper
extern AnimationHeader D_06001E14; // Crawl on Wall
extern AnimationHeader D_06001F20; // Falling
extern AnimationHeader D_060030E4; // Get up from Back
extern AnimationHeader D_0600347C; // Jab Punch
extern AnimationHeader D_060039C4; // Jump on Ground
extern AnimationHeader D_06003F28; // Kick
extern AnimationHeader D_06004298; // Fall on Back
extern AnimationHeader D_06004680; // Idle
extern AnimationHeader D_06004894; // Jump on Snapper
extern AnimationHeader D_06004D50; // Continue Rear on Snapper
extern AnimationHeader D_060050B8; // Squeeze Body
extern AnimationHeader D_060052EC; // Land on Snapper
extern AnimationHeader D_06005694; // Wiggle
extern AnimationHeader D_06005D54; // Head Knockback
extern AnimationHeader D_060066B4; // Look Around
extern AnimationHeader D_060070C4; // Hook Punch
extern FlexSkeletonHeader D_0600DF98;
extern AnimationHeader D_0600F048; // Windup Punch
extern AnimationHeader D_0600F990; // Melee Ready Stance
const ActorInit En_Pametfrog_InitVars = {
ACTOR_EN_PAMETFROG,
ACTORCAT_BOSS,
@@ -207,7 +186,8 @@ void EnPametfrog_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 55.0f);
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInit);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600DF98, &D_0600F990, this->jointTable, this->morphTable, 24);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGekkoSkel, &gGekkoBoxingStanceAnim, this->jointTable,
this->morphTable, GEKKO_LIMB_MAX);
Collider_InitAndSetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, this->colElement);
this->params = CLAMP(this->actor.params, 1, 4);
if (Actor_GetRoomCleared(globalCtx, globalCtx->roomCtx.currRoom.num)) {
@@ -250,7 +230,7 @@ u8 EnPametfrog_Vec3fNormalize(Vec3f* vec) {
}
}
void EnPametfrog_ChangeColliderFreeze(EnPametfrog* this) {
void EnPametfrog_Freeze(EnPametfrog* this) {
this->drawEffect = GEKKO_DRAW_EFFECT_FROZEN;
this->collider.base.colType = COLTYPE_HIT3;
this->collider.elements->info.elemType = ELEMTYPE_UNK0;
@@ -259,14 +239,14 @@ void EnPametfrog_ChangeColliderFreeze(EnPametfrog* this) {
this->unk_2C4 = 1.0f;
}
void EnPametfrog_ChangeColliderThaw(EnPametfrog* this, GlobalContext* globalCtx) {
void EnPametfrog_Thaw(EnPametfrog* this, GlobalContext* globalCtx) {
this->freezeTimer = 0;
if (this->drawEffect == GEKKO_DRAW_EFFECT_FROZEN) {
this->drawEffect = GEKKO_DRAW_EFFECT_NONE;
this->drawEffect = GEKKO_DRAW_EFFECT_THAW;
this->collider.base.colType = COLTYPE_HIT6;
this->collider.elements->info.elemType = ELEMTYPE_UNK1;
this->unk_2C4 = 0.0f;
func_800BF7CC(globalCtx, &this->actor, this->limbPos, 12, 2, 0.3f, 0.2f);
func_800BF7CC(globalCtx, &this->actor, this->limbPos, ARRAY_COUNT(this->limbPos), 2, 0.3f, 0.2f);
}
}
@@ -407,7 +387,7 @@ void EnPametfrog_JumpOnGround(EnPametfrog* this, GlobalContext* globalCtx) {
void EnPametfrog_ApplyMagicArrowEffects(EnPametfrog* this, GlobalContext* globalCtx) {
if (this->actor.colChkInfo.damageEffect == GEKKO_DMGEFF_FIRE) {
this->drawEffect = GEKKO_DRAW_EFFECT_NONE;
this->drawEffect = GEKKO_DRAW_EFFECT_THAW;
this->unk_2C4 = 3.0f;
this->unk_2C8 = 0.75f;
} else if (this->actor.colChkInfo.damageEffect == GEKKO_DMGEFF_LIGHT) {
@@ -418,7 +398,7 @@ void EnPametfrog_ApplyMagicArrowEffects(EnPametfrog* this, GlobalContext* global
this->collider.elements[0].info.bumper.hitPos.x, this->collider.elements[0].info.bumper.hitPos.y,
this->collider.elements[0].info.bumper.hitPos.z, 0, 0, 0, CLEAR_TAG_LARGE_LIGHT_RAYS);
} else if (this->actor.colChkInfo.damageEffect == GEKKO_DMGEFF_ICE) {
EnPametfrog_ChangeColliderFreeze(this);
EnPametfrog_Freeze(this);
}
}
@@ -439,11 +419,11 @@ void EnPametfrog_ApplyStun(EnPametfrog* this) {
void EnPametfrog_SetupRearOnSnapper(EnPametfrog* this) {
if (this->actionFunc == EnPametfrog_RearOnSnapperRise) {
Animation_PlayOnce(&this->skelAnime, &D_06005694);
Animation_PlayOnce(&this->skelAnime, &gGekkoWiggleAnim);
} else if (this->actionFunc == EnPametfrog_RearOnSnapperWave) {
Animation_PlayOnce(&this->skelAnime, &D_060052EC);
Animation_PlayOnce(&this->skelAnime, &gGekkoLandOnSnapperAnim);
} else {
Animation_PlayOnce(&this->skelAnime, &D_06004680);
Animation_PlayOnce(&this->skelAnime, &gGekkoStandingIdleAnim);
}
this->actor.flags &= ~1;
@@ -458,9 +438,9 @@ void EnPametfrog_RearOnSnapper(EnPametfrog* this, GlobalContext* globalCtx) {
if (SkelAnime_Update(&this->skelAnime)) {
if (Rand_ZeroOne() < 0.5f) {
Animation_PlayOnce(&this->skelAnime, &D_06004D50);
Animation_PlayOnce(&this->skelAnime, &gGekkoQuickFistPumpAnim);
} else {
Animation_PlayOnce(&this->skelAnime, &D_06004680);
Animation_PlayOnce(&this->skelAnime, &gGekkoStandingIdleAnim);
}
}
@@ -478,7 +458,7 @@ void EnPametfrog_RearOnSnapper(EnPametfrog* this, GlobalContext* globalCtx) {
}
void EnPametfrog_SetupRearOnSnapperWave(EnPametfrog* this) {
Animation_PlayOnce(&this->skelAnime, &D_06004894);
Animation_PlayOnce(&this->skelAnime, &gGekkoJumpOnSnapperAnim);
this->timer = 15;
this->actionFunc = EnPametfrog_RearOnSnapperWave;
}
@@ -493,7 +473,7 @@ void EnPametfrog_RearOnSnapperWave(EnPametfrog* this, GlobalContext* globalCtx)
}
void EnPametfrog_SetupRearOnSnapperRise(EnPametfrog* this) {
Animation_PlayOnce(&this->skelAnime, &D_060050B8);
Animation_PlayOnce(&this->skelAnime, &gGekkoSqueezeAnim);
this->timer = 10;
this->actor.params = GEKKO_REAR_ON_SNAPPER;
this->actor.shape.rot.x = 0;
@@ -517,7 +497,7 @@ void EnPametfrog_SetupFallOffSnapper(EnPametfrog* this, GlobalContext* globalCtx
Vec3f eye;
s16 yaw;
Animation_PlayOnce(&this->skelAnime, &D_06001F20);
Animation_PlayOnce(&this->skelAnime, &gGekkoFallInAirAnim);
this->actor.params = GEKKO_FALL_OFF_SNAPPER;
this->actor.speedXZ = 7.0f;
this->actor.velocity.y = 15.0f;
@@ -554,7 +534,7 @@ void EnPametfrog_FallOffSnapper(EnPametfrog* this, GlobalContext* globalCtx) {
}
void EnPametfrog_SetupJumpToWall(EnPametfrog* this) {
Animation_Change(&this->skelAnime, &D_060039C4, 2.0f, 0.0f, 0.0f, 0, -2.0f);
Animation_Change(&this->skelAnime, &gGekkoJumpForwardAnim, 2.0f, 0.0f, 0.0f, 0, -2.0f);
this->actor.shape.rot.x = 0;
this->actor.shape.rot.z = 0;
this->actor.bgCheckFlags &= ~8;
@@ -578,14 +558,14 @@ void EnPametfrog_JumpToWall(EnPametfrog* this, GlobalContext* globalCtx) {
void EnPametfrog_SetupWallCrawl(EnPametfrog* this) {
if (this->actionFunc == EnPametfrog_JumpToWall) {
Animation_PlayLoop(&this->skelAnime, &D_06001E14);
Animation_PlayLoop(&this->skelAnime, &gGekkoCrawlAnim);
this->collider.base.acFlags |= AC_ON;
this->unk_2D0.x = 0.0f;
this->unk_2D0.z = 0.0f;
this->actor.gravity = 0.0f;
this->actor.world.pos.y = this->actor.focus.pos.y;
this->unk_2D0.y = 1.0f;
Math_Vec3f_Copy(&this->actor.colChkInfo.displacement, &D_801D15B0);
Math_Vec3f_Copy(&this->actor.colChkInfo.displacement, &gZeroVec3f);
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->unk_2DC.x = COLPOLY_GET_NORMAL(this->actor.wallPoly->normal.x);
this->unk_2DC.y = COLPOLY_GET_NORMAL(this->actor.wallPoly->normal.y);
@@ -721,7 +701,8 @@ void EnPametfrog_WallPause(EnPametfrog* this, GlobalContext* globalCtx) {
void EnPametfrog_SetupClimbDownWall(EnPametfrog* this) {
s16 yaw;
Animation_Change(&this->skelAnime, &D_060039C4, 0.0f, 0.0f, Animation_GetLastFrame(&D_060039C4), 2, 0.0f);
Animation_Change(&this->skelAnime, &gGekkoJumpForwardAnim, 0.0f, 0.0f,
Animation_GetLastFrame(&gGekkoJumpForwardAnim), 2, 0.0f);
this->actor.shape.rot.y = Actor_YawBetweenActors(&this->actor, this->actor.child);
this->actor.world.rot.y = this->actor.shape.rot.y;
this->actor.shape.rot.x = 0;
@@ -755,7 +736,7 @@ void EnPametfrog_ClimbDownWall(EnPametfrog* this, GlobalContext* globalCtx) {
}
void EnPametfrog_SetupRunToSnapper(EnPametfrog* this) {
Animation_Change(&this->skelAnime, &D_060039C4, 2.0f, 0.0f, 0.0f, 0, -2.0f);
Animation_Change(&this->skelAnime, &gGekkoJumpForwardAnim, 2.0f, 0.0f, 0.0f, 0, -2.0f);
this->actor.params = GEKKO_RETURN_TO_SNAPPER;
this->actionFunc = EnPametfrog_RunToSnapper;
}
@@ -778,7 +759,7 @@ void EnPametfrog_RunToSnapper(EnPametfrog* this, GlobalContext* globalCtx) {
}
void EnPametfrog_SetupJumpOnSnapper(EnPametfrog* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06004680, 6.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gGekkoStandingIdleAnim, 6.0f);
this->timer = 6;
this->collider.base.ocFlags1 &= ~OC1_ON;
this->collider.base.acFlags &= ~AC_ON;
@@ -810,7 +791,7 @@ void EnPametfrog_JumpOnSnapper(EnPametfrog* this, GlobalContext* globalCtx) {
}
void EnPametfrog_SetupLandOnSnapper(EnPametfrog* this) {
Animation_PlayOnce(&this->skelAnime, &D_06000994);
Animation_PlayOnce(&this->skelAnime, &gGekkoFullFistPumpAnim);
this->actor.shape.rot.y = this->actor.child->shape.rot.y;
this->actor.params = GEKKO_ON_SNAPPER;
this->actionFunc = EnPametfrog_LandOnSnapper;
@@ -828,7 +809,7 @@ void EnPametfrog_SetupFallInAir(EnPametfrog* this, GlobalContext* globalCtx) {
Vec3f eye;
f32 xzDist;
Animation_PlayOnce(&this->skelAnime, &D_06001F20);
Animation_PlayOnce(&this->skelAnime, &gGekkoFallInAirAnim);
if (this->actor.colChkInfo.health > 0) {
this->actor.params = GEKKO_RETURN_TO_SNAPPER;
}
@@ -889,13 +870,13 @@ void EnPametfrog_FallInAir(EnPametfrog* this, GlobalContext* globalCtx) {
}
void EnPametfrog_SetupFallOnGround(EnPametfrog* this, GlobalContext* globalCtx) {
Animation_PlayOnce(&this->skelAnime, &D_06004298);
Animation_PlayOnce(&this->skelAnime, &gGekkoFallOnGroundAnim);
this->actor.shape.rot.x = 0;
this->actor.shape.rot.y += this->spinYaw;
this->actor.shape.rot.z = 0;
this->spinYaw = 0;
this->timer = 5;
EnPametfrog_ChangeColliderThaw(this, globalCtx);
EnPametfrog_Thaw(this, globalCtx);
EnPametfrog_JumpWaterEffects(this, globalCtx);
Audio_PlayActorSound2(&this->actor, NA_SE_EV_WALK_WATER);
this->actionFunc = EnPametfrog_FallOnGround;
@@ -903,14 +884,14 @@ void EnPametfrog_SetupFallOnGround(EnPametfrog* this, GlobalContext* globalCtx)
void EnPametfrog_FallOnGround(EnPametfrog* this, GlobalContext* globalCtx) {
if (SkelAnime_Update(&this->skelAnime)) {
if (this->skelAnime.animation == &D_06004298) {
if (this->skelAnime.animation == &gGekkoFallOnGroundAnim) {
if (this->actor.colChkInfo.health == 0) {
this->timer--;
if (this->timer == 0) {
EnPametfrog_SetupDefeatGekko(this, globalCtx);
}
} else {
Animation_PlayOnce(&this->skelAnime, &D_060030E4);
Animation_PlayOnce(&this->skelAnime, &gGekkoRecoverAnim);
}
} else {
EnPametfrog_SetupRunToSnapper(this);
@@ -982,7 +963,7 @@ void EnPametfrog_SetupSpawnFrog(EnPametfrog* this, GlobalContext* globalCtx) {
vec1.y = this->actor.world.pos.y + 25.0f;
vec1.z = (Math_CosS(yaw) * 20.0f) + this->actor.world.pos.z;
this->collider.base.ocFlags1 &= ~OC1_ON;
func_800B0DE0(globalCtx, &vec1, &D_801D15B0, &D_801D15B0, &primColor, &envColor, 800, 50);
func_800B0DE0(globalCtx, &vec1, &gZeroVec3f, &gZeroVec3f, &primColor, &envColor, 800, 50);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_NPC_APPEAR);
Actor_SetRoomClearedTemp(globalCtx, globalCtx->roomCtx.currRoom.num);
@@ -1043,7 +1024,7 @@ void EnPametfrog_PlayCutscene(EnPametfrog* this, GlobalContext* globalCtx) {
}
void EnPametfrog_SetupLookAround(EnPametfrog* this) {
Animation_PlayOnce(&this->skelAnime, &D_060066B4);
Animation_PlayOnce(&this->skelAnime, &gGekkoLookAroundAnim);
this->collider.base.atFlags &= ~AT_ON;
this->actor.speedXZ = 0.0f;
this->actor.world.rot.y = this->actor.shape.rot.y;
@@ -1064,7 +1045,7 @@ void EnPametfrog_LookAround(EnPametfrog* this, GlobalContext* globalCtx) {
}
void EnPametfrog_SetupJumpToLink(EnPametfrog* this) {
Animation_PlayLoop(&this->skelAnime, &D_060039C4);
Animation_PlayLoop(&this->skelAnime, &gGekkoJumpForwardAnim);
this->collider.base.acFlags |= AC_ON;
this->actor.world.rot.y = this->actor.shape.rot.y;
this->actionFunc = EnPametfrog_JumpToLink;
@@ -1089,17 +1070,17 @@ void EnPametfrog_JumpToLink(EnPametfrog* this, GlobalContext* globalCtx) {
}
void EnPametfrog_SetupMeleeAttack(EnPametfrog* this) {
Animation_PlayOnce(&this->skelAnime, &D_0600F990);
Animation_PlayOnce(&this->skelAnime, &gGekkoBoxingStanceAnim);
this->timer = 7;
this->actor.speedXZ = 0.0f;
this->actionFunc = EnPametfrog_MeleeAttack;
}
static AnimationHeader* sAttackAnimations[] = {
&D_0600347C, // Jab Punch
&D_060070C4, // Hook Punch
&D_06003F28, // Kick
&D_0600F048, // Windup Punch
&gGekkoJabPunchAnim,
&gGekkoHookPunchAnim,
&gGekkoKickAnim,
&gGekkoWindupPunchAnim,
};
void EnPametfrog_MeleeAttack(EnPametfrog* this, GlobalContext* globalCtx) {
@@ -1109,18 +1090,18 @@ void EnPametfrog_MeleeAttack(EnPametfrog* this, GlobalContext* globalCtx) {
if (this->timer == 0) {
EnPametfrog_SetupLookAround(this);
} else if (this->timer == 6) {
Animation_PlayOnce(&this->skelAnime, &D_0600F990);
Animation_PlayOnce(&this->skelAnime, &gGekkoBoxingStanceAnim);
} else {
Animation_PlayOnce(&this->skelAnime, sAttackAnimations[(s32)Rand_ZeroFloat(4.0f) % 4]);
}
}
if ((this->skelAnime.animation == &D_0600347C && Animation_OnFrame(&this->skelAnime, 2.0f)) ||
(this->skelAnime.animation == &D_060070C4 && Animation_OnFrame(&this->skelAnime, 9.0f)) ||
(this->skelAnime.animation == &D_06003F28 && Animation_OnFrame(&this->skelAnime, 2.0f)) ||
((this->skelAnime.animation == &D_0600F048) && Animation_OnFrame(&this->skelAnime, 27.0f))) {
if ((this->skelAnime.animation == &gGekkoJabPunchAnim && Animation_OnFrame(&this->skelAnime, 2.0f)) ||
(this->skelAnime.animation == &gGekkoHookPunchAnim && Animation_OnFrame(&this->skelAnime, 9.0f)) ||
(this->skelAnime.animation == &gGekkoKickAnim && Animation_OnFrame(&this->skelAnime, 2.0f)) ||
((this->skelAnime.animation == &gGekkoWindupPunchAnim) && Animation_OnFrame(&this->skelAnime, 27.0f))) {
this->collider.base.atFlags |= AT_ON;
if (this->skelAnime.animation == &D_06003F28) {
if (this->skelAnime.animation == &gGekkoKickAnim) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FROG_KICK);
} else {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FROG_PUNCH1);
@@ -1131,7 +1112,7 @@ void EnPametfrog_MeleeAttack(EnPametfrog* this, GlobalContext* globalCtx) {
}
void EnPametfrog_SetupDamage(EnPametfrog* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06005D54, -3.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gGekkoKnockbackAnim, -3.0f);
this->timer = 20;
this->collider.base.atFlags &= ~AT_ON;
this->collider.base.acFlags &= ~AC_ON;
@@ -1157,7 +1138,7 @@ void EnPametfrog_Damage(EnPametfrog* this, GlobalContext* globalCtx) {
}
void EnPametfrog_SetupStun(EnPametfrog* this) {
if (this->skelAnime.animation == &D_060039C4) {
if (this->skelAnime.animation == &gGekkoJumpForwardAnim) {
this->skelAnime.curFrame = 0.0f;
SkelAnime_Update(&this->skelAnime);
}
@@ -1175,10 +1156,10 @@ void EnPametfrog_SetupStun(EnPametfrog* this) {
void EnPametfrog_Stun(EnPametfrog* this, GlobalContext* globalCtx) {
this->freezeTimer--;
if (this->freezeTimer == 0) {
EnPametfrog_ChangeColliderThaw(this, globalCtx);
EnPametfrog_Thaw(this, globalCtx);
EnPametfrog_SetupJumpToLink(this);
} else if (this->freezeTimer == 78) {
EnPametfrog_ChangeColliderThaw(this, globalCtx);
EnPametfrog_Thaw(this, globalCtx);
this->actor.colorFilterTimer = 0;
EnPametfrog_SetupCutscene(this);
}
@@ -1189,7 +1170,7 @@ void EnPametfrog_SetupCallSnapper(EnPametfrog* this, GlobalContext* globalCtx) {
Vec3f at;
s16 yawDiff;
Animation_MorphToPlayOnce(&this->skelAnime, &D_06001B08, 3.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gGekkoCallAnim, 3.0f);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FROG_GREET);
this->actor.flags &= ~1;
this->actor.colChkInfo.health = 6;
@@ -1298,14 +1279,14 @@ void EnPametfrog_ApplyDamageEffect(EnPametfrog* this, GlobalContext* globalCtx)
EnPametfrog_ApplyStun(this);
EnPametfrog_SetupStun(this);
} else if (this->actor.colChkInfo.damageEffect == GEKKO_DMGEFF_ICE) {
EnPametfrog_ChangeColliderFreeze(this);
EnPametfrog_Freeze(this);
this->freezeTimer = 80;
func_800BCB70(&this->actor, 0x4000, 0xFF, 0, 0x50);
EnPametfrog_SetupStun(this);
} else {
EnPametfrog_ChangeColliderThaw(this, globalCtx);
EnPametfrog_Thaw(this, globalCtx);
if (this->actor.colChkInfo.damageEffect == GEKKO_DMGEFF_FIRE) {
this->drawEffect = GEKKO_DRAW_EFFECT_NONE;
this->drawEffect = GEKKO_DRAW_EFFECT_THAW;
this->unk_2C8 = 0.75f;
this->unk_2C4 = 4.0f;
} else if (this->actor.colChkInfo.damageEffect == GEKKO_DMGEFF_LIGHT) {
@@ -1388,19 +1369,19 @@ void EnPametfrog_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
/* index -1: Limb Not used
* index 0: GEKKO_LIMB_WAIST
* index 1: GEKKO_LIMB_L_SHIN
* index 2: GEKKO_LIMB_L_FOOT
* index 3: GEKKO_LIMB_R_SHIN
* index 4: GEKKO_LIMB_R_FOOT
* index 5: GEKKO_LIMB_L_UPPER_ARM
* index 6: GEKKO_LIMB_L_FOREARM
* index 7: GEKKO_LIMB_L_HAND
* index 8: GEKKO_LIMB_R_UPPER_ARM
* index 9: GEKKO_LIMB_R_FOREARM
* index 10: GEKKO_LIMB_R_HAND
* index 11: GEKKO_LIMB_JAW
/* value -1: Limb Not used
* value 0: GEKKO_LIMB_WAIST
* value 1: GEKKO_LIMB_L_SHIN
* value 2: GEKKO_LIMB_L_FOOT
* value 3: GEKKO_LIMB_R_SHIN
* value 4: GEKKO_LIMB_R_FOOT
* value 5: GEKKO_LIMB_L_UPPER_ARM
* value 6: GEKKO_LIMB_L_FOREARM
* value 7: GEKKO_LIMB_L_HAND
* value 8: GEKKO_LIMB_R_UPPER_ARM
* value 9: GEKKO_LIMB_R_FOREARM
* value 10: GEKKO_LIMB_R_HAND
* value 11: GEKKO_LIMB_JAW
*/
static s8 limbPosIndex[] = {
-1, -1, 0, -1, 1, -1, 2, -1, 3, -1, 4, -1, 5, 6, -1, 7, 8, 9, -1, 10, -1, 11, -1, -1,
@@ -21,7 +21,7 @@ typedef enum {
} EnPametfrogState;
typedef enum {
/* 00 */ GEKKO_DRAW_EFFECT_NONE, // May be GEKKO_DRAW_EFFECT_THAW
/* 00 */ GEKKO_DRAW_EFFECT_THAW,
/* 10 */ GEKKO_DRAW_EFFECT_FROZEN = 10,
/* 20 */ GEKKO_DRAW_EFFECT_LIGHT_ORBS = 20,
/* 30 */ GEKKO_DRAW_EFFECT_ELECTRIC_STUN = 30,
+5 -5
View File
@@ -1449,7 +1449,7 @@ s32 func_80AF9E7C(EnPm* this, GlobalContext* globalCtx) {
func_8013AF00(sp7C, 3, this->unk_234->count + 3);
if (!(this->unk_356 & 8)) {
sp58 = D_801D15B0;
sp58 = gZeroVec3f;
func_8013B6B0(this->unk_234, &this->unk_244, &this->unk_254, this->unk_24C, this->unk_248, &this->unk_250, sp7C,
&sp58, this->unk_374);
func_8013B878(globalCtx, this->unk_234, this->unk_250, &sp58);
@@ -1468,7 +1468,7 @@ s32 func_80AF9E7C(EnPm* this, GlobalContext* globalCtx) {
sp58 = this->actor.world.pos;
}
this->unk_238 = D_801D15B0;
this->unk_238 = gZeroVec3f;
if (func_8013B6B0(this->unk_234, &this->unk_244, &this->unk_254, this->unk_24C, this->unk_248, &this->unk_250, sp7C,
&this->unk_238, this->unk_374)) {
@@ -1827,7 +1827,7 @@ void func_80AFAA44(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
switch (limbIndex) {
case 15:
if (ActorCutscene_GetCurrentIndex() == -1) {
Matrix_MultiplyVector3fByState(&D_801D15B0, &this->actor.focus.pos);
Matrix_MultiplyVector3fByState(&gZeroVec3f, &this->actor.focus.pos);
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.world.rot);
}
if ((this->unk_356 & 0x8000) && !(gSaveContext.weekEventReg[90] & 4)) {
@@ -1843,10 +1843,10 @@ void func_80AFAA44(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
case 8:
if ((this->unk_258 == 9) || (this->unk_258 == 20) || (this->unk_258 == 21) || (this->unk_258 == 22)) {
Matrix_MultiplyVector3fByState(&D_801D15B0, &sp2C);
Matrix_MultiplyVector3fByState(&gZeroVec3f, &sp2C);
Math_Vec3f_ToVec3s(&this->colliderSphere.dim.worldSphere.center, &sp2C);
} else if (this->unk_258 == 24) {
Matrix_MultiplyVector3fByState(&D_801D15B0, &sp2C);
Matrix_MultiplyVector3fByState(&gZeroVec3f, &sp2C);
Math_Vec3f_ToVec3s(&this->colliderSphere.dim.worldSphere.center, &sp2C);
}
func_80AF8890(this, gfx, 2);
@@ -726,7 +726,7 @@ void func_80B1BE4C(EnPoSisters* this, s32 arg1) {
sp34.x = this->actor.world.pos.x;
sp34.y = this->actor.world.pos.y + 45.0f;
sp34.z = this->actor.world.pos.z;
func_800B3030(arg1, &sp34, &D_801D15B0, &D_801D15B0, 150, 0, 3);
func_800B3030(arg1, &sp34, &gZeroVec3f, &gZeroVec3f, 150, 0, 3);
}
Lights_PointSetColorAndRadius(&this->lightInfo, 0, 0, 0, 0);
this->actionFunc = func_80B1BF2C;
+4 -4
View File
@@ -203,7 +203,7 @@ void func_80B2C910(Vec3f* vec, GlobalContext* globalCtx) {
}
Math_Vec3f_ScaleAndStore(&sp20, temp_f0, vec);
} else {
Math_Vec3f_Copy(vec, &D_801D15B0);
Math_Vec3f_Copy(vec, &gZeroVec3f);
}
}
@@ -426,13 +426,13 @@ void func_80B2D300(EnPoh* this, GlobalContext* globalCtx) {
sp44.z = (Math_CosS(sp38) * 23.0f) + this->actor.world.pos.z;
}
sp36 = (this->unk_18E * 10) + 80;
func_800B3030(globalCtx, &sp44, &D_80B2F710, &D_801D15B0, sp36, 0, 2);
func_800B3030(globalCtx, &sp44, &D_80B2F710, &gZeroVec3f, sp36, 0, 2);
sp44.x = (2.0f * this->actor.world.pos.x) - sp44.x;
sp44.z = (2.0f * this->actor.world.pos.z) - sp44.z;
func_800B3030(globalCtx, &sp44, &D_80B2F710, &D_801D15B0, sp36, 0, 2);
func_800B3030(globalCtx, &sp44, &D_80B2F710, &gZeroVec3f, sp36, 0, 2);
sp44.x = this->actor.world.pos.x;
sp44.z = this->actor.world.pos.z;
func_800B3030(globalCtx, &sp44, &D_80B2F710, &D_801D15B0, sp36, 0, 2);
func_800B3030(globalCtx, &sp44, &D_80B2F710, &gZeroVec3f, sp36, 0, 2);
} else if (this->unk_18E == 28) {
func_80B2DC50(this, globalCtx);
} else if (this->unk_18E > 18) {
@@ -611,7 +611,7 @@ void func_80BA6800(EnRailgibud* this, GlobalContext* globalCtx, s32 arg2) {
void func_80BA6974(GlobalContext* globalCtx, Vec3f* vec, f32 arg2, s32 arg3, s16 arg4, s16 arg5) {
Vec3f sp8C;
Vec3f sp80 = { 0.0f, 0.3f, 0.0f };
Vec3f sp74 = D_801D15B0;
Vec3f sp74 = gZeroVec3f;
s32 i;
s32 pad;
+1 -1
View File
@@ -720,7 +720,7 @@ void func_808FB42C(EnRr* this, GlobalContext* globalCtx) {
sp74.x = this->actor.world.pos.x;
sp74.y = this->actor.world.pos.y + 20.0f;
sp74.z = this->actor.world.pos.z;
func_800B3030(globalCtx, &sp74, &D_801D15B0, &D_801D15B0, 100, 0, 0);
func_800B3030(globalCtx, &sp74, &gZeroVec3f, &gZeroVec3f, 100, 0, 0);
Audio_PlaySoundAtPosition(globalCtx, &sp74, 11, NA_SE_EN_EXTINCT);
} else {
temp_f20 = this->actor.scale.y * 66.66667f;
@@ -411,7 +411,7 @@ void func_80BAAFDC(EnSuttari* this, GlobalContext* globalCtx) {
Matrix_MultiplyVector3fByState(&effectVelOffset, &effectVel);
Matrix_StatePop();
if (this->unk3F0 == 0) {
EffectSsSolderSrchBall_Spawn(globalCtx, &effectPos, &effectVel, &D_801D15B0, 50, &this->unk3F0, 1);
EffectSsSolderSrchBall_Spawn(globalCtx, &effectPos, &effectVel, &gZeroVec3f, 50, &this->unk3F0, 1);
}
if (this->unk3F0 == 1) {
play_sound(NA_SE_SY_FOUND);
@@ -443,7 +443,7 @@ void func_80BAB1A0(EnSuttari* this, GlobalContext* globalCtx) {
Matrix_MultiplyVector3fByState(&effectVelOffset, &effectVel);
Matrix_StatePop();
if (this->unk3F0 == 0) {
EffectSsSolderSrchBall_Spawn(globalCtx, &effectPos, &effectVel, &D_801D15B0, 50, &this->unk3F0, 1);
EffectSsSolderSrchBall_Spawn(globalCtx, &effectPos, &effectVel, &gZeroVec3f, 50, &this->unk3F0, 1);
}
if (this->unk3F0 == 1) {
play_sound(NA_SE_SY_FOUND);
@@ -755,7 +755,7 @@ s32 func_80BABFD4(EnSuttari* this, GlobalContext* globalCtx) {
func_8013AF00(sp7C, 3, this->unk404->count + 3);
if (this->unk42C == 0) {
sp58 = D_801D15B0;
sp58 = gZeroVec3f;
func_8013B6B0(this->unk404, &this->unk414, &this->unk424, this->unk41C, this->unk418, &this->unk420, sp7C,
&sp58, this->unk42A);
func_8013B878(globalCtx, this->unk404, this->unk420, &sp58);
@@ -771,7 +771,7 @@ s32 func_80BABFD4(EnSuttari* this, GlobalContext* globalCtx) {
sp50 = this->unk420;
sp58 = this->actor.world.pos;
}
this->unk408 = D_801D15B0;
this->unk408 = gZeroVec3f;
if (func_8013B6B0(this->unk404, &this->unk414, &this->unk424, this->unk41C, this->unk418, &this->unk420, sp7C,
&this->unk408, this->unk42A)) {
this->unk430 = 1;
+3 -3
View File
@@ -174,11 +174,11 @@ void func_808D8940(EnSw* this, GlobalContext* globalCtx) {
sp94.x = 0.0f;
sp94.y = (Rand_ZeroOne() * 0.2f) + 0.1f;
sp94.z = Rand_ZeroOne() + 1.0f;
Lib_Vec3f_TranslateAndRotateY(&D_801D15B0, temp_s0, &sp94, &spAC);
Lib_Vec3f_TranslateAndRotateY(&gZeroVec3f, temp_s0, &sp94, &spAC);
sp94.x = 0.0f;
sp94.y = 0.7f;
sp94.z = 2.0f;
Lib_Vec3f_TranslateAndRotateY(&D_801D15B0, temp_s0, &sp94, &spB8);
Lib_Vec3f_TranslateAndRotateY(&gZeroVec3f, temp_s0, &sp94, &spB8);
spA0.x = this->actor.world.pos.x + (2.0f * spB8.x);
spA0.z = this->actor.world.pos.z + (2.0f * spB8.z);
func_800B0EB0(globalCtx, &spA0, &spB8, &spAC, &D_808DBAA4, &D_808DBAA8, 60, 30, temp_f4);
@@ -1148,7 +1148,7 @@ void func_808DB2E0(EnSw* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALTURA_BOUND);
} else {
func_800BC154(globalCtx, &globalCtx->actorCtx, &this->actor, 5);
Math_Vec3f_Copy(&this->actor.velocity, &D_801D15B0);
Math_Vec3f_Copy(&this->actor.velocity, &gZeroVec3f);
this->unk_410 &= ~(0x10 | 0x1);
this->actionFunc = func_808DB100;
}
@@ -102,7 +102,7 @@ void EnTest5_Update(Actor* thisx, GlobalContext* globalCtx2) {
steamVel.x = 0.0f;
steamVel.z = 0.0f;
EffectSsIceSmoke_Spawn(globalCtx, &steamPos, &steamVel, &D_801D15B0,
EffectSsIceSmoke_Spawn(globalCtx, &steamPos, &steamVel, &gZeroVec3f,
(s16)((-200) - (s32)(Rand_ZeroOne() * 50.0f)));
}
}
@@ -658,7 +658,7 @@ void func_80C11DF0(EnThiefbird* this, GlobalContext* globalCtx) {
if ((this->actor.bgCheckFlags & 1) || (this->actor.floorHeight == BGCHECK_Y_MIN)) {
for (i = 0; i < ARRAY_COUNT(this->unk_350); i++) {
func_800B3030(globalCtx, &this->unk_350[i], &D_801D15B0, &D_801D15B0, 0x8C, 0, 0);
func_800B3030(globalCtx, &this->unk_350[i], &gZeroVec3f, &gZeroVec3f, 0x8C, 0, 0);
}
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 11, NA_SE_EN_EXTINCT);
+3 -3
View File
@@ -266,7 +266,7 @@ void func_80893BCC(EnTite* this, GlobalContext* globalCtx) {
sp7C.x = ptr->x + randPlusMinusPoint5Scaled(1.0f);
sp7C.y = ptr->y + randPlusMinusPoint5Scaled(1.0f);
sp7C.z = ptr->z + randPlusMinusPoint5Scaled(1.0f);
func_800B0DE0(globalCtx, &sp7C, &D_801D15B0, &D_80896B64, &D_80896B3C, &D_80896B40,
func_800B0DE0(globalCtx, &sp7C, &gZeroVec3f, &D_80896B64, &D_80896B3C, &D_80896B40,
(s32)Rand_ZeroFloat(16.0f) + 80, 15);
}
}
@@ -677,7 +677,7 @@ void func_808951B8(EnTite* this, GlobalContext* globalCtx) {
if (this->unk_2BC == 0) {
for (i = 0; i < ARRAY_COUNT(this->unk_2D0); i++) {
func_800B3030(globalCtx, &this->unk_2D0[i], &D_801D15B0, &D_801D15B0, 40, 7, 1);
func_800B3030(globalCtx, &this->unk_2D0[i], &gZeroVec3f, &gZeroVec3f, 40, 7, 1);
Audio_PlaySoundAtPosition(globalCtx, &this->unk_2D0[i], 11, NA_SE_EN_EXTINCT);
}
Actor_MarkForDeath(&this->actor);
@@ -816,7 +816,7 @@ void func_8089595C(EnTite* this, GlobalContext* globalCtx) {
sp2C.x = randPlusMinusPoint5Scaled(20.0f) + this->actor.world.pos.x;
sp2C.y = this->actor.world.pos.y + 15.0f;
sp2C.z = randPlusMinusPoint5Scaled(20.0f) + this->actor.world.pos.z;
func_800B0DE0(globalCtx, &sp2C, &D_801D15B0, &D_80896B44, &D_80896B3C, &D_80896B40, 500, 50);
func_800B0DE0(globalCtx, &sp2C, &gZeroVec3f, &D_80896B44, &D_80896B3C, &D_80896B40, 500, 50);
}
void func_80895A10(EnTite* this) {
+2 -2
View File
@@ -405,7 +405,7 @@ s32 func_80AECE60(EnTk* this, GlobalContext* globalCtx) {
func_8013AF00(spA0, 3, this->unk_3C8->count + 3);
if (!(this->unk_3CE & 4)) {
sp7C = D_801D15B0;
sp7C = gZeroVec3f;
func_8013B6B0(this->unk_3C8, &this->unk_3E0, &this->unk_3F0, this->unk_3E8, this->unk_3E4, &this->unk_3EC, spA0,
&sp7C, this->unk_3D0);
func_8013B878(globalCtx, this->unk_3C8, this->unk_3EC, &sp7C);
@@ -428,7 +428,7 @@ s32 func_80AECE60(EnTk* this, GlobalContext* globalCtx) {
sp7C = this->actor.world.pos;
}
this->unk_3D4 = D_801D15B0;
this->unk_3D4 = gZeroVec3f;
if (func_8013B6B0(this->unk_3C8, &this->unk_3E0, &this->unk_3F0, this->unk_3E8, this->unk_3E4, &this->unk_3EC, spA0,
&this->unk_3D4, this->unk_3D0)) {
+2 -2
View File
@@ -1712,11 +1712,11 @@ void EnTrt_UpdateHeadYawAndPitch(EnTrt* this, GlobalContext* globalCtx) {
void EnTrt_UpdateHeadPosAndRot(s16 pitch, s16 yaw, Vec3f* pos, Vec3s* rot, s32 isFullyAwake) {
Vec3f newPos;
Vec3f D_801D15B0tmp = D_801D15B0;
Vec3f zeroVec = gZeroVec3f;
Vec3s newRot;
MtxF currentState;
Matrix_MultiplyVector3fByState(&D_801D15B0tmp, &newPos);
Matrix_MultiplyVector3fByState(&zeroVec, &newPos);
Matrix_CopyCurrentState(&currentState);
func_8018219C(&currentState, &newRot, MTXMODE_NEW);
*pos = newPos;
+15 -15
View File
@@ -130,7 +130,7 @@ void func_80A85620(EnTruUnkStruct* arg0, Vec3f* arg1, f32 arg2, f32 arg3, f32 ar
arg0->unk_01 = arg0->unk_02;
arg0->unk_00 = 1;
arg0->unk_04 = *arg1;
arg0->unk_1C = D_801D15B0;
arg0->unk_1C = gZeroVec3f;
arg0->unk_10 = D_80A8B250;
arg0->unk_28 = arg2;
arg0->unk_2C = arg3;
@@ -190,8 +190,8 @@ void func_80A85AA4(EnTruUnkStruct* arg0, Vec3f* arg1, f32 arg2, f32 arg3, f32 ar
arg0->unk_01 = arg0->unk_02;
arg0->unk_00 = 2;
arg0->unk_04 = *arg1;
arg0->unk_1C = D_801D15B0;
arg0->unk_10 = D_801D15B0;
arg0->unk_1C = gZeroVec3f;
arg0->unk_10 = gZeroVec3f;
arg0->unk_28 = arg2;
arg0->unk_2C = arg3;
break;
@@ -350,23 +350,23 @@ s32 func_80A86460(EnTru* this) {
f32 temp_f6;
s16 phi_s1;
Math_Vec3f_Copy(&spB0, &D_801D15B0);
Math_Vec3f_Copy(&sp8C, &D_801D15B0);
Math_Vec3f_Copy(&spA4, &D_801D15B0);
Math_Vec3f_Copy(&sp98, &D_801D15B0);
Math_Vec3f_Copy(&spB0, &gZeroVec3f);
Math_Vec3f_Copy(&sp8C, &gZeroVec3f);
Math_Vec3f_Copy(&spA4, &gZeroVec3f);
Math_Vec3f_Copy(&sp98, &gZeroVec3f);
phi_s1 = (Rand_ZeroOne() * 360.0f) * 182.0f;
spB0.z = 20.0f;
Lib_Vec3f_TranslateAndRotateY(&this->actor.world.pos, this->actor.world.rot.y, &spB0, &sp8C);
for (i = 0; i < 8; i++, phi_s1 += 0x1FFE) {
Math_Vec3f_Copy(&spB0, &D_801D15B0);
Math_Vec3f_Copy(&spB0, &gZeroVec3f);
spB0.y = 1.0f;
spB0.z = Rand_ZeroOne() + 3.0f;
Lib_Vec3f_TranslateAndRotateY(&D_801D15B0, phi_s1, &spB0, &sp98);
Math_Vec3f_Copy(&spB0, &D_801D15B0);
Lib_Vec3f_TranslateAndRotateY(&gZeroVec3f, phi_s1, &spB0, &sp98);
Math_Vec3f_Copy(&spB0, &gZeroVec3f);
spB0.z = (Rand_ZeroOne() * 4.0f) + 12.0f;
Lib_Vec3f_TranslateAndRotateY(&sp8C, phi_s1, &spB0, &spA4);
func_80A85E2C(this->unk_394, &spA4, &D_801D15B0, &sp98, 0.4f, 0.06f, 12.0f, 4);
func_80A85E2C(this->unk_394, &spA4, &gZeroVec3f, &sp98, 0.4f, 0.06f, 12.0f, 4);
}
return false;
@@ -378,7 +378,7 @@ s32 func_80A86674(EnTru* this) {
Vec3f sp34;
Lib_Vec3f_TranslateAndRotateY(&this->actor.world.pos, this->actor.world.rot.y, &D_80A8B3D8, &sp40);
Lib_Vec3f_TranslateAndRotateY(&D_801D15B0, this->actor.world.rot.y, &D_80A8B3E4, &sp34);
Lib_Vec3f_TranslateAndRotateY(&gZeroVec3f, this->actor.world.rot.y, &D_80A8B3E4, &sp34);
if (this->unk_390 == 1) {
func_80A85E2C(this->unk_394, &sp40, &D_80A8B3F0, &sp34, 0.2f, 0.1f, 12.0f, 3);
} else if (this->unk_390 == 2) {
@@ -396,12 +396,12 @@ s32 func_80A86770(EnTru* this) {
s16 phi_s0 = Rand_ZeroOne() * 360.0f * 182.0f;
for (i = 0; i < 4; i++, phi_s0 += 0x3FFC) {
Lib_Vec3f_TranslateAndRotateY(&this->actor.world.pos, phi_s0, &D_801D15B0, &sp98);
Lib_Vec3f_TranslateAndRotateY(&this->actor.world.pos, phi_s0, &gZeroVec3f, &sp98);
sp98.y = this->actor.floorHeight + 1.0f;
sp8C.x = Rand_ZeroOne() - 0.5f;
sp8C.z = Rand_ZeroOne() - 0.5f;
sp8C.y = Rand_ZeroOne() * 0.2f;
func_80A85E2C(this->unk_394, &sp98, &sp8C, &D_801D15B0, 1.0f, 0.04f, 28.0f, 4);
func_80A85E2C(this->unk_394, &sp98, &sp8C, &gZeroVec3f, 1.0f, 0.04f, 28.0f, 4);
}
return false;
@@ -931,7 +931,7 @@ s32 func_80A87B48(Actor* thisx, GlobalContext* globalCtx) {
case 1:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
sp3E = BINANG_ROT180(func_800DFCDC(GET_ACTIVE_CAM(globalCtx)));
Math_Vec3f_Copy(&sp4C, &D_801D15B0);
Math_Vec3f_Copy(&sp4C, &gZeroVec3f);
sp4C.z = 40.0f;
Lib_Vec3f_TranslateAndRotateY(&this->actor.world.pos, sp3E, &sp4C, &sp40);
func_80A85620(this->unk_394, &sp40, 2.0f, 0.08f, 60.0f);
+1 -1
View File
@@ -508,7 +508,7 @@ void func_80990C6C(EnWf* this, GlobalContext* globalCtx, s32 arg2) {
sp88.x = randPlusMinusPoint5Scaled(50.0f) + this->actor.world.pos.x;
sp88.y = Rand_ZeroFloat(5.0f) + this->actor.world.pos.y;
sp88.z = randPlusMinusPoint5Scaled(50.0f) + this->actor.world.pos.z;
func_800B0F18(globalCtx, &sp88, &D_801D15B0, &D_809942DC, phi_s1, phi_s1, phi_s6, 5,
func_800B0F18(globalCtx, &sp88, &gZeroVec3f, &D_809942DC, phi_s1, phi_s1, phi_s6, 5,
Rand_ZeroFloat(5.0f) + 14.0f);
}
}
@@ -114,7 +114,7 @@ void func_80ACB940(ObjAqua* this, GlobalContext* globalCtx) {
effectPos.x = this->actor.world.pos.x + (effectVel.x * 40.0f);
effectPos.y = this->actor.world.pos.y;
effectPos.z = this->actor.world.pos.z + (effectVel.z * 40.0f);
EffectSsIceSmoke_Spawn(globalCtx, &effectPos, &effectVel, &D_801D15B0, (s32)(Rand_ZeroOne() * 24.0f) + 70);
EffectSsIceSmoke_Spawn(globalCtx, &effectPos, &effectVel, &gZeroVec3f, (s32)(Rand_ZeroOne() * 24.0f) + 70);
}
void func_80ACBA10(ObjAqua* this) {
@@ -116,7 +116,7 @@ void ObjHsStump_Appear(ObjHsStump* this, GlobalContext* globalCtx) {
offsetAngle = i * angleBinary;
Lib_Vec3f_TranslateAndRotateY(&this->dyna.actor.world.pos, offsetAngle, &iceSmokePosOffset,
&iceSmokePos);
Lib_Vec3f_TranslateAndRotateY(&D_801D15B0, offsetAngle, &iceSmokeVelOffset, &iceSmokeVel);
Lib_Vec3f_TranslateAndRotateY(&gZeroVec3f, offsetAngle, &iceSmokeVelOffset, &iceSmokeVel);
EffectSsIceSmoke_Spawn(globalCtx, &iceSmokePos, &iceSmokeVel, &iceSmokeAccel, 100);
}
}
@@ -751,7 +751,7 @@ void func_80A24DD0(ObjIceblock* this, GlobalContext* globalCtx) {
spA8.z += this->dyna.actor.world.pos.z;
temp_f20 = ((Rand_ZeroOne() * 800.0f) + (1600.0f * this->dyna.actor.scale.x)) * phi_f22;
func_800B0E48(globalCtx, &spA8, &D_801D15B0, &D_80A26F90, &D_80A26F9C, &D_80A26FA0, temp_f20,
func_800B0E48(globalCtx, &spA8, &gZeroVec3f, &D_80A26F90, &D_80A26F9C, &D_80A26FA0, temp_f20,
(Rand_ZeroOne() * 20.0f) + 30.0f);
}
}
@@ -786,7 +786,7 @@ void func_80A2508C(ObjIceblock* this, GlobalContext* globalCtx) {
sp34.z = (this->dyna.actor.scale.z * sp34.z) + this->dyna.actor.world.pos.z;
if ((this->unk_244 - 3.0f) < sp34.y) {
EffectSsIceSmoke_Spawn(globalCtx, &sp34, &sp40, &D_801D15B0,
EffectSsIceSmoke_Spawn(globalCtx, &sp34, &sp40, &gZeroVec3f,
(s32)(this->dyna.actor.scale.y * 1300.0f) + 60);
}
}
@@ -145,7 +145,7 @@ void ObjLightswitch_SpawnEffects(ObjLightswitch* this, GlobalContext* globalCtx)
effectPos.y = this->actor.world.pos.y + tempResultDiff + 10.0f;
effectPos.z = this->actor.world.pos.z + ((rand * cosResult) - (tempResult * sinResult));
EffectSsDeadDb_Spawn(globalCtx, &effectPos, &D_801D15B0, &D_801D15B0, &sLightswitchEffectPrimColor,
EffectSsDeadDb_Spawn(globalCtx, &effectPos, &gZeroVec3f, &gZeroVec3f, &sLightswitchEffectPrimColor,
&sLightswitchEffectEnvColor, 100, 0, 9);
}
}
@@ -85,7 +85,7 @@ void ObjTokeiStep_SpawnDust(ObjTokeiStep* this, ObjTokeiStepPanel* panel, Global
dustSpawnPos.x += panel->pos.x;
dustSpawnPos.y += panel->pos.y;
dustSpawnPos.z += panel->pos.z;
func_800B1210(globalCtx, &dustSpawnPos, &D_801D15B0, &sDustEffectAccel, (s32)((Rand_ZeroOne() * 40.0f) + 80.0f),
func_800B1210(globalCtx, &dustSpawnPos, &gZeroVec3f, &sDustEffectAccel, (s32)((Rand_ZeroOne() * 40.0f) + 80.0f),
(s32)((Rand_ZeroOne() * 20.0f) + 50.0f));
}
}