SubS Cutscenes, Flags, Objects, and Angles (#665)

* Bring cutscene code over

* Document cutscene functions

* Bring over flags code

* Document flags

* Bring Object code over

* Document object functions

* Better infinite loop comment

* Remove Effect_add correction

* Bring func_8013D5E8 code over

* Document angle helper

* ActorFixer

* Rename angle helper

* Missed gs

* Should probably test before commiting

* Better angle helper name as well as typo fix

* English is hard

* Len to num

* Fix merge

* Fix merge

* Format

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
This commit is contained in:
Derek Hensley
2022-02-19 23:49:36 +00:00
committed by GitHub
co-authored by EllipticEllipsis
parent f67ecbc3c2
commit 71c0120fbd
34 changed files with 237 additions and 171 deletions
+7 -7
View File
@@ -2494,7 +2494,7 @@ Gfx* SubS_DrawTransformFlexLimb(GlobalContext* globalCtx, s32 idx, void** skelet
Gfx* SubS_DrawTransformFlex(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, TransformLimbDraw transformLimbDraw, Actor* actor, Gfx* gfx);
s32 func_8013AD6C(GlobalContext* globalCtx);
s32 func_8013AD9C(s16 arg0, s16 arg1, Vec3f* arg2, Vec3s* arg3, s32 arg4, s32 arg5);
void func_8013AED4(u16* arg0, u16 arg1, u16 arg2);
void SubS_UpdateFlags(u16* flags, u16 setBits, u16 unsetBits);
void func_8013AF00(f32* arg0, s32 arg1, s32 arg2);
s32 func_8013B010(f32* arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, f32* arg6);
void func_8013B0C8(s32 arg0, f32 arg1, s32 arg2, f32* arg3, f32* arg4);
@@ -2515,16 +2515,16 @@ void func_8013CD64(Vec3f* arg0, Vec3f* arg1, u8* arg2, f32 arg3, u8 arg4, u8* ar
void func_8013CF04(Actor* actor, GraphicsContext** gfxCtxPtr, u8* arg2);
s16 func_8013D0E0(s16* arg0, s16 arg1, s16 arg2, f32 arg3, f32 arg4, f32 arg5);
s32 func_8013D2E0(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, Vec3s* arg3, Vec3s* arg4, Vec3s* arg5, u16* arg6);
s32 func_8013D5E8(s16 arg0, s16 arg1, s16 arg2);
s32 SubS_AngleDiffLessEqual(s16 angleA, s16 threshold, s16 angleB);
Path* func_8013D648(GlobalContext* globalCtx, s16 arg1, s16 arg2);
s32 func_8013D68C(Path* path, s32 arg1, Vec3f* arg2);
s16 func_8013D720(Vec3f* arg0, Vec3f* arg1, f32* arg2);
s32 func_8013D768(Actor* actor, Vec3f* arg1, s16 arg2);
s16 func_8013D83C(Path* path, s32 pointIdx, Vec3f* pos, f32* distSq);
s8 func_8013D8DC(s8 arg0, GlobalContext* globalCtx);
s8 func_8013D924(s16 arg0, GlobalContext* globalCtx);
s8 SubS_IsObjectLoaded(s8 index, GlobalContext* globalCtx);
s8 SubS_GetObjectIndex(s16 id, GlobalContext* globalCtx);
Actor* SubS_FindActor(GlobalContext* globalCtx, Actor* actorListStart, u8 actorCategory, s16 actorId);
s32 SubS_FillLimbRotTables(GlobalContext* globalCtx, s16* limbRotTableY, s16* limbRotTableZ, s32 limbRotTableLen);
s32 SubS_FillLimbRotTables(GlobalContext* globalCtx, s16* limbRotTableY, s16* limbRotTableZ, s32 numLimbs);
s32 func_8013DB90(GlobalContext* globalCtx, Vec3f* arg1, f32 arg2);
s32 func_8013DC40(Path* arg0, s32 arg1, s32 arg2, Vec3f* arg3);
void func_8013DCE0(GlobalContext* globalCtx, Vec3f* arg1, Actor* arg2, struct_8013DF3C_arg1* arg3, Path* arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, u8 arg9);
@@ -2534,8 +2534,8 @@ s32 func_8013E054(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1);
s32 func_8013E07C(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1);
s32 func_8013E0A4(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1);
void SubS_ChangeAnimationBySpeedInfo(SkelAnime* skelAnime, AnimationSpeedInfo* animations, s32 nextIndex, s32* curIndex);
s32 func_8013E2D4(Actor* actor, s16 arg1, s16 arg2, s32 arg3);
s32 func_8013E3B8(Actor* actor, s16 cutscenes[], s16 len);
s32 SubS_StartActorCutscene(Actor* actor, s16 nextCutscene, s16 curCutscene, s32 type);
s32 SubS_FillCutscenesList(Actor* actor, s16 cutscenes[], s16 numCutscenes);
void func_8013E4B0(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, Plane* plane);
s32 func_8013E5CC(Vec3f* arg0, Vec3s* arg1, Vec3f* arg2, Vec3f* arg3, Vec3f* arg4, Vec3f* arg5);
Actor* SubS_FindActorCustom(GlobalContext* globalCtx, Actor* actor, Actor* actorListStart, u8 actorCategory, s16 actorId, void* verifyData, VerifyActor verifyActor);
+7
View File
@@ -1381,6 +1381,13 @@ typedef struct {
/* 0x8 */ s32 unk8; // game script pointer?
} struct_80133038_arg2; // size = 0xC
typedef enum {
/* 0 */ SUBS_CUTSCENE_SET_UNK_LINK_FIELDS,
/* 1 */ SUBS_CUTSCENE_NORMAL,
/* 2 */ SUBS_CUTSCENE_SET_FLAG
} SubSCutsceneType;
typedef s32 (*func_8013E748_arg6)(struct GlobalContext*, Actor*, Vec3s*);
typedef s32 (*VerifyActor)(struct GlobalContext*, Actor*, Actor*, void*);
+4 -4
View File
@@ -112,10 +112,10 @@ void EnHy_Blink(EnHy* enHy, s32 eyeTexMaxIndex) {
s32 EnHy_Init(EnHy* enHy, GlobalContext* globalCtx, FlexSkeletonHeader* skeletonHeaderSeg, s16 animIndex) {
s32 isInitialized = false;
if ((func_8013D8DC(enHy->animObjIndex, globalCtx) == true) &&
(func_8013D8DC(enHy->headObjIndex, globalCtx) == true) &&
(func_8013D8DC(enHy->skelUpperObjIndex, globalCtx) == true) &&
(func_8013D8DC(enHy->skelLowerObjIndex, globalCtx) == true)) {
if ((SubS_IsObjectLoaded(enHy->animObjIndex, globalCtx) == true) &&
(SubS_IsObjectLoaded(enHy->headObjIndex, globalCtx) == true) &&
(SubS_IsObjectLoaded(enHy->skelUpperObjIndex, globalCtx) == true) &&
(SubS_IsObjectLoaded(enHy->skelLowerObjIndex, globalCtx) == true)) {
enHy->actor.objBankIndex = enHy->skelLowerObjIndex;
isInitialized = true;
ActorShape_Init(&enHy->actor.shape, 0.0f, NULL, 0.0f);
+61 -8
View File
@@ -154,7 +154,9 @@ Gfx* SubS_DrawTransformFlex(GlobalContext* globalCtx, void** skeleton, Vec3s* jo
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013AD9C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013AED4.s")
void SubS_UpdateFlags(u16* flags, u16 setBits, u16 unsetBits) {
*flags = (*flags & ~unsetBits) | setBits;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013AF00.s")
@@ -248,7 +250,9 @@ s32 SubS_ChangeAnimationByInfoS(SkelAnime* skelAnime, AnimationInfoS* animations
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013D2E0.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013D5E8.s")
s32 SubS_AngleDiffLessEqual(s16 angleA, s16 threshold, s16 angleB) {
return (ABS_ALT(BINANG_SUB(angleB, angleA)) <= threshold) ? true : false;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013D648.s")
@@ -260,9 +264,13 @@ s32 SubS_ChangeAnimationByInfoS(SkelAnime* skelAnime, AnimationInfoS* animations
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013D83C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013D8DC.s")
s8 SubS_IsObjectLoaded(s8 index, GlobalContext* globalCtx) {
return !Object_IsLoaded(&globalCtx->objectCtx, index) ? false : true;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013D924.s")
s8 SubS_GetObjectIndex(s16 id, GlobalContext* globalCtx) {
return Object_GetIndex(&globalCtx->objectCtx, id);
}
/**
* Finds the first actor instance of a specified Id and category.
@@ -281,11 +289,11 @@ Actor* SubS_FindActor(GlobalContext* globalCtx, Actor* actorListStart, u8 actorC
return actor;
}
s32 SubS_FillLimbRotTables(GlobalContext* globalCtx, s16* limbRotTableY, s16* limbRotTableZ, s32 limbRotTableLen) {
s32 SubS_FillLimbRotTables(GlobalContext* globalCtx, s16* limbRotTableY, s16* limbRotTableZ, s32 numLimbs) {
s32 i;
u32 frames = globalCtx->gameplayFrames;
for (i = 0; i < limbRotTableLen; i++) {
for (i = 0; i < numLimbs; i++) {
limbRotTableY[i] = (i * 50 + 0x814) * frames;
limbRotTableZ[i] = (i * 50 + 0x940) * frames;
}
@@ -340,9 +348,54 @@ void SubS_ChangeAnimationBySpeedInfo(SkelAnime* skelAnime, AnimationSpeedInfo* a
*curIndex = nextIndex;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013E2D4.s")
s32 SubS_StartActorCutscene(Actor* actor, s16 nextCutscene, s16 curCutscene, s32 type) {
s32 isStarted = false;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013E3B8.s")
if ((curCutscene != -1) && (ActorCutscene_GetCurrentIndex() == curCutscene)) {
ActorCutscene_Stop(curCutscene);
ActorCutscene_SetIntentToPlay(nextCutscene);
} else if (ActorCutscene_GetCanPlayNext(nextCutscene)) {
switch (type) {
case SUBS_CUTSCENE_SET_UNK_LINK_FIELDS:
ActorCutscene_StartAndSetUnkLinkFields(nextCutscene, actor);
break;
case SUBS_CUTSCENE_NORMAL:
ActorCutscene_Start(nextCutscene, actor);
break;
case SUBS_CUTSCENE_SET_FLAG:
ActorCutscene_StartAndSetFlag(nextCutscene, actor);
break;
}
isStarted = true;
} else {
ActorCutscene_SetIntentToPlay(nextCutscene);
}
return isStarted;
}
s32 SubS_FillCutscenesList(Actor* actor, s16 cutscenes[], s16 numCutscenes) {
s16 cs;
s32 i;
for (i = 0; i < numCutscenes; i++) {
cutscenes[i] = -1;
}
cs = actor->cutscene;
i = 0;
while (cs != -1) {
// Note: Infinite loop if numCutscenes is less than possible additional cutscenes
if (i < numCutscenes) {
cutscenes[i] = cs;
cs = ActorCutscene_GetAdditionalCutscene(cs);
i++;
}
}
return i;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013E4B0.s")
@@ -196,7 +196,7 @@ void BgDblueMovebg_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_168 = D_80A2B8DC[this->unk_160];
this->unk_16C = D_80A2B93C[this->unk_160];
func_8013E3B8(&this->dyna.actor, this->unk_1B6, ARRAY_COUNT(this->unk_1B6));
SubS_FillCutscenesList(&this->dyna.actor, this->unk_1B6, ARRAY_COUNT(this->unk_1B6));
switch (this->unk_160) {
case 1:
@@ -723,7 +723,7 @@ void BgDblueMovebg_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
if (this->unk_172 & 8) {
if (func_8013E2D4(&this->dyna.actor, this->unk_1D2, -1, 0)) {
if (SubS_StartActorCutscene(&this->dyna.actor, this->unk_1D2, -1, SUBS_CUTSCENE_SET_UNK_LINK_FIELDS)) {
this->unk_172 &= ~8;
}
}
@@ -47,7 +47,7 @@ void BgHakaTomb_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &object_haka_obj_Colheader_000EE8);
func_8013E3B8(&this->dyna.actor, this->cutscenes, ARRAY_COUNT(this->cutscenes));
SubS_FillCutscenesList(&this->dyna.actor, this->cutscenes, ARRAY_COUNT(this->cutscenes));
func_80BD6624(this);
}
@@ -100,7 +100,7 @@ void func_80BD6754(BgHakaTomb* this) {
}
void func_80BD6768(BgHakaTomb* this, GlobalContext* globalCtx) {
if (func_8013E2D4(&this->dyna.actor, this->cutscenes[0], -1, 0)) {
if (SubS_StartActorCutscene(&this->dyna.actor, this->cutscenes[0], -1, SUBS_CUTSCENE_SET_UNK_LINK_FIELDS)) {
BgHakaTomb_SetupDoNothing(this);
}
}
+6 -6
View File
@@ -473,7 +473,7 @@ s32 func_80BDEC2C(EnAl* this, GlobalContext* globalCtx) {
this->unk_4C2 |= 0x1000;
this->unk_4F4 = player->exchangeItemId;
}
func_8013AED4(&this->unk_4C2, 0, 7);
SubS_UpdateFlags(&this->unk_4C2, 0, 7);
this->unk_4E6 = 0;
this->unk_4EC = 0;
this->actor.child = this->unk_368;
@@ -629,7 +629,7 @@ s32 func_80BDF244(EnAl* this, GlobalContext* globalCtx, struct_80133038_arg2* ar
if ((sp20 != NULL) && (sp20->update != NULL) && (temp_v0 != NULL) && (temp_v0->update != NULL)) {
func_80BDE27C(this, 0);
func_8013AED4(&this->unk_4C2, 3, 7);
SubS_UpdateFlags(&this->unk_4C2, 3, 7);
this->unk_368 = sp20;
this->unk_4C2 |= 0x20;
ret = true;
@@ -638,7 +638,7 @@ s32 func_80BDF244(EnAl* this, GlobalContext* globalCtx, struct_80133038_arg2* ar
}
s32 func_80BDF308(EnAl* this, GlobalContext* globalCtx, struct_80133038_arg2* arg2) {
func_8013AED4(&this->unk_4C2, 3, 7);
SubS_UpdateFlags(&this->unk_4C2, 3, 7);
switch (arg2->unk0) {
case 1:
@@ -708,9 +708,9 @@ void func_80BDF414(EnAl* this, GlobalContext* globalCtx) {
temp_v0 = this->actor.world.rot.y - this->actor.yawTowardsPlayer;
if (((this->unk_4EA == 0) && (ABS_ALT(temp_v0) >= 0x5800)) ||
((this->unk_4EA == 5) && (ABS_ALT(temp_v0) >= 0x5800)) || (this->unk_4EA == 2)) {
func_8013AED4(&this->unk_4C2, 3, 7);
SubS_UpdateFlags(&this->unk_4C2, 3, 7);
} else {
func_8013AED4(&this->unk_4C2, 0, 7);
SubS_UpdateFlags(&this->unk_4C2, 0, 7);
}
}
@@ -753,7 +753,7 @@ void func_80BDF5E8(EnAl* this, GlobalContext* globalCtx) {
void func_80BDF6C4(EnAl* this, GlobalContext* globalCtx) {
if (func_8010BF58(&this->actor, globalCtx, this->unk_360, this->unk_4EC, &this->unk_364)) {
func_8013AED4(&this->unk_4C2, 3, 7);
SubS_UpdateFlags(&this->unk_4C2, 3, 7);
this->unk_4C2 &= ~0x20;
this->unk_4C2 |= 0x200;
this->actor.child = NULL;
@@ -471,7 +471,7 @@ void func_809C1EC8(EnAob01* this, GlobalContext* globalCtx) {
Vec3f sp30;
SkelAnime_Update(&this->skelAnime);
if (func_8013D5E8(this->actor.shape.rot.y, 14000, this->actor.yawTowardsPlayer)) {
if (SubS_AngleDiffLessEqual(this->actor.shape.rot.y, 0x36B0, this->actor.yawTowardsPlayer)) {
sp30.x = player->actor.world.pos.x;
sp30.y = player->bodyPartsPos[7].y + 3.0f;
sp30.z = player->actor.world.pos.z;
+2 -1
View File
@@ -281,7 +281,8 @@ void func_80BA8DF4(EnBaba* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
if (func_8013D5E8(this->actor.shape.rot.y, 0x36B0, this->actor.yawTowardsPlayer) && !(this->unk_40A & 4)) {
if (SubS_AngleDiffLessEqual(this->actor.shape.rot.y, 0x36B0, this->actor.yawTowardsPlayer) &&
!(this->unk_40A & 4)) {
sp30.x = player->actor.world.pos.x;
sp30.y = player->bodyPartsPos[7].y + 3.0f;
sp30.z = player->actor.world.pos.z;
@@ -104,7 +104,7 @@ void EnBba01_UpdateModel(EnBba01* this, GlobalContext* globalCtx) {
Vec3f focus;
EnHy_UpdateSkelAnime(&this->enHy, globalCtx);
if (func_8013D5E8(this->enHy.actor.shape.rot.y, 0x36B0, this->enHy.actor.yawTowardsPlayer)) {
if (SubS_AngleDiffLessEqual(this->enHy.actor.shape.rot.y, 0x36B0, this->enHy.actor.yawTowardsPlayer)) {
focus.x = player->actor.world.pos.x;
focus.y = player->bodyPartsPos[7].y + 3.0f;
focus.z = player->actor.world.pos.z;
@@ -206,10 +206,10 @@ void EnBba01_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnBba01* this = THIS;
this->enHy.animObjIndex = func_8013D924(OBJECT_BBA, globalCtx);
this->enHy.headObjIndex = func_8013D924(OBJECT_BBA, globalCtx);
this->enHy.skelUpperObjIndex = func_8013D924(OBJECT_BBA, globalCtx);
this->enHy.skelLowerObjIndex = func_8013D924(OBJECT_BBA, globalCtx);
this->enHy.animObjIndex = SubS_GetObjectIndex(OBJECT_BBA, globalCtx);
this->enHy.headObjIndex = SubS_GetObjectIndex(OBJECT_BBA, globalCtx);
this->enHy.skelUpperObjIndex = SubS_GetObjectIndex(OBJECT_BBA, globalCtx);
this->enHy.skelLowerObjIndex = SubS_GetObjectIndex(OBJECT_BBA, globalCtx);
if ((this->enHy.animObjIndex < 0) || (this->enHy.headObjIndex < 0) || (this->enHy.skelUpperObjIndex < 0) ||
(this->enHy.skelLowerObjIndex < 0)) {
@@ -341,8 +341,7 @@ void EnBji01_Init(Actor* thisx, GlobalContext* globalCtx) {
this->animationIndex = -1;
Actor_SetScale(&this->actor, 0.01f);
func_8013E3B8(&this->actor, this->cutscenes,
ARRAY_COUNT(this->cutscenes)); /* initializes all elements of cutscenes to -1 */
SubS_FillCutscenesList(&this->actor, this->cutscenes, ARRAY_COUNT(this->cutscenes));
this->moonsTear = (ObjMoonStone*)SubS_FindActor(globalCtx, NULL, ACTORCAT_PROP, ACTOR_OBJ_MOON_STONE);
switch (gSaveContext.entranceIndex) {
@@ -96,7 +96,7 @@ void EnCne01_UpdateModel(EnCne01* this, GlobalContext* globalCtx) {
Vec3f focus;
EnHy_UpdateSkelAnime(&this->enHy, globalCtx);
if (func_8013D5E8(this->enHy.actor.shape.rot.y, 0x36B0, this->enHy.actor.yawTowardsPlayer)) {
if (SubS_AngleDiffLessEqual(this->enHy.actor.shape.rot.y, 0x36B0, this->enHy.actor.yawTowardsPlayer)) {
focus.x = player->actor.world.pos.x;
focus.y = player->bodyPartsPos[7].y + 3.0f;
focus.z = player->actor.world.pos.z;
@@ -196,10 +196,10 @@ void EnCne01_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnCne01* this = THIS;
this->enHy.animObjIndex = func_8013D924(OBJECT_OS_ANIME, globalCtx);
this->enHy.headObjIndex = func_8013D924(OBJECT_CNE, globalCtx);
this->enHy.skelUpperObjIndex = func_8013D924(OBJECT_CNE, globalCtx);
this->enHy.skelLowerObjIndex = func_8013D924(OBJECT_CNE, globalCtx);
this->enHy.animObjIndex = SubS_GetObjectIndex(OBJECT_OS_ANIME, globalCtx);
this->enHy.headObjIndex = SubS_GetObjectIndex(OBJECT_CNE, globalCtx);
this->enHy.skelUpperObjIndex = SubS_GetObjectIndex(OBJECT_CNE, globalCtx);
this->enHy.skelLowerObjIndex = SubS_GetObjectIndex(OBJECT_CNE, globalCtx);
if ((this->enHy.animObjIndex < 0) || (this->enHy.headObjIndex < 0) || (this->enHy.skelUpperObjIndex < 0) ||
(this->enHy.skelLowerObjIndex < 0)) {
+3 -3
View File
@@ -206,7 +206,7 @@ s32 func_80B3E7C8(EnDai* this, GlobalContext* globalCtx) {
if (this->unk_1CE & 7) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_8013AED4(&this->unk_1CE, 0, 7);
SubS_UpdateFlags(&this->unk_1CE, 0, 7);
this->actionFunc = func_80B3EF90;
ret = true;
}
@@ -428,7 +428,7 @@ void func_80B3EEDC(EnDai* this, GlobalContext* globalCtx) {
void func_80B3EF90(EnDai* this, GlobalContext* globalCtx) {
if (func_8010BF58(&this->actor, globalCtx, D_80B3FC8C, NULL, &this->unk_1D0)) {
func_8013AED4(&this->unk_1CE, 3, 7);
SubS_UpdateFlags(&this->unk_1CE, 3, 7);
this->unk_1D0 = 0;
this->actionFunc = func_80B3F00C;
} else {
@@ -527,7 +527,7 @@ void EnDai_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_1D6 = 0;
if (gSaveContext.weekEventReg[33] & 0x80) {
func_8013AED4(&this->unk_1CE, 3, 7);
SubS_UpdateFlags(&this->unk_1CE, 3, 7);
this->unk_1CE |= 0x80;
this->unk_1CD = 0xFF;
this->actionFunc = func_80B3F00C;
+4 -4
View File
@@ -170,7 +170,7 @@ s32 func_80A515C4(EnDnk* this) {
}
void func_80A51648(EnDnk* this, GlobalContext* globalCtx) {
if (func_8013D8DC(this->unk_28E, globalCtx) == 1) {
if (SubS_IsObjectLoaded(this->unk_28E, globalCtx) == true) {
gSegments[0x06] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->unk_28E].segment);
this->actor.draw = func_80A52018;
this->actor.objBankIndex = this->unk_28E;
@@ -227,15 +227,15 @@ void EnDnk_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_28E = -1;
switch (ENDNK_GET_3(&this->actor)) {
case ENDNK_GET_3_1:
this->unk_28E = func_8013D924(0x12B, globalCtx);
this->unk_28E = SubS_GetObjectIndex(OBJECT_HINTNUTS, globalCtx);
break;
case ENDNK_GET_3_0:
this->unk_28E = func_8013D924(0x135, globalCtx);
this->unk_28E = SubS_GetObjectIndex(OBJECT_DNK, globalCtx);
break;
case ENDNK_GET_3_2:
this->unk_28E = func_8013D924(0x40, globalCtx);
this->unk_28E = SubS_GetObjectIndex(OBJECT_DEKUNUTS, globalCtx);
break;
}
+8 -8
View File
@@ -202,12 +202,12 @@ s32 func_80B3CF60(EnDnp* this, GlobalContext* globalCtx) {
s32 ret = false;
if ((this->unk_322 & 7) && Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_8013AED4(&this->unk_322, 0, 7);
SubS_UpdateFlags(&this->unk_322, 0, 7);
this->unk_322 |= 8;
this->actionFunc = func_80B3D3F8;
ret = true;
} else if (!(gSaveContext.weekEventReg[23] & 0x20) && Actor_HasParent(&this->actor, globalCtx)) {
func_8013AED4(&this->unk_322, 0, 7);
SubS_UpdateFlags(&this->unk_322, 0, 7);
this->unk_322 &= ~0x500;
this->actor.parent = NULL;
this->unk_32E = 0;
@@ -227,12 +227,12 @@ s32 func_80B3D044(EnDnp* this, GlobalContext* globalCtx) {
this->actor.flags &= ~ACTOR_FLAG_1;
this->unk_324 = 0xFF;
}
func_8013AED4(&this->unk_322, 0, 7);
SubS_UpdateFlags(&this->unk_322, 0, 7);
this->actionFunc = func_80B3D11C;
ret = true;
} else if (this->unk_322 & 0x200) {
this->actor.flags |= ACTOR_FLAG_1;
func_8013AED4(&this->unk_322, 3, 7);
SubS_UpdateFlags(&this->unk_322, 3, 7);
this->unk_322 &= ~(0x200 | 0x10);
this->actionFunc = func_80B3D2D4;
}
@@ -311,7 +311,7 @@ void func_80B3D338(EnDnp* this, GlobalContext* globalCtx) {
void func_80B3D3F8(EnDnp* this, GlobalContext* globalCtx) {
if (func_8010BF58(&this->actor, globalCtx, D_80B3DE58, NULL, &this->unk_328)) {
func_8013AED4(&this->unk_322, 3, 7);
SubS_UpdateFlags(&this->unk_322, 3, 7);
this->unk_322 &= ~8;
this->actionFunc = func_80B3D2D4;
} else {
@@ -324,7 +324,7 @@ void func_80B3D47C(EnDnp* this, GlobalContext* globalCtx) {
Math_SmoothStepToF(&this->actor.scale.x, 0.0085f, 0.1f, 0.01f, 0.001f);
if ((s32)(this->actor.scale.x * 10000.0f) >= 85) {
this->actor.flags |= ACTOR_FLAG_1;
func_8013AED4(&this->unk_322, 3, 7);
SubS_UpdateFlags(&this->unk_322, 3, 7);
this->unk_322 &= ~0x10;
this->unk_322 |= 0x400;
this->actor.scale.x = 0.0085f;
@@ -360,7 +360,7 @@ void EnDnp_Init(Actor* thisx, GlobalContext* globalCtx) {
if (ENDNP_GET_7(&this->actor) == ENDNP_GET_7_1) {
this->actor.flags &= ~ACTOR_FLAG_1;
Actor_SetScale(&this->actor, 0.00085000007f);
func_8013AED4(&this->unk_322, 0, 7);
SubS_UpdateFlags(&this->unk_322, 0, 7);
this->actor.shape.rot.x = 0;
this->actor.world.rot.x = this->actor.shape.rot.x;
this->actor.cutscene = 0x10;
@@ -369,7 +369,7 @@ void EnDnp_Init(Actor* thisx, GlobalContext* globalCtx) {
!(gSaveContext.weekEventReg[23] & 0x20)) ||
((ENDNP_GET_7(&this->actor) == ENDNP_GET_7_2) && (gSaveContext.weekEventReg[23] & 0x20))) {
Actor_SetScale(&this->actor, 0.0085f);
func_8013AED4(&this->unk_322, 3, 7);
SubS_UpdateFlags(&this->unk_322, 3, 7);
this->unk_322 |= 0x400;
if ((globalCtx->sceneNum == SCENE_MITURIN) && (gSaveContext.weekEventReg[29] & 0x40)) {
this->unk_322 |= 0x20;
+7 -7
View File
@@ -124,14 +124,14 @@ s32 func_80A52648(EnDnq* this, GlobalContext* globalCtx) {
this->unk_1DC = 0xFF;
this->unk_37C |= 0x20;
}
func_8013AED4(&this->unk_37C, 0, 7);
SubS_UpdateFlags(&this->unk_37C, 0, 7);
ret = true;
} else {
if (this->unk_37C & 0x20) {
this->actor.flags |= ACTOR_FLAG_1;
this->unk_1DC = 0xFF;
this->unk_37C &= ~0x20;
func_8013AED4(&this->unk_37C, 3, 7);
SubS_UpdateFlags(&this->unk_37C, 3, 7);
}
}
@@ -321,7 +321,7 @@ s32 func_80A52D44(EnDnq* this, GlobalContext* globalCtx) {
s32 ret = false;
if ((this->unk_37C & 7) && Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_8013AED4(&this->unk_37C, 0, 7);
SubS_UpdateFlags(&this->unk_37C, 0, 7);
this->unk_380 = func_80A52CF8(this, globalCtx);
this->actionFunc = func_80A52FB8;
ret = true;
@@ -335,9 +335,9 @@ void func_80A52DC8(EnDnq* this, GlobalContext* globalCtx) {
s16 yaw = this->actor.yawTowardsPlayer - this->actor.world.rot.y;
if (yaw <= 0x3800) {
func_8013AED4(&this->unk_37C, 3, 7);
SubS_UpdateFlags(&this->unk_37C, 3, 7);
} else {
func_8013AED4(&this->unk_37C, 0, 7);
SubS_UpdateFlags(&this->unk_37C, 0, 7);
}
if (!(gSaveContext.weekEventReg[23] & 0x20)) {
@@ -376,7 +376,7 @@ void func_80A52FB8(EnDnq* this, GlobalContext* globalCtx) {
s16 sp2E = this->actor.yawTowardsPlayer;
if (func_8010BF58(&this->actor, globalCtx, this->unk_380, NULL, &this->unk_1E0)) {
func_8013AED4(&this->unk_37C, 3, 7);
SubS_UpdateFlags(&this->unk_37C, 3, 7);
this->unk_386 = 0;
this->actionFunc = func_80A52DC8;
} else {
@@ -426,7 +426,7 @@ void EnDnq_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.targetMode = 1;
this->unk_386 = 0;
this->unk_37C = 0;
func_8013AED4(&this->unk_37C, 3, 7);
SubS_UpdateFlags(&this->unk_37C, 3, 7);
if (gSaveContext.weekEventReg[9] & 0x80) {
this->unk_3A4 = 1;
} else {
+6 -6
View File
@@ -230,7 +230,7 @@ s32 func_8092CAD0(EnDns* this, GlobalContext* globalCtx) {
if (this->unk_2C6 & 7) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_8013AED4(&this->unk_2C6, 0, 7);
SubS_UpdateFlags(&this->unk_2C6, 0, 7);
this->unk_2C6 &= ~0x10;
if (ENDNS_GET_4000(&this->actor)) {
this->unk_2F0 = 0.0f;
@@ -255,14 +255,14 @@ s32 func_8092CB98(EnDns* this, GlobalContext* globalCtx) {
if (!(this->unk_2C6 & 0x80)) {
this->unk_2C8 = func_8092CA74(this);
this->actor.flags &= ~ACTOR_FLAG_1;
func_8013AED4(&this->unk_2C6, 0, 7);
SubS_UpdateFlags(&this->unk_2C6, 0, 7);
this->unk_2C6 |= 0x80;
this->unk_1D8 = 0xFF;
}
phi_v1 = 1;
} else if (this->unk_2C6 & 0x80) {
this->actor.flags |= ACTOR_FLAG_1;
func_8013AED4(&this->unk_2C6, 3, 7);
SubS_UpdateFlags(&this->unk_2C6, 3, 7);
this->unk_2C6 &= ~0x80;
}
return phi_v1;
@@ -402,7 +402,7 @@ void func_8092D1B8(EnDns* this, GlobalContext* globalCtx) {
if (!(gSaveContext.weekEventReg[23] & 0x20) && !(gSaveContext.eventInf[1] & 0x20) && func_8092CC68(globalCtx)) {
player->stateFlags1 |= 0x20;
this->unk_2C6 |= 0x100;
func_8013AED4(&this->unk_2C6, 4, 7);
SubS_UpdateFlags(&this->unk_2C6, 4, 7);
play_sound(NA_SE_SY_FOUND);
gSaveContext.eventInf[1] |= 0x20;
this->unk_2F4 = func_8092CCEC;
@@ -455,7 +455,7 @@ void func_8092D4D8(EnDns* this, GlobalContext* globalCtx) {
func_8092C63C(this, EN_DNS_ANIMATION_WALK_1);
}
} else if (func_8010BF58(&this->actor, globalCtx, this->unk_1E0, this->unk_2F4, &this->unk_1DC)) {
func_8013AED4(&this->unk_2C6, 3, 7);
SubS_UpdateFlags(&this->unk_2C6, 3, 7);
this->unk_2F4 = NULL;
if (ENDNS_GET_4000(&this->actor)) {
if (!(gSaveContext.eventInf[1] & 0x20)) {
@@ -521,7 +521,7 @@ void EnDns_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.gravity = -0.8f;
this->unk_2D2 = 0;
this->unk_2C6 = 0;
func_8013AED4(&this->unk_2C6, 3, 7);
SubS_UpdateFlags(&this->unk_2C6, 3, 7);
this->unk_2C6 |= (0x40 | 0x10);
this->unk_2C6 |= 0x200;
if (gSaveContext.weekEventReg[9] & 0x80) {
+14 -14
View File
@@ -249,7 +249,7 @@ s32 func_8094E0F8(EnGm* this, GlobalContext* globalCtx) {
if ((this->unk_260 != globalCtx->roomCtx.currRoom.num) && (globalCtx->roomCtx.unk31 == 0)) {
this->unk_260 = globalCtx->roomCtx.currRoom.num;
this->unk_262 = func_8013D924(0x248, globalCtx);
this->unk_262 = SubS_GetObjectIndex(OBJECT_IN2, globalCtx);
this->actor.draw = NULL;
this->unk_3FC = 1;
}
@@ -258,7 +258,7 @@ s32 func_8094E0F8(EnGm* this, GlobalContext* globalCtx) {
return false;
}
if ((this->unk_262 < 0) || !func_8013D8DC(this->unk_262, globalCtx)) {
if ((this->unk_262 < 0) || !SubS_IsObjectLoaded(this->unk_262, globalCtx)) {
ret = true;
} else {
this->actor.draw = EnGm_Draw;
@@ -652,7 +652,7 @@ s32 func_8094EE84(EnGm* this, GlobalContext* globalCtx) {
if (this->unk_3A4 & 7) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_8013AED4(&this->unk_3A4, 0, 7);
SubS_UpdateFlags(&this->unk_3A4, 0, 7);
this->unk_3E0 = 0;
this->unk_3E4 = NULL;
this->actor.child = this->unk_268;
@@ -999,7 +999,7 @@ s32 func_8094FAC4(EnGm* this, GlobalContext* globalCtx, struct_80133038_arg2* ar
this->unk_250 = (this->unk_254 / this->unk_24C) + 2;
this->unk_3A4 &= ~0x8;
this->unk_3A4 &= ~0x10;
func_8013AED4(&this->unk_3A4, 3, 7);
SubS_UpdateFlags(&this->unk_3A4, 3, 7);
this->unk_3A4 |= 0x100;
this->unk_3A4 |= 0x200;
func_8094E054(this, globalCtx, 7);
@@ -1016,7 +1016,7 @@ s32 func_8094FCC4(EnGm* this, GlobalContext* globalCtx, struct_80133038_arg2* ar
if (func_8094F7D0(this, globalCtx, arg2, ACTORCAT_NPC, ACTOR_EN_TAB)) {
if (this->unk_258 == 0) {
Math_Vec3f_Copy(&this->actor.world.pos, &D_80951D90);
func_8013AED4(&this->unk_3A4, 3, 7);
SubS_UpdateFlags(&this->unk_3A4, 3, 7);
func_8094E054(this, globalCtx, 0);
} else {
func_8094E054(this, globalCtx, 9);
@@ -1034,7 +1034,7 @@ s32 func_8094FD88(EnGm* this, GlobalContext* globalCtx, struct_80133038_arg2* ar
if (func_8094F7D0(this, globalCtx, arg2, ACTORCAT_NPC, ACTOR_EN_RECEPGIRL)) {
func_8094E054(this, globalCtx, 11);
func_8013AED4(&this->unk_3A4, 3, 7);
SubS_UpdateFlags(&this->unk_3A4, 3, 7);
this->unk_3A4 |= 0x100;
this->unk_3A4 |= 0x200;
ret = true;
@@ -1049,7 +1049,7 @@ s32 func_8094FE10(EnGm* this, GlobalContext* globalCtx, struct_80133038_arg2* ar
al = func_8094DEE0(this, globalCtx, ACTORCAT_NPC, ACTOR_EN_AL);
if (func_8094F7D0(this, globalCtx, arg2, ACTORCAT_NPC, ACTOR_EN_TOTO) && (al != NULL) && (al->update != NULL)) {
func_8094E054(this, globalCtx, 11);
func_8013AED4(&this->unk_3A4, 3, 7);
SubS_UpdateFlags(&this->unk_3A4, 3, 7);
this->unk_268 = al;
if (!(gSaveContext.weekEventReg[86] & 0x20)) {
this->unk_3C8 = 2;
@@ -1086,7 +1086,7 @@ s32 func_8094FF04(EnGm* this, GlobalContext* globalCtx, struct_80133038_arg2* ar
this->actor.world.rot.y = Math_Vec3f_Yaw(&sp3C, &sp30);
if (this->unk_258 == 0) {
Math_Vec3f_Copy(&this->actor.world.pos, &D_80951D9C);
func_8013AED4(&this->unk_3A4, 3, 7);
SubS_UpdateFlags(&this->unk_3A4, 3, 7);
this->unk_3C8 = 4;
this->unk_3CA = 4;
this->unk_3CC = 8;
@@ -1113,7 +1113,7 @@ s32 func_80950088(EnGm* this, GlobalContext* globalCtx, struct_80133038_arg2* ar
Math_Vec3f_Copy(&this->actor.world.pos, &D_80951DA8);
Math_Vec3s_Copy(&this->actor.world.rot, &D_80951DB4);
Math_Vec3s_Copy(&this->actor.shape.rot, &this->actor.world.rot);
func_8013AED4(&this->unk_3A4, 3, 7);
SubS_UpdateFlags(&this->unk_3A4, 3, 7);
this->unk_3A4 |= (0x2000 | 0x100);
this->unk_3A4 |= 0x200;
func_8094E054(this, globalCtx, 12);
@@ -1128,7 +1128,7 @@ s32 func_80950120(EnGm* this, GlobalContext* globalCtx, struct_80133038_arg2* ar
Math_Vec3f_Copy(&this->actor.world.pos, &D_80951DBC);
Math_Vec3s_Copy(&this->actor.world.rot, &D_80951DC8);
Math_Vec3s_Copy(&this->actor.shape.rot, &this->actor.world.rot);
func_8013AED4(&this->unk_3A4, 3, 7);
SubS_UpdateFlags(&this->unk_3A4, 3, 7);
this->unk_3A4 |= (0x800 | 0x100);
this->unk_3A4 |= 0x200;
func_8094E054(this, globalCtx, 4);
@@ -1144,7 +1144,7 @@ s32 func_809501B8(EnGm* this, GlobalContext* globalCtx, struct_80133038_arg2* ar
Math_Vec3s_Copy(&this->actor.world.rot, &D_80951DDC);
Math_Vec3s_Copy(&this->actor.shape.rot, &this->actor.world.rot);
this->actor.targetMode = 6;
func_8013AED4(&this->unk_3A4, 3, 7);
SubS_UpdateFlags(&this->unk_3A4, 3, 7);
this->unk_3A4 |= (0x1000 | 0x100);
this->unk_3A4 |= 0x200;
this->unk_3C8 = 3;
@@ -1251,7 +1251,7 @@ s32 func_809503F8(EnGm* this, GlobalContext* globalCtx) {
if (this->unk_3E8 == 9) {
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
this->actor.shape.shadowDraw = ActorShadow_DrawCircle;
func_8013AED4(&this->unk_3A4, 3, 7);
SubS_UpdateFlags(&this->unk_3A4, 3, 7);
func_8094E054(this, globalCtx, 0);
} else {
AnimationContext_SetMoveActor(globalCtx, &this->actor, &this->skelAnime, 1.0f);
@@ -1283,7 +1283,7 @@ s32 func_80950490(EnGm* this, GlobalContext* globalCtx) {
case 9:
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
this->actor.shape.shadowDraw = ActorShadow_DrawCircle;
func_8013AED4(&this->unk_3A4, 3, 7);
SubS_UpdateFlags(&this->unk_3A4, 3, 7);
this->unk_3C8 = 4;
this->unk_3CA = 4;
this->unk_3CC = 8;
@@ -1518,7 +1518,7 @@ void func_80950DB8(EnGm* this, GlobalContext* globalCtx) {
Actor* al;
if (func_8010BF58(&this->actor, globalCtx, this->unk_264, this->unk_3E4, &this->unk_25C)) {
func_8013AED4(&this->unk_3A4, 3, 7);
SubS_UpdateFlags(&this->unk_3A4, 3, 7);
al = func_8094DEE0(this, globalCtx, ACTORCAT_NPC, ACTOR_EN_AL);
if ((this->unk_258 == 2) && (al != NULL) && (al->update != NULL)) {
this->unk_268 = al;
+21 -21
View File
@@ -672,7 +672,7 @@ s32 func_80A12774(EnGo* this, GlobalContext* globalCtx) {
this->unk_390 |= 0x20;
}
func_8013AED4(&this->unk_390, 0, 7);
SubS_UpdateFlags(&this->unk_390, 0, 7);
this->unk_3C0 = 0;
this->unk_3C4 = 0;
this->unk_18C = this->actionFunc;
@@ -717,13 +717,13 @@ s32 func_80A12954(EnGo* this, GlobalContext* globalCtx) {
this->unk_3F0 = 1;
this->unk_18C = this->actionFunc;
}
func_8013AED4(&this->unk_390, 0, 7);
SubS_UpdateFlags(&this->unk_390, 0, 7);
this->actionFunc = func_80A14FC8;
} else if (this->unk_3F0 != 0) {
this->actor.flags |= ACTOR_FLAG_1;
this->unk_394 = 255;
this->unk_3F0 = 0;
func_8013AED4(&this->unk_390, 3, 7);
SubS_UpdateFlags(&this->unk_390, 3, 7);
this->actionFunc = this->unk_18C;
}
@@ -941,20 +941,20 @@ void func_80A132C8(EnGo* this, GlobalContext* globalCtx) {
s16 temp_v1 = BINANG_SUB(this->actor.yawTowardsPlayer, this->actor.shape.rot.y);
if ((fabsf(this->actor.playerHeightRel) > 20.0f) || (this->actor.xzDistToPlayer > 300.0f)) {
func_8013AED4(&this->unk_390, 3, 7);
SubS_UpdateFlags(&this->unk_390, 3, 7);
} else if ((player->transformation != PLAYER_FORM_GORON) || (ABS_ALT(temp_v1) >= 0x1C70) ||
(gSaveContext.weekEventReg[21] & 4) || (gSaveContext.weekEventReg[21] & 8)) {
func_8013AED4(&this->unk_390, 3, 7);
SubS_UpdateFlags(&this->unk_390, 3, 7);
} else {
func_8013AED4(&this->unk_390, 4, 7);
SubS_UpdateFlags(&this->unk_390, 4, 7);
}
}
void func_80A133A8(EnGo* this, GlobalContext* globalCtx) {
if (gSaveContext.weekEventReg[21] & 8) {
func_8013AED4(&this->unk_390, 3, 7);
SubS_UpdateFlags(&this->unk_390, 3, 7);
} else {
func_8013AED4(&this->unk_390, 4, 7);
SubS_UpdateFlags(&this->unk_390, 4, 7);
}
}
@@ -1348,7 +1348,7 @@ void func_80A14324(EnGo* this, GlobalContext* globalCtx) {
Actor_SetScale(&this->actor, this->unk_3A4);
this->unk_390 = 0;
this->actor.gravity = -1.0f;
func_8013AED4(&this->unk_390, 3, 7);
SubS_UpdateFlags(&this->unk_390, 3, 7);
this->unk_3EC = 0;
this->unk_390 |= 0x40;
this->unk_3BC = 0;
@@ -1362,7 +1362,7 @@ void func_80A143A8(EnGo* this, GlobalContext* globalCtx) {
Actor_SetScale(&this->actor, this->unk_3A4);
this->unk_390 = 0;
this->actor.gravity = -1.0f;
func_8013AED4(&this->unk_390, 3, 7);
SubS_UpdateFlags(&this->unk_390, 3, 7);
this->unk_3EC = 0;
this->unk_390 |= 0x40;
this->unk_390 |= 0x20;
@@ -1441,7 +1441,7 @@ void func_80A146CC(EnGo* this, GlobalContext* globalCtx) {
this->actor.targetMode = 3;
this->unk_390 = 0;
this->actor.gravity = -1.0f;
func_8013AED4(&this->unk_390, 3, 7);
SubS_UpdateFlags(&this->unk_390, 3, 7);
this->unk_390 |= 0x40;
this->unk_390 |= 0x20;
this->unk_3D8 = func_80A13E80;
@@ -1451,8 +1451,8 @@ void func_80A146CC(EnGo* this, GlobalContext* globalCtx) {
void func_80A14798(EnGo* this, GlobalContext* globalCtx) {
s32 sp38[2] = { 0x0000003E, 0x00000F64 };
if ((this->unk_288 < 0) || func_8013D8DC(this->unk_288, globalCtx) || (this->unk_289 < 0) ||
func_8013D8DC(this->unk_289, globalCtx)) {
if ((this->unk_288 < 0) || SubS_IsObjectLoaded(this->unk_288, globalCtx) || (this->unk_289 < 0) ||
SubS_IsObjectLoaded(this->unk_289, globalCtx)) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_oF1d_map_Skel_011AC8, NULL, this->jointTable,
this->morphTable, 18);
@@ -1511,7 +1511,7 @@ void func_80A149B0(EnGo* this, GlobalContext* globalCtx) {
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_GORON_CHEER - SFX_FLAG);
} else if (ENGO_GET_F(&this->actor) != ENGO_F_8) {
if (func_80A1222C(this, globalCtx)) {
func_8013AED4(&this->unk_390, 0, 7);
SubS_UpdateFlags(&this->unk_390, 0, 7);
this->unk_3EC = 1;
this->actionFunc = func_80A14B30;
} else if (ENGO_GET_F(&this->actor) == ENGO_F_4) {
@@ -1526,9 +1526,9 @@ void func_80A149B0(EnGo* this, GlobalContext* globalCtx) {
}
} else if (ENGO_GET_F(&this->actor) == ENGO_F_1) {
if (ABS_ALT(BINANG_SUB(this->actor.yawTowardsPlayer, this->actor.shape.rot.y)) < 0x3FFC) {
func_8013AED4(&this->unk_390, 3, 7);
SubS_UpdateFlags(&this->unk_390, 3, 7);
} else {
func_8013AED4(&this->unk_390, 0, 7);
SubS_UpdateFlags(&this->unk_390, 0, 7);
}
}
}
@@ -1579,7 +1579,7 @@ void func_80A14B30(EnGo* this, GlobalContext* globalCtx) {
}
this->unk_3AE += 0x400;
this->actor.shape.yOffset = (this->actor.scale.y / this->unk_3A4) * 14.0f;
func_8013AED4(&this->unk_390, 3, 7);
SubS_UpdateFlags(&this->unk_390, 3, 7);
}
} else if ((this->actor.xzDistToPlayer >= 240.0f) || (this->actor.playerHeightRel >= 20.0f) ||
(this->unk_3EC != 0)) {
@@ -1621,7 +1621,7 @@ void func_80A14EB0(EnGo* this, GlobalContext* globalCtx) {
ActorCutscene_Stop(this->actor.cutscene);
func_80A143A8(this, globalCtx);
if ((ENGO_GET_F(&this->actor) == ENGO_F_4) && (ENGO_GET_70(&this->actor) == ENGO_70_1)) {
func_8013AED4(&this->unk_390, 4, 7);
SubS_UpdateFlags(&this->unk_390, 4, 7);
func_80A143A8(sp24, globalCtx);
sp24->actionFunc = func_80A149B0;
}
@@ -1876,7 +1876,7 @@ void func_80A157C4(EnGo* this, GlobalContext* globalCtx) {
}
this->unk_390 &= ~0x8;
func_8013AED4(&this->unk_390, 3, 7);
SubS_UpdateFlags(&this->unk_390, 3, 7);
this->unk_28C = 0;
this->unk_390 |= 0x40;
this->actionFunc = this->unk_18C;
@@ -1885,8 +1885,8 @@ void func_80A157C4(EnGo* this, GlobalContext* globalCtx) {
void EnGo_Init(Actor* thisx, GlobalContext* globalCtx) {
EnGo* this = THIS;
this->unk_288 = func_8013D924(OBJECT_TAISOU, globalCtx);
this->unk_289 = func_8013D924(OBJECT_HAKUGIN_DEMO, globalCtx);
this->unk_288 = SubS_GetObjectIndex(OBJECT_TAISOU, globalCtx);
this->unk_289 = SubS_GetObjectIndex(OBJECT_HAKUGIN_DEMO, globalCtx);
this->actionFunc = func_80A14798;
}
+4 -4
View File
@@ -156,7 +156,7 @@ void EnGs_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_1F4 = this->unk_1FA;
Math_Vec3f_Copy(&this->unk_1B0[0], &D_801C5DB0);
Math_Vec3f_Copy(&this->unk_1B0[1], &D_801C5DB0);
func_8013E3B8(&this->actor, &this->unk_212, 2);
SubS_FillCutscenesList(&this->actor, this->unk_212, ARRAY_COUNT(this->unk_212));
func_801A5080(0);
if (this->actor.params == ENGS_1) {
Actor_SetScale(&this->actor, 0.15f);
@@ -262,7 +262,7 @@ void func_80997E4C(EnGs* this, GlobalContext* globalCtx) {
}
void func_80997FF0(EnGs* this, GlobalContext* globalCtx) {
if (func_8013E2D4(&this->actor, globalCtx->unk_1879C[0], -1, 1)) {
if (SubS_StartActorCutscene(&this->actor, globalCtx->unk_1879C[0], -1, SUBS_CUTSCENE_NORMAL)) {
func_80998040(this, globalCtx);
}
}
@@ -380,7 +380,7 @@ void func_809985B8(EnGs* this, GlobalContext* globalCtx) {
EnGs* gossipStone;
Vec3f sp38;
if (func_8013E2D4(&this->actor, this->unk_212, -1, 0)) {
if (SubS_StartActorCutscene(&this->actor, this->unk_212[0], -1, SUBS_CUTSCENE_SET_UNK_LINK_FIELDS)) {
Player* player = GET_PLAYER(globalCtx);
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_NEW);
@@ -446,7 +446,7 @@ void func_8099874C(EnGs* this, GlobalContext* globalCtx) {
if ((this->unk_19C == 5) && (this->unk_194 != 0)) {
s32 i;
ActorCutscene_Stop(this->unk_212);
ActorCutscene_Stop(this->unk_212[0]);
phi_v0 = 1;
for (i = 0; i < 4; i++) {

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