EnBigpo (Big Poh) (#250)

* EnBigpo: start

* EnBigpo: uhh, this struct is weird

* EnBigpo: progress

* EnBigpo: so many of these functions are tiny

* EnBigpo nasty four loop function

* EnBigpo: hate draw functions

* EnBigpo: all functions attempted

* EnBigpo: data migrated, does not OK, 2 bytes off...

* Multi: Attempting to OK, issues

* EnBigpo: more docs

* EnBigpo: more docs2

* EnBigpo: more docs and cleaning

* EnBigpo: removed data to try to find the issues, matched a draw function thanks to Tharo

* EnBigpo: progress? maybe not

* EnBigpo: matched another function

* EnBigpo: overwrite limbdraw matches now

* EnBigpo: one more nonmatching rejected

* EnBigPo: not actual progress, probably

* Match Init, down to single stack pointer on second func

* EnBigPo OK

* EnBigpo: docs and cleaning

* EnBigpo: more docs and cleaning

* EnBigpo: back to OK with no warnings

* EnBigpo: more docs and cleaning

* EnBigpo: docs and cleaning

* EnBigpo: hmm, rename_sym doesn't like renaming system functions but I'm 98% sure I know what these are

* Multiple: changed some function names, maybe changed too much... hmm

* EnBigpo: even more changes to docs

* EnBigpo: formater pass

* EnBigpo: small fixes

* EnBigpo: c file description

* Apply suggestions from code review

Apply camera suggestions from eng124

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

* EnBigpo: updating all requested changes and reverting one incorrect macro

* Apply suggestions from code review

Some of eng124's recommendations, need to add the last by hand

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

* EnBigpo: back to OK

* EnBigpo: Minor cleanup changes

* Functions fixed: added function changes to actorfixer and fixed dinofos

* EnBigpo: BINANG_ROT180

* Apply suggestions from code review

First batch of requested changes, the simpler ones that shouldn't require checking

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

* EnBigpo: fixes to recommended changes, back to OK

* EnBigpo: move idleTimer docs out of struct

* Sprite: removed old commented out pragma, it matches, I still dont get it

* EnBigpo: more changes I had to check first

* EnBigpo: more requested changes, and some macro uses found

* EnBigpo: forgot a requested change

* Update src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c

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

* Apply suggestions from code review

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

* EnBigPo: missed a disphead array access

* Apply suggestions from code review

More requested changes

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

* EnBigpo: more hex to dec

* EnBigpo: more hex to dec 2

* Update src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c

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

* Update include/functions.h

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

* EnBigpo: build being weird

* EnBigpo: weird, rename_sym didn't catch this earlier

* Tools: fixed actorfixer to use Play_CameraSetAtEye forgot I blew this change away trying to get build again,

* Update src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.h

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

* EnBigpo: cutscene functions changed name to indicate they are stages

* EnBigpo: Rename Particles to Effect

* EnBigpo: changed draw function names, changed function comment format

* EnBigpo: renamed limbdraw functions, formater pass

Co-authored-by: isghj8 <isghj8@gmail.com>
Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
Co-authored-by: Kenix3 <kenixwhisperwind@gmail.com>
This commit is contained in:
Isghj
2021-09-01 18:44:42 -04:00
committed by GitHub
co-authored by isghj8 engineer124 engineer124 Anghelo Carvajal Kenix3
parent e1cb76c258
commit f21f393fcc
27 changed files with 1594 additions and 303 deletions
+4 -4
View File
@@ -871,7 +871,7 @@ Actor* func_800BB498(ActorContext* actorCtx, Actor* actor, GlobalContext* global
// void func_800BB59C(void);
// void func_800BB604(void);
// void func_800BB8EC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
void func_800BBA88(GlobalContext* globalCtx, Actor* actor);
void Enemy_StartFinishingBlow(GlobalContext* globalCtx, Actor* actor);
// void func_800BBAC0(void);
void func_800BBB74(s16* arg1, UNK_TYPE1 arg2, UNK_TYPE1 arg3, UNK_TYPE4 arg4);
// void func_800BBC20(void);
@@ -911,7 +911,7 @@ void func_800BDFC0(GlobalContext* globalCtx, Gfx* dl);
void func_800BE03C(GlobalContext* globalCtx, Gfx* dl);
Actor* func_800BE0B8(GlobalContext* globalCtx, Actor* inActor, s16 arg2, u8 arg3, f32 arg4);
// void func_800BE184(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6);
u8 func_800BE22C(Actor* actor);
u8 Actor_ApplyDamage(Actor* actor); // returns current health
void func_800BE258(Actor* actor, UNK_PTR arg1);
void func_800BE2B8(Actor* actor, ColliderJntSph* jntSphere);
void func_800BE33C(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, s32 arg3);
@@ -1640,7 +1640,7 @@ void EffFootmark_Draw(GlobalContext* globalCtx);
void func_800F0390(GlobalContext* globalCtx);
void func_800F03C0(GlobalContext* globalCtx);
void func_800F048C(GlobalContext* globalCtx, Vec3f* param_2, u8 param_3, u16 param_4, u8 param_5);
void func_800F0568(GlobalContext* globalCtx, Vec3f* position, s32 param_3, u16 sfxId);
void Audio_PlaySoundAtPosition(GlobalContext* globalCtx, Vec3f* position, s32 param_3, u16 sfxId);
// void func_800F0590(void);
// void func_800F05C0(void);
// void func_800F07C0(void);
@@ -3035,7 +3035,7 @@ void func_80169590(GlobalContext* globalCtx, s16 param_2, s16 param_3);
void func_80169600(GlobalContext* globalCtx, s16 param_2);
// void func_80169668(void);
Camera* Play_GetCamera(GlobalContext* globalCtx, s16 index);
s32 func_8016970C(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye);
s32 Play_CameraSetAtEye(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye);
// void func_8016981C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_80169940(void);
// void func_80169988(void);
+3
View File
@@ -19,6 +19,7 @@
// Currently most often called ctxt in MM, TODO: Refactor names when its used
#define ACTIVE_CAM globalCtx->cameraPtrs[globalCtx->activeCamera]
#define MAIN_CAM 0
#define SUBCAM_FREE 0
#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \
(curState)->nextGameStateInit = (GameStateFunc)newInit; \
@@ -26,6 +27,8 @@
#define PLAYER ((Player*)globalCtx->actorCtx.actorList[ACTORCAT_PLAYER].first)
#define FIRST_ENEMY ((Actor*)globalCtx->actorCtx.actorList[ACTORCAT_ENEMY].first)
// linkAge still exists in MM, but is always set to 0 (always adult)
// There are remnants of these macros from OOT, but they are essentially useless
//#define LINK_IS_CHILD (gSaveContext.linkAge != 0)
-1
View File
@@ -236,7 +236,6 @@ typedef struct {
/* 0x15A */ s16 pad15A;
} DynaPolyActor; // size = 0x15C
typedef enum {
/* 0x00 */ ITEM00_RUPEE_GREEN,
/* 0x01 */ ITEM00_RUPEE_BLUE,
+1 -2
View File
@@ -4252,8 +4252,7 @@ beginseg
name "ovl_En_Bigpo"
compress
include "build/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.o"
include "build/data/ovl_En_Bigpo/ovl_En_Bigpo.data.o"
include "build/data/ovl_En_Bigpo/ovl_En_Bigpo.reloc.o"
include "build/src/overlays/actors/ovl_En_Bigpo/ovl_En_Bigpo_reloc.o"
endseg
beginseg
+1 -1
View File
@@ -6,6 +6,6 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F0390/func_800F048C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F0390/func_800F0568.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F0390/Audio_PlaySoundAtPosition.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F0390/func_800F0590.s")
+2 -2
View File
@@ -766,7 +766,7 @@ void Actor_FreeOverlay(ActorOverlay* entry) {
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_800BB8EC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_800BBA88.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/Enemy_StartFinishingBlow.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_800BBAC0.s")
@@ -866,7 +866,7 @@ Actor* func_800BE0B8(GlobalContext* globalCtx, Actor* inActor, s16 arg2, u8 arg3
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_800BE184.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_800BE22C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/Actor_ApplyDamage.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_800BE258.s")
-4
View File
@@ -566,7 +566,6 @@ void EffectSsHahen_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity,
* - due to how life is implemented it is capped at 200. Any value over 200 is accepted, but the fragment will
* only live for 200 frames
*/
#ifdef NON_MATCHING
void EffectSsHahen_SpawnBurst(GlobalContext* globalCtx, Vec3f* pos, f32 burstScale, s16 unused, s16 scale,
s16 randScaleRange, s16 count, s16 objId, s16 life, Gfx* dList) {
s32 i;
@@ -585,9 +584,6 @@ void EffectSsHahen_SpawnBurst(GlobalContext* globalCtx, Vec3f* pos, f32 burstSca
life, dList);
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsHahen_SpawnBurst.s")
#endif
extern Vec3f D_801AE3E0;
+4 -4
View File
@@ -871,7 +871,7 @@ EnItem00* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, u32 pa
(EnItem00*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f,
spawnPos->z, 0, 0, 0, ((((param7F00 >> 8) & 0x7F) << 9) & 0xFE00) | 0x102);
if (!Actor_GetCollectibleFlag(globalCtx, (param7F00 >> 8) & 0x7F)) {
func_800F0568(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
Audio_PlaySoundAtPosition(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
}
} else {
// TODO: fix cast, this actor is not an EnItem00
@@ -880,7 +880,7 @@ EnItem00* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, u32 pa
((((param7F00 >> 8) & 0x7F) & 0x7F) << 9) | 7);
if (param20000 == 0) {
if (!Actor_GetCollectibleFlag(globalCtx, (param7F00 >> 8) & 0x7F)) {
func_800F0568(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
Audio_PlaySoundAtPosition(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
}
}
}
@@ -947,7 +947,7 @@ Actor* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, u32 para
spawnPos->z, 0, 0, 0, ((((param7F00 >> 8) & 0x7F) & 0x7F) << 9) | 7);
}
if (Actor_GetCollectibleFlag(globalCtx, (param7F00 >> 8) & 0x7F) == 0) {
func_800F0568(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
Audio_PlaySoundAtPosition(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
}
} else {
params = func_800A7650(params);
@@ -1105,7 +1105,7 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3
if (gSaveContext.health < 0x11) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f,
spawnPos->z, 0, 0, 0, 2);
func_800F0568(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
Audio_PlaySoundAtPosition(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
return;
}
+1 -1
View File
@@ -86,7 +86,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_GetCamera.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_8016970C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/Play_CameraSetAtEye.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play/func_8016981C.s")
@@ -107,7 +107,7 @@ void BgIcicle_Break(BgIcicle* this, GlobalContext* globalCtx, f32 arg2) {
s32 j;
s32 i;
func_800F0568(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_ICE_BROKEN);
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_ICE_BROKEN);
for (i = 0; i < 2; i++) {
for (j = 0; j < 10; j++) {
File diff suppressed because it is too large Load Diff
+57 -6
View File
@@ -5,15 +5,66 @@
struct EnBigpo;
typedef void (*EnBigpoActionFunc)(struct EnBigpo*, GlobalContext*);
typedef void (*EnBigPoActionFunc)(struct EnBigpo*, GlobalContext*);
typedef struct EnBigpoFireEffect {
/* 0x00 */ Vec3f pos;
/* 0x0C */ LightNode* light;
/* 0x10 */ LightInfo info; // size 0xE
} EnBigpoFireEffect; // size = 0x20
#define ENBIGPO_LIMBCOUNT 10
// idleTimer gets reused:
// * after dampe reveals a fire, 8 minutes of frames before it goes away again
// * used by flames and regular bigpo to count frames during the appearance cutscene
// * when idle flying around, frames until next attack
// * when spinning in/out of reality, counts frames from start
// * in burning death, counts frames from death start
// * after scoop spawned, idle timer used to count down to actor disapear
typedef struct EnBigpo {
/* 0x0000 */ Actor actor;
/* 0x0144 */ char unk_144[0xBC];
/* 0x0200 */ EnBigpoActionFunc actionFunc;
/* 0x0204 */ char unk_204[0x194];
/* 0x000 */ Actor actor;
/* 0x144 */ SkelAnime skelAnime;
/* 0x188 */ Vec3s jointTable[ENBIGPO_LIMBCOUNT];
/* 0x1C4 */ Vec3s morphTable[ENBIGPO_LIMBCOUNT];
/* 0x200 */ EnBigPoActionFunc actionFunc;
/* 0x204 */ u8 unkBool204; // need to know what func_801A2E54 does to know what this is
/* 0x206 */ s16 idleTimer; // frame counter
/* 0x208 */ s16 unk208; // facing rotY?
/* 0x20A */ s16 rotVelocity;
/* 0x20C */ s16 unk20C; // is this counting the number of frames the player is ztargeting them?
/* 0x20E */ s16 cutsceneSubCamId;
/* 0x210 */ s16 switchFlags;
/* 0x212 */ s16 hoverHeightCycleTimer; // sin wave up and down bobbing
/* 0x214 */ f32 fireRadius; // distance from center during conjunction cutscene
/* 0x218 */ f32 savedHeight; // actual height while flying moves as part of bobbing
// both unk21C and unk220 are passed to func_800BE680, probably need that to know what they are
/* 0x21C */ f32 unk21C; // tied to color alpha, decremented to zero
/* 0x220 */ f32 unk220; // created from unk21C
/* 0x224 */ Vec3f limbPos[9];
/* 0x290 */ Color_RGBA8 mainColor;
/* 0x294 */ Color_RGBA8 lanternColor;
/* 0x298 */ UNK_TYPE1 pad298[0x14];
/* 0x2AC */ ColliderCylinder collider;
/* 0x2F8 */ MtxF drawMtxF;
// the three fires that merge to become big po
// also the fires dampe digs up under his house
/* 0x338 */ EnBigpoFireEffect fires[3];
} EnBigpo; // size = 0x398
extern const ActorInit En_Bigpo_InitVars;
// well ver is regular, dampe basement ver is summoned
// on spawn, 3/possible fires are turned into chosenfire
enum EnBigpoType {
/* 0 */ ENBIGPO_REGULAR,
/* 1 */ ENBIGPO_SUMMONED,
/* 2 */ ENBIGPO_POSSIBLEFIRE,
/* 3 */ ENBIGPO_CHOSENFIRE,
/* 4 */ ENBIGPO_REVEALEDFIRE,
/* 5 */ ENBIGPO_UNK5,
};
#define GET_BIGPO_SWITCHFLAGS(thisx) ((u8)(thisx->params >> 0x8))
#endif // Z_EN_BIGPO_H
@@ -571,7 +571,7 @@ void EnClearTag_UpdateCamera(EnClearTag* this, GlobalContext* globalCtx) {
}
if (this->camId != 0) {
func_8016970C(globalCtx, this->camId, &this->at, &this->eye);
Play_CameraSetAtEye(globalCtx, this->camId, &this->at, &this->eye);
}
}
@@ -548,7 +548,7 @@ void func_808BE4D4(EnDekunuts* this, GlobalContext* globalCtx) {
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);
func_800F0568(globalCtx, &this->actor.world.pos, 11, NA_SE_EN_EXTINCT);
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);
Item_DropCollectibleRandom(globalCtx, &this->actor, &this->actor.world.pos, 0xE0);
@@ -582,8 +582,8 @@ void func_808BE73C(EnDekunuts* this, GlobalContext* globalCtx) {
if ((this->unk_18E != 10) || !(this->collider.info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
func_808BD3B4(this, globalCtx);
if ((this->actor.colChkInfo.mass == 50) || (this->actor.params != ENDEKUNUTS_GET_FF00_0)) {
if ((this->actor.params != ENDEKUNUTS_GET_FF00_1) && !func_800BE22C(&this->actor)) {
func_800BBA88(globalCtx, &this->actor);
if ((this->actor.params != ENDEKUNUTS_GET_FF00_1) && !Actor_ApplyDamage(&this->actor)) {
Enemy_StartFinishingBlow(globalCtx, &this->actor);
}
if (this->actor.params == ENDEKUNUTS_GET_FF00_1) {
@@ -639,7 +639,7 @@ void func_808BE73C(EnDekunuts* this, GlobalContext* globalCtx) {
func_808BDE7C(this);
} else if (this->actor.colChkInfo.health != 0) {
this->actor.colChkInfo.health = 0;
func_800BBA88(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
func_808BE294(this, 0);
}
}
@@ -384,7 +384,7 @@ void func_8089ABF4(EnDinofos* this, GlobalContext* globalCtx) {
if (this->camId != 0) {
Camera* camera = Play_GetCamera(globalCtx, this->camId);
func_8016970C(globalCtx, 0, &camera->at, &camera->eye);
Play_CameraSetAtEye(globalCtx, 0, &camera->at, &camera->eye);
this->camId = 0;
ActorCutscene_Stop(this->actor.cutscene);
if (this->actor.colChkInfo.health == 0) {
@@ -506,7 +506,7 @@ void func_8089B288(EnDinofos* this, GlobalContext* globalCtx) {
this->unk_290--;
Math_Vec3f_StepTo(&camera->eye, &this->unk_2BC, this->unk_2AC);
Math_Vec3f_StepTo(&camera->at, &this->unk_2C8, this->unk_2A8);
func_8016970C(globalCtx, this->camId, &camera->at, &camera->eye);
Play_CameraSetAtEye(globalCtx, this->camId, &camera->at, &camera->eye);
if (this->unk_290 == 0) {
func_8089B320(this);
}
@@ -540,7 +540,7 @@ void func_8089B3D4(EnDinofos* this, GlobalContext* globalCtx) {
sp28.y = camera->at.y;
}
func_8016970C(globalCtx, this->camId, &sp28, &camera->eye);
Play_CameraSetAtEye(globalCtx, this->camId, &sp28, &camera->eye);
if (this->actor.bgCheckFlags & 1) {
func_8089B4A4(this);
}
@@ -565,7 +565,7 @@ void func_8089B580(EnDinofos* this, GlobalContext* globalCtx) {
this->unk_290++;
if (this->unk_290 < 8) {
func_8016970C(globalCtx, this->camId, &this->actor.focus.pos, &camera->eye);
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.focus.pos, &camera->eye);
}
if (this->skelAnime.animCurrentFrame > 35.0f) {
@@ -574,7 +574,7 @@ void func_8089B580(EnDinofos* this, GlobalContext* globalCtx) {
}
Math_Vec3f_StepTo(&camera->eye, &this->unk_2BC, 10.0f);
func_8016970C(globalCtx, this->camId, &this->actor.focus.pos, &camera->eye);
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.focus.pos, &camera->eye);
if (this->skelAnime.animCurrentFrame <= 55.0f) {
func_800B9010(&this->actor, NA_SE_EN_DODO_J_FIRE - SFX_FLAG);
}
@@ -1231,7 +1231,7 @@ void func_8089D318(EnDinofos* this, GlobalContext* globalCtx) {
sp24.x = (Math_SinS(this->actor.shape.rot.y) * 150.0f) + this->actor.focus.pos.x;
sp24.y = this->actor.focus.pos.y;
sp24.z = (Math_CosS(this->actor.shape.rot.y) * 150.0f) + this->actor.focus.pos.z;
func_8016970C(globalCtx, this->camId, &this->actor.focus.pos, &sp24);
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.focus.pos, &sp24);
func_8089CFAC(this);
} else {
func_8089B100(this, globalCtx);
@@ -1284,8 +1284,8 @@ s32 func_8089D60C(EnDinofos* this, GlobalContext* globalCtx) {
return false;
}
if (!func_800BE22C(&this->actor)) {
func_800BBA88(globalCtx, &this->actor);
if (!Actor_ApplyDamage(&this->actor)) {
Enemy_StartFinishingBlow(globalCtx, &this->actor);
D_8089E350--;
if (D_8089E350 == 0) {
if (D_8089E34C != -1) {
@@ -645,7 +645,7 @@ void EnFirefly_UpdateDamage(EnFirefly* this, GlobalContext* globalCtx) {
this->unk_2E8.y = 0.55f;
EnFirefly_SetupStunned(this);
} else {
func_800BBA88(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
this->actor.colChkInfo.health = 0;
this->actor.flags &= ~1;
@@ -2307,7 +2307,7 @@ void func_80B479E8(EnInvadepoh* this, GlobalContext* globalCtx) {
}
if (this->actionTimer == 8) {
func_800BBA88(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
}
this->actionTimer--;
@@ -2372,7 +2372,7 @@ void func_80B47D30(Actor* thisx, GlobalContext* globalCtx) {
thisx->gravity = 0.0f;
thisx->velocity.y = acAttached->velocity.y * 0.5f;
thisx->velocity.y = CLAMP(thisx->velocity.y, -30.0f, 30.0f);
func_800F0568(globalCtx, &thisx->world.pos, 50, NA_SE_EN_INVADER_DEAD);
Audio_PlaySoundAtPosition(globalCtx, &thisx->world.pos, 50, NA_SE_EN_INVADER_DEAD);
func_80B47830(this);
}
@@ -289,7 +289,7 @@ void EnMinifrog_ReturnFrogCutscene(EnMinifrog* this, GlobalContext* globalCtx) {
default:
func_801477B4(globalCtx);
EnMinifrog_SetCamera(this, globalCtx);
func_800F0568(globalCtx, &this->actor.world.pos, 30, NA_SE_EN_NPC_FADEAWAY);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 30, NA_SE_EN_NPC_FADEAWAY);
if (this->actor.cutscene != -1) {
if (ActorCutscene_GetCurrentIndex() == this->actor.cutscene) {
ActorCutscene_Stop(this->actor.cutscene);
@@ -115,9 +115,9 @@ void EnNutsball_Update(Actor* thisx, GlobalContext* globalCtx) {
spawnBurstPos.z = this->actor.world.pos.z;
EffectSsHahen_SpawnBurst(globalCtx, &spawnBurstPos, 6.0f, 0, 7, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
if (this->actor.params == 1) {
func_800F0568(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_NUTS_BROKEN);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EV_NUTS_BROKEN);
} else {
func_800F0568(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
}
Actor_MarkForDeath(&this->actor);
}
@@ -354,7 +354,7 @@ void EnPametfrog_ShakeCamera(EnPametfrog* this, GlobalContext* globalCtx, f32 ma
eye.x = (Math_SinS(y) * magShakeXZ) + camera->at.x;
eye.y = camera->at.y + magShakeY;
eye.z = (Math_CosS(y) * magShakeXZ) + camera->at.z;
func_8016970C(globalCtx, this->camId, &camera->at, &eye);
Play_CameraSetAtEye(globalCtx, this->camId, &camera->at, &eye);
}
void EnPametfrog_StopCutscene(EnPametfrog* this, GlobalContext* globalCtx) {
@@ -362,7 +362,7 @@ void EnPametfrog_StopCutscene(EnPametfrog* this, GlobalContext* globalCtx) {
if (this->camId != 0) {
camera = Play_GetCamera(globalCtx, this->camId);
func_8016970C(globalCtx, 0, &camera->at, &camera->eye);
Play_CameraSetAtEye(globalCtx, 0, &camera->at, &camera->eye);
this->camId = 0;
ActorCutscene_Stop(this->cutscene);
func_800B724C(globalCtx, &this->actor, 6);
@@ -531,7 +531,7 @@ void EnPametfrog_SetupFallOffSnapper(EnPametfrog* this, GlobalContext* globalCtx
eye.x = (Math_SinS(yaw) * 300.0f) + this->actor.focus.pos.x;
eye.y = this->actor.focus.pos.y + 100.0f;
eye.z = (Math_CosS(yaw) * 300.0f) + this->actor.focus.pos.z;
func_8016970C(globalCtx, this->camId, &this->actor.focus.pos, &eye);
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.focus.pos, &eye);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FROG_DAMAGE);
this->actionFunc = EnPametfrog_FallOffSnapper;
}
@@ -861,7 +861,7 @@ void EnPametfrog_SetupFallInAir(EnPametfrog* this, GlobalContext* globalCtx) {
eye.x = this->actor.world.pos.x + (xzDist * this->unk_2DC.x);
eye.y = (this->actor.world.pos.y + this->actor.home.pos.y) * 0.5f;
eye.z = this->actor.world.pos.z + (xzDist * this->unk_2DC.z);
func_8016970C(globalCtx, this->camId, &this->actor.world.pos, &eye);
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.world.pos, &eye);
}
this->actionFunc = EnPametfrog_FallInAir;
@@ -879,7 +879,7 @@ void EnPametfrog_FallInAir(EnPametfrog* this, GlobalContext* globalCtx) {
} else {
this->spinYaw += 0xF00;
if (this->camId != 0) {
func_8016970C(globalCtx, this->camId, &this->actor.world.pos, &Play_GetCamera(globalCtx, this->camId)->eye);
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.world.pos, &Play_GetCamera(globalCtx, this->camId)->eye);
}
if (this->actor.bgCheckFlags & 1) {
@@ -927,7 +927,7 @@ void EnPametfrog_SetupDefeatGekko(EnPametfrog* this, GlobalContext* globalCtx) {
eye.x = this->actor.child->focus.pos.x + 150.0f * Math_SinS(yaw);
eye.y = this->actor.child->focus.pos.y + 20.0f;
eye.z = this->actor.child->focus.pos.z + 150.0f * Math_CosS(yaw);
func_8016970C(globalCtx, this->camId, &this->actor.child->focus.pos, &eye);
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.child->focus.pos, &eye);
this->actor.params = GEKKO_DEFEAT;
this->timer = 38;
this->actionFunc = EnPametfrog_DefeatGekko;
@@ -952,7 +952,7 @@ void EnPametfrog_SetupDefeatSnapper(EnPametfrog* this, GlobalContext* globalCtx)
eye.x = this->actor.world.pos.x + Math_SinS(yaw) * 150.0f;
eye.y = this->actor.world.pos.y + 20.0f;
eye.z = this->actor.world.pos.z + Math_CosS(yaw) * 150.0f;
func_8016970C(globalCtx, this->camId, &this->actor.world.pos, &eye);
Play_CameraSetAtEye(globalCtx, this->camId, &this->actor.world.pos, &eye);
this->timer = 20;
this->actionFunc = EnPametfrog_DefeatSnapper;
}
@@ -983,7 +983,7 @@ void EnPametfrog_SetupSpawnFrog(EnPametfrog* this, GlobalContext* globalCtx) {
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_800F0568(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_NPC_APPEAR);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_NPC_APPEAR);
Actor_SetRoomClearedTemp(globalCtx, globalCtx->roomCtx.currRoom.num);
for (i = 0; i < 25; i++) {
@@ -1211,7 +1211,7 @@ void EnPametfrog_SetupCallSnapper(EnPametfrog* this, GlobalContext* globalCtx) {
eye.y = at.y + 4.0f;
// Zooms in on Gekko
func_8016970C(globalCtx, this->camId, &at, &eye);
Play_CameraSetAtEye(globalCtx, this->camId, &at, &eye);
this->timer = 0;
this->actor.hintId = 0x5F;
this->actionFunc = EnPametfrog_CallSnapper;
@@ -1243,7 +1243,7 @@ void EnPametfrog_SetupSnapperSpawn(EnPametfrog* this, GlobalContext* globalCtx)
eye.z = (Math_CosS(yaw) * 500.0f) + at.z;
// Zooms in on Snapper spawn point
func_8016970C(globalCtx, this->camId, &at, &eye);
Play_CameraSetAtEye(globalCtx, this->camId, &at, &eye);
this->quake = Quake_Add(ACTIVE_CAM, 6);
Quake_SetSpeed(this->quake, 18000);
Quake_SetQuakeValues(this->quake, 2, 0, 0, 0);
@@ -1288,7 +1288,7 @@ void EnPametfrog_ApplyDamageEffect(EnPametfrog* this, GlobalContext* globalCtx)
if ((this->drawEffect != GEKKO_DRAW_EFFECT_FROZEN) ||
!(this->collider.elements->info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
if (this->actor.params == GEKKO_PRE_SNAPPER) {
if (func_800BE22C(&this->actor) == 0) {
if (Actor_ApplyDamage(&this->actor) == 0) {
func_801A2ED8();
}
@@ -1321,10 +1321,10 @@ void EnPametfrog_ApplyDamageEffect(EnPametfrog* this, GlobalContext* globalCtx)
}
EnPametfrog_SetupDamage(this);
}
} else if (func_800BE22C(&this->actor) == 0) {
} else if (Actor_ApplyDamage(&this->actor) == 0) {
this->collider.base.acFlags &= ~AC_ON;
EnPametfrog_ApplyMagicArrowEffects(this, globalCtx);
func_800BBA88(globalCtx, &this->actor);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
this->actor.flags &= ~1;
func_801A2ED8();
EnPametfrog_SetupCutscene(this);

Some files were not shown because too many files have changed in this diff Show More