z_actor with some documentation, with 1 NON_EQUIVALENTs (#401)

* Match Player_GetHeight

* Another bunch

* Fix merge conflict

* rename Gfx_DrawDListXlu

* add WEEROR

* Actor_Spawn

* almost Actor_SpawnTransitionActors  and Actor_Delete

* A bunch of small actors

* More renames

* format

* Some Player renames

* a few more

* import data

* run formatter

* func_800B7170

* whoops

* Fix merge issues

* Whoops 2

* func_800B83BC and func_800B83F8

* Actor_IsActorFacingPlayerAndWithinRange

* add some prototypes

* match Actor_UpdateBgCheckInfo

* func_800B7678

* mark Actor_SpawnAsChildAndCutscene as non_matching

* Actor_Draw

* Update is chaotic

* 2 new matches

* func_800BC8B8

* Another bunch

* function renames

* run formatter

* cleanup

* remove unnecesary casts

* add missing sfx

* Fix renames

* fix merge

* func_800BF7CC

* small bunch

* another bunch

* func_800BE184 non_matching

* two more

* split z_cheap_proc

* Another bunch

* another bunch

* a few and a non matching

* yeee

* a

* Actor_DrawAll non_equivalent

* Actor_RecordUndrawnActor

* i don't know what to put in this commit message

* func_800B4B50 non matching

* func_800B42F8 non matching

* func_800B5040

* func_800B5814 non_equiv

* func_800B6584

* func_800B6608

* func_800B6680

* func_800B7E04

* func_800B8118

* func_800b9170

* ,

* func_800BC4EC

* func_800BA6FC

* func_800BA798

* func_800BA8B8

* Actor_LoadOverlay

* small cleanup

* func_800BB2D0

* meh

* func_800BBAC0

* func_800BC270

* func_800B5208 non matching

* Fix warnings

* meh

* rename some ActorShadow_ functions

* fairy

* Flags_

* fix warnings

* format

* Actor_PickUp and family

* func_800B8E58

* match Actor_RemoveFromCategory

* another bit of docs

* Match func_800B86C8

* And another bit

* rename Player_GetRunSpeedLimit

* func_800B9E84

* func_800BE63C

* func_800BB8EC

* match func_800B5814

* match func_800B9334

* cleanup

* fix conflicts: first pass

* another fix

* actorfixer fix

* fix conflicts

* func_800BE680 non_equivalent

* Improve func_800BE680 a bit

* func_800BE680 equivalent (?)

* func_800BE680 equivalent

* Actor_UpdateActor equivalent

* format

* use some  ExchangeItemID enum values

* Some more cleaning

* more cleanup

* More name stealing from OoT

* match func_800B82EC

* match func_800B9D1C and a bit of cleanup

* Add ACTOR_FLAGS placeholders

* Renames and match func_800BE184

* last pass of name stealing

* format

* fix conflicts

* more cleanup

* more cleanup

* cleanup and OVERLAY_RELOCATION_OFFSET macro

* Remove prototypes of obviously internal-only functions,
update variable names,
forward declare where necessary,
remove all `param_\d`s

* remove newlines

* minor rename

* Use ACTOR_FLAGS in z_actor

* Match func_800BE3D0

* Rename movement functions

* Document Actor_CalcOffsetOrientedToDrawRotation

* velX -> horizontalSpeed

* A bit of documentation for actor movement functions

* format

* Fix merge issues

* format

* Format

* Fix renames

* fix warnings

* fix conflicts

* review :D

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

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Fix

* format

* Actor_SpawnSetupActors

* engineer review

* Update src/code/z_actor.c

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

* A bunch of Engineer's reviews

* more Engineer's review

* a

* whoops

* run actorfixer

* c'mon

* 😮‍💨

* whoops

* warning

* More engineer's review

* run format

* I'm dumb

* a

* match func_800BE680

* Match Actor_DrawZTarget

* Match Actor_SpawnAsChildAndCutscene, fix non-equivalent in Actor_UpdateActor

* Fix merge issue

* format

* update actor

* Steal a bit of @Thar0 documentation from OoT's z_message

* Run actorfixer

* Fix renames

* Match func_800B4B50 thanks to @hensldm

* Improve ActorShadow_DrawFeet thanks to @hensldm

* whoops

* Actor_PlaySfxAtProjectedPos

* Actor_UpdateActor matched by @hensldm

* Match func_800BA2FC by @hensldm

* Match Actor_SpawnTransitionActors by @hensldm

* Match func_800BB604 by @hensldm

* Match Actor_DrawAll by @hensldm

* ActorShadow_DrawFeet by @hensldm

* Actor_UpdateAll by @hensldm

* Match func_800BCCDC by @engineer124

* Small Actor_PlaySfxAtPos by @engineer124

* ACTOR_FLAGS_ALL and a bit of cleanup

* Add invisible comment

* Small docs pass

* Fix merge

* Engineer's review

* format lol

* Actor_DrawDoorLock docs

* Actor_SpawnShieldParticlesMetal

* fix merge issues

* sActorFaultClient

* fix

* commit message

* Run actorfixer.py && format.sh

* Fix warnings

* fixes

* format

* bss

* Update include/functions.h

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Address review

* Fix merge issues, format and such

* fix merge issues

* Add ACTORCAT_MAX

* actorList -> actorLists

* Fix merge issues

* format

* Enable WERROR on jenkinsfile

* Fix merge

* Use object symbols

* address review

* format

* review

* fix merge issues

* fix

* VRAM_PTR_SIZE, small cleanup and format

* review

Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
This commit is contained in:
Anghelo Carvajal
2022-01-10 14:04:28 -03:00
committed by GitHub
parent b74bec0e1d
commit 6069a1585f
260 changed files with 7753 additions and 3747 deletions
+4 -4
View File
@@ -182,7 +182,7 @@ void __osFree(Arena* arena, void* ptr) {
ArenaNode* newNext;
ArenaImpl_Lock(arena);
node = (ArenaNode*)((u32)ptr - sizeof(ArenaNode));
node = (ArenaNode*)((uintptr_t)ptr - sizeof(ArenaNode));
if (ptr == NULL || (node->magic != NODE_MAGIC) || node->isFree) {
goto end;
@@ -190,10 +190,10 @@ void __osFree(Arena* arena, void* ptr) {
next = node->next;
prev = node->prev;
node->isFree = 1;
node->isFree = true;
newNext = next;
if ((u32)next == (u32)node + sizeof(ArenaNode) + node->size && next->isFree) {
if ((uintptr_t)next == (uintptr_t)node + sizeof(ArenaNode) + node->size && next->isFree) {
newNext = next->next;
if (newNext != NULL) {
newNext->prev = node;
@@ -205,7 +205,7 @@ void __osFree(Arena* arena, void* ptr) {
next = newNext;
}
if (prev != NULL && prev->isFree && (u32)node == (u32)prev + sizeof(ArenaNode) + prev->size) {
if (prev != NULL && prev->isFree && (uintptr_t)node == (uintptr_t)prev + sizeof(ArenaNode) + prev->size) {
if (next) {
next->prev = prev;
}
+1
View File
@@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h"
u32 sDmaMgrDmaBuffSize = 0x2000;
+1
View File
@@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h"
u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE];
+1 -1
View File
@@ -6,7 +6,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A5C8C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A5CFC.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/Audio_PlaySfxGeneral.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A5DDC.s")
+1 -1
View File
@@ -97,7 +97,7 @@ void* Graph_FaultAddrConvFunc(void* address, void* param) {
s32 i;
for (i = 0; i < graphNumGameStates; i++, gamestateOvl++) {
diff = (uintptr_t)gamestateOvl->vramEnd - (uintptr_t)gamestateOvl->vramStart;
diff = VRAM_PTR_SIZE(gamestateOvl);
ramStart = gamestateOvl->loadedRamAddr;
ramConv = (uintptr_t)gamestateOvl->vramStart - (uintptr_t)ramStart;
+1
View File
@@ -1,3 +1,4 @@
#include "prevent_bss_reordering.h"
#include "global.h"
#define RSP_DONE_MSG 667
+1 -1
View File
@@ -138,7 +138,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_IsPointInSphere.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017D668.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_PointDistToLine2D.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017D7C0.s")
+4297 -452
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -722,7 +722,7 @@ void ActorOverlayTable_FaultPrint(void* arg0, void* arg1) {
FaultDrawer_Printf("No. RamStart- RamEnd cn Name\n");
for (i = 0, overlayEntry = &gActorOverlayTable[0]; i < gMaxActorId; i++, overlayEntry++) {
overlaySize = (u32)overlayEntry->vramEnd - (u32)overlayEntry->vramStart;
overlaySize = VRAM_PTR_SIZE(overlayEntry);
if (overlayEntry->loadedRamAddr != NULL) {
FaultDrawer_Printf("%3d %08x-%08x %3d %s\n", i, overlayEntry->loadedRamAddr,
(u32)overlayEntry->loadedRamAddr + overlaySize, overlayEntry->numLoaded, "");
@@ -740,7 +740,7 @@ void* ActorOverlayTable_FaultAddrConv(void* arg0, void* arg1) {
u32 offset;
for (i = 0; i < gMaxActorId; i++, overlayEntry++) {
size = (u8*)overlayEntry->vramEnd - (u8*)overlayEntry->vramStart;
size = VRAM_PTR_SIZE(overlayEntry);
ramStart = overlayEntry->loadedRamAddr;
ramEnd = ramStart + size;
offset = (u8*)overlayEntry->vramStart - ramStart;
+1 -1
View File
@@ -3991,7 +3991,7 @@ void BgCheck_InitCollisionHeaders(CollisionContext* colCtx, GlobalContext* globa
for (i = 0; i < BG_ACTOR_MAX; i++) {
flag = dyna->bgActorFlags[i];
if ((flag & 1) && !(flag & 2)) {
Actor_SetObjectSegment(globalCtx, dyna->bgActors[i].actor);
Actor_SetObjectDependency(globalCtx, dyna->bgActors[i].actor);
CollisionHeader_SegmentedToVirtual(dyna->bgActors[i].colHeader);
}
}
+1 -1
View File
@@ -312,7 +312,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_SetMode.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DF840.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_ChangeMode.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DF86C.s")
+39
View File
@@ -0,0 +1,39 @@
#include "global.h"
/**
* Draws a display list to the opaque display buffer
*/
void Gfx_DrawDListOpa(GlobalContext* globalCtx, Gfx* dlist) {
Gfx* dl;
OPEN_DISPS(globalCtx->state.gfxCtx);
dl = POLY_OPA_DISP;
gSPDisplayList(&dl[0], &sSetupDL[6 * 0x19]);
gSPMatrix(&dl[1], Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(&dl[2], dlist);
POLY_OPA_DISP = &dl[3];
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
/**
* Draws a display list to the translucent display buffer
*/
void Gfx_DrawDListXlu(GlobalContext* globalCtx, Gfx* dlist) {
Gfx* dl;
OPEN_DISPS(globalCtx->state.gfxCtx);
dl = POLY_XLU_DISP;
gSPDisplayList(&dl[0], &sSetupDL[6 * 0x19]);
gSPMatrix(&dl[1], Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(&dl[2], dlist);
POLY_XLU_DISP = &dl[3];
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
+3 -5
View File
@@ -172,7 +172,7 @@ void EffectSs_Spawn(GlobalContext* globalCtx, s32 type, s32 priority, void* init
}
sEffectSsInfo.searchIndex = index + 1;
overlaySize = (uintptr_t)entry->vramEnd - (uintptr_t)entry->vramStart;
overlaySize = VRAM_PTR_SIZE(entry);
if (entry->vramStart == NULL) {
initInfo = entry->initInfo;
@@ -187,10 +187,8 @@ void EffectSs_Spawn(GlobalContext* globalCtx, s32 type, s32 priority, void* init
Load2_LoadOverlay(entry->vromStart, entry->vromEnd, entry->vramStart, entry->vramEnd, entry->loadedRamAddr);
}
initInfo = (u32)((entry->initInfo != NULL)
? (EffectSsInit*)(-((uintptr_t)entry->vramStart - (uintptr_t)entry->loadedRamAddr) +
(uintptr_t)entry->initInfo)
: NULL);
initInfo = (uintptr_t)(
(entry->initInfo != NULL) ? (void*)(-OVERLAY_RELOCATION_OFFSET(entry) + (uintptr_t)entry->initInfo) : NULL);
}
if (initInfo->init != NULL) {
+3 -3
View File
@@ -795,7 +795,7 @@ void EffectSsEnIce_SpawnFlyingVec3f(GlobalContext* globalCtx, Actor* actor, Vec3
initParams.scale = scale;
if (actor != NULL) {
Audio_PlayActorSound2(actor, NA_SE_PL_FREEZE_S);
Actor_PlaySfxAtPos(actor, NA_SE_PL_FREEZE_S);
}
EffectSs_Spawn(globalCtx, EFFECT_SS_EN_ICE, 80, &initParams);
@@ -888,7 +888,7 @@ void EffectSsEnFire_SpawnVec3f(GlobalContext* globalCtx, Actor* actor, Vec3f* po
initParams.bodyPart = bodyPart;
if (actor != NULL) {
Audio_PlayActorSound2(actor, NA_SE_EV_FLAME_IGNITION);
Actor_PlaySfxAtPos(actor, NA_SE_EV_FLAME_IGNITION);
}
EffectSs_Spawn(globalCtx, EFFECT_SS_EN_FIRE, 128, &initParams);
@@ -908,7 +908,7 @@ void EffectSsEnFire_SpawnVec3s(GlobalContext* globalCtx, Actor* actor, Vec3s* po
initParams.bodyPart = bodyPart;
if (actor != NULL) {
Audio_PlayActorSound2(actor, NA_SE_EV_FLAME_IGNITION);
Actor_PlaySfxAtPos(actor, NA_SE_EV_FLAME_IGNITION);
}
EffectSs_Spawn(globalCtx, EFFECT_SS_EN_FIRE, 128, &initParams);
+6 -6
View File
@@ -11,10 +11,10 @@ void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.textId = ((this->actor.params >> 8) & 0xFF) | 0x300;
this->actor.params = (this->actor.params & 0xFF) - 9;
Actor_ProcessInitChain(&this->actor, &enAObjInitVar);
ActorShape_Init(&this->actor.shape, 0, func_800B3FC0, 12);
ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawCircle, 12);
Collider_InitAndSetCylinder(globalCtx, &this->collision, &this->actor, &enAObjCylinderInit);
Collider_UpdateCylinder(&this->actor, &this->collision);
this->actor.colChkInfo.mass = 255;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actionFunc = EnAObj_Update1;
}
@@ -27,7 +27,7 @@ void EnAObj_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void EnAObj_Update1(EnAObj* this, GlobalContext* globalCtx) {
s32 yawDiff;
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->actionFunc = EnAObj_Update2;
} else {
yawDiff = ABS_ALT((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y));
@@ -39,7 +39,7 @@ void EnAObj_Update1(EnAObj* this, GlobalContext* globalCtx) {
}
void EnAObj_Update2(EnAObj* this, GlobalContext* globalCtx) {
if (func_800B867C(&this->actor, globalCtx)) {
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
this->actionFunc = EnAObj_Update1;
}
}
@@ -48,10 +48,10 @@ void EnAObj_Update(Actor* thisx, GlobalContext* globalCtx) {
EnAObj* this = THIS;
this->actionFunc(this, globalCtx);
Actor_SetHeight(&this->actor, 45.0f);
Actor_SetFocus(&this->actor, 45.0f);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collision.base);
}
void EnAObj_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, enAObjDisplayLists[thisx->params]);
Gfx_DrawDListOpa(globalCtx, enAObjDisplayLists[thisx->params]);
}
+3 -3
View File
@@ -131,7 +131,7 @@ void func_800F0BB4(EnHy* enHy, GlobalContext* globalCtx, Actor* door, s16 arg3,
Vec3f offset;
f32 phi_f0;
Actor_CalcOffsetOrientedToDrawRotation(door, &offset, &enHy->actor.world.pos);
Actor_OffsetOfPointInActorCoords(door, &offset, &enHy->actor.world.pos);
phi_f0 = (offset.z >= 0.0f) ? 1.0f : -1.0f;
sp3B = ((s8)phi_f0 < 0) ? 0 : 2;
EnHy_ChangeObjectAndAnim(enHy, globalCtx, (sp3B == 0) ? arg3 : arg4);
@@ -260,12 +260,12 @@ s32 EnHy_PlayWalkingSound(EnHy* enHy, GlobalContext* globalCtx, f32 distAboveThr
enHy->isLeftFootOnGround = isFootOnGround = func_8013DB90(globalCtx, &enHy->leftFootPos, distAboveThreshold);
if (enHy->isLeftFootOnGround && !wasLeftFootOnGround && isFootOnGround) {
Audio_PlayActorSound2(&enHy->actor, sfxId);
Actor_PlaySfxAtPos(&enHy->actor, sfxId);
}
enHy->isRightFootOnGround = isFootOnGround = func_8013DB90(globalCtx, &enHy->rightFootPos, distAboveThreshold);
if (enHy->isRightFootOnGround && !wasRightFootOnGround && isFootOnGround) {
Audio_PlayActorSound2(&enHy->actor, sfxId);
Actor_PlaySfxAtPos(&enHy->actor, sfxId);
}
return 0;
}
+16 -16
View File
@@ -43,7 +43,7 @@ static InitChainEntry sInitChain[] = {
};
void EnItem00_SetObject(EnItem00* this, GlobalContext* globalCtx, f32* shadowOffset, f32* shadowScale) {
Actor_SetObjectSegment(globalCtx, &this->actor);
Actor_SetObjectDependency(globalCtx, &this->actor);
Actor_SetScale(&this->actor, 0.5f);
this->unk154 = 0.5f;
*shadowOffset = 0.0f;
@@ -63,7 +63,7 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
thisx->params &= 0xFF; // Has to be thisx to match
if (Actor_GetCollectibleFlag(globalCtx, this->collectibleFlag)) {
if (Flags_GetCollectible(globalCtx, this->collectibleFlag)) {
if (this->actor.params == ITEM00_HEART_PIECE) {
sp30 = 0;
this->collectibleFlag = 0;
@@ -169,7 +169,7 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
}
this->unk14E = 0;
ActorShape_Init(&this->actor.shape, shadowOffset, func_800B3FC0, shadowScale);
ActorShape_Init(&this->actor.shape, shadowOffset, ActorShadow_DrawCircle, shadowScale);
this->actor.shape.shadowAlpha = 180;
this->actor.focus.pos = this->actor.world.pos;
this->unk14A = GI_NONE;
@@ -251,7 +251,7 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) {
}
if ((getItemId != GI_NONE) && (Actor_HasParent(&this->actor, globalCtx) == 0)) {
func_800B8A1C(&this->actor, globalCtx, getItemId, 50.0f, 20.0f);
Actor_PickUp(&this->actor, globalCtx, getItemId, 50.0f, 20.0f);
}
this->actionFunc = func_800A6A40;
@@ -407,7 +407,7 @@ void func_800A6A40(EnItem00* this, GlobalContext* globalCtx) {
if (this->unk14A != GI_NONE) {
if (Actor_HasParent(&this->actor, globalCtx) == 0) {
func_800B8A1C(&this->actor, globalCtx, this->unk14A, 50.0f, 80.0f);
Actor_PickUp(&this->actor, globalCtx, this->unk14A, 50.0f, 80.0f);
this->unk152++;
} else {
this->unk14A = GI_NONE;
@@ -457,7 +457,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actor.scale.y = this->actor.scale.x;
if (this->actor.gravity != 0.0f) {
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 15.0f, 15.0f, 0x1D);
if (this->actor.floorHeight <= BGCHECK_Y_MIN) {
@@ -574,7 +574,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
if (getItemId != GI_NONE) {
if (!Actor_HasParent(&this->actor, globalCtx)) {
func_800B8A1C(&this->actor, globalCtx, getItemId, 50.0f, 20.0f);
Actor_PickUp(&this->actor, globalCtx, getItemId, 50.0f, 20.0f);
}
}
@@ -586,7 +586,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
case ITEM00_MAP:
case ITEM00_COMPASS:
if (Actor_HasParent(&this->actor, globalCtx)) {
Actor_SetCollectibleFlag(globalCtx, this->collectibleFlag);
Flags_SetCollectible(globalCtx, this->collectibleFlag);
Actor_MarkForDeath(&this->actor);
}
return;
@@ -598,7 +598,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
play_sound(NA_SE_SY_GET_RUPY);
} else if (getItemId != GI_NONE) {
if (Actor_HasParent(&this->actor, globalCtx)) {
Actor_SetCollectibleFlag(globalCtx, this->collectibleFlag);
Flags_SetCollectible(globalCtx, this->collectibleFlag);
Actor_MarkForDeath(&this->actor);
}
return;
@@ -606,7 +606,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
play_sound(NA_SE_SY_GET_ITEM);
}
Actor_SetCollectibleFlag(globalCtx, this->collectibleFlag);
Flags_SetCollectible(globalCtx, this->collectibleFlag);
this->unk152 = 15;
this->unk14C = 35;
@@ -651,7 +651,7 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
s8 bankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_GI_HEART);
if (Object_IsLoaded(&globalCtx->objectCtx, bankIndex)) {
this->actor.objBankIndex = bankIndex;
Actor_SetObjectSegment(globalCtx, &this->actor);
Actor_SetObjectDependency(globalCtx, &this->actor);
this->unk152 = -2;
}
} else {
@@ -848,7 +848,7 @@ Actor* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, u32 param
}
} else if (paramFF == ITEM00_MUSHROOM_CLOUD) {
param7F00 >>= 8;
if (!Actor_GetCollectibleFlag(globalCtx, param7F00)) {
if (!Flags_GetCollectible(globalCtx, param7F00)) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_OBJ_KINOKO, spawnPos->x, spawnPos->y, spawnPos->z, 0, 0,
0, param7F00);
}
@@ -857,7 +857,7 @@ Actor* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, u32 param
if (newParamFF == ITEM00_FLEXIBLE) {
spawnedActor = 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)) {
if (!Flags_GetCollectible(globalCtx, (param7F00 >> 8) & 0x7F)) {
Audio_PlaySoundAtPosition(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
}
} else {
@@ -865,7 +865,7 @@ Actor* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, u32 param
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELFORG, spawnPos->x, spawnPos->y + 40.0f,
spawnPos->z, 0, 0, 0, ((((param7F00 >> 8) & 0x7F) & 0x7F) << 9) | 7);
if (param20000 == 0) {
if (!Actor_GetCollectibleFlag(globalCtx, (param7F00 >> 8) & 0x7F)) {
if (!Flags_GetCollectible(globalCtx, (param7F00 >> 8) & 0x7F)) {
Audio_PlaySoundAtPosition(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
}
}
@@ -923,7 +923,7 @@ Actor* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s32 para
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELFORG, spawnPos->x, spawnPos->y + 40.0f,
spawnPos->z, 0, 0, 0, ((((param7F00 >> 8) & 0x7F) & 0x7F) << 9) | 7);
}
if (Actor_GetCollectibleFlag(globalCtx, (param7F00 >> 8) & 0x7F) == 0) {
if (Flags_GetCollectible(globalCtx, (param7F00 >> 8) & 0x7F) == 0) {
Audio_PlaySoundAtPosition(globalCtx, spawnPos, 40, NA_SE_EV_BUTTERFRY_TO_FAIRY);
}
} else {
@@ -1179,5 +1179,5 @@ s32 func_800A817C(s32 index) {
}
s32 func_800A81A4(GlobalContext* globalCtx, s32 a1, s32 a2) {
return (func_800A8150(a1) == ITEM00_BIG_FAIRY) && (!Actor_GetCollectibleFlag(globalCtx, a2));
return (func_800A8150(a1) == ITEM00_BIG_FAIRY) && (!Flags_GetCollectible(globalCtx, a2));
}
+3 -3
View File
@@ -24,7 +24,7 @@ void* KaleidoManager_FaultAddrConvFunc(void* address, void* param) {
uintptr_t offset;
if (ovl != NULL) {
size = (u8*)ovl->vramEnd - (u8*)ovl->vramStart;
size = VRAM_PTR_SIZE(ovl);
ramStart = ovl->loadedRamAddr;
ramEnd = ramStart + size;
offset = (u8*)ovl->vramStart - ramStart;
@@ -47,7 +47,7 @@ void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl) {
void KaleidoManager_ClearOvl(KaleidoMgrOverlay* ovl) {
if (ovl->loadedRamAddr != NULL) {
ovl->offset = 0;
bzero(ovl->loadedRamAddr, (uintptr_t)ovl->vramEnd - (uintptr_t)ovl->vramStart);
bzero(ovl->loadedRamAddr, VRAM_PTR_SIZE(ovl));
ovl->loadedRamAddr = NULL;
gKaleidoMgrCurOvl = NULL;
}
@@ -59,7 +59,7 @@ void KaleidoManager_Init(GlobalContext* globalCtx) {
u32 i;
for (i = 0; i < ARRAY_COUNT(gKaleidoMgrOverlayTable); i++) {
size = (uintptr_t)gKaleidoMgrOverlayTable[i].vramEnd - (uintptr_t)gKaleidoMgrOverlayTable[i].vramStart;
size = VRAM_PTR_SIZE(&gKaleidoMgrOverlayTable[i]);
if (size > largestSize) {
largestSize = size;
}
+2 -2
View File
@@ -399,9 +399,9 @@ void LifeMeter_UpdateSizeAndBeep(GlobalContext* globalCtx) {
if (interfaceCtx->lifeSizeChange <= 0) {
interfaceCtx->lifeSizeChange = 0;
interfaceCtx->lifeSizeChangeDirection = 0;
if (func_801233E4(globalCtx) == 0 && (globalCtx->pauseCtx.state == 0) &&
if (Player_InCsMode(&globalCtx->state) == 0 && (globalCtx->pauseCtx.state == 0) &&
(globalCtx->pauseCtx.debugState == 0) && LifeMeter_IsCritical() && func_801690CC(globalCtx) == 0) {
// func_801233E4 and func_801690CC : Check if in Cutscene
// Player_InCsMode and func_801690CC : Check if in Cutscene
play_sound(NA_SE_SY_HITPOINT_ALARM);
}
}
+1 -1
View File
@@ -382,7 +382,7 @@ void Lights_GlowCheck(GlobalContext* globalCtx) {
pos.x = params->x;
pos.y = params->y;
pos.z = params->z;
func_800B4EDC(globalCtx, &pos, &multDest, &wDest);
Actor_GetProjectedPos(globalCtx, &pos, &multDest, &wDest);
params->drawGlow = 0;
+1 -1
View File
@@ -80,7 +80,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80152464.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_80152498.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/Message_GetState.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8015268C.s")
+2 -2
View File
@@ -38,7 +38,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80123358.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_801233E4.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/Player_InCsMode.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80123420.s")
@@ -114,7 +114,7 @@
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8012422C.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80124258.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/Player_GetExplosiveHeld.s")
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_80124278.s")
+1 -1
View File
@@ -608,7 +608,7 @@ void Quake2_Update(void) {
player = GET_PLAYER(globalCtx);
if (&player->actor != NULL) {
func_800B8248(&playerPosRot, player);
Actor_GetWorldPosShapeRot(&playerPosRot, &player->actor);
}
angle1Speed = 359.2f;
+2 -2
View File
@@ -20,7 +20,7 @@ s32 func_8013A240(GlobalContext* globalCtx) {
}
for (; type < 12; type++) {
for (actor = globalCtx->actorCtx.actorList[type].first; actor != NULL; actor = actor->next) {
for (actor = globalCtx->actorCtx.actorLists[type].first; actor != NULL; actor = actor->next) {
seen = 0;
switch (globalCtx->sceneNum) {
@@ -134,7 +134,7 @@ s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos,
ret |= 0x3e;
}
func_800B4EDC(globalCtx, pos, &screenSpace, &distance);
Actor_GetProjectedPos(globalCtx, pos, &screenSpace, &distance);
x = (s16)(screenSpace.x * distance * 160.0f + 160.0f) - 85;
y = (s16)(screenSpace.y * distance * -120.0f + 120.0f) - 67;
if ((x < 0) || (0x96 < x) || (y < 0) || (0x69 < y)) {
+2 -2
View File
@@ -142,7 +142,7 @@ Actor* SubS_FindActor(GlobalContext* globalCtx, Actor* actorListStart, u8 actorC
Actor* actor = actorListStart;
if (actor == NULL) {
actor = globalCtx->actorCtx.actorList[actorCategory].first;
actor = globalCtx->actorCtx.actorLists[actorCategory].first;
}
while (actor != NULL && actorId != actor->id) {
@@ -191,7 +191,7 @@ Actor* SubS_FindActorCustom(GlobalContext* globalCtx, Actor* actor, Actor* actor
Actor* actorIter = actorListStart;
if (actorListStart == NULL) {
actorIter = globalCtx->actorCtx.actorList[actorCategory].first;
actorIter = globalCtx->actorCtx.actorLists[actorCategory].first;
}
while (actorIter != NULL && (actorId != actorIter->id ||
@@ -77,7 +77,7 @@ void ArmsHook_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void ArmsHook_Wait(ArmsHook* this, GlobalContext* globalCtx) {
if (this->actor.parent == NULL) {
ArmsHook_SetupAction(this, ArmsHook_Shoot);
func_800B6C04(&this->actor, 20.0f);
Actor_SetSpeeds(&this->actor, 20.0f);
this->actor.parent = &GET_PLAYER(globalCtx)->actor;
this->timer = 26;
}
@@ -90,7 +90,7 @@ void func_808C1154(ArmsHook* this) {
s32 ArmsHook_AttachToPlayer(ArmsHook* this, Player* player) {
player->actor.child = &this->actor;
player->leftHandActor = &this->actor;
player->heldActor = &this->actor;
if (this->actor.child != NULL) {
player->actor.parent = this->actor.child = NULL;
return 1;
@@ -237,7 +237,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
Vec3f prevFrameDiff;
Vec3f sp60;
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Math_Vec3f_Diff(&this->actor.world.pos, &this->actor.prevPos, &prevFrameDiff);
Math_Vec3f_Sum(&this->unk1E0, &prevFrameDiff, &this->unk1E0);
this->actor.shape.rot.x = Math_FAtan2F(this->actor.speedXZ, -this->actor.velocity.y);
@@ -162,7 +162,7 @@ void ArrowIce_Fly(ArrowIce* this, GlobalContext* globalCtx) {
ArrowIce_LerpFiredPosition(&this->firedPos, &this->actor.world.pos, 0.05f);
if (arrow->unk_261 & 1) {
Audio_PlayActorSound2(&this->actor, NA_SE_IT_EXPLOSION_ICE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_IT_EXPLOSION_ICE);
ArrowIce_SetupAction(this, ArrowIce_Hit);
this->timer = 32;
this->alpha = 255;
@@ -123,7 +123,7 @@ void BgCtowerGear_Splash(BgCtowerGear* this, GlobalContext* globalCtx) {
}
}
}
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WATERWHEEL_LEVEL);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WATERWHEEL_LEVEL);
}
}
@@ -200,7 +200,7 @@ void BgCtowerGear_UpdateOrgan(Actor* thisx, GlobalContext* globalCtx) {
// Using BgCtowerGear *this = THIS causes regalloc issues
void BgCtowerGear_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_80AD32E8[BGCTOWERGEAR_GET_TYPE(thisx)]);
Gfx_DrawDListOpa(globalCtx, D_80AD32E8[BGCTOWERGEAR_GET_TYPE(thisx)]);
}
void BgCtowerGear_DrawOrgan(Actor* thisx, GlobalContext* globalCtx) {
@@ -67,7 +67,7 @@ void BgCtowerRot_Init(Actor* thisx, GlobalContext* globalCtx) {
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06017650);
this->dyna.actor.world.rot.y = this->dyna.actor.shape.rot.y - 0x4000;
}
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
Actor_OffsetOfPointInActorCoords(&this->dyna.actor, &offset, &player->actor.world.pos);
if (offset.z < 0.0f) {
this->dyna.actor.world.pos.x = this->dyna.actor.home.pos.x + (Math_SinS(this->dyna.actor.world.rot.y) * 80.0f);
this->dyna.actor.world.pos.z = this->dyna.actor.home.pos.z + (Math_CosS(this->dyna.actor.world.rot.y) * 80.0f);
@@ -91,7 +91,7 @@ void BgCtowerRot_CorridorRotate(BgCtowerRot* this, GlobalContext* globalCtx) {
f32 offsetDiffZ;
f32 rotZtmp;
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
Actor_OffsetOfPointInActorCoords(&this->dyna.actor, &offset, &player->actor.world.pos);
if (offset.z > 1100.0f) {
rotZ = 0.0f;
} else {
@@ -114,7 +114,7 @@ void BgCtowerRot_DoorDoNothing(BgCtowerRot* this, GlobalContext* globalCtx) {
void BgCtowerRot_DoorClose(BgCtowerRot* this, GlobalContext* globalCtx) {
if (!Math_SmoothStepToF(&this->timer, 0.0f, 0.1f, 15.0f, 0.1f)) {
if (this->dyna.actor.params == MAIN_DOOR) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP);
ActorCutscene_Stop(this->dyna.actor.cutscene);
}
this->actionFunc = BgCtowerRot_DoorDoNothing;
@@ -131,7 +131,7 @@ void BgCtowerRot_DoorIdle(BgCtowerRot* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
Vec3f offset;
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
Actor_OffsetOfPointInActorCoords(&this->dyna.actor, &offset, &player->actor.world.pos);
if (offset.z > 30.0f) {
this->unk160 = 0.0f;
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
@@ -159,8 +159,8 @@ void BgCtowerRot_Update(Actor* thisx, GlobalContext* globalCtx) {
void BgCtowerRot_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgCtowerRot* this = THIS;
func_800BDFC0(globalCtx, bgCtowerRotDlists[this->dyna.actor.params]);
Gfx_DrawDListOpa(globalCtx, bgCtowerRotDlists[this->dyna.actor.params]);
if (this->dyna.actor.params == CORRIDOR) {
func_800BE03C(globalCtx, D_060129D0);
Gfx_DrawDListXlu(globalCtx, D_060129D0);
}
}
@@ -95,8 +95,8 @@ void func_80B401F8(BgGoronOyu* this, GlobalContext* globalCtx) {
if (dist.x >= 0.0f && dist.x <= this->waterBoxXLength && dist.z >= 0.0f && dist.z <= this->waterBoxZLength &&
fabsf(dist.y) < 100.0f && player->actor.depthInWater > 12.0f) {
func_800B8A1C(&this->dyna.actor, globalCtx, 0xBA, this->dyna.actor.xzDistToPlayer,
fabsf(this->dyna.actor.playerHeightRel));
Actor_PickUp(&this->dyna.actor, globalCtx, 0xBA, this->dyna.actor.xzDistToPlayer,
fabsf(this->dyna.actor.playerHeightRel));
}
}
@@ -53,7 +53,7 @@ void BgHakaCurtain_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 1);
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06001588);
if (Actor_GetRoomCleared(globalCtx, this->dyna.actor.room)) {
if (Flags_GetClear(globalCtx, this->dyna.actor.room)) {
func_80B6DE80(this);
return;
}
@@ -71,7 +71,7 @@ void func_80B6DC98(BgHakaCurtain* this) {
}
void func_80B6DCAC(BgHakaCurtain* this, GlobalContext* globalCtx) {
if (Actor_GetRoomCleared(globalCtx, this->dyna.actor.room)) {
if (Flags_GetClear(globalCtx, this->dyna.actor.room)) {
func_80B6DCEC(this);
}
}
@@ -137,5 +137,5 @@ void BgHakaCurtain_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgHakaCurtain_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_06001410);
Gfx_DrawDListOpa(globalCtx, D_06001410);
}
@@ -84,11 +84,10 @@ s32 func_80BD6638(s16* arg0, s16* arg1, s32 arg2) {
void func_80BD66AC(BgHakaTomb* this, GlobalContext* globalCtx) {
s16 temp;
if (Actor_GetRoomCleared(globalCtx, this->dyna.actor.room)) {
if (Flags_GetClear(globalCtx, this->dyna.actor.room)) {
this->dyna.actor.flags |= 9;
}
if (!func_80BD6638(&temp, this->cutscenes, 1) && (temp < 0) &&
Actor_GetRoomCleared(globalCtx, this->dyna.actor.room)) {
if (!func_80BD6638(&temp, this->cutscenes, 1) && (temp < 0) && Flags_GetClear(globalCtx, this->dyna.actor.room)) {
this->dyna.actor.flags |= 1;
if (this->dyna.actor.isTargeted) {
func_80BD6754(this);
@@ -129,5 +128,5 @@ void BgHakaTomb_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgHakaTomb_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_060007B0);
Gfx_DrawDListOpa(globalCtx, D_060007B0);
}
@@ -187,7 +187,7 @@ void func_80A9B160(BgHakuginPostUnkStruct* unkStruct, GlobalContext* globalCtx)
unkStruct->unk_0000[i].unk_24 = 0.0f;
unkStruct->unk_0000[i].unk_34 = 1;
if (D_80A9D880[unkStruct->unk_0000[i].unk_00].unk_04 != 0) {
Actor_UnsetSwitchFlag(globalCtx, unkStruct->unk_0000[i].unk_2E);
Flags_UnsetSwitch(globalCtx, unkStruct->unk_0000[i].unk_2E);
}
}
}
@@ -261,7 +261,7 @@ void func_80A9B3BC(BgHakuginPost* this, GlobalContext* globalCtx) {
}
if (!(sp20 | sp1C)) {
Actor_SetSwitchFlag(globalCtx, sp28);
Flags_SetSwitch(globalCtx, sp28);
this->unk_170 = true;
} else {
this->unk_170 = sp20;
@@ -290,9 +290,9 @@ void func_80A9B46C(BgHakuginPost* this, GlobalContext* globalCtx) {
}
if (!this->unk_170 && (sp28 == 1)) {
Actor_UnsetSwitchFlag(globalCtx, sp2C);
Flags_UnsetSwitch(globalCtx, sp2C);
} else if (!this->unk_174 && (sp24 == 1)) {
Actor_UnsetSwitchFlag(globalCtx, sp30);
Flags_UnsetSwitch(globalCtx, sp30);
}
this->unk_170 = sp28;
@@ -682,9 +682,9 @@ void func_80A9C854(BgHakuginPost* this, GlobalContext* globalCtx) {
}
if (sp38) {
Actor_SetSwitchFlag(globalCtx, this->dyna.actor.home.rot.x & 0x7F);
Flags_SetSwitch(globalCtx, this->dyna.actor.home.rot.x & 0x7F);
} else {
Actor_UnsetSwitchFlag(globalCtx, this->dyna.actor.home.rot.x & 0x7F);
Flags_UnsetSwitch(globalCtx, this->dyna.actor.home.rot.x & 0x7F);
}
}
@@ -840,9 +840,9 @@ void func_80A9CE1C(BgHakuginPost* this, GlobalContext* globalCtx) {
temp = (s16)(this->dyna.actor.yawTowardsPlayer + 0x58F0);
D_80A9E028.unk_0000[i].unk_28 = ((s16)(player->actor.shape.rot.y - temp) / 3) + temp;
D_80A9E028.unk_0000[i].unk_34 = 2;
func_800B8E58(&player->actor, NA_SE_IT_HAMMER_HIT);
func_800B8E58(player, NA_SE_IT_HAMMER_HIT);
func_8019F128(NA_SE_EV_SLIDE_DOOR_OPEN);
Actor_SetSwitchFlag(globalCtx, D_80A9E028.unk_0000[i].unk_2E);
Flags_SetSwitch(globalCtx, D_80A9E028.unk_0000[i].unk_2E);
this->unk_178 = 20;
func_80A9D2C4(this, func_80A9CE00, D_80A9E028.unk_0000[i].unk_14.y + 50.0f,
D_80A9E028.unk_0000[i].unk_2A, D_80A9E028.unk_0000[i].unk_2C);
@@ -56,7 +56,7 @@ const ActorInit Bg_Icicle_InitVars = {
static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneScale, 1500, ICHAIN_CONTINUE),
ICHAIN_F32(gravity, -3, ICHAIN_CONTINUE),
ICHAIN_F32(minVelocityY, -30, ICHAIN_CONTINUE),
ICHAIN_F32(terminalVelocity, -30, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
@@ -144,7 +144,7 @@ void BgIcicle_Shiver(BgIcicle* this, GlobalContext* globalCtx) {
}
if (!(this->shiverTimer % 4)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_ICE_SWING);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_ICE_SWING);
}
if (this->shiverTimer == 0) {
@@ -184,7 +184,7 @@ void BgIcicle_Fall(BgIcicle* this, GlobalContext* globalCtx) {
return;
}
} else {
Actor_SetVelocityAndMoveYRotationAndGravity(&this->dyna.actor);
Actor_MoveWithGravity(&this->dyna.actor);
this->dyna.actor.world.pos.y += 40.0f;
Actor_UpdateBgCheckInfo(globalCtx, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4);
this->dyna.actor.world.pos.y -= 40.0f;
@@ -245,5 +245,5 @@ void BgIcicle_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgIcicle_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_060000D0);
Gfx_DrawDListOpa(globalCtx, D_060000D0);
}
@@ -119,5 +119,5 @@ void BgIkanaRay_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgIkanaRay* this = THIS;
AnimatedMat_Draw(globalCtx, this->animatedTextures);
func_800BE03C(globalCtx, D_06001100);
Gfx_DrawDListXlu(globalCtx, D_06001100);
}
@@ -77,7 +77,7 @@ void BgIkanaShutter_Init(Actor* thisx, GlobalContext* globalCtx) {
func_80BD5828(this);
return;
}
if (Actor_GetRoomCleared(globalCtx, this->dyna.actor.room)) {
if (Flags_GetClear(globalCtx, this->dyna.actor.room)) {
BgIkanaShutter_SetupDoNothing(this);
return;
}
@@ -166,7 +166,7 @@ void func_80BD5AE8(BgIkanaShutter* this) {
}
void func_80BD5B04(BgIkanaShutter* this, GlobalContext* globalCtx) {
if (Actor_GetRoomClearedTemp(globalCtx, this->dyna.actor.room)) {
if (Flags_GetClearTemp(globalCtx, this->dyna.actor.room)) {
func_80BD5B44(this);
}
}
@@ -179,7 +179,7 @@ void func_80BD5B44(BgIkanaShutter* this) {
void func_80BD5B60(BgIkanaShutter* this, GlobalContext* globalCtx) {
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
Actor_SetRoomCleared(globalCtx, this->dyna.actor.room);
Flags_SetClear(globalCtx, this->dyna.actor.room);
func_80BD5BC4(this);
return;
}
@@ -213,5 +213,5 @@ void BgIkanaShutter_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgIkanaShutter_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_06000CE8);
Gfx_DrawDListOpa(globalCtx, D_06000CE8);
}
@@ -57,7 +57,7 @@ s32 func_80C0A740(BgIkninSusceil* this, GlobalContext* globalCtx) {
Vec3f offset;
Player* player = GET_PLAYER(globalCtx);
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
Actor_OffsetOfPointInActorCoords(&this->dyna.actor, &offset, &player->actor.world.pos);
return (D_80C0B0E8.x < offset.z) && (offset.z < D_80C0B0E8.y) && (offset.x > -240.0f) && (offset.x < D_80C0B0E4);
}
@@ -94,7 +94,7 @@ s32 func_80C0A95C(BgIkninSusceil* this, GlobalContext* globalCtx) {
Vec3f offset;
f32 temp1, temp2, temp3, temp4;
Actor_CalcOffsetOrientedToDrawRotation(&this->dyna.actor, &offset, &player->actor.world.pos);
Actor_OffsetOfPointInActorCoords(&this->dyna.actor, &offset, &player->actor.world.pos);
for (i = 0; i < 7; i++) {
temp3 = (D_80C0B0F0[i] * 80.0f) + 0.5f;
temp4 = (D_80C0B0F0[i] * 80.0f) + 79.5f;
@@ -155,8 +155,8 @@ void func_80C0ABA8(BgIkninSusceil* this, GlobalContext* globalCtx) {
this->dyna.actor.world.pos.y += this->dyna.actor.velocity.y;
if (this->dyna.actor.world.pos.y <= this->dyna.actor.home.pos.y) {
func_80C0A86C(this, globalCtx, 4, 14, 1);
Actor_UnsetSwitchFlag(globalCtx, GET_SUSCEIL_SWITCHFLAG(this));
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BIGWALL_BOUND);
Flags_UnsetSwitch(globalCtx, GET_SUSCEIL_SWITCHFLAG(this));
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_BIGWALL_BOUND);
func_80C0AC74(this);
} else {
func_800B9010(&this->dyna.actor, NA_SE_EV_ICE_PILLAR_FALL - SFX_FLAG);
@@ -229,7 +229,7 @@ void BgIkninSusceil_Update(Actor* thisx, GlobalContext* globalCtx) {
if ((this->unk168 == 0) && (this->unk166 > 0) && (player->stateFlags3 & 0x100) && (player->unk_B48 > 1000.0f)) {
this->unk168 = 2;
if ((func_80C0A95C(this, globalCtx) != 0) && (this->actionFunc != func_80C0AE5C)) {
func_800B8E58(&player->actor, NA_SE_PL_BODY_HIT);
func_800B8E58(player, NA_SE_PL_BODY_HIT);
func_80C0AE3C(this);
}
}
@@ -260,5 +260,5 @@ void BgIkninSusceil_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgIkninSusceil* this = THIS;
AnimatedMat_Draw(globalCtx, this->animatedTexture);
func_800BDFC0(globalCtx, D_0600C308);
Gfx_DrawDListOpa(globalCtx, D_0600C308);
}
@@ -90,7 +90,7 @@ void BgIknvObj_Init(Actor* thisx, GlobalContext* globalCtx) {
Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE;
gSaveContext.weekEventReg[51] &= (u8)~0x10;
Actor_SetHeight(&this->dyna.actor, IREG(88));
Actor_SetFocus(&this->dyna.actor, IREG(88));
break;
default:
Actor_MarkForDeath(&this->dyna.actor);
@@ -154,7 +154,7 @@ s32 func_80BD7E0C(BgIknvObj* this, s16 targetRotation, GlobalContext* globalCtx)
func_800B9010(&this->dyna.actor, NA_SE_EV_STONEDOOR_OPEN_S - SFX_FLAG);
return false;
}
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP);
return true;
}
@@ -71,11 +71,11 @@ void BgInibsMovebg_Draw(Actor* thisx, GlobalContext* globalCtx) {
dl1 = this->unk_15C;
if (dl1 != NULL) {
func_800BDFC0(globalCtx, this->unk_15C);
Gfx_DrawDListOpa(globalCtx, this->unk_15C);
}
dl2 = this->unk_160;
if (dl2 != NULL) {
func_800BE03C(globalCtx, this->unk_160);
Gfx_DrawDListXlu(globalCtx, this->unk_160);
}
}
@@ -228,7 +228,7 @@ void BgKin2Fence_SetupPlayOpenCutscene(BgKin2Fence* this) {
void BgKin2Fence_PlayOpenCutscene(BgKin2Fence* this, GlobalContext* globalCtx) {
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
Actor_SetSwitchFlag(globalCtx, this->dyna.actor.params & 0x7F);
Flags_SetSwitch(globalCtx, this->dyna.actor.params & 0x7F);
BgKin2Fence_SetupWaitBeforeOpen(this);
return;
}
@@ -272,5 +272,5 @@ void BgKin2Fence_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgKin2Fence_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_06000828);
Gfx_DrawDListOpa(globalCtx, D_06000828);
}
@@ -55,7 +55,7 @@ static ColliderTrisInit D_80B6FA08 = {
// static InitChainEntry sInitChain[] = {
static InitChainEntry D_80B6FA24[] = {
ICHAIN_F32_DIV1000(gravity, -2000, ICHAIN_CONTINUE),
ICHAIN_F32_DIV1000(minVelocityY, -20000, ICHAIN_CONTINUE),
ICHAIN_F32_DIV1000(terminalVelocity, -20000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneScale, 100, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 100, ICHAIN_CONTINUE),
@@ -110,7 +110,7 @@ void BgLadder_ActionStartCutscene(BgLadder* this, GlobalContext* globalCtx) {
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
this->dyna.actor.draw = BgLadder_Draw;
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_SECRET_LADDER_APPEAR);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_SECRET_LADDER_APPEAR);
this->action = BgLadder_ActionFadeIn;
} else {
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
@@ -47,5 +47,5 @@ void BgLbfshot_Destroy(Actor* thisx, GlobalContext* globalCtx) {
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
}
void BgLbfshot_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_06000228);
Gfx_DrawDListOpa(globalCtx, D_06000228);
}
@@ -173,5 +173,5 @@ void BgLotus_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgLotus_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_06000040);
Gfx_DrawDListOpa(globalCtx, D_06000040);
}
@@ -41,6 +41,6 @@ void BgMarketStep_Init(Actor* thisx, GlobalContext* globalCtx) {
void BgMarketStep_Draw(Actor* thisx, GlobalContext* globalCtx) {
s32 index = thisx->params & 1;
func_800BDFC0(globalCtx, D_80AF0120[index]);
func_800BDFC0(globalCtx, D_80AF0128[index]);
Gfx_DrawDListOpa(globalCtx, D_80AF0120[index]);
Gfx_DrawDListOpa(globalCtx, D_80AF0128[index]);
}
@@ -55,5 +55,5 @@ void BgMbarChair_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgMbarChair_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, D_06000288);
Gfx_DrawDListOpa(globalCtx, D_06000288);
}
@@ -65,7 +65,7 @@ void BgTobira01_Open(BgTobira01* this, GlobalContext* globalCtx) {
if (this->timer != prevTimer) {
if (1) {}
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONEDOOR_OPEN_S - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_STONEDOOR_OPEN_S - SFX_FLAG);
this->dyna.actor.world.pos.y = (this->yOffset = (this->timer * (5.0f / 3.0f)) + this->dyna.actor.home.pos.y);
this->timer2 = 180;
}
+17 -17
View File
@@ -740,8 +740,8 @@ void func_809DAB78(Boss02* this, GlobalContext* globalCtx) {
this->actor.speedXZ = this->unk_01A8 * D_809DF5B0;
}
Actor_SetVelocityXYRotation(&this->actor);
Actor_ApplyMovement(&this->actor);
Actor_UpdateVelocityWithoutGravity(&this->actor);
Actor_UpdatePos(&this->actor);
spD0 = this->actor.world.pos;
if (D_809E0422 != 0) {
@@ -756,7 +756,7 @@ void func_809DAB78(Boss02* this, GlobalContext* globalCtx) {
this->unk_0170 = this->unk_017C;
this->unk_0170.y = temp_f0;
this->unk_016C = 120;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_INBOSS_ROAR_OLD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_INBOSS_ROAR_OLD);
}
this->actor.flags &= ~1;
@@ -965,7 +965,7 @@ void func_809DAB78(Boss02* this, GlobalContext* globalCtx) {
D_809E042C->unk_1D5C = 0.0f;
play_sound(NA_SE_EN_INBOSS_DEAD_PRE2_OLD);
} else if (!(this->unk_0146[1] & 0xF) && (Rand_ZeroOne() < 0.5f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_INBOSS_DAMAGE_OLD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_INBOSS_DAMAGE_OLD);
}
return;
@@ -987,7 +987,7 @@ void func_809DAB78(Boss02* this, GlobalContext* globalCtx) {
this->unk_0144 = 22;
this->actor.gravity = -1.0f * D_809DF5B0;
this->actor.velocity.y = 0.0f;
this->actor.minVelocityY = -1000.0f * D_809DF5B0;
this->actor.terminalVelocity = -1000.0f * D_809DF5B0;
this->unk_0164 = randPlusMinusPoint5Scaled(0.05f);
spCC = player->actor.world.pos.x - this->actor.world.pos.x;
@@ -1006,7 +1006,7 @@ void func_809DAB78(Boss02* this, GlobalContext* globalCtx) {
Audio_QueueSeqCmd(NA_BGM_CLEAR_BOSS | 0x8000);
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_INBOSS_DEAD_OLD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_INBOSS_DEAD_OLD);
}
}
return;
@@ -1017,7 +1017,7 @@ void func_809DAB78(Boss02* this, GlobalContext* globalCtx) {
Math_Vec3f_Copy(&this->unk_01BC[i], &this->actor.world.pos);
this->unk_0B1C[i].y += this->unk_0164;
Math_ApproachF(&this->unk_0B1C[i].x, -(M_PI / 2), 0.1f, 0.07f);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 50.0f, 150.0f, 100.0f, 4);
if (this->actor.bgCheckFlags & 1) {
@@ -1100,7 +1100,7 @@ void func_809DBFB4(Boss02* this, GlobalContext* globalCtx) {
this->unk_0156 = 15;
if (i == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_INBOSS_DAMAGE_OLD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_INBOSS_DAMAGE_OLD);
this->unk_015C = 1;
} else {
func_8019F1C0(&this->unk_167C, NA_SE_EN_INBOSS_DAMAGE_OLD);
@@ -1227,9 +1227,9 @@ void Boss02_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_016C != 0) {
if ((this->unk_016C == 60) && (this->unk_0144 < 20)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_INBOSS_ROAR_OLD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_INBOSS_ROAR_OLD);
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_INBOSS_SAND_OLD - SFX_FLAG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_INBOSS_SAND_OLD - SFX_FLAG);
if (this->unk_0144 > 20) {
sp3C.x = randPlusMinusPoint5Scaled(100.0f * D_809DF5B0) + this->unk_0170.x;
@@ -1959,7 +1959,7 @@ void func_809DD934(Boss02* this, GlobalContext* globalCtx) {
player->actor.home.pos = player->actor.world.pos;
player->actor.prevPos = player->actor.world.pos;
temp_a0_5 = globalCtx->actorCtx.actorList[ACTORCAT_BG].first;
temp_a0_5 = globalCtx->actorCtx.actorLists[ACTORCAT_BG].first;
while (temp_a0_5 != NULL) {
if (temp_a0_5->id == ACTOR_BG_INIBS_MOVEBG) {
Actor_MarkForDeath(temp_a0_5);
@@ -1971,7 +1971,7 @@ void func_809DD934(Boss02* this, GlobalContext* globalCtx) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_BG_INIBS_MOVEBG, 0, D_809E0422 ? 3150.0f : 0.0f, 0, 0, 0, 0,
D_809E0422);
temp_a0_5 = globalCtx->actorCtx.actorList[ACTORCAT_BOSS].first;
temp_a0_5 = globalCtx->actorCtx.actorLists[ACTORCAT_BOSS].first;
while (temp_a0_5 != NULL) {
if ((temp_a0_5->id == ACTOR_EN_TANRON5) || (temp_a0_5->id == ACTOR_ITEM_B_HEART)) {
if (D_809E0422 == 0) {
@@ -2002,7 +2002,7 @@ void func_809DD934(Boss02* this, GlobalContext* globalCtx) {
temp_a0_5->velocity.z *= phi_f0_2;
temp_a0_5->gravity *= phi_f0_2;
temp_a0_5->minVelocityY *= phi_f0_2;
temp_a0_5->terminalVelocity *= phi_f0_2;
temp_a0_5->scale.x *= phi_f0_2;
temp_a0_5->scale.y *= phi_f0_2;
@@ -2109,11 +2109,11 @@ void func_809DEAC4(Boss02* this, GlobalContext* globalCtx) {
player->actor.shape.rot.y = -0x8000;
player->actor.world.rot.y = player->actor.shape.rot.y;
this->unk_1D24.x = player->actor.world.pos.x - 20.0f;
this->unk_1D24.y = (func_800B6FC8(player) + player->actor.world.pos.y) - 29.0f;
this->unk_1D24.y = (Player_GetHeight(player) + player->actor.world.pos.y) - 29.0f;
this->unk_1D24.z = player->actor.world.pos.z - 50;
this->unk_1D30.x = player->actor.world.pos.x;
this->unk_1D30.y = (func_800B6FC8(player) + player->actor.world.pos.y) - 17.0f;
this->unk_1D30.y = (Player_GetHeight(player) + player->actor.world.pos.y) - 17.0f;
this->unk_1D30.z = player->actor.world.pos.z;
if (this->unk_1D1C >= 30) {
if (this->unk_1D1C == 30) {
@@ -2177,8 +2177,8 @@ void func_809DEAC4(Boss02* this, GlobalContext* globalCtx) {
}
if (this->unk_1D1C == (u32)(KREG(92) + 125)) {
Actor_TitleCardCreate(globalCtx, &globalCtx->actorCtx.titleCtxt, Lib_SegmentedToVirtual(&D_06008650),
160, 180, 128, 40);
TitleCard_InitBossName(&globalCtx->state, &globalCtx->actorCtx.titleCtxt,
Lib_SegmentedToVirtual(&D_06008650), 160, 180, 128, 40);
}
if (this->unk_1D1C == (u32)(BREG(27) + 335)) {
+12 -12
View File
@@ -156,7 +156,7 @@ void Boss04_Init(Actor* thisx, GlobalContext* globalCtx2) {
s16 phi_s0_2;
s32 pad;
if (Actor_GetRoomCleared(globalCtx, globalCtx->roomCtx.currRoom.num)) {
if (Flags_GetClear(globalCtx, globalCtx->roomCtx.currRoom.num)) {
Actor_MarkForDeath(&this->actor);
return;
}
@@ -274,7 +274,7 @@ void func_809EC568(Boss04* this, GlobalContext* globalCtx) {
func_8016566C(150);
this->unk_744 = 60.0f;
boss = globalCtx->actorCtx.actorList[ACTORCAT_BOSS].first;
boss = globalCtx->actorCtx.actorLists[ACTORCAT_BOSS].first;
while (boss != NULL) {
if (boss->id == ACTOR_EN_WATER_EFFECT) {
Actor_MarkForDeath(boss);
@@ -289,7 +289,7 @@ void func_809EC568(Boss04* this, GlobalContext* globalCtx) {
case 10:
if (this->unk_704 == 3) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_EYEGOLE_DEMO_EYE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_EYEGOLE_DEMO_EYE);
this->unk_74A = 1;
}
this->unk_2D0 = 10000.0f;
@@ -319,7 +319,7 @@ void func_809EC568(Boss04* this, GlobalContext* globalCtx) {
}
case 12:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_ME_ATTACK - SFX_FLAG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ME_ATTACK - SFX_FLAG);
Math_ApproachF(&this->unk_718.x, this->actor.world.pos.x, 0.5f, 1000.0f);
Math_ApproachF(&this->unk_718.y, this->actor.world.pos.y, 0.5f, 1000.0f);
Math_ApproachF(&this->unk_718.z, this->actor.world.pos.z, 0.5f, 1000.0f);
@@ -331,7 +331,7 @@ void func_809EC568(Boss04* this, GlobalContext* globalCtx) {
this->unk_2DA = 10;
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_CLEAR_TAG, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, CLEAR_TAG_SPLASH);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_KONB_JUMP_LEV_OLD - SFX_FLAG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_KONB_JUMP_LEV_OLD - SFX_FLAG);
this->unk_748 = 20;
}
break;
@@ -342,11 +342,11 @@ void func_809EC568(Boss04* this, GlobalContext* globalCtx) {
Matrix_GetStateTranslationAndScaledZ(-100.0f, &this->unk_70C);
this->unk_70C.x += player->actor.world.pos.x;
this->unk_70C.y = func_800B6FC8(player) + player->actor.world.pos.y + 36.0f;
this->unk_70C.y = Player_GetHeight(player) + player->actor.world.pos.y + 36.0f;
this->unk_70C.z += player->actor.world.pos.z;
this->unk_718.x = player->actor.world.pos.x;
this->unk_718.y = (func_800B6FC8(player) + player->actor.world.pos.y) - 4.0f;
this->unk_718.y = (Player_GetHeight(player) + player->actor.world.pos.y) - 4.0f;
this->unk_718.z = player->actor.world.pos.z;
if (this->unk_704 >= 35) {
@@ -501,7 +501,7 @@ void func_809ECF58(Boss04* this, GlobalContext* globalCtx) {
sp3C.y = this->actor.floorHeight + 2.0f;
sp3C.z = this->actor.world.pos.z;
EffectSsGRipple_Spawn(globalCtx, &sp3C, 1400, 500, 0);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_ME_ATTACK - SFX_FLAG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ME_ATTACK - SFX_FLAG);
}
}
@@ -520,7 +520,7 @@ void func_809ED224(Boss04* this) {
this->actor.speedXZ = 0.0f;
this->unk_2D0 = 10000.0f;
this->unk_2C8 = 200;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_ME_DEAD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ME_DEAD);
this->actor.flags &= ~1;
func_801A2ED8();
this->unk_1F6 = 10;
@@ -569,7 +569,7 @@ void func_809ED45C(Boss04* this, GlobalContext* globalCtx) {
if ((this->unk_1FE == 0) && (this->collider1.elements[0].info.bumperFlags & BUMP_HIT)) {
this->collider1.elements[0].info.bumperFlags &= ~BUMP_HIT;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_ME_DAMAGE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ME_DAMAGE);
damage = this->actor.colChkInfo.damage;
this->actor.colChkInfo.health = this->actor.colChkInfo.health - damage;
if ((s8)this->actor.colChkInfo.health <= 0) {
@@ -706,7 +706,7 @@ void Boss04_Update(Actor* thisx, GlobalContext* globalCtx2) {
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
this->actor.world.pos.y -= 100.0f;
this->actor.prevPos.y -= 100.0f;
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 100.0f, 120.0f, 200.0f, 5);
@@ -765,7 +765,7 @@ void Boss04_Update(Actor* thisx, GlobalContext* globalCtx2) {
}
if (this->unk_74A != 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_ME_EXIST - SFX_FLAG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ME_EXIST - SFX_FLAG);
}
}
+2 -2
View File
@@ -53,8 +53,8 @@ void DmSa_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk2E0 = 0;
this->alpha = 0xFF;
this->actor.targetArrowOffset = 3000.0f;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 24.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06013328, NULL, 0, 0, 0);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06013328, NULL, NULL, NULL, 0);
func_80A2E960(&this->skelAnime, D_80A2ED00, 0);
Actor_SetScale(&this->actor, 0.01f);
this->actionFunc = DmSa_DoNothing;
@@ -44,5 +44,5 @@ void DmStatue_Update(Actor* thisx, GlobalContext* globalCtx) {
void DmStatue_Draw(Actor* thisx, GlobalContext* globalCtx) {
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&D_06001788));
func_800BE03C(globalCtx, D_06000520);
Gfx_DrawDListXlu(globalCtx, D_06000520);
}
+92 -92
View File
@@ -260,7 +260,7 @@ void func_80A9FE3C(DmStk* this, GlobalContext* globalCtx, SkelAnime* skelAnime,
void func_80A9FED8(DmStk* this, GlobalContext* globalCtx) {
switch (globalCtx->csCtx.frames + 20) {
case 1195:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_APPEAR);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_APPEAR);
break;
case 1232:
@@ -268,48 +268,48 @@ void func_80A9FED8(DmStk* this, GlobalContext* globalCtx) {
case 1252:
case 1255:
case 1257:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_SHAKEHEAD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_SHAKEHEAD);
break;
case 1285:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL03_LAUGH_BIG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL03_LAUGH_BIG);
break;
case 1343:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
break;
case 1410:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
break;
case 1603:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_WALK);
break;
case 1610:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_REVERSE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_REVERSE);
break;
case 2095:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_SURPRISED);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_SURPRISED);
break;
case 2190:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_JUMP);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_JUMP);
break;
case 2212:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_ONGND);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_ONGND);
break;
case 2214:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL02_LAUGH_SHORT);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL02_LAUGH_SHORT);
break;
case 2250:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL06_SURPRISED);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_DOWN_K);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL06_SURPRISED);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_DOWN_K);
break;
case 2255:
@@ -338,7 +338,7 @@ void func_80A9FED8(DmStk* this, GlobalContext* globalCtx) {
case 2508:
case 2519:
case 2530:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_RIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_RIDE);
break;
}
}
@@ -368,11 +368,11 @@ void func_80AA0100(DmStk* this, GlobalContext* globalCtx) {
case 232:
case 243:
case 254:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_RIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_RIDE);
break;
case 173:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL03_LAUGH_BIG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL03_LAUGH_BIG);
break;
}
}
@@ -380,15 +380,15 @@ void func_80AA0100(DmStk* this, GlobalContext* globalCtx) {
void func_80AA0158(DmStk* this, GlobalContext* globalCtx) {
switch (globalCtx->csCtx.frames) {
case 18:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_GASAGOSO);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_GASAGOSO);
break;
case 90:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
break;
case 142:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_EVIL_POWER);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_EVIL_POWER);
break;
}
}
@@ -405,11 +405,11 @@ void func_80AA01C0(DmStk* this, GlobalContext* globalCtx) {
break;
case 560:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL02_LAUGH_SHORT);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL02_LAUGH_SHORT);
break;
case 890:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL21_PSYCHO_VOICE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL21_PSYCHO_VOICE);
break;
}
}
@@ -423,7 +423,7 @@ void func_80AA0264(DmStk* this, GlobalContext* globalCtx) {
break;
case 71:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_BODY);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_BODY);
break;
case 365:
@@ -435,30 +435,30 @@ void func_80AA0264(DmStk* this, GlobalContext* globalCtx) {
break;
case 265:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL03_LAUGH_BIG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL03_LAUGH_BIG);
break;
case 126:
Audio_PlayActorSound2(&player->actor, NA_SE_VO_DUMMY_150);
Actor_PlaySfxAtPos(&player->actor, NA_SE_VO_DUMMY_150);
break;
case 197:
Audio_PlayActorSound2(&player->actor, NA_SE_VO_DUMMY_134);
Actor_PlaySfxAtPos(&player->actor, NA_SE_VO_DUMMY_134);
break;
case 207:
Audio_PlayActorSound2(&player->actor, NA_SE_VO_DUMMY_135);
Actor_PlaySfxAtPos(&player->actor, NA_SE_VO_DUMMY_135);
break;
case 217:
Audio_PlayActorSound2(&player->actor, NA_SE_VO_DUMMY_136);
Actor_PlaySfxAtPos(&player->actor, NA_SE_VO_DUMMY_136);
break;
}
if (player) {}
if ((globalCtx->csCtx.frames >= 263) && (globalCtx->csCtx.frames < 698)) {
Audio_PlayActorSound2(&player->actor, NA_SE_EN_STALKIDS_BODY_LEV - SFX_FLAG);
Actor_PlaySfxAtPos(&player->actor, NA_SE_EN_STALKIDS_BODY_LEV - SFX_FLAG);
}
}
@@ -471,37 +471,37 @@ void func_80AA0420(DmStk* this, GlobalContext* globalCtx) {
break;
case 258:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_TURN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_TURN);
break;
case 524:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_TURN);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL04_ANGER);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_TURN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL04_ANGER);
break;
case 534:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_ROLL);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_PO_ROLL);
break;
case 678:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_STRETCH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_STRETCH);
break;
}
if ((this->unk_2E0 == 31) && (globalCtx->csCtx.frames < 700)) {
if (Animation_OnFrame(&this->skelAnime, 5.0f) || Animation_OnFrame(&this->skelAnime, 25.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_OTEDAMA1);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_OTEDAMA1);
} else if (Animation_OnFrame(&this->skelAnime, 17.0f) || Animation_OnFrame(&this->skelAnime, 40.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_OTEDAMA2);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_OTEDAMA2);
}
}
if (globalCtx->csCtx.frames >= 700) {
if (D_80AA3CB8 < 128) {
if ((D_80AA3CB8 & 0x1F) == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL20_CALL_MOON);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL20_CALL_MOON);
} else if ((D_80AA3CB8 & 0x1F) == 16) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL20_CALL_MOON2);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL20_CALL_MOON2);
}
D_80AA3CB8++;
}
@@ -512,14 +512,14 @@ void func_80AA0420(DmStk* this, GlobalContext* globalCtx) {
void func_80AA05F0(DmStk* this, GlobalContext* globalCtx) {
if (globalCtx->csCtx.frames == 3) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL06_SURPRISED);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_DOWN_K);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL06_SURPRISED);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_DOWN_K);
}
}
void func_80AA0634(DmStk* this, GlobalContext* globalCtx) {
if ((globalCtx->csCtx.frames >= 642) && (globalCtx->csCtx.frames < 845)) {
Audio_PlayActorSound2(&this->actor, NA_SE_NE_STAL23_COLD - SFX_FLAG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_NE_STAL23_COLD - SFX_FLAG);
}
}
@@ -531,16 +531,16 @@ void func_80AA066C(DmStk* this, GlobalContext* globalCtx) {
case 72:
case 77:
case 79:
Audio_PlayActorSound2(&this->actor, NA_SE_PL_WALK_WATER2);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_PL_WALK_WATER2);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_WALK);
break;
case 186:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_UP);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_UP);
break;
case 230:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL22_LAUGH_KID_L);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL22_LAUGH_KID_L);
break;
}
}
@@ -552,7 +552,7 @@ void func_80AA071C(DmStk* this, GlobalContext* globalCtx) {
break;
case 660:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_SHAKEHEAD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_SHAKEHEAD);
break;
}
}
@@ -566,27 +566,27 @@ void func_80AA076C(DmStk* this, GlobalContext* globalCtx) {
break;
case 45:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_RIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_RIDE);
break;
case 93:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
break;
case 245:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_RIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_RIDE);
break;
case 269:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL11_LAUGH_SHY2);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL11_LAUGH_SHY2);
break;
case 327:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_SHAKEHEAD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_SHAKEHEAD);
break;
case 455:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_RIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_RIDE);
break;
case 1730:
@@ -594,7 +594,7 @@ void func_80AA076C(DmStk* this, GlobalContext* globalCtx) {
break;
case 1395:
func_800B8E58(&player->actor, NA_SE_VO_DUMMY_34);
func_800B8E58(player, NA_SE_VO_DUMMY_34);
break;
case 1850:
@@ -608,20 +608,20 @@ void func_80AA076C(DmStk* this, GlobalContext* globalCtx) {
if (this->unk_2E0 == 0) {
if (Animation_OnFrame(&this->skelAnime, 8.0f) || Animation_OnFrame(&this->skelAnime, 17.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
}
if (Animation_OnFrame(&this->skelAnime, 28.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_RIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_RIDE);
}
} else if (this->unk_2E0 == 71) {
if (Animation_OnFrame(&this->skelAnime, 2.0f) || Animation_OnFrame(&this->skelAnime, 6.0f) ||
Animation_OnFrame(&this->skelAnime, 12.0f) || Animation_OnFrame(&this->skelAnime, 18.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
}
} else if ((this->unk_2E0 == 70) &&
(Animation_OnFrame(&this->skelAnime, 16.0f) || Animation_OnFrame(&this->skelAnime, 23.0f))) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_NOSE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_NOSE);
}
}
@@ -634,25 +634,25 @@ void func_80AA09DC(DmStk* this, GlobalContext* globalCtx) {
break;
case 234:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_TURN);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL04_ANGER);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_TURN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL04_ANGER);
break;
case 244:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_ROLL);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_PO_ROLL);
break;
case 388:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_STRETCH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_STRETCH);
break;
}
if (globalCtx->csCtx.frames >= 408) {
if (D_80AA3CBC < 128) {
if ((D_80AA3CBC & 0x1F) == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL20_CALL_MOON);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL20_CALL_MOON);
} else if ((D_80AA3CBC & 0x1F) == 16) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL20_CALL_MOON2);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL20_CALL_MOON2);
}
D_80AA3CBC++;
}
@@ -675,19 +675,19 @@ void func_80AA0B08(DmStk* this, GlobalContext* globalCtx) {
case 332:
case 335:
case 344:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
break;
case 367:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_BODY_LEV);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_BODY_LEV);
break;
case 470:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_HEADACHE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_HEADACHE);
break;
case 486:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
func_8019F1C0(&this->unk_310, NA_SE_EN_STAL08_CRY_BIG);
break;
@@ -696,11 +696,11 @@ void func_80AA0B08(DmStk* this, GlobalContext* globalCtx) {
break;
case 590:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
break;
case 592:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_RIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_RIDE);
break;
case 594:
@@ -712,16 +712,16 @@ void func_80AA0B08(DmStk* this, GlobalContext* globalCtx) {
if ((globalCtx->csCtx.frames >= 62) && (globalCtx->csCtx.frames < 273)) {
if ((Rand_ZeroOne() < 0.75f) && ((globalCtx->state.frames % 2) != 0)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_EARTHQUAKE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_EARTHQUAKE);
}
}
if ((globalCtx->csCtx.frames >= 498) && (globalCtx->csCtx.frames < 577)) {
if ((globalCtx->state.frames % 4) == 0) {
if ((globalCtx->state.frames & 4) != 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_BODY_LEV);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_BODY_LEV);
} else {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
}
}
}
@@ -734,16 +734,16 @@ void func_80AA0B08(DmStk* this, GlobalContext* globalCtx) {
void func_80AA0DA8(DmStk* this, GlobalContext* globalCtx) {
switch (globalCtx->csCtx.frames) {
case 551:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_PULLED);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_PULLED);
break;
case 711:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
break;
case 716:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_ONGND);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_ONGND);
break;
}
}
@@ -751,16 +751,16 @@ void func_80AA0DA8(DmStk* this, GlobalContext* globalCtx) {
void func_80AA0E1C(DmStk* this, GlobalContext* globalCtx) {
switch (globalCtx->csCtx.frames) {
case 311:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_PULLED);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_PULLED);
break;
case 365:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF);
break;
case 372:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_ONGND);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_ON);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_ONGND);
break;
}
}
@@ -834,24 +834,24 @@ void func_80AA0E90(DmStk* this, GlobalContext* globalCtx) {
if (this->unk_2E0 == 1) {
if (Animation_OnFrame(&this->skelAnime, 2.0f) || Animation_OnFrame(&this->skelAnime, 6.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_WALK);
}
} else if (this->unk_2E0 == 19) {
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 13.0f) ||
Animation_OnFrame(&this->skelAnime, 20.0f) || Animation_OnFrame(&this->skelAnime, 27.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_PL_CALM_HIT);
Actor_PlaySfxAtPos(&this->actor, NA_SE_PL_CALM_HIT);
}
} else if (this->unk_2E0 == 14) {
if (Animation_OnFrame(&this->skelAnime, 3.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_PL_PUT_OUT_ITEM);
Actor_PlaySfxAtPos(&this->actor, NA_SE_PL_PUT_OUT_ITEM);
}
} else if (this->unk_2E0 == 15) {
if (Animation_OnFrame(&this->skelAnime, 14.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_UNSKILLFUL_OCARINA);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_UNSKILLFUL_OCARINA);
}
if (Animation_OnFrame(&this->skelAnime, 45.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL01_LAUGH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STAL01_LAUGH);
}
}
}
@@ -964,7 +964,7 @@ void DmStk_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_2E4 = this->unk_2E4;
this->actor.targetArrowOffset = 1100.0f;
this->unk_334 = 99;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 24.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06013328, NULL, NULL, NULL, 0);
func_80A9FE3C(this, globalCtx, &this->skelAnime, &sAnimations[this->unk_2E0], 0);
}
@@ -1062,7 +1062,7 @@ void func_80AA19EC(DmStk* this, GlobalContext* globalCtx) {
void func_80AA1A50(DmStk* this, GlobalContext* globalCtx) {
if (ActorCutscene_GetCanPlayNext(0xA)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_DAMAGE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_DAMAGE);
ActorCutscene_Start(0xA, &this->actor);
this->actor.shape.rot.x = 0;
this->actor.world.rot.x = this->actor.shape.rot.x;
@@ -1109,7 +1109,7 @@ void func_80AA1B9C(DmStk* this, GlobalContext* globalCtx) {
this->unk_2E0 = 39;
func_80A9FE3C(this, globalCtx, &this->skelAnime, &sAnimations[this->unk_2E0], 0);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_DOWN_K);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_DOWN_K);
this->actionFunc = func_80AA1C64;
}
@@ -1568,9 +1568,9 @@ void DmStk_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->actor.params != 1) {
if (this->unk_2E0 == 33) {
Actor_SetHeight(&this->actor, 40.0f);
Actor_SetFocus(&this->actor, 40.0f);
} else {
Actor_SetHeight(&this->actor, 6.0f);
Actor_SetFocus(&this->actor, 6.0f);
}
func_80A9FDB0(this, globalCtx);
@@ -1592,7 +1592,7 @@ void DmStk_Update(Actor* thisx, GlobalContext* globalCtx) {
switch (this->unk_33A) {
case 1:
if (func_800B8718(&this->actor, globalCtx)) {
if (func_800B8718(&this->actor, &globalCtx->state)) {
this->unk_33A = 2;
} else {
func_800B874C(&this->actor, globalCtx, this->actor.xzDistToPlayer,
@@ -1719,7 +1719,7 @@ void DmStk_PostLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[this->unk_337].segment);
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&D_06008658));
func_800BDFC0(globalCtx, D_06007840);
Gfx_DrawDListOpa(globalCtx, D_06007840);
gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->unk_336].segment);
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[this->unk_336].segment);
@@ -1829,7 +1829,7 @@ void DmStk_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_33B != 0) {
if (this->actor.params == 1) {
func_800BDFC0(globalCtx, D_06006BB0);
Gfx_DrawDListOpa(globalCtx, D_06006BB0);
return;
}
@@ -208,5 +208,5 @@ void DoorAna_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void DoorAna_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800BE03C(globalCtx, D_05000C40);
Gfx_DrawDListXlu(globalCtx, D_05000C40);
}
@@ -205,7 +205,7 @@ void DoorSpiral_Init(Actor* thisx, GlobalContext* globalCtx) {
}
DoorSpiral_SetupAction(this, DoorSpiral_WaitForObject);
Actor_SetHeight(&this->actor, 60.0f);
Actor_SetFocus(&this->actor, 60.0f);
}
void DoorSpiral_Destroy(Actor* thisx, GlobalContext* globalCtx) {
@@ -237,7 +237,7 @@ f32 DoorSpiral_GetDistFromPlayer(GlobalContext* globalCtx, DoorSpiral* this, f32
target.y = player->actor.world.pos.y + yOffset;
target.z = player->actor.world.pos.z;
Actor_CalcOffsetOrientedToDrawRotation(&this->actor, &offset, &target);
Actor_OffsetOfPointInActorCoords(&this->actor, &offset, &target);
if ((spiralWidth < fabsf(offset.x)) || (spiralHeight < fabsf(offset.y))) {
return FLT_MAX;
@@ -252,7 +252,7 @@ f32 DoorSpiral_GetDistFromPlayer(GlobalContext* globalCtx, DoorSpiral* this, f32
s32 DoorSpiral_PlayerShouldClimb(DoorSpiral* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if (!(func_801233E4(globalCtx))) {
if (!Player_InCsMode(&globalCtx->state)) {
SpiralInfo* spiralInfo = &sSpiralInfo[this->spiralType];
f32 dist =
DoorSpiral_GetDistFromPlayer(globalCtx, this, 0.0f, spiralInfo->spiralWidth, spiralInfo->spiralHeight);
@@ -327,7 +327,7 @@ void func_808B90CC(DoorWarp1* this, GlobalContext* globalCtx) {
DoorWarp1_SetupAction(this, func_808B921C);
}
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WARP_HOLE_ENERGY - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WARP_HOLE_ENERGY - SFX_FLAG);
}
void func_808B921C(DoorWarp1* this, GlobalContext* globalCtx) {
@@ -348,14 +348,14 @@ void func_808B921C(DoorWarp1* this, GlobalContext* globalCtx) {
DoorWarp1_SetupAction(this, func_808B93A0);
}
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BOSS_WARP_HOLE - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_BOSS_WARP_HOLE - SFX_FLAG);
}
void func_808B93A0(DoorWarp1* this, GlobalContext* globalCtx) {
s32 pad;
Player* player = GET_PLAYER(globalCtx);
if ((func_80152498(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 4 && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
if (globalCtx->msgCtx.choiceIndex == 0) {
func_8019F208();
@@ -371,7 +371,7 @@ void func_808B93A0(DoorWarp1* this, GlobalContext* globalCtx) {
}
}
func_808BB8D4(this, globalCtx, 1);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BOSS_WARP_HOLE - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_BOSS_WARP_HOLE - SFX_FLAG);
}
void func_808B94A4(DoorWarp1* this, GlobalContext* globalCtx) {
@@ -379,7 +379,7 @@ void func_808B94A4(DoorWarp1* this, GlobalContext* globalCtx) {
DoorWarp1_SetupAction(this, func_808B921C);
}
func_808BB8D4(this, globalCtx, 1);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BOSS_WARP_HOLE - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_BOSS_WARP_HOLE - SFX_FLAG);
}
void func_808B9524(DoorWarp1* this, GlobalContext* globalCtx) {
@@ -414,14 +414,14 @@ void func_808B958C(DoorWarp1* this, GlobalContext* globalCtx) {
}
Math_SmoothStepToF(&this->unk_1A8, 6.0f, 0.2f, 0.02f, 0.01f);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_LINK_WARP - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_LINK_WARP - SFX_FLAG);
}
void func_808B96A0(DoorWarp1* this, GlobalContext* globalCtx) {
}
void func_808B96B0(DoorWarp1* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
Math_SmoothStepToF(&this->unk_1B0, 255.0f, 0.4f, 10.0f, 0.01f);
Math_SmoothStepToF(&this->unk_1B4, 255.0f, 0.4f, 10.0f, 0.01f);
@@ -441,11 +441,11 @@ void func_808B96B0(DoorWarp1* this, GlobalContext* globalCtx) {
}
void func_808B977C(DoorWarp1* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
if (func_808B866C(this, globalCtx) && !func_801690CC(globalCtx)) {
Player* player = GET_PLAYER(globalCtx);
func_801A5CFC(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &D_801DB4B0, &D_801DB4B0, &D_801DB4B8);
Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &D_801DB4B0, &D_801DB4B0, &D_801DB4B8);
func_800B7298(globalCtx, &this->dyna.actor, 9);
player->unk_3A0.x = this->dyna.actor.world.pos.x;
player->unk_3A0.z = this->dyna.actor.world.pos.z;
@@ -514,7 +514,7 @@ void func_808B9B30(DoorWarp1* this, GlobalContext* globalCtx) {
}
void func_808B9BE8(DoorWarp1* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
Math_SmoothStepToF(&this->unk_1B0, 255.0f, 0.2f, 2.0f, 0.1f);
Math_SmoothStepToF(&this->unk_1B4, 255.0f, 0.2f, 2.0f, 0.1f);
if (this->unk_1C4 < 10) {
@@ -546,7 +546,7 @@ void func_808B9CE8(DoorWarp1* this, GlobalContext* globalCtx) {
}
if (!Actor_HasParent(&this->dyna.actor, globalCtx)) {
func_800B8A1C(&this->dyna.actor, globalCtx, func_808B849C(this, globalCtx) + 84, 30.0f, 80.0f);
Actor_PickUp(&this->dyna.actor, globalCtx, func_808B849C(this, globalCtx) + 84, 30.0f, 80.0f);
return;
}
@@ -579,7 +579,7 @@ void func_808B9CE8(DoorWarp1* this, GlobalContext* globalCtx) {
}
void func_808B9E94(DoorWarp1* this, GlobalContext* globalCtx) {
if (func_80152498(&globalCtx->msgCtx) == 2) {
if (Message_GetState(&globalCtx->msgCtx) == 2) {
this->unk_1CE = 110;
DoorWarp1_SetupAction(this, func_808B9ED8);
}
@@ -593,7 +593,7 @@ void func_808B9ED8(DoorWarp1* this, GlobalContext* globalCtx) {
}
void func_808B9F10(DoorWarp1* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WARP_HOLE - SFX_FLAG);
if ((this->unk_203 == 0) && func_808B866C(this, globalCtx) && !func_801690CC(globalCtx) && (this->unk_203 == 0)) {
Player* player = GET_PLAYER(globalCtx);
@@ -619,7 +619,7 @@ void func_808B9FD0(DoorWarp1* this, GlobalContext* globalCtx) {
ActorCutscene_SetIntentToPlay(globalCtx->unk_1879C[9]);
} else {
ActorCutscene_Start(globalCtx->unk_1879C[9], NULL);
func_801A5CFC(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &D_801DB4B0, &D_801DB4B0, &D_801DB4B8);
Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &D_801DB4B0, &D_801DB4B0, &D_801DB4B8);
Animation_ChangeImpl(&this->skelAnime, &object_warp1_Anim_001374, 1.0f,
Animation_GetLastFrame(&object_warp1_Anim_001374.common),
Animation_GetLastFrame(&object_warp1_Anim_001374.common), 2, 40.0f, 1);
@@ -1015,7 +1015,7 @@ void func_808BAE9C(DoorWarp1* this, GlobalContext* globalCtx) {
}
void func_808BB4C4(DoorWarp1* this, GlobalContext* globalCtx) {
func_800BDFC0(globalCtx, object_warp1_DL_0076C0);
Gfx_DrawDListOpa(globalCtx, object_warp1_DL_0076C0);
}
#ifdef NON_MATCHING
@@ -1036,7 +1036,7 @@ void func_808BB4F4(DoorWarp1* this, GlobalContext* globalCtx2) {
this->dyna.actor.world.pos.z, MTXMODE_NEW);
Matrix_Scale(4.0f, this->unk_1AC, 4.0f, MTXMODE_APPLY);
AnimatedMat_Draw(globalCtx, Lib_SegmentedToVirtual(&object_warp1_Matanimheader_0044D8));
func_800BE03C(globalCtx, object_warp1_DL_003230);
Gfx_DrawDListXlu(globalCtx, object_warp1_DL_003230);
return;
}
@@ -129,7 +129,7 @@ void func_80BECBE0(EnAkindonuts* this, s16 arg1) {
this->actor.velocity.z = 0.0f;
}
Actor_ApplyMovement(&this->actor);
Actor_UpdatePos(&this->actor);
}
void func_80BECC7C(EnAkindonuts* this, GlobalContext* globalCtx) {
@@ -1036,7 +1036,7 @@ void func_80BEE73C(EnAkindonuts* this, GlobalContext* globalCtx) {
player->actor.textId = D_80BF048C[params];
this->unk_33C = player->actor.textId;
if (this->unk_33C == 0x15E4) {
player->unk_A87 = itemActionParam;
player->exchangeItemId = itemActionParam;
this->actionFunc = func_80BEF20C;
} else {
this->actionFunc = func_80BEF18C;
@@ -1045,7 +1045,7 @@ void func_80BEE73C(EnAkindonuts* this, GlobalContext* globalCtx) {
player->actor.textId = D_80BF0494[params];
this->unk_33C = player->actor.textId;
if (this->unk_33C == 0x15F9) {
player->unk_A87 = itemActionParam;
player->exchangeItemId = itemActionParam;
this->actionFunc = func_80BEF20C;
} else {
this->actionFunc = func_80BEF18C;
@@ -1054,7 +1054,7 @@ void func_80BEE73C(EnAkindonuts* this, GlobalContext* globalCtx) {
player->actor.textId = D_80BF049C[params];
this->unk_33C = player->actor.textId;
if (this->unk_33C == 0x160C) {
player->unk_A87 = itemActionParam;
player->exchangeItemId = itemActionParam;
this->actionFunc = func_80BEF20C;
} else {
this->actionFunc = func_80BEF18C;
@@ -1063,7 +1063,7 @@ void func_80BEE73C(EnAkindonuts* this, GlobalContext* globalCtx) {
player->actor.textId = D_80BF04A4[params];
this->unk_33C = player->actor.textId;
if (this->unk_33C == 0x1621) {
player->unk_A87 = itemActionParam;
player->exchangeItemId = itemActionParam;
this->actionFunc = func_80BEF20C;
} else {
this->actionFunc = func_80BEF18C;
@@ -1162,7 +1162,7 @@ void func_80BEEB20(EnAkindonuts* this, GlobalContext* globalCtx) {
}
if (phi_v0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_AKINDONUTS_HIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_AKINDONUTS_HIDE);
this->actionFunc = func_80BEEDC0;
this->unk_338 = 3;
this->collider.dim.height = 64;
@@ -1175,12 +1175,12 @@ void func_80BEEB20(EnAkindonuts* this, GlobalContext* globalCtx) {
if ((this->unk_338 == 4) || (this->unk_338 == 18)) {
this->unk_338 = 17;
this->collider.dim.height = 0;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_DOWN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN);
func_8013BC6C(&this->skelAnime, sAnimations, 17);
} else if (this->unk_338 == 2) {
this->unk_338 = 16;
this->collider.dim.height = 32;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_UP);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_UP);
func_8013BC6C(&this->skelAnime, sAnimations, 16);
} else if (this->unk_338 == 17) {
phi_v0 = DECR(this->unk_33A);
@@ -1213,7 +1213,7 @@ void func_80BEEE10(EnAkindonuts* this, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 2000, 0);
this->actor.world.rot.y = this->actor.shape.rot.y;
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_2DC(this, globalCtx);
this->actionFunc = func_80BEEFA8;
} else if (((this->actor.xzDistToPlayer < 100.0f) &&
@@ -1229,7 +1229,7 @@ void func_80BEEE10(EnAkindonuts* this, GlobalContext* globalCtx) {
}
void func_80BEEFA8(EnAkindonuts* this, GlobalContext* globalCtx) {
u8 temp_v0 = func_80152498(&globalCtx->msgCtx);
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 5) {
if (func_80147624(globalCtx)) {
@@ -1274,7 +1274,7 @@ void func_80BEEFA8(EnAkindonuts* this, GlobalContext* globalCtx) {
}
void func_80BEF18C(EnAkindonuts* this, GlobalContext* globalCtx) {
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
globalCtx->msgCtx.unk11F22 = 0x43;
globalCtx->msgCtx.unk12023 = 4;
this->unk_33C = 0;
@@ -1283,7 +1283,7 @@ void func_80BEF18C(EnAkindonuts* this, GlobalContext* globalCtx) {
}
void func_80BEF20C(EnAkindonuts* this, GlobalContext* globalCtx) {
u8 sp27 = func_80152498(&globalCtx->msgCtx);
u8 sp27 = Message_GetState(&globalCtx->msgCtx);
s16 sp24 = this->skelAnime.curFrame;
s16 sp22 = Animation_GetLastFrame(&sAnimations[this->unk_338].animationSeg->common);
@@ -1319,25 +1319,25 @@ void func_80BEF360(EnAkindonuts* this, GlobalContext* globalCtx) {
this->unk_32C &= ~0x40;
this->actionFunc = func_80BEF450;
} else {
func_800B8A1C(&this->actor, globalCtx, func_80BED034(this), 300.0f, 300.0f);
Actor_PickUp(&this->actor, globalCtx, func_80BED034(this), 300.0f, 300.0f);
}
} else if (Actor_HasParent(&this->actor, globalCtx)) {
this->actor.parent = NULL;
this->actionFunc = func_80BEF450;
} else {
func_800B8A1C(&this->actor, globalCtx, func_80BECFBC(this), 300.0f, 300.0f);
Actor_PickUp(&this->actor, globalCtx, func_80BECFBC(this), 300.0f, 300.0f);
}
}
void func_80BEF450(EnAkindonuts* this, GlobalContext* globalCtx) {
if ((func_80152498(&globalCtx->msgCtx) == 6) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 6) && func_80147624(globalCtx)) {
func_800B85E0(&this->actor, globalCtx, 400.0f, -1);
this->actionFunc = func_80BEF4B8;
}
}
void func_80BEF4B8(EnAkindonuts* this, GlobalContext* globalCtx) {
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_2DC(this, globalCtx);
this->actionFunc = func_80BEEFA8;
} else {
@@ -1422,7 +1422,7 @@ void func_80BEF518(EnAkindonuts* this, GlobalContext* globalCtx) {
this->unk_33E = 3;
this->unk_338 = 19;
func_8013BC6C(&this->skelAnime, sAnimations, this->unk_338);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_DOWN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN);
this->unk_32C &= ~2;
this->unk_32C |= 0x80;
this->unk_358 = this->actor.world.pos.y;
@@ -1481,7 +1481,7 @@ void func_80BEF83C(EnAkindonuts* this, GlobalContext* globalCtx) {
this->unk_34C = 0.3f;
this->unk_338 = 9;
func_8013BC6C(&this->skelAnime, sAnimations, this->unk_338);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_AKINDONUTS_HIDE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_AKINDONUTS_HIDE);
this->actionFunc = func_80BEF9F0;
}
}
@@ -1587,7 +1587,7 @@ void EnAkindonuts_Init(Actor* thisx, GlobalContext* globalCtx) {
this->morphTable, 28);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinderType1(globalCtx, &this->collider, &this->actor, &sCylinderInit);
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 35.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
Actor_SetScale(&this->actor, 0.01f);
this->actor.colChkInfo.cylRadius = 0;
@@ -1620,9 +1620,9 @@ void EnAkindonuts_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void EnAkindonuts_Update(Actor* thisx, GlobalContext* globalCtx) {
EnAkindonuts* this = THIS;
Actor_SetHeight(&this->actor, 60.0f);
Actor_SetFocus(&this->actor, 60.0f);
SkelAnime_Update(&this->skelAnime);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
this->actionFunc(this, globalCtx);
+27 -27
View File
@@ -150,7 +150,7 @@ s32 func_809C1424(EnAob01* this) {
if (this->unk_43C == 1) {
if (curFrame == lastFrame) {
this->unk_43C = 2;
func_800BDC5C(&this->skelAnime, D_809C3790, 2);
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 2);
return true;
}
} else if (this->unk_43C == 2) {
@@ -166,13 +166,13 @@ s32 func_809C14D0(EnAob01* this) {
if ((this->unk_43C == 0) || (this->unk_43C == 5)) {
if (curFrame == lastFrame) {
this->unk_43C = 3;
func_800BDC5C(&this->skelAnime, D_809C3790, 3);
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 3);
return true;
}
} else if (this->unk_43C == 3) {
if (curFrame == lastFrame) {
this->unk_43C = 4;
func_800BDC5C(&this->skelAnime, D_809C3790, 4);
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 4);
return true;
}
} else if (this->unk_43C == 4) {
@@ -188,7 +188,7 @@ s32 func_809C15BC(EnAob01* this) {
if ((this->unk_43C != 0) && (this->unk_43C != 5)) {
if (curFrame == lastFrame) {
this->unk_43C = 5;
func_800BDC5C(&this->skelAnime, D_809C3790, 5);
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 5);
return true;
}
} else {
@@ -330,7 +330,7 @@ void func_809C16DC(EnAob01* this, GlobalContext* globalCtx) {
this->unk_2D2 |= 0x40;
this->unk_2D2 |= 0x10;
this->unk_43C = 1;
func_800BDC5C(&this->skelAnime, D_809C3790, 1);
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 1);
break;
case 0x3525:
@@ -345,7 +345,7 @@ void func_809C16DC(EnAob01* this, GlobalContext* globalCtx) {
this->unk_2D2 |= 0x40;
this->unk_2D2 |= 0x10;
this->unk_43C = 1;
func_800BDC5C(&this->skelAnime, D_809C3790, 1);
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 1);
break;
}
@@ -360,7 +360,7 @@ void func_809C16DC(EnAob01* this, GlobalContext* globalCtx) {
this->unk_2D2 |= 4;
this->unk_2D2 |= 0x10;
this->unk_43C = 1;
func_800BDC5C(&this->skelAnime, D_809C3790, 1);
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 1);
break;
case 0x3527:
@@ -372,7 +372,7 @@ void func_809C16DC(EnAob01* this, GlobalContext* globalCtx) {
this->unk_210 = 0x3536;
this->unk_2D2 |= 0x40;
this->unk_43C = 1;
func_800BDC5C(&this->skelAnime, D_809C3790, 1);
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 1);
break;
}
@@ -380,7 +380,7 @@ void func_809C16DC(EnAob01* this, GlobalContext* globalCtx) {
this->unk_210 = 0x3537;
this->unk_2D2 |= 0x40;
this->unk_43C = 1;
func_800BDC5C(&this->skelAnime, D_809C3790, 1);
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 1);
break;
}
@@ -427,7 +427,7 @@ void func_809C1C9C(EnAob01* this, GlobalContext* globalCtx) {
}
void func_809C1D64(EnAob01* this, GlobalContext* globalCtx) {
u8 temp_v0 = func_80152498(&globalCtx->msgCtx);
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (temp_v0 == 4) {
if (func_80147624(globalCtx)) {
@@ -499,7 +499,7 @@ void func_809C2060(EnAob01* this, GlobalContext* globalCtx) {
this->unk_2D2 |= 8;
this->actionFunc = func_809C21E0;
}
} else if (func_800B84D0(&this->actor, globalCtx) && (this->unk_2D2 & 0x100)) {
} else if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) && (this->unk_2D2 & 0x100)) {
this->unk_2D2 &= ~0x100;
this->unk_2E6 = this->unk_2D4;
this->unk_2EC = this->unk_2DA;
@@ -517,7 +517,7 @@ void func_809C2060(EnAob01* this, GlobalContext* globalCtx) {
}
void func_809C21E0(EnAob01* this, GlobalContext* globalCtx) {
u8 sp2F = func_80152498(&globalCtx->msgCtx);
u8 sp2F = Message_GetState(&globalCtx->msgCtx);
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 4000, 1);
@@ -542,7 +542,7 @@ void func_809C21E0(EnAob01* this, GlobalContext* globalCtx) {
}
if (this->unk_2D2 & 8) {
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->actor.flags &= ~0x10000;
func_80123E90(globalCtx, &this->actor);
if (this->unk_2D2 & 4) {
@@ -552,7 +552,7 @@ void func_809C21E0(EnAob01* this, GlobalContext* globalCtx) {
this->unk_2D2 |= 0x10;
this->unk_2D2 |= 0x40;
this->unk_43C = 1;
func_800BDC5C(&this->skelAnime, D_809C3790, 1);
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 1);
func_801518B0(globalCtx, 0x354B, &this->actor);
}
this->unk_2D2 &= ~8;
@@ -593,7 +593,7 @@ void func_809C21E0(EnAob01* this, GlobalContext* globalCtx) {
}
s32 func_809C2504(EnAob01* this, GlobalContext* globalCtx) {
Actor* npc = globalCtx->actorCtx.actorList[ACTORCAT_NPC].first;
Actor* npc = globalCtx->actorCtx.actorLists[ACTORCAT_NPC].first;
while (npc != NULL) {
if ((npc->id == ACTOR_EN_RACEDOG) && (func_800F2178(this->unk_430) == ((EnRacedog*)npc)->unk_1E8)) {
@@ -609,7 +609,7 @@ s32 func_809C2504(EnAob01* this, GlobalContext* globalCtx) {
}
s32 func_809C2594(EnAob01* this, GlobalContext* globalCtx) {
Actor* npc = globalCtx->actorCtx.actorList[ACTORCAT_NPC].first;
Actor* npc = globalCtx->actorCtx.actorLists[ACTORCAT_NPC].first;
while (npc != NULL) {
if ((npc->id == ACTOR_EN_RACEDOG) && (((EnRacedog*)npc)->unk_290 == ((EnRacedog*)npc)->unk_292)) {
@@ -623,7 +623,7 @@ s32 func_809C2594(EnAob01* this, GlobalContext* globalCtx) {
}
s32 func_809C25E4(EnAob01* this, GlobalContext* globalCtx) {
Actor* npc = globalCtx->actorCtx.actorList[ACTORCAT_NPC].first;
Actor* npc = globalCtx->actorCtx.actorLists[ACTORCAT_NPC].first;
s16 count = 0;
while (npc != NULL) {
@@ -699,7 +699,7 @@ void func_809C2824(EnAob01* this, GlobalContext* globalCtx) {
}
void func_809C28B8(EnAob01* this, GlobalContext* globalCtx) {
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->actor.flags &= ~0x10000;
func_80123E90(globalCtx, &this->actor);
this->unk_434 = gSaveContext.unk_3F5C;
@@ -731,7 +731,7 @@ void func_809C28B8(EnAob01* this, GlobalContext* globalCtx) {
this->unk_210 = 0x352D;
this->unk_2D2 |= 0x40;
this->unk_43C = 1;
func_800BDC5C(&this->skelAnime, D_809C3790, 1);
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 1);
break;
}
@@ -743,7 +743,7 @@ void func_809C28B8(EnAob01* this, GlobalContext* globalCtx) {
}
void func_809C2A64(EnAob01* this, GlobalContext* globalCtx) {
u8 sp2F = func_80152498(&globalCtx->msgCtx);
u8 sp2F = Message_GetState(&globalCtx->msgCtx);
if (func_809C15BC(this)) {
if ((sp2F == 5) && func_80147624(globalCtx)) {
@@ -765,15 +765,15 @@ void func_809C2A64(EnAob01* this, GlobalContext* globalCtx) {
this->actionFunc = func_809C2BE4;
}
} else if (gSaveContext.weekEventReg[8] & 0x20) {
func_800B8A1C(&this->actor, globalCtx, 4, 300.0f, 300.0f);
Actor_PickUp(&this->actor, globalCtx, 4, 300.0f, 300.0f);
} else {
func_800B8A1C(&this->actor, globalCtx, 12, 300.0f, 300.0f);
Actor_PickUp(&this->actor, globalCtx, 12, 300.0f, 300.0f);
}
}
}
void func_809C2BE4(EnAob01* this, GlobalContext* globalCtx) {
u8 temp_v0 = func_80152498(&globalCtx->msgCtx);
u8 temp_v0 = Message_GetState(&globalCtx->msgCtx);
if (((temp_v0 == 5) || (temp_v0 == 6)) && func_80147624(globalCtx)) {
if (gSaveContext.weekEventReg[63] & 2) {
@@ -792,7 +792,7 @@ void func_809C2BE4(EnAob01* this, GlobalContext* globalCtx) {
}
void func_809C2C9C(EnAob01* this, GlobalContext* globalCtx) {
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_210 = 0x354C;
func_80151938(globalCtx, this->unk_210);
this->actionFunc = func_809C1D64;
@@ -802,7 +802,7 @@ void func_809C2C9C(EnAob01* this, GlobalContext* globalCtx) {
}
void func_809C2D0C(EnAob01* this, GlobalContext* globalCtx) {
u8 sp2F = func_80152498(&globalCtx->msgCtx);
u8 sp2F = Message_GetState(&globalCtx->msgCtx);
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 4000, 1);
@@ -847,7 +847,7 @@ void func_809C2D0C(EnAob01* this, GlobalContext* globalCtx) {
}
s32 func_809C2EC4(EnAob01* this, GlobalContext* globalCtx) {
Actor* dog = globalCtx->actorCtx.actorList[ACTORCAT_ENEMY].first;
Actor* dog = globalCtx->actorCtx.actorLists[ACTORCAT_ENEMY].first;
while (dog != NULL) {
if (dog->id == ACTOR_EN_DG) {
@@ -927,7 +927,7 @@ void EnAob01_Init(Actor* thisx, GlobalContext* globalCtx) {
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
this->unk_43C = 0;
func_800BDC5C(&this->skelAnime, D_809C3790, 0);
Actor_ChangeAnimation(&this->skelAnime, D_809C3790, 0);
Actor_SetScale(&this->actor, 0.01f);
switch (gSaveContext.eventInf[0] & 7) {
@@ -42,7 +42,7 @@ static ColliderQuadInit D_8088C1E0 = {
// static InitChainEntry sInitChain[] = {
static InitChainEntry D_8088C230[] = {
ICHAIN_F32(minVelocityY, -150, ICHAIN_STOP),
ICHAIN_F32(terminalVelocity, -150, ICHAIN_STOP),
};
#endif
+16 -16
View File
@@ -111,7 +111,7 @@ static DamageTable sDamageTable = {
void EnBaguo_Init(Actor* thisx, GlobalContext* globalCtx) {
EnBaguo* this = THIS;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 0.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
SkelAnime_Init(globalCtx, &this->skelAnime, &gNejironSkel, NULL, this->jointTable, this->morphTable, 3);
this->actor.hintId = 0xB;
this->maxDistanceFromHome = 240.0f;
@@ -145,7 +145,7 @@ void EnBaguo_UndergroundIdle(EnBaguo* this, GlobalContext* globalCtx) {
this->action = NEJIRON_ACTION_INACTIVE;
if (this->actor.xzDistToPlayer < 200.0f && Player_GetMask(globalCtx) != PLAYER_MASK_STONE) {
this->actor.draw = EnBaguo_DrawBody;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BAKUO_APPEAR);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_BAKUO_APPEAR);
this->actor.world.rot.z = 0;
this->actor.world.rot.x = this->actor.world.rot.z;
this->actor.flags &= ~0x8000000;
@@ -159,8 +159,8 @@ void EnBaguo_EmergeFromUnderground(EnBaguo* this, GlobalContext* globalCtx) {
this->actor.world.rot.y += 0x1518;
this->actor.shape.rot.y = this->actor.world.rot.y;
if ((globalCtx->gameplayFrames % 8) == 0) {
func_800BBDAC(globalCtx, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale - 20.0f, 10, 8.0f,
500, 10, 1);
Actor_SpawnFloorDustRing(globalCtx, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale - 20.0f,
10, 8.0f, 500, 10, 1);
}
Math_ApproachF(&this->actor.shape.shadowScale, 50.0f, 0.3f, 5.0f);
Math_ApproachF(&this->actor.shape.yOffset, 2700.0f, 100.0f, 500.0f);
@@ -188,9 +188,9 @@ void EnBaguo_Idle(EnBaguo* this, GlobalContext* globalCtx) {
if (fabsf(this->actor.world.rot.y - this->actor.yawTowardsPlayer) > 200.0f) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 30, 300, 1000);
if ((globalCtx->gameplayFrames % 8) == 0) {
func_800BBDAC(globalCtx, &this->actor, &this->actor.world.pos,
this->actor.shape.shadowScale - 20.0f, 10, 8.0f, 500, 10, 1);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BAKUO_VOICE);
Actor_SpawnFloorDustRing(globalCtx, &this->actor, &this->actor.world.pos,
this->actor.shape.shadowScale - 20.0f, 10, 8.0f, 500, 10, 1);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_BAKUO_VOICE);
}
}
}
@@ -252,7 +252,7 @@ void EnBaguo_Roll(EnBaguo* this, GlobalContext* globalCtx) {
this->actor.world.rot.z -= (s16)this->currentRotation.z;
}
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BAKUO_ROLL - SFX_FLAG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_BAKUO_ROLL - SFX_FLAG);
}
void EnBaguo_SetupRetreatUnderground(EnBaguo* this) {
@@ -265,8 +265,8 @@ void EnBaguo_RetreatUnderground(EnBaguo* this, GlobalContext* globalCtx) {
this->actor.world.rot.y -= 0x1518;
this->actor.shape.rot.y = this->actor.world.rot.y;
if ((globalCtx->gameplayFrames % 8) == 0) {
func_800BBDAC(globalCtx, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale - 20.0f, 10, 8.0f,
500, 10, 1);
Actor_SpawnFloorDustRing(globalCtx, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale - 20.0f,
10, 8.0f, 500, 10, 1);
}
Math_ApproachF(&this->actor.shape.yOffset, -3000.0f, 100.0f, 500.0f);
Math_ApproachZeroF(&this->actor.shape.shadowScale, 0.3f, 5.0f);
@@ -274,7 +274,7 @@ void EnBaguo_RetreatUnderground(EnBaguo* this, GlobalContext* globalCtx) {
this->actor.shape.yOffset = -3000.0f;
this->actor.draw = EnBaguo_DrawBody;
Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.home.pos);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BAKUO_APPEAR);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_BAKUO_APPEAR);
this->actor.flags |= 0x8000000;
this->actor.flags &= ~1;
this->actionFunc = EnBaguo_UndergroundIdle;
@@ -311,7 +311,7 @@ void EnBaguo_CheckForDetonation(EnBaguo* this, GlobalContext* globalCtx) {
if ((this->collider.base.acFlags & AC_HIT || i)) {
this->collider.base.acFlags &= ~AC_HIT;
if (i || this->actor.colChkInfo.damageEffect == NEJIRON_DMGEFF_KILL) {
func_800BCB70(&this->actor, 0x4000, 0xFF, 0, 8);
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8);
this->action = NEJIRON_ACTION_EXPLODING;
this->actor.speedXZ = 0.0f;
this->actor.shape.shadowScale = 0.0f;
@@ -329,8 +329,8 @@ void EnBaguo_CheckForDetonation(EnBaguo* this, GlobalContext* globalCtx) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_CLEAR_TAG, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, CLEAR_TAG_POP);
Audio_PlayActorSound2(&this->actor, NA_SE_IT_BOMB_EXPLOSION);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BAKUO_DEAD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_IT_BOMB_EXPLOSION);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_BAKUO_DEAD);
this->timer = 30;
this->actor.flags |= 0x8000000;
this->actor.flags &= ~1;
@@ -347,7 +347,7 @@ void EnBaguo_CheckForDetonation(EnBaguo* this, GlobalContext* globalCtx) {
void EnBaguo_Update(Actor* thisx, GlobalContext* globalCtx) {
EnBaguo* this = THIS;
Actor_SetHeight(&this->actor, 30.0f);
Actor_SetFocus(&this->actor, 30.0f);
EnBaguo_UpdateParticles(this, globalCtx);
EnBaguo_CheckForDetonation(this, globalCtx);
this->actionFunc(this, globalCtx);
@@ -369,7 +369,7 @@ void EnBaguo_Update(Actor* thisx, GlobalContext* globalCtx) {
this->blinkTimer = Rand_ZeroFloat(60.0f) + 20.0f;
}
}
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 60.0f, 0x1D);
if (this->action != NEJIRON_ACTION_INACTIVE) {
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
@@ -68,7 +68,7 @@ static u8 animModes[] = { 0, 0 };
void EnBaisen_Init(Actor* thisx, GlobalContext* globalCtx) {
EnBaisen* this = THIS;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 25.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06007908, &D_060011C0, this->jointTable, this->morphTable, 20);
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->paramCopy = this->actor.params;
@@ -124,7 +124,7 @@ void func_80BE871C(EnBaisen* this) {
}
void func_80BE87B0(EnBaisen* this, GlobalContext* globalCtx) {
Actor* actorIterator = globalCtx->actorCtx.actorList[ACTORCAT_NPC].first;
Actor* actorIterator = globalCtx->actorCtx.actorLists[ACTORCAT_NPC].first;
while (actorIterator != NULL) {
if (actorIterator->id == ACTOR_EN_HEISHI) {
@@ -151,7 +151,7 @@ void func_80BE87FC(EnBaisen* this) {
}
void func_80BE887C(EnBaisen* this, GlobalContext* globalCtx) {
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_80BE895C(this, globalCtx);
} else {
if (this->paramCopy != 0) {
@@ -176,7 +176,7 @@ void func_80BE895C(EnBaisen* this, GlobalContext* globalCtx) {
if (this->unk2A4 != NULL) {
this->unk290 = true;
this->unk2AC = 1;
func_800B86C8(this->unk2A4, globalCtx, this->unk2A4);
Actor_ChangeFocus(this->unk2A4, globalCtx, this->unk2A4);
}
this->unk29C = 1;
if (this->paramCopy == 0) {
@@ -223,7 +223,7 @@ void func_80BE8AAC(EnBaisen* this, GlobalContext* globalCtx) {
EnBaisen_ChangeAnimation(this, 0);
}
}
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
this->textIdIndex++;
if (this->textIdIndex < 6) {
@@ -233,7 +233,7 @@ void func_80BE8AAC(EnBaisen* this, GlobalContext* globalCtx) {
} else {
this->unk2A4 = &this->actor;
}
func_800B86C8(this->unk2A4, globalCtx, this->unk2A4);
Actor_ChangeFocus(this->unk2A4, globalCtx, this->unk2A4);
} else {
func_80BE87FC(this);
}
@@ -254,13 +254,13 @@ void EnBaisen_Update(Actor* thisx, GlobalContext* globalCtx) {
return;
}
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
Actor_SetScale(&this->actor, 0.01f);
if (this->unk290) {
func_80BE871C(this);
}
Actor_SetHeight(&this->actor, 60.0f);
Actor_SetFocus(&this->actor, 60.0f);
Math_SmoothStepToS(&this->headRotX, this->headRotXTarget, 1, 0xBB8, 0);
Math_SmoothStepToS(&this->headRotY, this->headRotYTarget, 1, 0x3E8, 0);
Collider_UpdateCylinder(&this->actor, &this->collider);
+19 -19
View File
@@ -207,7 +207,7 @@ void EnBigpo_Init(Actor* thisx, GlobalContext* globalCtx2) {
255, 0);
}
ActorShape_Init(&thisx->shape, 0.0f, func_800B3FC0, 45.0f);
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 45.0f);
thisx->bgCheckFlags |= 0x400;
this->savedHeight = thisx->home.pos.y + 100.0f;
this->mainColor.r = 255;
@@ -262,7 +262,7 @@ void EnBigpo_UpdateSpin(EnBigpo* this) {
this->actor.shape.rot.y += this->rotVelocity;
if ((oldYaw < 0) && (this->actor.shape.rot.y > 0)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_ROLL); // spinning sfx during spin attack
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_PO_ROLL); // spinning sfx during spin attack
}
}
@@ -398,7 +398,7 @@ void EnBigpo_SpawnCutsceneStage5(EnBigpo* this) {
Animation_PlayLoop(&this->skelAnime, &gBigpoAwakenStretchAnim);
this->actor.draw = EnBigpo_DrawMainBigpo;
Actor_SetScale(&this->actor, 0.014f);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_APPEAR);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_APPEAR);
this->actionFunc = EnBigpo_SpawnCutsceneStage6;
}
@@ -486,7 +486,7 @@ void EnBigpo_SetupWarpOut(EnBigpo* this) {
this->idleTimer = 32;
this->actor.flags &= ~0x1; // targetable OFF
this->actor.speedXZ = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_DISAPPEAR);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_PO_DISAPPEAR);
this->actionFunc = EnBigpo_WarpingOut;
}
@@ -508,7 +508,7 @@ void EnBigpo_SetupWarpIn(EnBigpo* this, GlobalContext* globalCtx) {
f32 distance = CLAMP_MIN(this->actor.xzDistToPlayer, 200.0f);
s16 randomYaw = (Rand_Next() >> 0x14) + this->actor.yawTowardsPlayer;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_APPEAR);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_APPEAR);
Animation_PlayLoop(&this->skelAnime, &gBigpoAwakenStretchAnim);
this->rotVelocity = 0x2000;
this->actor.world.pos.x = (Math_SinS(randomYaw) * distance) + player->actor.world.pos.x;
@@ -648,7 +648,7 @@ void EnBigpo_SpinningDown(EnBigpo* this, GlobalContext* globalCtx) {
*/
void EnBigpo_HitStun(EnBigpo* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gBigpoShockAnim, -6.0f);
func_800BCB70(&this->actor, 0x4000, 0xFF, 0, 0x10);
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0x10);
this->collider.base.acFlags &= ~AC_ON;
func_800BE504(&this->actor, &this->collider);
this->actionFunc = EnBigpo_CheckHealth;
@@ -728,7 +728,7 @@ void EnBigpo_BurnAwayDeath(EnBigpo* this, GlobalContext* globalCtx) {
func_800B9010(&this->actor, NA_SE_EN_COMMON_EXTINCT_LEV - SFX_FLAG); // burning sfx
}
if (this->idleTimer == 18) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_WIZ_DISAPPEAR);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_WIZ_DISAPPEAR);
}
}
@@ -754,7 +754,7 @@ void EnBigpo_SetupLanternDrop(EnBigpo* this, GlobalContext* globalCtx) {
void EnBigpo_LanternFalling(EnBigpo* this, GlobalContext* globalCtx) {
if (this->actor.bgCheckFlags & 1 || this->actor.floorHeight == BGCHECK_Y_MIN) {
if (this->switchFlags != 0xFF) {
Actor_SetSwitchFlag(globalCtx, this->switchFlags);
Flags_SetSwitch(globalCtx, this->switchFlags);
}
EffectSsHahen_SpawnBurst(globalCtx, &this->actor.world.pos, 6.0f, 0, 1, 1, 15, OBJECT_BIGPO, 10,
@@ -799,7 +799,7 @@ void EnBigpo_SpawnScoopSoul(EnBigpo* this) {
this->actor.scale.x = 0.0f;
this->actor.scale.y = 0.0f;
this->savedHeight = this->actor.world.pos.y;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_METAL_BOX_BOUND); // misnamed?
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_METAL_BOX_BOUND); // misnamed?
this->actionFunc = EnBigpo_ScoopSoulAppearing;
}
@@ -813,7 +813,7 @@ void EnBigpo_ScoopSoulAppearing(EnBigpo* this, GlobalContext* globalCtx) {
void EnBigpo_SetupScoopSoulIdle(EnBigpo* this) {
this->savedHeight = this->actor.world.pos.y;
Actor_SetHeight(&this->actor, -10.0f);
Actor_SetFocus(&this->actor, -10.0f);
this->idleTimer = 400; // 20 seconds
this->actor.flags |= 0x1; // targetable ON
this->actionFunc = EnBigpo_ScoopSoulIdle;
@@ -825,10 +825,10 @@ void EnBigpo_ScoopSoulIdle(EnBigpo* this, GlobalContext* globalCtx) {
Actor_MarkForDeath(&this->actor);
} else if (this->idleTimer == 0) {
// took too long, soul is leaving
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_LAUGH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_PO_LAUGH);
EnBigpo_SetupScoopSoulLeaving(this);
} else {
func_800B8A1C(&this->actor, globalCtx, GI_MAX, 35.0f, 60.0f);
Actor_PickUp(&this->actor, globalCtx, GI_MAX, 35.0f, 60.0f);
this->actor.world.pos.y = (sin_rad(this->idleTimer * (M_PI / 20)) * 5.0f) + this->savedHeight;
}
}
@@ -1048,7 +1048,7 @@ void EnBigpo_FlameCircleCutscene(EnBigpo* this, GlobalContext* globalCtx) {
this->idleTimer--;
if (this->idleTimer == 0) {
EnBigpo* parentPoh = (EnBigpo*)this->actor.parent;
Actor_SetSwitchFlag(globalCtx, this->switchFlags);
Flags_SetSwitch(globalCtx, this->switchFlags);
Math_Vec3f_Copy(&parentPoh->fires[this->unk20C].pos, &this->actor.world.pos);
Actor_MarkForDeath(&this->actor);
if (this->unk20C == 0) {
@@ -1126,13 +1126,13 @@ s32 EnBigpo_ApplyDamage(EnBigpo* this, GlobalContext* globalCtx) {
if (Actor_ApplyDamage(&this->actor) == 0) {
this->actor.flags &= ~0x1; // targetable OFF
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_DEAD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_PO_DEAD);
Enemy_StartFinishingBlow(globalCtx, &this->actor);
if (this->actor.params == ENBIGPO_SUMMONED) { // dampe type
func_801A2ED8();
}
} else {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_DAMAGE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_PO_DAMAGE);
}
// light arrows
@@ -1167,23 +1167,23 @@ void EnBigpo_Update(Actor* thisx, GlobalContext* globalCtx) {
this->unk20C = 0;
}
if (this->unk20C == 40) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_LAUGH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_PO_LAUGH);
EnBigpo_SetupWarpOut(this);
}
}
this->actionFunc(this, globalCtx);
if ((this->actionFunc != EnBigpo_SpawnCutsceneStage6) && (this->actionFunc != EnBigpo_SpawnCutsceneStage4)) {
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
if (this->actionFunc == EnBigpo_LanternFalling) {
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 27.0f, 60.0f, 4);
}
if (this->actor.draw == EnBigpo_DrawScoopSoul) {
Actor_SetHeight(&this->actor, -10.0f);
Actor_SetFocus(&this->actor, -10.0f);
} else {
Actor_SetHeight(&this->actor, 42.0f);
Actor_SetFocus(&this->actor, 42.0f);
}
EnBigpo_UpdateColor(this);
@@ -337,7 +337,7 @@ void EnBigslime_Init(Actor* thisx, GlobalContext* globalCtx) {
this->gekkoCollider.base.ocFlags1 &= ~OC1_NO_PUSH;
this->actor.params = CLAMP(this->actor.params, 1, 4);
if (Actor_GetRoomCleared(globalCtx, globalCtx->roomCtx.currRoom.num)) {
if (Flags_GetClear(globalCtx, globalCtx->roomCtx.currRoom.num)) {
Actor_MarkForDeath(&this->actor);
if (!(gSaveContext.weekEventReg[isFrogReturnedFlags[this->actor.params - 1] >> 8] &
(u8)isFrogReturnedFlags[this->actor.params - 1])) {
@@ -770,7 +770,7 @@ void EnBigslime_BreakIntoMinislime(EnBigslime* this, GlobalContext* globalCtx) {
this->actor.bgCheckFlags &= ~1;
this->formBigslimeTimer = 2;
EnBigslime_AddIceShardEffect(this, globalCtx);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_B_SLIME_BREAK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_B_SLIME_BREAK);
EnBigslime_SetupJumpGekko(this);
}
@@ -921,7 +921,7 @@ void EnBigslime_GekkoThaw(EnBigslime* this, GlobalContext* globalCtx) {
this->gekkoCollider.base.colType = COLTYPE_HIT6;
this->gekkoCollider.info.elemType = ELEMTYPE_UNK1;
this->unk_388 = 0.0f;
func_800BF7CC(globalCtx, &this->actor, this->limbPos, ARRAY_COUNT(this->limbPos), 2, 0.3f, 0.2f);
Actor_SpawnIceEffects(globalCtx, &this->actor, this->limbPos, ARRAY_COUNT(this->limbPos), 2, 0.3f, 0.2f);
this->actor.flags |= 0x200;
}
}
@@ -1212,7 +1212,7 @@ void EnBigslime_SetTargetVtxToWideCone(EnBigslime* this) {
}
void EnBigslime_SetupSquishFlat(EnBigslime* this) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_B_SLIME_JUMP2);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_B_SLIME_JUMP2);
this->squishFlatTimer = 20;
this->actor.scale.x = 0.2f;
this->actor.scale.z = 0.2f;
@@ -1411,7 +1411,7 @@ void EnBigslime_SetupRise(EnBigslime* this) {
Animation_PlayLoop(&this->skelAnime, &gGekkoSwimForwardAnim);
EnBigslime_GekkoSfxOutsideBigslime(this, NA_SE_EN_FROG_JUMP_ABOVE);
EnBigslime_GekkoSfxOutsideBigslime(this, NA_SE_EN_UTSUBO_APPEAR_TRG);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_B_SLIME_JUMP1);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_B_SLIME_JUMP1);
this->riseCounter = 0;
this->bigslimeCollider[0].base.atFlags &= ~AT_ON;
this->actor.gravity = 0.0f;
@@ -1514,7 +1514,7 @@ void EnBigslime_SetupCutsceneGrabPlayer(EnBigslime* this, GlobalContext* globalC
this->subCamYawGrabPlayer += this->actor.world.rot.y;
Animation_PlayLoop(&this->skelAnime, &gGekkoBoxingStanceAnim);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_B_SLIME_EAT);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_B_SLIME_EAT);
this->actionFunc = EnBigslime_CutsceneGrabPlayer;
}
@@ -1623,7 +1623,7 @@ void EnBigslime_AttackPlayerInBigslime(EnBigslime* this, GlobalContext* globalCt
}
globalCtx->damagePlayer(globalCtx, -4);
func_800B8E58(&player->actor, player->ageProperties->unk_92 + 0x6805);
func_800B8E58(player, player->ageProperties->unk_92 + NA_SE_VO_LI_DAMAGE_S);
this->gekkoRot.y += (s16)(Rand_S16Offset(0x4000, 0x4000) * (Rand_ZeroOne() < 0.5f ? -1 : 1));
this->gekkoPosOffset.x = Math_SinS(this->gekkoRot.y) * -50.0f;
this->gekkoPosOffset.z = Math_CosS(this->gekkoRot.y) * -50.0f;
@@ -1700,7 +1700,7 @@ void EnBigslime_WindupThrowPlayer(EnBigslime* this, GlobalContext* globalCtx) {
this->gekkoPosOffset.z = Math_CosS(this->gekkoRot.y) * -50.0f;
} else {
if (this->windupPunchTimer == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_B_SLIME_REVERSE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_B_SLIME_REVERSE);
EnBigslime_GekkoSfxInsideBigslime(this, NA_SE_EN_FROG_PUNCH1);
}
@@ -2283,7 +2283,7 @@ void EnBigslime_FormBigslime(EnBigslime* this, GlobalContext* globalCtx) {
this->actor.speedXZ = 0.0f;
Animation_PlayLoop(&this->skelAnime, &gGekkoSwimForwardAnim);
this->formBigslimeCutsceneTimer--;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_B_SLIME_COMBINE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_B_SLIME_COMBINE);
} else if (this->isAnimUpdate) {
this->formBigslimeCutsceneTimer--;
if (this->formBigslimeCutsceneTimer == 0) {
@@ -2497,7 +2497,7 @@ void EnBigslime_Despawn(EnBigslime* this, GlobalContext* globalCtx) {
}
if (!this->isDespawned) {
Actor_SetRoomClearedTemp(globalCtx, globalCtx->roomCtx.currRoom.num);
Flags_SetClearTemp(globalCtx, globalCtx->roomCtx.currRoom.num);
this->isDespawned = true;
}
@@ -2643,7 +2643,7 @@ void EnBigslime_ApplyDamageEffectGekko(EnBigslime* this, GlobalContext* globalCt
EnBigslime_SetupCutscene(this);
} else if (this->actor.colChkInfo.damageEffect == BIGSLIME_DMGEFF_ELECTRIC_STUN) {
this->stunTimer = 40;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_COMMON_FREEZE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_COMMON_FREEZE);
this->gekkoDrawEffect = GEKKO_DRAW_EFFECT_ELECTRIC_STUN;
this->unk_38C = 0.75f;
this->unk_388 = 2.0f;
@@ -2651,7 +2651,7 @@ void EnBigslime_ApplyDamageEffectGekko(EnBigslime* this, GlobalContext* globalCt
} else if (this->actor.colChkInfo.damageEffect == BIGSLIME_DMGEFF_STUN ||
this->actor.colChkInfo.damageEffect == BIGSLIME_DMGEFF_DEKU_STUN) {
this->stunTimer = 40;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_COMMON_FREEZE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_COMMON_FREEZE);
EnBigslime_SetupStunGekko(this);
} else if (this->actor.colChkInfo.damageEffect == BIGSLIME_DMGEFF_ICE) {
EnBigslime_GekkoFreeze(this);
@@ -2721,7 +2721,7 @@ void EnBigslime_AddIceShardEffect(EnBigslime* this, GlobalContext* globalCtx) {
}
}
Audio_PlayActorSound2(&this->actor, NA_SE_EV_ICE_BROKEN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_ICE_BROKEN);
EnBigslime_InitShockwave(this, globalCtx);
}
@@ -2790,9 +2790,9 @@ void EnBigslime_UpdateBigslime(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
if (this->actionFunc != EnBigslime_FormBigslime) {
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
} else {
Actor_SetVelocityAndMoveXYRotation(&this->actor);
Actor_MoveWithoutGravity(&this->actor);
}
if (this->actionFunc != EnBigslime_JumpGekko) {
@@ -2830,9 +2830,9 @@ void EnBigslime_UpdateGekko(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
if (this->actionFunc != EnBigslime_FormBigslime) {
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
} else {
Actor_SetVelocityAndMoveXYRotation(&this->actor);
Actor_MoveWithoutGravity(&this->actor);
}
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 40.0f, 80.0f, 0x1F);
@@ -105,7 +105,7 @@ void func_809CCEE8(EnBji01* this, GlobalContext* globalCtx) {
this->actor.flags &= ~0x10000;
}
}
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
globalCtx->msgCtx.unk11F22 = 0;
globalCtx->msgCtx.unk11F10 = 0;
func_809CD028(this, globalCtx);
@@ -118,7 +118,7 @@ void func_809CCEE8(EnBji01* this, GlobalContext* globalCtx) {
} else {
this->moonsTear = (ObjMoonStone*)SubS_FindActor(globalCtx, NULL, ACTORCAT_PROP, ACTOR_OBJ_MOON_STONE);
}
func_800B8500(&this->actor, globalCtx, 60.0f, 10.0f, 0);
func_800B8500(&this->actor, globalCtx, 60.0f, 10.0f, EXCH_ITEM_NONE);
}
}
@@ -171,7 +171,8 @@ void func_809CD028(EnBji01* this, GlobalContext* globalCtx) {
} else {
this->textId = 0x5F1;
}
func_800B8500(&this->actor, globalCtx, this->actor.xzDistToPlayer, this->actor.playerHeightRel, 0);
func_800B8500(&this->actor, globalCtx, this->actor.xzDistToPlayer, this->actor.playerHeightRel,
EXCH_ITEM_NONE);
break;
case PLAYER_FORM_HUMAN:
this->textId = 0x5F7;
@@ -204,7 +205,7 @@ void func_809CD028(EnBji01* this, GlobalContext* globalCtx) {
}
void EnBji01_DialogueHandler(EnBji01* this, GlobalContext* globalCtx) {
switch (func_80152498(&globalCtx->msgCtx)) {
switch (Message_GetState(&globalCtx->msgCtx)) {
case 0:
Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x444);
func_809CCDE0(this, globalCtx);
@@ -322,7 +323,7 @@ void func_809CD70C(EnBji01* this, GlobalContext* globalCtx) {
Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x444);
func_809CCDE0(this, globalCtx);
if (this->actor.shape.rot.y == this->actor.yawTowardsPlayer) {
func_800B86C8(&this->moonsTear->actor, globalCtx, &this->actor); /* Z-Target the Moon's Tear? */
Actor_ChangeFocus(&this->moonsTear->actor, globalCtx, &this->actor); /* Z-Target the Moon's Tear? */
this->actionFunc = func_809CD77C;
}
}
@@ -336,7 +337,7 @@ void func_809CD77C(EnBji01* this, GlobalContext* globalCtx) {
void EnBji01_Init(Actor* thisx, GlobalContext* globalCtx) {
EnBji01* this = THIS;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 30.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600578C, &D_06000FDC, this->jointTable, this->morphTable,
BJI_LIMB_MAX);
Collider_InitAndSetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
@@ -394,7 +395,7 @@ void EnBji01_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
Actor_SetHeight(&this->actor, 40.0f);
Actor_SetFocus(&this->actor, 40.0f);
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
@@ -120,7 +120,7 @@ void EnBomjima_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 i;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 19.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 19.0f);
this->actor.gravity = -3.0f;
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_cs_Skel_00F82C, &object_cs_Anim_0064B8, this->jointTable,
this->morphTable, 21);
@@ -216,21 +216,21 @@ void func_80BFE524(EnBomjima* this) {
if ((this->unk_2EC == 5) &&
(Animation_OnFrame(&this->skelAnime, 9.0f) || Animation_OnFrame(&this->skelAnime, 10.0f) ||
Animation_OnFrame(&this->skelAnime, 17.0f) || Animation_OnFrame(&this->skelAnime, 18.0f))) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BOMBERS_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BOMBERS_WALK);
}
if ((this->unk_2EC == 18) &&
(Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 2.0f) ||
Animation_OnFrame(&this->skelAnime, 4.0f) || Animation_OnFrame(&this->skelAnime, 6.0f))) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BOMBERS_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BOMBERS_WALK);
}
if ((this->unk_2EC == 15) && Animation_OnFrame(&this->skelAnime, 15.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BOMBERS_LAND);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BOMBERS_LAND);
}
if ((this->unk_2EC == 6) && Animation_OnFrame(&this->skelAnime, 8.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BOMBERS_LAND);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BOMBERS_LAND);
}
}
@@ -326,7 +326,7 @@ void func_80BFE67C(EnBomjima* this, GlobalContext* globalCtx) {
}
void func_80BFEA94(EnBomjima* this, GlobalContext* globalCtx) {
Actor* actor = globalCtx->actorCtx.actorList[ACTORCAT_PROP].first;
Actor* actor = globalCtx->actorCtx.actorLists[ACTORCAT_PROP].first;
while (actor != NULL) {
if (actor->id != ACTOR_EN_BOMBAL) {
@@ -379,7 +379,7 @@ void func_80BFEB64(EnBomjima* this, GlobalContext* globalCtx) {
this->actor.textId = Text_GetFaceReaction(globalCtx, 0x11);
}
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_2DC = this->actor.yawTowardsPlayer;
func_80C00234(this);
return;
@@ -405,7 +405,7 @@ void func_80BFEB64(EnBomjima* this, GlobalContext* globalCtx) {
this->unk_2DC = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_2F0->actor.world.pos);
if (Animation_OnFrame(&this->skelAnime, 19.0f)) {
this->unk_2C0 = 5;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BOMBERS_SHOT_BREATH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BOMBERS_SHOT_BREATH);
}
if (this->unk_2C0 == 1) {
@@ -498,7 +498,7 @@ void func_80BFF174(EnBomjima* this, GlobalContext* globalCtx) {
this->actor.textId = Text_GetFaceReaction(globalCtx, 0x11);
}
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_2DC = this->actor.yawTowardsPlayer;
func_80C00234(this);
return;
@@ -573,7 +573,7 @@ void func_80BFF430(EnBomjima* this, GlobalContext* globalCtx) {
if (bombal != NULL) {
bombal->unk_150 = 0.0f;
bombal->unk_14C = this->unk_2F4;
func_800B86C8(&this->actor, globalCtx, &bombal->actor);
Actor_ChangeFocus(&this->actor, globalCtx, &bombal->actor);
gSaveContext.weekEventReg[83] &= (u8)~4;
func_80BFE65C(this);
func_801477B4(globalCtx);
@@ -589,7 +589,7 @@ void func_80BFF4F4(EnBomjima* this) {
}
void func_80BFF52C(EnBomjima* this, GlobalContext* globalCtx) {
if ((func_80152498(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
if (globalCtx->msgCtx.choiceIndex == 0) {
Player* player = GET_PLAYER(globalCtx);
@@ -632,7 +632,7 @@ void func_80BFF6CC(EnBomjima* this, GlobalContext* globalCtx) {
f32 curFrame = this->skelAnime.curFrame;
if (this->unk_2CC <= curFrame) {
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
func_80BFE494(this, 1, 1.0f);
this->actionFunc = func_80BFF754;
@@ -761,7 +761,7 @@ void func_80BFF9B0(EnBomjima* this, GlobalContext* globalCtx) {
}
void func_80BFFB40(EnBomjima* this, GlobalContext* globalCtx) {
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
func_80BFE494(this, 15, 1.0f);
D_80C009F0 = 100;
@@ -868,7 +868,7 @@ void func_80BFFF54(EnBomjima* this, GlobalContext* globalCtx) {
if (this->unk_2EC == 8) {
if ((D_80C009F4 == 1) && Animation_OnFrame(&this->skelAnime, 7.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_HUMAN_BOUND);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_HUMAN_BOUND);
D_80C009F4 = 2;
}
@@ -905,7 +905,7 @@ void func_80C00168(EnBomjima* this, GlobalContext* globalCtx) {
this->actor.textId = Text_GetFaceReaction(globalCtx, 0x11);
}
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_2DC = this->actor.yawTowardsPlayer;
func_80C00234(this);
} else {
@@ -945,7 +945,7 @@ void func_80C00284(EnBomjima* this, GlobalContext* globalCtx) {
this->unk_28E = -6000;
}
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
this->collider.dim.radius = 10;
this->collider.dim.height = 30;
if ((this->unk_2A0 == 4) || (this->unk_2CA == 1) || ((this->unk_2CA == 3) && (this->unk_2C8 >= 2))) {
@@ -1044,9 +1044,9 @@ void EnBomjima_Update(Actor* thisx, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
this->actor.shape.rot.y = this->actor.world.rot.y;
func_80BFE524(this);
Actor_SetHeight(&this->actor, 20.0f);
Actor_SetFocus(&this->actor, 20.0f);
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Math_SmoothStepToS(&this->unk_28A, this->unk_290, 1, 5000, 0);
Math_SmoothStepToS(&this->unk_288, this->unk_28E, 1, 1000, 0);
Math_SmoothStepToS(&this->unk_294, this->unk_29A, 1, 1000, 0);
@@ -76,7 +76,7 @@ void EnBomjimb_Init(Actor* thisx, GlobalContext* globalCtx) {
EnBomjimb* this = THIS;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 19.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 19.0f);
this->actor.gravity = -2.0f;
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_cs_Skel_00F82C, &object_cs_Anim_0064B8, this->jointTable,
this->morphTable, 21);
@@ -181,20 +181,20 @@ void func_80C011CC(EnBomjimb* this) {
if ((this->unk_2DC == 5) &&
(Animation_OnFrame(&this->skelAnime, 9.0f) || Animation_OnFrame(&this->skelAnime, 10.0f) ||
Animation_OnFrame(&this->skelAnime, 17.0f) || Animation_OnFrame(&this->skelAnime, 18.0f))) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BOMBERS_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BOMBERS_WALK);
}
if ((this->unk_2DC == 19) &&
(Animation_OnFrame(&this->skelAnime, 2.0f) || Animation_OnFrame(&this->skelAnime, 6.0f))) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BOMBERS_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BOMBERS_WALK);
}
if ((this->unk_2DC == 18) && Animation_OnFrame(&this->skelAnime, 15.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BOMBERS_LAND);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BOMBERS_LAND);
}
if ((this->unk_2DC == 7) && Animation_OnFrame(&this->skelAnime, 8.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BOMBERS_LAND);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BOMBERS_LAND);
}
}
@@ -447,7 +447,7 @@ void func_80C01CD0(EnBomjimb* this, GlobalContext* globalCtx) {
}
if ((this->unk_2C0 == 0) && (this->unk_2E4->bgCheckFlags & 1)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_PUT_DOWN_WOODBOX);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_PUT_DOWN_WOODBOX);
this->unk_2C0 = 1;
}
@@ -501,7 +501,7 @@ void func_80C0201C(EnBomjimb* this, GlobalContext* globalCtx) {
}
}
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_2CA = 10;
this->actionFunc = func_80C02A14;
} else {
@@ -691,7 +691,7 @@ void func_80C02740(EnBomjimb* this, GlobalContext* globalCtx) {
if (gSaveContext.unk_FE6 > 4) {
func_801A3098(0x922);
} else {
Audio_PlayActorSound2(&this->actor, NA_SE_SY_PIECE_OF_HEART);
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_PIECE_OF_HEART);
}
switch (this->unk_2C8) {
@@ -747,7 +747,7 @@ void func_80C02A14(EnBomjimb* this, GlobalContext* globalCtx) {
player->actor.freezeTimer = 3;
if (this->unk_2E0 == 0) {
if (Animation_OnFrame(&this->skelAnime, 7.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_HUMAN_BOUND);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_HUMAN_BOUND);
this->unk_2E0 = 1;
}
}
@@ -757,7 +757,7 @@ void func_80C02A14(EnBomjimb* this, GlobalContext* globalCtx) {
player->actor.freezeTimer = 3;
}
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
if ((this->unk_2CA == 8) && (gSaveContext.unk_FE6 >= 5)) {
func_80C02CA4(this, globalCtx);
@@ -776,7 +776,7 @@ void func_80C02BCC(EnBomjimb* this, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 5000, 0);
if (this->unk_2C0 == 0) {
player->actor.freezeTimer = 3;
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
this->unk_2C0 = 1;
player->stateFlags1 &= ~0x10000000;
@@ -829,11 +829,11 @@ void EnBomjimb_Update(Actor* thisx, GlobalContext* globalCtx2) {
SkelAnime_Update(&this->skelAnime);
this->actor.shape.rot.y = this->actor.world.rot.y;
func_80C011CC(this);
Actor_SetHeight(&this->actor, 20.0f);
Actor_SetFocus(&this->actor, 20.0f);
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
if (this->unk_2CA == 0) {
if ((this->unk_2E4 != NULL) && (this->unk_2E4->update != NULL)) {
+5 -1
View File
@@ -9,7 +9,11 @@ typedef void (*EnBoxActionFunc)(struct EnBox*, GlobalContext*);
typedef struct EnBox {
/* 0x0000 */ Actor actor;
/* 0x0144 */ char unk_144[0xBC];
/* 0x0144 */ char unk_144[0xAC];
/* 0x01F0 */ char unk_1F0[0x01];
/* 0x01F1 */ u8 unk_1F1;
/* 0x01F2 */ char unk_1F2[0x02];
/* 0x01F4 */ char unk_1F4[0x0C];
/* 0x0200 */ EnBoxActionFunc actionFunc;
/* 0x0204 */ char unk_204[0x20];
} EnBox; // size = 0x224
+1 -1
View File
@@ -44,7 +44,7 @@ void EnBu_DoNothing(EnBu* this, GlobalContext* globalCtx) {
void EnBu_Update(Actor* thisx, GlobalContext* globalCtx) {
EnBu* this = THIS;
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
this->actionFunc(this, globalCtx);
}
+4 -4
View File
@@ -86,12 +86,12 @@ void EnCha_Ring(EnCha* this, GlobalContext* globalCtx) {
void EnCha_Idle(EnCha* this, GlobalContext* globalCtx) {
if (gSaveContext.weekEventReg[60] & 4) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_DOOR_BELL);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_DOOR_BELL);
gSaveContext.weekEventReg[60] &= 0xFB;
this->actor.home.rot.z = 0x7D0;
}
if (this->collider.base.acFlags & AC_HIT) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_DOOR_BELL);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_DOOR_BELL);
this->actor.home.rot.z = 0x7D0;
if (!(gSaveContext.weekEventReg[51] & 4)) {
gSaveContext.weekEventReg[51] |= 4;
@@ -117,8 +117,8 @@ void EnCha_Update(Actor* thisx, GlobalContext* globalCtx) {
void EnCha_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnCha* this = THIS;
func_800BDFC0(globalCtx, D_06000710);
Gfx_DrawDListOpa(globalCtx, D_06000710);
Matrix_InsertTranslation(-1094.0f, 4950.0f, 9.0f, MTXMODE_APPLY);
Matrix_InsertXRotation_s(this->actor.home.rot.x, MTXMODE_APPLY);
func_800BDFC0(globalCtx, D_06000958);
Gfx_DrawDListOpa(globalCtx, D_06000958);
}
@@ -556,7 +556,7 @@ void EnClearTag_UpdateCamera(EnClearTag* this, GlobalContext* globalCtx) {
}
player->actor.speedXZ = 0.0f;
if (func_80152498(&globalCtx->msgCtx) == 0) {
if (Message_GetState(&globalCtx->msgCtx) == 0) {
camera = Play_GetCamera(globalCtx, MAIN_CAM);
camera->eye = this->eye;
camera->eyeNext = this->eye;
@@ -73,11 +73,11 @@ void EnColMan_Init(Actor* thisx, GlobalContext* globalCtx) {
case EN_COL_MAN_HEART_PIECE:
case EN_COL_MAN_RECOVERY_HEART:
default:
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 10.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 10.0f);
func_80AFDD60(this);
break;
case EN_COL_MAN_FALLING_ROCK:
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 10.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 10.0f);
func_80AFDF60(this);
break;
case EN_COL_MAN_CUTSCENE_BOMB:
@@ -131,14 +131,14 @@ void func_80AFDE00(EnColMan* this, GlobalContext* globalCtx) {
this->actor.draw = NULL;
this->actionFunc = EnColMan_SetHeartPieceCollectedAndKill;
} else if (!(gSaveContext.weekEventReg[56] & 2)) {
func_800B8A1C(&this->actor, globalCtx, GI_HEART_PIECE, 40.0f, 40.0f);
Actor_PickUp(&this->actor, globalCtx, GI_HEART_PIECE, 40.0f, 40.0f);
} else {
func_800B8A1C(&this->actor, globalCtx, GI_RECOVERY_HEART, 40.0f, 40.0f);
Actor_PickUp(&this->actor, globalCtx, GI_RECOVERY_HEART, 40.0f, 40.0f);
}
}
void EnColMan_SetHeartPieceCollectedAndKill(EnColMan* this, GlobalContext* globalCtx) {
if (func_80152498(&globalCtx->msgCtx) == 6 && func_80147624(globalCtx)) {
if (Message_GetState(&globalCtx->msgCtx) == 6 && func_80147624(globalCtx)) {
gSaveContext.weekEventReg[56] |= 2;
Actor_MarkForDeath(&this->actor);
}
@@ -167,7 +167,7 @@ void func_80AFDFB4(EnColMan* this, GlobalContext* globalCtx) {
this->actor.speedXZ = 2.0f + BREG(56) + Rand_ZeroFloat(2.0f);
this->actor.velocity.y = 12.0f + BREG(57) + Rand_ZeroFloat(5.0f);
this->hasSetRandomValues = true;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_ANSATSUSYA_ROCK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ANSATSUSYA_ROCK);
return;
}
@@ -210,7 +210,7 @@ void func_80AFE25C(EnColMan* this, GlobalContext* globalCtx) {
}
}
Audio_PlayActorSound2(&this->actor, NA_SE_IT_BOMB_EXPLOSION);
Actor_PlaySfxAtPos(&this->actor, NA_SE_IT_BOMB_EXPLOSION);
Actor_MarkForDeath(&this->actor);
}
}
@@ -221,7 +221,7 @@ void EnColMan_Update(Actor* thisx, GlobalContext* globalCtx) {
Actor_SetScale(&this->actor, this->scale);
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 30.0f, 30.0f, 30.0f, 0x1F);
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
+10 -10
View File
@@ -108,7 +108,7 @@ void EnCow_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnCow* this = THIS;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 72.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 72.0f);
switch (EN_COW_TYPE(thisx)) {
case EN_COW_TYPE_DEFAULT:
@@ -207,7 +207,7 @@ void EnCow_UpdateAnimation(EnCow* this, GlobalContext* globalCtx) {
}
void EnCow_TalkEnd(EnCow* this, GlobalContext* globalCtx) {
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
this->actor.flags &= ~0x10000;
func_801477B4(globalCtx);
this->actionFunc = EnCow_Idle;
@@ -215,7 +215,7 @@ void EnCow_TalkEnd(EnCow* this, GlobalContext* globalCtx) {
}
void EnCow_GiveMilkEnd(EnCow* this, GlobalContext* globalCtx) {
if (func_800B867C(&this->actor, globalCtx)) {
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
this->actor.flags &= ~0x10000;
this->actionFunc = EnCow_Idle;
}
@@ -226,21 +226,21 @@ void EnCow_GiveMilkWait(EnCow* this, GlobalContext* globalCtx) {
this->actor.parent = NULL;
this->actionFunc = EnCow_GiveMilkEnd;
} else {
func_800B8A1C(&this->actor, globalCtx, GI_MILK, 10000.0f, 100.0f);
Actor_PickUp(&this->actor, globalCtx, GI_MILK, 10000.0f, 100.0f);
}
}
void EnCow_GiveMilk(EnCow* this, GlobalContext* globalCtx) {
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
this->actor.flags &= ~0x10000;
func_801477B4(globalCtx);
this->actionFunc = EnCow_GiveMilkWait;
func_800B8A1C(&this->actor, globalCtx, GI_MILK, 10000.0f, 100.0f);
Actor_PickUp(&this->actor, globalCtx, GI_MILK, 10000.0f, 100.0f);
}
}
void EnCow_CheckForEmptyBottle(EnCow* this, GlobalContext* globalCtx) {
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if (func_80114E90()) {
func_80151938(globalCtx, 0x32C9); // Text to give milk.
this->actionFunc = EnCow_GiveMilk;
@@ -252,7 +252,7 @@ void EnCow_CheckForEmptyBottle(EnCow* this, GlobalContext* globalCtx) {
}
void EnCow_Talk(EnCow* this, GlobalContext* globalCtx) {
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
if (this->actor.textId == 0x32C8) { // Text to give milk after playing Epona's Song.
this->actionFunc = EnCow_CheckForEmptyBottle;
} else if (this->actor.textId == 0x32C9) { // Text to give milk.
@@ -345,13 +345,13 @@ void EnCow_Update(Actor* thisx, GlobalContext* globalCtx2) {
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliders[0].base);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliders[1].base);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
if (SkelAnime_Update(&this->skelAnime)) {
if (this->skelAnime.animation == &D_060001CC) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_COW_CRY);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_COW_CRY);
Animation_Change(&this->skelAnime, &D_06004264, 1.0f, 0.0f, Animation_GetLastFrame(&D_06004264),
ANIMMODE_ONCE, 1.0f);
} else {
+10 -10
View File
@@ -192,7 +192,7 @@ s32 func_80B3E69C(EnDai* this, GlobalContext* globalCtx) {
if ((globalCtx->csCtx.state != 0) && (globalCtx->sceneNum == SCENE_12HAKUGINMAE) &&
(globalCtx->csCtx.unk_12 == 0) && !(gSaveContext.weekEventReg[30] & 1)) {
if (!(this->unk_1CE & 0x10)) {
Actor_SetSwitchFlag(globalCtx, 20);
Flags_SetSwitch(globalCtx, 20);
this->unk_1CE |= (0x80 | 0x10);
this->unk_1CE &= ~(0x100 | 0x20);
this->unk_1CC = 0xFF;
@@ -216,7 +216,7 @@ s32 func_80B3E7C8(EnDai* this, GlobalContext* globalCtx) {
s32 ret = false;
if (this->unk_1CE & 7) {
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_8013AED4(&this->unk_1CE, 0, 7);
this->actionFunc = func_80B3EF90;
ret = true;
@@ -304,7 +304,7 @@ s32 func_80B3E96C(EnDai* this, GlobalContext* globalCtx) {
break;
case 1:
Audio_PlayActorSound2(&this->actor, NA_SE_EV_SNOWSTORM_HARD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SNOWSTORM_HARD);
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_WEATHER_TAG, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0x1388, 0x708, 0x3E8, 0);
func_80B3E5DC(this, 3);
@@ -470,7 +470,7 @@ void func_80B3F044(EnDai* this, GlobalContext* globalCtx) {
break;
case 2:
Audio_PlayActorSound2(&this->actor, NA_SE_EV_ROLL_AND_FALL);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_ROLL_AND_FALL);
break;
case 3:
@@ -493,27 +493,27 @@ void func_80B3F044(EnDai* this, GlobalContext* globalCtx) {
case 2:
if (globalCtx->csCtx.frames == 360) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DAIGOLON_SLEEP3 - SFX_FLAG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DAIGOLON_SLEEP3 - SFX_FLAG);
}
if (Animation_OnFrame(&this->skelAnime, 43.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_GORON_BOUND_1);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_GORON_BOUND_1);
}
this->unk_1D6 = func_80B3E8BC(this, this->unk_1CC);
break;
case 3:
if (Animation_OnFrame(&this->skelAnime, 6.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DAIGOLON_SLEEP1);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DAIGOLON_SLEEP1);
}
this->unk_1D6 = func_80B3E8BC(this, this->unk_1CC);
break;
case 4:
if (Animation_OnFrame(&this->skelAnime, 30.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DAIGOLON_SLEEP2);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DAIGOLON_SLEEP2);
}
if (Animation_OnFrame(&this->skelAnime, 35.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_GORON_BOUND_0);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_GORON_BOUND_0);
}
this->unk_1D6 = func_80B3E8BC(this, this->unk_1CC);
break;
@@ -525,7 +525,7 @@ void func_80B3F044(EnDai* this, GlobalContext* globalCtx) {
void EnDai_Init(Actor* thisx, GlobalContext* globalCtx) {
EnDai* this = THIS;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 0.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_060130D0, NULL, this->jointTable, this->morphTable, 19);
this->unk_A70 = -1;
func_80B3E5DC(this, 0);
@@ -76,7 +76,7 @@ void EnDaiku_Init(Actor* thisx, GlobalContext* globalCtx) {
EnDaiku* this = THIS;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 40.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 40.0f);
this->actor.targetMode = 0;
Collider_InitAndSetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
this->unk_278 = ENDAIKU_GET_FF(&this->actor);
@@ -195,7 +195,7 @@ void func_809438F8(EnDaiku* this, GlobalContext* globalCtx) {
this->actor.textId = sTextIds[this->unk_28C];
}
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_80943BC0(this);
return;
}
@@ -255,7 +255,7 @@ void func_80943BDC(EnDaiku* this, GlobalContext* globalCtx) {
}
}
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
func_80943820(this);
}
@@ -286,8 +286,8 @@ void EnDaiku_Update(Actor* thisx, GlobalContext* globalCtx) {
Actor_SetScale(&this->actor, 0.01f);
this->actor.shape.rot.y = this->actor.world.rot.y;
Actor_SetHeight(&this->actor, 65.0f);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_SetFocus(&this->actor, 65.0f);
Actor_MoveWithGravity(&this->actor);
Math_SmoothStepToS(&this->unk_260, this->unk_266, 1, 0xBB8, 0);
Math_SmoothStepToS(&this->unk_25E, this->unk_264, 1, 0xBB8, 0);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
@@ -95,7 +95,7 @@ void EnDaiku2_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 day = gSaveContext.day;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 40.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 40.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600A850, &D_06002FA0, this->jointTable, this->morphTable, 17);
this->actor.targetMode = 0;
Collider_InitAndSetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
@@ -158,7 +158,7 @@ s32 func_80BE64C0(EnDaiku2* this, GlobalContext* globalCtx) {
Math_Vec3f_Copy(&sp30, &this->actor.world.pos);
Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.home.pos);
bomb = (EnBom*)func_800BE0B8(globalCtx, &this->actor, -1, ACTORCAT_EXPLOSIVES, BREG(7) + 240.0f);
bomb = (EnBom*)Actor_FindNearby(globalCtx, &this->actor, -1, ACTORCAT_EXPLOSIVES, BREG(7) + 240.0f);
Math_Vec3f_Copy(&this->actor.world.pos, &sp30);
if ((this->unk_278 >= ENDAIKU2_GET_7F_0) && !Flags_GetSwitch(globalCtx, this->unk_278) && (bomb != NULL) &&
(bomb->actor.id == ACTOR_EN_BOM)) {
@@ -233,7 +233,7 @@ void func_80BE66E4(EnDaiku2* this, GlobalContext* globalCtx) {
this->actor.textId = sTextIds[this->unk_28A];
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_80BE6B40(this, globalCtx);
return;
}
@@ -245,7 +245,7 @@ void func_80BE66E4(EnDaiku2* this, GlobalContext* globalCtx) {
func_800B8614(&this->actor, globalCtx, 80.0f);
if ((this->unk_276 == 8) && Animation_OnFrame(&this->skelAnime, 6.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_ROCK_BROKEN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_ROCK_BROKEN);
for (i = 0; i < 10; i++) {
Math_Vec3f_Copy(&sp70, &this->actor.world.pos);
@@ -304,7 +304,7 @@ void func_80BE6B40(EnDaiku2* this, GlobalContext* globalCtx) {
void func_80BE6BC0(EnDaiku2* this, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0x0);
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
s32 day = gSaveContext.day - 1;
func_801477B4(globalCtx);
@@ -342,7 +342,7 @@ void func_80BE6D40(EnDaiku2* this, GlobalContext* globalCtx) {
s32 pad[3];
s16 sp3A = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_268);
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->actionFunc = func_80BE6BC0;
return;
}
@@ -376,7 +376,7 @@ void func_80BE6EF0(EnDaiku2* this, GlobalContext* globalCtx) {
Vec3f sp40;
s16 var;
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->actionFunc = func_80BE6BC0;
return;
}
@@ -460,8 +460,8 @@ void EnDaiku2_Update(Actor* thisx, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
this->actionFunc(this, globalCtx);
this->actor.shape.rot.y = this->actor.world.rot.y;
Actor_SetHeight(&this->actor, 65.0f);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_SetFocus(&this->actor, 65.0f);
Actor_MoveWithGravity(&this->actor);
Math_ApproachF(&this->unk_260, this->unk_264, 0.3f, 2.0f);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
Collider_UpdateCylinder(&this->actor, &this->collider);
@@ -131,7 +131,7 @@ void EnDekunuts_Init(Actor* thisx, GlobalContext* globalCtx) {
EnDekunuts* this = THIS;
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 35.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_06002468, &D_0600326C, this->jointTable, this->morphTable, 10);
Collider_InitAndSetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
@@ -165,7 +165,7 @@ void func_808BD348(EnDekunuts* this) {
this->unk_210 = 1.0f;
this->collider.base.colType = COLTYPE_HIT3;
this->unk_190 = 80;
func_800BCB70(&this->actor, 0x4000, 255, 0, 80);
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 80);
}
void func_808BD3B4(EnDekunuts* this, GlobalContext* globalCtx) {
@@ -173,7 +173,7 @@ void func_808BD3B4(EnDekunuts* this, GlobalContext* globalCtx) {
this->unk_18E = 0;
this->collider.base.colType = COLTYPE_HIT6;
this->unk_210 = 0.0f;
func_800BF7CC(globalCtx, &this->actor, this->unk_21C, 8, 2, 0.2f, 0.2f);
Actor_SpawnIceEffects(globalCtx, &this->actor, this->unk_21C, 8, 2, 0.2f, 0.2f);
}
}
@@ -200,7 +200,7 @@ void func_808BD49C(EnDekunuts* this, GlobalContext* globalCtx) {
if (Animation_OnFrame(&this->skelAnime, 9.0f)) {
this->collider.base.acFlags |= AC_ON;
} else if (Animation_OnFrame(&this->skelAnime, 8.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_UP);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_UP);
}
this->collider.dim.height = (s32)((CLAMP(this->skelAnime.curFrame, 9.0f, 12.0f) - 9.0f) * 9.0f) + 5;
@@ -333,7 +333,7 @@ void func_808BDA4C(EnDekunuts* this, GlobalContext* globalCtx) {
if (Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_NUTSBALL, pos.x, pos.y, pos.z,
this->actor.world.rot.x, this->actor.shape.rot.y, 0, params) != NULL) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_THROW);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_THROW);
}
} else if ((this->unk_190 >= 2) && Animation_OnFrame(&this->skelAnime, 12.0f)) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06000168, -3.0f);
@@ -346,7 +346,7 @@ void func_808BDA4C(EnDekunuts* this, GlobalContext* globalCtx) {
void func_808BDC9C(EnDekunuts* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06002A5C, -5.0f);
this->unk_190 = 0;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_DOWN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN);
this->actionFunc = func_808BDD54;
}
@@ -354,7 +354,7 @@ void func_808BDCF0(EnDekunuts* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06002A5C, -5.0f);
this->collider.base.acFlags &= ~AC_ON;
this->unk_190 = 80;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_DOWN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN);
this->actionFunc = func_808BDD54;
}
@@ -382,7 +382,7 @@ void func_808BDE7C(EnDekunuts* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06002DD4, -3.0f);
this->collider.dim.height = 37;
this->actor.colChkInfo.mass = 50;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_DAMAGE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DAMAGE);
this->actor.world.rot.x = 0;
this->actor.flags |= 0x20;
this->collider.base.acFlags &= ~AC_ON;
@@ -418,7 +418,7 @@ void func_808BDFB8(EnDekunuts* this, GlobalContext* globalCtx) {
}
if (this->unk_18C != 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_WALK);
this->unk_18C = 0;
} else {
this->unk_18C = 1;
@@ -490,9 +490,9 @@ void func_808BE294(EnDekunuts* this, s32 arg1) {
this->actor.world.rot.x = 0;
this->collider.base.acFlags &= ~AC_ON;
this->actionFunc = func_808BE358;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_DAMAGE);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_CUTBODY);
func_800BCB70(&this->actor, 0x4000, 255, 0, Animation_GetLastFrame(&D_0600259C));
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DAMAGE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_CUTBODY);
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, Animation_GetLastFrame(&D_0600259C));
}
void func_808BE358(EnDekunuts* this, GlobalContext* globalCtx) {
@@ -534,7 +534,7 @@ void func_808BE484(EnDekunuts* this) {
Animation_PlayOnce(&this->skelAnime, &D_06002BD4);
this->actionFunc = func_808BE4D4;
this->actor.speedXZ = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_DEAD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DEAD);
}
void func_808BE4D4(EnDekunuts* this, GlobalContext* globalCtx) {
@@ -578,7 +578,7 @@ void func_808BE6C4(EnDekunuts* this, GlobalContext* globalCtx) {
void func_808BE73C(EnDekunuts* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
func_800BE258(&this->actor, &this->collider.info);
Actor_SetDropFlag(&this->actor, &this->collider.info);
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)) {
@@ -603,8 +603,8 @@ void func_808BE73C(EnDekunuts* this, GlobalContext* globalCtx) {
if (this->actor.colChkInfo.damageEffect == 1) {
this->unk_190 = 40;
func_800BCB70(&this->actor, 0, 255, 0, 40);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_COMMON_FREEZE);
Actor_SetColorFilter(&this->actor, 0, 255, 0, 40);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_COMMON_FREEZE);
func_808BE3A8(this);
return;
}
@@ -651,7 +651,7 @@ void EnDekunuts_Update(Actor* thisx, GlobalContext* globalCtx) {
func_808BE73C(this, globalCtx);
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, this->collider.dim.radius, this->collider.dim.height, 0x1D);
Collider_UpdateCylinder(&this->actor, &this->collider);
@@ -747,7 +747,7 @@ void EnDekunuts_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (this->actor.colorFilterTimer != 0) {
func_800AE5A0(globalCtx);
}
func_800BDFC0(globalCtx, D_06001E50);
Gfx_DrawDListOpa(globalCtx, D_06001E50);
func_800BE680(globalCtx, &this->actor, this->unk_21C, 8, this->unk_214, this->unk_218, this->unk_210,
this->unk_18E);
}
+38 -38
View File
@@ -302,37 +302,37 @@ void func_80989864(EnDg* this, GlobalContext* globalCtx) {
sp38.x = randPlusMinusPoint5Scaled(15.0f) + this->actor.world.pos.x;
sp38.y = this->actor.world.pos.y;
sp38.z = randPlusMinusPoint5Scaled(15.0f) + this->actor.world.pos.z;
func_800BBDAC(globalCtx, &this->actor, &sp38, 10.0f, 0, 2.0f, 300, 0, 1);
Actor_SpawnFloorDustRing(globalCtx, &this->actor, &sp38, 10.0f, 0, 2.0f, 300, 0, 1);
}
}
void func_80989974(EnDg* this) {
if (Animation_OnFrame(&this->skelAnime, 1.0f) || Animation_OnFrame(&this->skelAnime, 7.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_MONKEY_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_MONKEY_WALK);
}
}
void func_809899C8(EnDg* this, f32 arg1) {
if (Animation_OnFrame(&this->skelAnime, arg1)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_SMALL_DOG_BARK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SMALL_DOG_BARK);
}
}
void func_80989A08(EnDg* this, f32 arg1) {
if (Animation_OnFrame(&this->skelAnime, arg1)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_SMALL_DOG_ANG_BARK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SMALL_DOG_ANG_BARK);
}
}
void func_80989A48(EnDg* this) {
if (Animation_OnFrame(&this->skelAnime, 23.0f) || Animation_OnFrame(&this->skelAnime, 28.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_SMALL_DOG_WHINE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SMALL_DOG_WHINE);
}
}
void func_80989A9C(EnDg* this, f32 arg1) {
if (Animation_OnFrame(&this->skelAnime, arg1)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_SMALL_DOG_GROAN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SMALL_DOG_GROAN);
}
}
@@ -402,7 +402,7 @@ void func_80989E18(EnDg* this, GlobalContext* globalCtx) {
}
if (Actor_HasParent(&this->actor, globalCtx)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_SMALL_DOG_BARK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SMALL_DOG_BARK);
this->unk_290 = 1;
D_8098C2FC = D_8098C2A8[this->unk_286];
if (D_8098C2A0 == 0) {
@@ -422,12 +422,12 @@ void func_80989E18(EnDg* this, GlobalContext* globalCtx) {
this->actionFunc = func_8098BA64;
}
} else {
func_800B8BB0(&this->actor, globalCtx);
Actor_LiftActor(&this->actor, globalCtx);
}
}
s32 func_80989FC8(GlobalContext* globalCtx) {
EnDg* enemy = (EnDg*)globalCtx->actorCtx.actorList[ACTORCAT_ENEMY].first;
EnDg* enemy = (EnDg*)globalCtx->actorCtx.actorLists[ACTORCAT_ENEMY].first;
f32 minDist = 9999.0f;
f32 dist;
@@ -470,7 +470,7 @@ void func_8098A064(EnDg* this, GlobalContext* globalCtx) {
} else if ((this->actionFunc == func_8098B004) || (this->actionFunc == func_8098AB48)) {
if (DECR(this->unk_292) == 0) {
this->unk_292 = 10;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_SMALL_DOG_BARK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SMALL_DOG_BARK);
}
}
}
@@ -567,7 +567,7 @@ void func_8098A468(EnDg* this, GlobalContext* globalCtx) {
this->actor.velocity.y = 0.0f;
this->actor.gravity = -3.0f;
func_80989674(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
if (player->transformation == PLAYER_FORM_HUMAN) {
func_80989E18(this, globalCtx);
}
@@ -619,7 +619,7 @@ void func_8098A618(EnDg* this, GlobalContext* globalCtx) {
}
this->actor.world.rot.y = this->actor.shape.rot.y;
Math_ApproachF(&this->actor.speedXZ, -1.5f, 0.2f, 1.0f);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
func_80989974(this);
@@ -655,12 +655,12 @@ void func_8098A70C(EnDg* this, GlobalContext* globalCtx) {
this->actor.speedXZ = 7.0f;
}
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
func_80989974(this);
if (Animation_OnFrame(&this->skelAnime, 3.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_SMALL_DOG_CRY);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SMALL_DOG_CRY);
} else if (Animation_OnFrame(&this->skelAnime, 6.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_MONKEY_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_MONKEY_WALK);
}
}
@@ -707,7 +707,7 @@ void func_8098A938(EnDg* this, GlobalContext* globalCtx) {
Math_ApproachF(&this->actor.speedXZ, 5.0f, 0.2f, 1.0f);
}
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
func_80989974(this);
func_80989A08(this, 5.0f);
}
@@ -715,7 +715,7 @@ void func_8098A938(EnDg* this, GlobalContext* globalCtx) {
void func_8098AAAC(EnDg* this, GlobalContext* globalCtx) {
this->unk_280 &= ~8;
Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.1f, 0.5f);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
if (DECR(this->unk_28E) == 0) {
this->unk_28E = 20;
this->actionFunc = func_8098A938;
@@ -790,7 +790,7 @@ void func_8098AC34(EnDg* this, GlobalContext* globalCtx) {
if (sp26 >= 0x18) {
func_80989864(this, globalCtx);
}
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
func_80989A9C(this, 10.0f);
@@ -808,7 +808,7 @@ void func_8098AE58(EnDg* this, GlobalContext* globalCtx) {
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0xC00);
this->actor.world.rot.y = this->actor.shape.rot.y;
Math_ApproachF(&this->actor.speedXZ, 2.0f, 0.2f, 1.0f);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
func_80989974(this);
@@ -818,7 +818,7 @@ void func_8098AE58(EnDg* this, GlobalContext* globalCtx) {
void func_8098AF44(EnDg* this, GlobalContext* globalCtx) {
if (func_801A46F8() == 1) {
this->unk_292 = 10;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_SMALL_DOG_BARK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SMALL_DOG_BARK);
this->actionFunc = func_8098B004;
}
}
@@ -829,7 +829,7 @@ void func_8098AF98(EnDg* this, GlobalContext* globalCtx) {
this->actionFunc = func_8098A468;
}
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
func_809899C8(this, 3.0f);
}
@@ -859,7 +859,7 @@ void func_8098B004(EnDg* this, GlobalContext* globalCtx) {
}
func_8098A064(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
func_80989974(this);
if (!(this->unk_280 & 0x20)) {
func_809899C8(this, 3.0f);
@@ -881,7 +881,7 @@ void func_8098B198(EnDg* this, GlobalContext* globalCtx) {
this->actor.world.rot.y = this->actor.shape.rot.y;
Math_ApproachF(&this->actor.speedXZ, -1.0f, 0.2f, 1.0f);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
func_80989974(this);
func_80989A9C(this, 4.0f);
}
@@ -901,11 +901,11 @@ void func_8098B28C(EnDg* this, GlobalContext* globalCtx) {
this->actor.world.rot.y = this->actor.shape.rot.y;
Math_ApproachF(&this->actor.speedXZ, -2.0f, 0.2f, 1.0f);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
func_80989974(this);
Audio_PlayActorSound2(&this->actor, NA_SE_EV_SMALL_DOG_GROAN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SMALL_DOG_GROAN);
}
void func_8098B390(EnDg* this, GlobalContext* globalCtx) {
@@ -936,12 +936,12 @@ void func_8098B464(EnDg* this, GlobalContext* globalCtx) {
this->actor.gravity = 0.0f;
this->actor.velocity.y = -3.0f;
this->unk_284 = 10;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BOMB_DROP_WATER);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BOMB_DROP_WATER);
this->actionFunc = func_8098B560;
}
Math_ApproachF(&this->actor.speedXZ, 1.0f, 0.2f, 1.0f);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
void func_8098B560(EnDg* this, GlobalContext* globalCtx) {
@@ -963,7 +963,7 @@ void func_8098B560(EnDg* this, GlobalContext* globalCtx) {
if (DECR(this->unk_284) == 0) {
if (!(this->unk_280 & 4)) {
this->unk_280 |= 4;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_OUT_OF_WATER);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_OUT_OF_WATER);
}
this->unk_284 = 5;
EffectSsGRipple_Spawn(globalCtx, &sp54, 100, 500, 30);
@@ -999,7 +999,7 @@ void func_8098B560(EnDg* this, GlobalContext* globalCtx) {
this->unk_280 &= ~4;
this->unk_28C = 8;
this->unk_282 = Rand_S16Offset(60, 60);
Audio_PlayActorSound2(&this->actor, NA_SE_EV_OUT_OF_WATER);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_OUT_OF_WATER);
func_80989140(&this->skelAnime, sAnimations, 2);
Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f);
this->actionFunc = func_8098A468;
@@ -1008,7 +1008,7 @@ void func_8098B560(EnDg* this, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->actor.world.rot.y, sp46, 4, 0x3E8, 1);
this->actor.shape.rot.y = this->actor.world.rot.y;
Math_ApproachF(&this->actor.speedXZ, 0.5f, 0.2f, 1.0f);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
void func_8098B88C(EnDg* this, GlobalContext* globalCtx) {
@@ -1040,7 +1040,7 @@ void func_8098B88C(EnDg* this, GlobalContext* globalCtx) {
this->actor.velocity.y = 10.0f;
this->actor.gravity = -3.0f;
this->unk_282 = Rand_S16Offset(60, 60);
Audio_PlayActorSound2(&this->actor, NA_SE_EV_OUT_OF_WATER);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_OUT_OF_WATER);
func_80989140(&this->skelAnime, sAnimations, 2);
this->actionFunc = func_8098A468;
Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f);
@@ -1048,7 +1048,7 @@ void func_8098B88C(EnDg* this, GlobalContext* globalCtx) {
Math_ApproachF(&this->actor.speedXZ, 0.5f, 0.2f, 1.0f);
}
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
void func_8098BA64(EnDg* this, GlobalContext* globalCtx) {
@@ -1063,7 +1063,7 @@ void func_8098BA64(EnDg* this, GlobalContext* globalCtx) {
this->unk_288 = -1;
D_8098C2FC.unk_02 = this->unk_288;
this->unk_28A = 100;
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
this->unk_280 |= 0x10;
this->actionFunc = func_8098BB10;
}
@@ -1075,7 +1075,7 @@ void func_8098BB10(EnDg* this, GlobalContext* globalCtx) {
if (this->actor.bgCheckFlags & 1) {
if (this->unk_280 & 0x10) {
this->unk_280 &= ~0x10;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_MONKEY_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_MONKEY_WALK);
}
this->actor.speedXZ = 0.0f;
@@ -1091,11 +1091,11 @@ void func_8098BB10(EnDg* this, GlobalContext* globalCtx) {
this->actionFunc = func_8098A468;
}
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
void func_8098BBEC(EnDg* this, GlobalContext* globalCtx) {
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->actor.flags &= ~0x10000;
func_80989D38(this, globalCtx);
this->actionFunc = func_8098BC54;
@@ -1105,7 +1105,7 @@ void func_8098BBEC(EnDg* this, GlobalContext* globalCtx) {
}
void func_8098BC54(EnDg* this, GlobalContext* globalCtx) {
if (func_80152498(&globalCtx->msgCtx) == 2) {
if (Message_GetState(&globalCtx->msgCtx) == 2) {
func_80989140(&this->skelAnime, sAnimations, 0);
this->actionFunc = func_8098BA64;
}
@@ -1115,7 +1115,7 @@ void EnDg_Init(Actor* thisx, GlobalContext* globalCtx) {
EnDg* this = THIS;
s32 pad;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 24.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_060080F0, NULL, this->jointTable, this->morphTable, 13);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
@@ -287,7 +287,7 @@ void EnDinofos_Init(Actor* thisx, GlobalContext* globalCtx) {
ColliderJntSphElementDim* dim;
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, func_800B42F8, 90.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFeet, 90.0f);
Effect_Add(globalCtx, &this->unk_2A0, EFFECT_BLURE2, 0, 0, &D_8089E368);
Collider_InitAndSetJntSph(globalCtx, &this->colliderJntSph, &this->actor, &sJntSphInit,
this->colliderJntSphElement);
@@ -353,7 +353,7 @@ s32 func_8089A968(EnDinofos* this) {
void func_8089A9B0(EnDinofos* this, GlobalContext* globalCtx) {
if (func_8089A968(this)) {
if (this->actor.xzDistToPlayer < 100.0f) {
if (!func_800BC5EC(globalCtx, &this->actor) &&
if (!Actor_OtherIsTargeted(globalCtx, &this->actor) &&
(((this->actionFunc != func_8089C56C) && (Rand_ZeroOne() > 0.35f)) ||
((this->actionFunc == func_8089C56C) && (Rand_ZeroOne() > 0.8f)))) {
func_8089C4F8(this);
@@ -400,7 +400,7 @@ void func_8089AC70(EnDinofos* this) {
this->unk_2B0 = 1.0f;
this->unk_290 = 80;
this->actor.flags &= ~0x400;
func_800BCB70(&this->actor, 0x4000, 255, 0, 80);
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 80);
}
void func_8089ACEC(EnDinofos* this, GlobalContext* globalCtx) {
@@ -408,7 +408,7 @@ void func_8089ACEC(EnDinofos* this, GlobalContext* globalCtx) {
this->unk_28A = 0;
this->colliderJntSph.base.colType = COLTYPE_HIT0;
this->unk_2B0 = 0.0f;
func_800BF7CC(globalCtx, &this->actor, this->unk_2D4, 12, 2, 0.3f, 0.2f);
Actor_SpawnIceEffects(globalCtx, &this->actor, this->unk_2D4, 12, 2, 0.3f, 0.2f);
this->actor.flags |= 0x400;
}
}
@@ -436,7 +436,7 @@ s32 func_8089AE00(EnDinofos* this, GlobalContext* globalCtx) {
temp_v1 = (Actor_YawBetweenActors(&this->actor, temp_v0) - this->actor.shape.rot.y) - this->unk_28E;
if (ABS_ALT(temp_v1) < 0x3000) {
func_8089D11C(this, temp_v1 + this->unk_28E);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_WARAU);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_RIZA_WARAU);
return true;
}
}
@@ -446,7 +446,7 @@ s32 func_8089AE00(EnDinofos* this, GlobalContext* globalCtx) {
temp_v1_2 = (Actor_YawBetweenActors(&this->actor, temp_v0) - this->actor.shape.rot.y) - this->unk_28E;
if (ABS_ALT(temp_v1_2) < 0x3000) {
func_8089C024(this, 1);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_WARAU);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_RIZA_WARAU);
return true;
}
}
@@ -457,13 +457,13 @@ s32 func_8089AE00(EnDinofos* this, GlobalContext* globalCtx) {
}
if ((this->actor.xzDistToPlayer < 100.0f) && (player->swordState != 0) && this->actor.isTargeted &&
(Rand_ZeroOne() < 0.5f) && func_8089A968(this) && Actor_IsLinkFacingActor(&this->actor, 0x2000, globalCtx)) {
(Rand_ZeroOne() < 0.5f) && func_8089A968(this) && Player_IsFacingActor(&this->actor, 0x2000, globalCtx)) {
if (Rand_ZeroOne() < 0.5f) {
func_8089C024(this, 2);
} else {
func_8089C024(this, 3);
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_WARAU);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_RIZA_WARAU);
return true;
}
@@ -485,7 +485,7 @@ void func_8089B100(EnDinofos* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_06001CCC, 1.0f, Animation_GetLastFrame(&D_06001CCC),
Animation_GetLastFrame(&D_06001CCC), 2, 0.0f);
func_800BE33C(&camera->eye, &camera->at, &this->unk_29A, 1);
func_800BE33C(&camera->eye, &camera->at, &this->unk_29A, true);
Math_Vec3f_Diff(&this->actor.world.pos, &player->actor.world.pos, &sp3C);
this->unk_2BC.x = player->actor.world.pos.x + (0.4f * sp3C.x);
this->unk_2BC.y = player->actor.world.pos.y + 5.0f;
@@ -513,7 +513,7 @@ void func_8089B288(EnDinofos* this, GlobalContext* globalCtx) {
void func_8089B320(EnDinofos* this) {
this->actor.gravity = -2.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_CRY);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_RIZA_CRY);
this->unk_2BC.x = (Math_SinS(this->actor.shape.rot.y - 0x0E00) * 86.0f) + this->actor.world.pos.x;
this->unk_2BC.y = this->actor.floorHeight + 6.0f;
this->unk_2BC.z = (Math_CosS(this->actor.shape.rot.y - 0x0E00) * 86.0f) + this->actor.world.pos.z;
@@ -553,7 +553,7 @@ void func_8089B4A4(EnDinofos* this) {
this->unk_2BC.x = (Math_SinS(this->actor.shape.rot.y + 0x200) * 123.0f) + this->actor.world.pos.x;
this->unk_2BC.y = this->actor.floorHeight + 11.0f;
this->unk_2BC.z = (Math_CosS(this->actor.shape.rot.y + 0x200) * 123.0f) + this->actor.world.pos.z;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BOMCHU_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_BOMCHU_WALK);
this->unk_290 = 0;
this->unk_292 = -1;
this->actionFunc = func_8089B580;
@@ -595,7 +595,7 @@ void func_8089B6E8(EnDinofos* this) {
void func_8089B72C(EnDinofos* this, GlobalContext* globalCtx) {
if (Animation_OnFrame(&this->skelAnime, 2.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_ATTACK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_RIZA_ATTACK);
}
if (SkelAnime_Update(&this->skelAnime)) {
@@ -636,7 +636,7 @@ void func_8089B8B0(EnDinofos* this, GlobalContext* globalCtx) {
if (this->actionFunc != func_8089B98C) {
Animation_MorphToLoop(&this->skelAnime, &D_06000580, -4.0f);
if (func_800BC5EC(globalCtx, &this->actor)) {
if (Actor_OtherIsTargeted(globalCtx, &this->actor)) {
phi_f0 = 170.0f;
} else {
phi_f0 = 70.0f;
@@ -658,7 +658,7 @@ void func_8089B98C(EnDinofos* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
if (!func_8089AE00(this, globalCtx)) {
if (func_800BC5EC(globalCtx, &this->actor)) {
if (Actor_OtherIsTargeted(globalCtx, &this->actor)) {
phi_f0 = 170.0f;
} else {
phi_f0 = 70.0f;
@@ -683,7 +683,7 @@ void func_8089B98C(EnDinofos* this, GlobalContext* globalCtx) {
}
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 6.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_RIZA_WALK);
}
}
}
@@ -782,7 +782,7 @@ void func_8089BD28(EnDinofos* this, GlobalContext* globalCtx) {
}
this->actor.world.rot.y = BINANG_ADD(this->actor.shape.rot.y, 0x4000);
if (func_800BC5EC(globalCtx, &this->actor)) {
if (Actor_OtherIsTargeted(globalCtx, &this->actor)) {
sp2C = 100.0f;
}
@@ -804,7 +804,7 @@ void func_8089BD28(EnDinofos* this, GlobalContext* globalCtx) {
}
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 5.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_RIZA_WALK);
}
}
}
@@ -853,7 +853,7 @@ void func_8089C164(EnDinofos* this) {
}
this->actor.bgCheckFlags &= ~1;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_JUMP);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_RIZA_JUMP);
this->actionFunc = func_8089C1F8;
}
@@ -868,7 +868,7 @@ void func_8089C244(EnDinofos* this) {
this->actor.bgCheckFlags &= ~1;
this->actor.speedXZ = 8.0f;
this->actor.velocity.y = 16.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_JUMP);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_RIZA_JUMP);
this->unk_290 = 0;
this->unk_292 = -1;
this->actionFunc = func_8089C2A8;
@@ -905,7 +905,7 @@ void func_8089C398(EnDinofos* this) {
this->actor.speedXZ = 0.0f;
func_8089AD70(this);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BOMCHU_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_BOMCHU_WALK);
this->actionFunc = func_8089C44C;
}
@@ -923,7 +923,7 @@ void func_8089C44C(EnDinofos* this, GlobalContext* globalCtx) {
void func_8089C4F8(EnDinofos* this) {
Animation_PlayOnce(&this->skelAnime, &D_060025B4);
this->colliderQuad.base.atFlags &= ~AT_BOUNCED;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_CRY);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_RIZA_CRY);
this->unk_290 = 0;
this->unk_292 = -1;
this->actor.speedXZ = 0.0f;
@@ -945,7 +945,7 @@ void func_8089C56C(EnDinofos* this, GlobalContext* globalCtx) {
} else if (Animation_OnFrame(&this->skelAnime, 13.0f)) {
this->colliderQuad.base.atFlags &= ~AT_ON;
} else if (Animation_OnFrame(&this->skelAnime, 11.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_ATTACK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_RIZA_ATTACK);
} else if (this->skelAnime.curFrame < 7.0f) {
func_8089AE00(this, globalCtx);
}
@@ -1010,9 +1010,9 @@ void func_8089C87C(EnDinofos* this, s32 arg1) {
this->actor.velocity.y = 0.0f;
}
this->unk_28E = 0;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_DAMAGE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_RIZA_DAMAGE);
this->colliderJntSph.base.acFlags &= ~AC_ON;
func_800BCB70(&this->actor, 0x4000, 255, 0, 18);
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 18);
this->actionFunc = func_8089C938;
}
@@ -1145,7 +1145,7 @@ void func_8089CF70(EnDinofos* this, GlobalContext* globalCtx) {
void func_8089CFAC(EnDinofos* this) {
Animation_PlayOnce(&this->skelAnime, &D_0600ABD0);
this->actor.flags &= ~1;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_DEAD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_RIZA_DEAD);
this->actor.speedXZ = 0.0f;
this->actor.world.rot.y = this->actor.shape.rot.y;
this->actionFunc = func_8089D018;
@@ -1173,7 +1173,7 @@ void func_8089D018(EnDinofos* this, GlobalContext* globalCtx) {
this->actor.shape.shadowAlpha = this->unk_288;
} else if (Animation_OnFrame(&this->skelAnime, 26.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_DOWN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_GERUDOFT_DOWN);
}
}
@@ -1206,7 +1206,7 @@ void func_8089D1E0(EnDinofos* this, GlobalContext* globalCtx) {
}
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 5.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_RIZA_WALK);
}
}
@@ -1263,7 +1263,7 @@ s32 func_8089D60C(EnDinofos* this, GlobalContext* globalCtx) {
if (this->colliderJntSph.base.acFlags & AC_HIT) {
this->colliderJntSph.base.acFlags &= ~AC_HIT;
func_800BE2B8(&this->actor, &this->colliderJntSph);
Actor_SetDropFlagJntSph(&this->actor, &this->colliderJntSph);
for (i = 0; i < ARRAY_COUNT(this->colliderJntSphElement); i++) {
if (this->colliderJntSph.elements[i].info.bumperFlags & BUMP_HIT) {
@@ -1317,19 +1317,19 @@ s32 func_8089D60C(EnDinofos* this, GlobalContext* globalCtx) {
if (this->actor.colChkInfo.damageEffect == 1) {
this->unk_290 = 40;
func_800BCB70(&this->actor, 0, 255, 0, 40);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_COMMON_FREEZE);
Actor_SetColorFilter(&this->actor, 0, 255, 0, 40);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_COMMON_FREEZE);
func_8089C784(this);
return true;
}
if (this->actor.colChkInfo.damageEffect == 5) {
this->unk_290 = 40;
func_800BCB70(&this->actor, 0, 255, 0, 40);
Actor_SetColorFilter(&this->actor, 0, 255, 0, 40);
this->unk_2B4 = 0.55f;
this->unk_2B0 = 2.0f;
this->unk_28A = 31;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_COMMON_FREEZE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_COMMON_FREEZE);
func_8089C784(this);
return true;
}
@@ -1369,7 +1369,7 @@ void EnDinofos_Update(Actor* thisx, GlobalContext* globalCtx2) {
}
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 25.0f, 30.0f, 60.0f, 0x5D);
if (this->actionFunc != func_8089C7B8) {
if ((this->actor.depthInWater > 0.0f) && (this->actor.depthInWater < 10.0f)) {
+3 -3
View File
@@ -265,7 +265,7 @@ void EnDnk_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
SkelAnime_Update(&this->skelAnime);
func_80A515C4(this);
Actor_SetHeight(&this->actor, 34.0f);
Actor_SetFocus(&this->actor, 34.0f);
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
@@ -436,11 +436,11 @@ void func_80A52074(EnDnk* this, GlobalContext* globalCtx) {
break;
case 438:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEKNUTS_DANCE_BIG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DEKNUTS_DANCE_BIG);
break;
case 493:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKIDS_APPEAR);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_APPEAR);
break;
}
+20 -18
View File
@@ -137,8 +137,8 @@ void func_80A714B4(EnDno* this, GlobalContext* globalCtx) {
do {
actor = SubS_FindActor(globalCtx, actor, ACTORCAT_BG, ACTOR_BG_CRACE_MOVEBG);
if (actor != NULL) {
if ((s32)ENDNO_GET_F(actor) == ENDNO_GET_F_1) {
Actor_SetSwitchFlag(globalCtx, ENDNO_GET_7F0(actor));
if (ENDNO_GET_F(actor) == ENDNO_GET_F_1) {
Flags_SetSwitch(globalCtx, ENDNO_GET_7F0(actor));
}
actor = actor->next;
}
@@ -189,7 +189,7 @@ void func_80A71788(EnDno* this, GlobalContext* globalCtx) {
do {
actor = SubS_FindActor(globalCtx, actor, ACTORCAT_BG, ACTOR_BG_CRACE_MOVEBG);
if (actor != NULL) {
Actor_UnsetSwitchFlag(globalCtx, ENDNO_GET_7F0(actor));
Flags_UnsetSwitch(globalCtx, ENDNO_GET_7F0(actor));
actor = actor->next;
}
} while (actor != NULL);
@@ -212,7 +212,7 @@ void EnDno_Init(Actor* thisx, GlobalContext* globalCtx) {
if (actor == NULL) {
Actor_ProcessInitChain(thisx, sInitChain);
ActorShape_Init(&thisx->shape, 0.0f, func_800B3FC0, 21.0f);
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 21.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600E1F8, &D_06007CA4, this->jointTable,
this->morphTable, 28);
Collider_InitCylinder(globalCtx, &this->collider);
@@ -339,7 +339,7 @@ void func_80A71C3C(EnDno* this, GlobalContext* globalCtx) {
Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 0x222);
}
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
globalCtx->msgCtx.unk11F22 = 0;
globalCtx->msgCtx.unk11F10 = 0;
func_80A71E54(this, globalCtx);
@@ -374,7 +374,7 @@ void func_80A71E54(EnDno* this, GlobalContext* globalCtx) {
void func_80A71F18(EnDno* this, GlobalContext* globalCtx) {
Math_ScaledStepToS(&this->unk_466, 0, 0x16C);
switch (func_80152498(&globalCtx->msgCtx)) {
switch (Message_GetState(&globalCtx->msgCtx)) {
case 0:
if (!(this->unk_3B0 & 0x10) ||
Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0xE38)) {
@@ -528,7 +528,7 @@ void func_80A724B8(EnDno* this, GlobalContext* globalCtx) {
func_80A71424(&this->unk_466, 0, this->actor.yawTowardsPlayer, this->actor.home.rot.y, 0x2000, 0x2D8);
}
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_80A725E0(this, globalCtx);
} else if (this->actor.xzDistToPlayer < 60.0f) {
func_800B8614(&this->actor, globalCtx, 60.0f);
@@ -536,11 +536,11 @@ void func_80A724B8(EnDno* this, GlobalContext* globalCtx) {
}
void func_80A7256C(EnDno* this, GlobalContext* globalCtx) {
func_800B8500(&this->actor, globalCtx, this->actor.xzDistToPlayer, this->actor.playerHeightRel, -1);
func_800B8500(&this->actor, globalCtx, this->actor.xzDistToPlayer, this->actor.playerHeightRel, EXCH_ITEM_MINUS1);
}
void func_80A72598(EnDno* this, GlobalContext* globalCtx) {
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_80A725E0(this, globalCtx);
} else {
func_80A7256C(this, globalCtx);
@@ -555,7 +555,7 @@ void func_80A725F8(EnDno* this, GlobalContext* globalCtx) {
s32 pad[2];
func_80A71424(&this->unk_466, 0, 0, 0, 0x2000, 0x16C);
switch (func_80152498(&globalCtx->msgCtx)) {
switch (Message_GetState(&globalCtx->msgCtx)) {
case 0:
switch (this->unk_328) {
case 0:
@@ -597,7 +597,7 @@ void func_80A725F8(EnDno* this, GlobalContext* globalCtx) {
if (this->skelAnime.curFrame <= 23.0f) {
this->unk_452 = 3;
if (Animation_OnFrame(&this->skelAnime, 23.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_OPEN_AMBRELLA);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_OPEN_AMBRELLA);
}
} else if (this->skelAnime.curFrame <= 24.0f) {
this->unk_452 = 4;
@@ -633,7 +633,7 @@ void func_80A725F8(EnDno* this, GlobalContext* globalCtx) {
} else {
this->unk_458 = GI_MASK_SCENTS;
}
func_800B8A1C(&this->actor, globalCtx, this->unk_458, 60.0f, 60.0f);
Actor_PickUp(&this->actor, globalCtx, this->unk_458, 60.0f, 60.0f);
func_801477B4(globalCtx);
func_80A72B84(this, globalCtx);
}
@@ -697,7 +697,7 @@ void func_80A72BA4(EnDno* this, GlobalContext* globalCtx) {
this->actor.parent = NULL;
this->actionFunc = func_80A72598;
} else {
func_800B8A1C(&this->actor, globalCtx, this->unk_458, 60.0f, 60.0f);
Actor_PickUp(&this->actor, globalCtx, this->unk_458, 60.0f, 60.0f);
}
}
@@ -709,9 +709,11 @@ void func_80A72C04(EnDno* this, GlobalContext* globalCtx) {
func_8013DCE0(globalCtx, &this->unk_334, &this->actor, &this->unk_340, globalCtx->setupPathList,
ENDNO_GET_7F(&this->actor), 1, 0, 1, 0);
func_8013DF3C(globalCtx, &this->unk_340);
this->actor.world.rot.y = this->unk_340.unk_54.y;
this->actor.world.rot.x = this->unk_340.unk_54.x;
Actor_SetSwitchFlag(globalCtx, ENDNO_GET_3F80(&this->actor));
Flags_SetSwitch(globalCtx, ENDNO_GET_3F80(&this->actor));
this->actionFunc = func_80A730A0;
}
@@ -831,7 +833,7 @@ void func_80A73244(EnDno* this, GlobalContext* globalCtx) {
this->actor.flags |= (8 | 1);
this->unk_328 = 2;
this->actor.speedXZ = 0.0f;
Actor_UnsetSwitchFlag(globalCtx, ENDNO_GET_3F80(&this->actor));
Flags_UnsetSwitch(globalCtx, ENDNO_GET_3F80(&this->actor));
gSaveContext.unk_3DD0[1] = 5;
this->unk_44E = 0;
this->actionFunc = func_80A732C8;
@@ -856,14 +858,14 @@ void func_80A732C8(EnDno* this, GlobalContext* globalCtx) {
}
if (Animation_OnFrame(&this->skelAnime, 4.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_CLOSE_AMBRELLA);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_CLOSE_AMBRELLA);
this->unk_452 = 4;
} else if (Animation_OnFrame(&this->skelAnime, 5.0f)) {
this->unk_452 = 3;
}
}
}
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
void func_80A73408(EnDno* this, GlobalContext* globalCtx) {
@@ -914,7 +916,7 @@ void EnDno_Update(Actor* thisx, GlobalContext* globalCtx) {
}
Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
Actor_SetHeight(&this->actor, 51.0f);
Actor_SetFocus(&this->actor, 51.0f);
}
void EnDno_Draw(Actor* thisx, GlobalContext* globalCtx) {
+18 -18
View File
@@ -104,37 +104,37 @@ s32 func_80B3CA20(EnDnp* this) {
if ((this->unk_340 == 2) || (this->unk_340 == 9)) {
if (Animation_OnFrame(&this->skelAnime, 1.0f) || Animation_OnFrame(&this->skelAnime, 5.0f) ||
Animation_OnFrame(&this->skelAnime, 9.0f) || Animation_OnFrame(&this->skelAnime, 13.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEKUHIME_TURN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DEKUHIME_TURN);
}
} else if ((this->unk_340 == 24) || (this->unk_340 == 7)) {
if (Animation_OnFrame(&this->skelAnime, 1.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEKUHIME_TURN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DEKUHIME_TURN);
}
} else if (this->unk_340 == 14) {
if (Animation_OnFrame(&this->skelAnime, 7.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEKUHIME_GREET);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DEKUHIME_GREET);
}
if (Animation_OnFrame(&this->skelAnime, 22.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEKUHIME_GREET2);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DEKUHIME_GREET2);
}
} else if (this->unk_340 == 8) {
if (Animation_OnFrame(&this->skelAnime, 9.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEKUHIME_GREET);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DEKUHIME_GREET);
}
if (Animation_OnFrame(&this->skelAnime, 18.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEKUHIME_GREET2);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DEKUHIME_GREET2);
}
} else if ((this->unk_340 == 17) && (this->unk_340 == 18)) {
if (Animation_OnFrame(&this->skelAnime, 7.0f) || Animation_OnFrame(&this->skelAnime, 15.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEKUHIME_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DEKUHIME_WALK);
}
} else if (this->unk_340 == 21) {
if (Animation_OnFrame(&this->skelAnime, 17.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEKUHIME_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DEKUHIME_WALK);
}
} else if (this->unk_340 == 23) {
if (Animation_OnFrame(&this->skelAnime, 3.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEKUHIME_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DEKUHIME_WALK);
}
}
@@ -212,7 +212,7 @@ s32 func_80B3CEC0(EnDnp* this, GlobalContext* globalCtx) {
s32 func_80B3CF60(EnDnp* this, GlobalContext* globalCtx) {
s32 ret = false;
if ((this->unk_322 & 7) && func_800B84D0(&this->actor, globalCtx)) {
if ((this->unk_322 & 7) && Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_8013AED4(&this->unk_322, 0, 7);
this->unk_322 |= 8;
this->actionFunc = func_80B3D3F8;
@@ -276,7 +276,7 @@ void func_80B3D11C(EnDnp* this, GlobalContext* globalCtx) {
}
if (this->unk_340 == 19) {
Audio_PlayActorSound2(&this->actor, NA_SE_VO_DHVO04);
Actor_PlaySfxAtPos(&this->actor, NA_SE_VO_DHVO04);
}
if (this->unk_340 == 24) {
@@ -307,15 +307,15 @@ void func_80B3D2D4(EnDnp* this, GlobalContext* globalCtx) {
void func_80B3D338(EnDnp* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
if ((this->unk_32E != 0) && (func_80152498(&globalCtx->msgCtx) == 2)) {
if ((this->unk_32E != 0) && (Message_GetState(&globalCtx->msgCtx) == 2)) {
Actor_MarkForDeath(&this->actor);
} else if (this->unk_32E == 0) {
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
this->unk_32E = 1;
} else {
this->actor.textId = 0x971;
player->actor.textId = this->actor.textId;
func_800B8500(&this->actor, globalCtx, 9999.9f, 9999.9f, -1);
func_800B8500(&this->actor, globalCtx, 9999.9f, 9999.9f, EXCH_ITEM_MINUS1);
}
}
}
@@ -357,7 +357,7 @@ void func_80B3D558(EnDnp* this, GlobalContext* globalCtx) {
void EnDnp_Init(Actor* thisx, GlobalContext* globalCtx) {
EnDnp* this = THIS;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 16.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 16.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06010D60, NULL, this->jointTable, this->morphTable, 26);
this->unk_340 = -1;
func_80B3CC38(this, 15);
@@ -413,15 +413,15 @@ void EnDnp_Update(Actor* thisx, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
func_80B3CD1C(this);
func_80B3CEC0(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 30.0f, 12.0f, 0.0f, 4);
sp2C = this->collider.dim.radius + 50;
sp28 = this->collider.dim.height + 30;
if ((this->unk_322 & 0x400) && !(gSaveContext.weekEventReg[23] & 0x20)) {
func_800B8A1C(&this->actor, globalCtx, GI_MAX, sp2C, sp28);
Actor_PickUp(&this->actor, globalCtx, GI_MAX, sp2C, sp28);
}
func_8013C964(&this->actor, globalCtx, sp2C, sp28, 0, this->unk_322 & 7);
Actor_SetHeight(&this->actor, 30.0f);
Actor_SetFocus(&this->actor, 30.0f);
func_80B3CC80(this, globalCtx);
}
+4 -4
View File
@@ -324,7 +324,7 @@ s32* func_80A52CF8(EnDnq* this, GlobalContext* globalCtx) {
s32 func_80A52D44(EnDnq* this, GlobalContext* globalCtx) {
s32 ret = false;
if ((this->unk_37C & 7) && func_800B84D0(&this->actor, globalCtx)) {
if ((this->unk_37C & 7) && Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_8013AED4(&this->unk_37C, 0, 7);
this->unk_380 = func_80A52CF8(this, globalCtx);
this->actionFunc = func_80A52FB8;
@@ -347,7 +347,7 @@ void func_80A52DC8(EnDnq* this, GlobalContext* globalCtx) {
if (!(gSaveContext.weekEventReg[23] & 0x20)) {
this->unk_390 = 70.0f;
if (func_80114F2C(ITEM_DEKU_PRINCESS) && !func_801690CC(globalCtx) &&
(func_80152498(&globalCtx->msgCtx) == 0) && (ActorCutscene_GetCurrentIndex() == -1)) {
(Message_GetState(&globalCtx->msgCtx) == 0) && (ActorCutscene_GetCurrentIndex() == -1)) {
if ((DECR(this->unk_384) == 0) && (gSaveContext.weekEventReg[29] & 0x40)) {
func_801518B0(globalCtx, 0x969, NULL);
this->unk_384 = 200;
@@ -404,7 +404,7 @@ void func_80A53038(EnDnq* this, GlobalContext* globalCtx) {
}
if ((this->unk_398 == 4) && Animation_OnFrame(&this->skelAnime, 2.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_KINGNUTS_DAMAGE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_KINGNUTS_DAMAGE);
}
if (((this->unk_398 == 3) || (this->unk_398 == 6)) &&
@@ -461,7 +461,7 @@ void EnDnq_Update(Actor* thisx, GlobalContext* globalCtx) {
func_8013C964(&this->actor, globalCtx, this->unk_390, fabsf(this->actor.playerHeightRel) + 1.0f, 0,
this->unk_37C & 7);
this->actor.xzDistToPlayer = this->unk_394;
Actor_SetHeight(&this->actor, 46.0f);
Actor_SetFocus(&this->actor, 46.0f);
func_80A52604(this, globalCtx);
}
}
+8 -8
View File
@@ -85,7 +85,7 @@ void func_8092C5C0(EnDns* this) {
if (((this->unk_2F8 == 2) || (this->unk_2F8 == 3) || (this->unk_2F8 == 6) || (this->unk_2F8 == 7)) &&
(Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 3.0f))) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_WALK);
}
}
@@ -220,7 +220,7 @@ s32 func_8092CAD0(EnDns* this, GlobalContext* globalCtx) {
s32 ret = false;
if (this->unk_2C6 & 7) {
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_8013AED4(&this->unk_2C6, 0, 7);
this->unk_2C6 &= ~0x10;
if (ENDNS_GET_4000(&this->actor)) {
@@ -292,7 +292,7 @@ s32 func_8092CCEC(EnDns* this, GlobalContext* globalCtx) {
this->unk_2D8 = (Rand_ZeroOne() * 182.0f) + 182.0f;
this->unk_2D8 = (sp2E > 0) ? this->unk_2D8 : -this->unk_2D8;
this->unk_2D0 = 0x28;
this->actor.shape.shadowDraw = func_800B3FC0;
this->actor.shape.shadowDraw = ActorShadow_DrawCircle;
return 1;
}
@@ -308,7 +308,7 @@ s32 func_8092CE38(EnDns* this) {
this->unk_2C6 &= ~0x200;
this->skelAnime.curFrame = 0.0f;
if (this->unk_2D2 == 2) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_JUMP);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_JUMP);
}
this->unk_2D2++;
if (this->unk_2D2 >= 3) {
@@ -321,7 +321,7 @@ s32 func_8092CE38(EnDns* this) {
this->actor.world.rot.y = BINANG_ROT180(this->actor.world.rot.y);
this->unk_2E4 = 0.0f;
this->actor.shape.rot.y = this->actor.world.rot.y;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_JUMP);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_JUMP);
} else if (this->skelAnime.curFrame < 13.0f) {
frame = this->skelAnime.curFrame;
this->actor.shape.rot.y = this->actor.world.rot.y;
@@ -332,7 +332,7 @@ s32 func_8092CE38(EnDns* this) {
} else {
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 6.0f) ||
Animation_OnFrame(&this->skelAnime, 13.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_WALK);
}
if (this->skelAnime.curFrame > 7.0f) {
@@ -426,7 +426,7 @@ void func_8092D330(EnDns* this, GlobalContext* globalCtx) {
sp30.x = Math_SinS(this->unk_2D4) * this->unk_2EC;
sp30.z = Math_CosS(this->unk_2D4) * this->unk_2EC;
Math_ApproachS(&this->actor.shape.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &sp30), 3, 0x2AA8);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
if ((this->unk_2C6 & 0x100) && (DECR(this->unk_2D0) == 0)) {
this->unk_2C6 &= ~0x100;
@@ -538,7 +538,7 @@ void EnDns_Update(Actor* thisx, GlobalContext* globalCtx) {
func_8092C86C(this, globalCtx);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 30.0f, 12.0f, 0.0f, 4);
func_8013C964(&this->actor, globalCtx, 80.0f, 40.0f, 0, this->unk_2C6 & 7);
Actor_SetHeight(&this->actor, 34.0f);
Actor_SetFocus(&this->actor, 34.0f);
func_8092C6FC(this, globalCtx);
func_8092C5C0(this);
}
@@ -303,7 +303,7 @@ void EnDodongo_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_330.g = 10;
this->unk_330.a = 200;
Math_Vec3f_Copy(&this->unk_314, &D_801C5DB0);
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 48.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 48.0f);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_06008318, &D_06004C20, this->jointTable, this->morphTable, 31);
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
Collider_InitAndSetJntSph(globalCtx, &this->collider2, &this->actor, &sJntSphInit2, this->collider2Elements);
@@ -429,7 +429,7 @@ void func_80876CAC(EnDodongo* this) {
this->unk_33C = 1.0f;
this->timer = 80;
this->actor.flags &= ~0x400;
func_800BCB70(&this->actor, 0x4000, 0xFF, 0, 80);
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 80);
}
void func_80876D28(EnDodongo* this, GlobalContext* globalCtx) {
@@ -439,7 +439,8 @@ void func_80876D28(EnDodongo* this, GlobalContext* globalCtx) {
this->unk_300 = 0;
this->collider1.base.colType = COLTYPE_HIT0;
this->unk_33C = 0.0f;
func_800BF7CC(globalCtx, &this->actor, &this->unk_348[0], 9, 2, this->unk_334 * 0.3f, this->unk_334 * 0.2f);
Actor_SpawnIceEffects(globalCtx, &this->actor, &this->unk_348[0], 9, 2, this->unk_334 * 0.3f,
this->unk_334 * 0.2f);
this->actor.flags |= 0x400;
}
}
@@ -522,13 +523,13 @@ s32 func_8087721C(EnDodongo* this) {
s32 func_80877278(EnDodongo* this, GlobalContext* globalCtx) {
Player* player = GET_PLAYER(globalCtx);
Actor* explosive = globalCtx->actorCtx.actorList[ACTORCAT_EXPLOSIVES].first;
Actor* explosive = globalCtx->actorCtx.actorLists[ACTORCAT_EXPLOSIVES].first;
Vec3f sp44;
// Bugfix from OoT
while (explosive != NULL) {
if (!explosive->params && (explosive->parent == NULL) && (explosive->update != NULL) &&
(explosive != player->unk_388) &&
(explosive != player->interactRangeActor) &&
(((explosive->id == ACTOR_EN_BOM) && (((EnBom*)explosive)->timer > 0)) ||
((explosive->id == ACTOR_EN_BOMBF) && (((EnBombf*)explosive)->timer > 0)))) {
Math_Vec3f_Diff(&explosive->world.pos, &this->unk_308, &sp44);
@@ -577,13 +578,13 @@ void func_80877500(EnDodongo* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
if (Animation_OnFrame(&this->skelAnime, 19.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_J_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DODO_J_WALK);
sp30.x = this->collider1Elements[2].dim.worldSphere.center.x;
sp30.y = this->collider1Elements[2].dim.worldSphere.center.y;
sp30.z = this->collider1Elements[2].dim.worldSphere.center.z;
func_80876930(this, globalCtx, &sp30);
} else if (Animation_OnFrame(&this->skelAnime, 39.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_J_WALK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DODO_J_WALK);
sp30.x = this->collider1Elements[1].dim.worldSphere.center.x;
sp30.y = this->collider1Elements[1].dim.worldSphere.center.y;
sp30.z = this->collider1Elements[1].dim.worldSphere.center.z;
@@ -649,7 +650,7 @@ void func_8087784C(EnDodongo* this, GlobalContext* globalCtx) {
f32 temp_f12;
if (Animation_OnFrame(&this->skelAnime, 24.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_J_CRY);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DODO_J_CRY);
}
if (func_8087721C(this)) {
@@ -713,7 +714,7 @@ void func_80877E60(EnDodongo* this, GlobalContext* globalCtx) {
Vec3f sp84;
Vec3f sp78;
s16 i;
Actor* explosive = globalCtx->actorCtx.actorList[ACTORCAT_EXPLOSIVES].first;
Actor* explosive = globalCtx->actorCtx.actorLists[ACTORCAT_EXPLOSIVES].first;
Vec3f sp64;
s32 pad;
s16 sp5E;
@@ -736,7 +737,7 @@ void func_80877E60(EnDodongo* this, GlobalContext* globalCtx) {
}
if (Animation_OnFrame(&this->skelAnime, 28.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_J_EAT);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DODO_J_EAT);
if (this->actor.child != NULL) {
Actor_MarkForDeath(this->actor.child);
this->actor.child = NULL;
@@ -759,14 +760,14 @@ void func_80877E60(EnDodongo* this, GlobalContext* globalCtx) {
this->unk_334 * 10.0f, 10);
}
Audio_PlayActorSound2(&this->actor, NA_SE_IT_BOMB_EXPLOSION);
Actor_PlaySfxAtPos(&this->actor, NA_SE_IT_BOMB_EXPLOSION);
if (this->actor.colChkInfo.health <= 4) {
this->actor.colChkInfo.health = 0;
Enemy_StartFinishingBlow(globalCtx, &this->actor);
} else {
this->actor.colChkInfo.health -= 4;
}
func_800BCB70(&this->actor, 0x4000, 0x78, 0, 8);
Actor_SetColorFilter(&this->actor, 0x4000, 0x78, 0, 8);
}
} else if (Animation_OnFrame(&this->skelAnime, 24.0f)) {
this->timer--;
@@ -818,7 +819,7 @@ void func_80878354(EnDodongo* this) {
sp18 = &D_06003B14;
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_J_TAIL);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DODO_J_TAIL);
Animation_PlayOnceSetSpeed(&this->skelAnime, sp18, 2.0f);
this->timer = 0;
this->collider1.base.atFlags |= AT_ON;
@@ -879,11 +880,11 @@ void func_808785B0(EnDodongo* this, GlobalContext* globalCtx) {
void func_8087864C(EnDodongo* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06001A44, -4.0f);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_J_DAMAGE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DODO_J_DAMAGE);
this->timer = 0;
this->unk_304 = 0;
this->actor.speedXZ = 0.0f;
func_800BCB70(&this->actor, 0x4000, 0xFF, 0, 8);
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8);
this->actionFunc = func_808786C8;
}
@@ -901,10 +902,10 @@ void func_80878724(EnDodongo* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_060013C4, -8.0f);
this->timer = 0;
this->unk_304 = 0;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_J_DEAD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DODO_J_DEAD);
this->actor.flags &= ~1;
this->actor.speedXZ = 0.0f;
func_800BCB70(&this->actor, 0x4000, 0xFF, 0, 8);
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8);
this->actionFunc = func_808787B0;
}
@@ -916,7 +917,7 @@ void func_808787B0(EnDodongo* this, GlobalContext* globalCtx) {
func_80876DC4(this, globalCtx);
}
} else if (this->actor.colorFilterTimer == 0) {
func_800BCB70(&this->actor, 0x4000, 0x78, 0, 4);
Actor_SetColorFilter(&this->actor, 0x4000, 0x78, 0, 4);
}
if (SkelAnime_Update(&this->skelAnime)) {
@@ -929,7 +930,7 @@ void func_808787B0(EnDodongo* this, GlobalContext* globalCtx) {
this->timer = 8;
}
} else if (Animation_OnFrame(&this->skelAnime, 52.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_DOWN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_GERUDOFT_DOWN);
}
if (this->timer != 0) {
@@ -974,7 +975,7 @@ void EnDodongo_UpdateDamage(EnDodongo* this, GlobalContext* globalCtx) {
} else if (this->collider1.base.acFlags & AC_HIT) {
this->collider2.base.acFlags &= ~AC_HIT;
this->collider1.base.acFlags &= ~AC_HIT;
func_800BE2B8(&this->actor, &this->collider1);
Actor_SetDropFlagJntSph(&this->actor, &this->collider1);
for (i = 0; i < ARRAY_COUNT(this->collider1Elements); i++) {
if (this->collider1.elements[i].info.bumperFlags & BUMP_HIT) {
@@ -1000,13 +1001,13 @@ void EnDodongo_UpdateDamage(EnDodongo* this, GlobalContext* globalCtx) {
}
} else if (this->actor.colChkInfo.damageEffect == 1) {
this->timer = 40;
func_800BCB70(&this->actor, 0, 0xFF, 0, 40);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_COMMON_FREEZE);
Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 40);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_COMMON_FREEZE);
func_80878594(this);
} else if (this->actor.colChkInfo.damageEffect == 5) {
this->timer = 40;
func_800BCB70(&this->actor, 0, 0xFF, 0, 40);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_COMMON_FREEZE);
Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 40);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_COMMON_FREEZE);
this->unk_300 = 30;
this->unk_340 = 0.75f;
this->unk_33C = 2.0f;
@@ -1029,10 +1030,10 @@ void EnDodongo_Update(Actor* thisx, GlobalContext* globalCtx2) {
EnDodongo_UpdateDamage(this, globalCtx);
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 75.0f, 60.0f, 70.0f, 0x1D);
if (this->actor.bgCheckFlags & 2) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_DOWN);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_GERUDOFT_DOWN);
}
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider1.base);
@@ -82,9 +82,9 @@ void EnDyExtra_Update(Actor* thisx, GlobalContext* globalCtx) {
EnDyExtra* this = THIS;
DECR(this->unk14C);
Audio_PlayActorSound2(&this->actor, NA_SE_PL_SPIRAL_HEAL_BEAM - SFX_FLAG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_PL_SPIRAL_HEAL_BEAM - SFX_FLAG);
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
void EnDyExtra_Draw(Actor* thisx, GlobalContext* globalCtx) {
+32 -32
View File
@@ -297,7 +297,7 @@ void func_8088CC48(EnElf* this, GlobalContext* globalCtx) {
func_8088CBAC(this, globalCtx);
this->unk_25C = 0;
this->disappearTimer = 240;
if ((this->fairyFlags & 0x400) && Actor_GetCollectibleFlag(globalCtx, this->unk_260)) {
if ((this->fairyFlags & 0x400) && Flags_GetCollectible(globalCtx, this->unk_260)) {
Actor_MarkForDeath(&this->actor);
}
}
@@ -386,7 +386,7 @@ void EnElf_Init(Actor* thisx, GlobalContext* globalCtx2) {
case 7:
this->fairyFlags |= 0x200;
thisx->shape.shadowDraw = func_800B4088;
thisx->shape.shadowDraw = ActorShadow_DrawWhiteCircle;
this->fairyFlags |= 0x100;
colorConfig = -1;
this->fairyFlags |= 0x800;
@@ -519,14 +519,14 @@ void func_8088D660(EnElf* this, Vec3f* targetPos, f32 arg2) {
func_8088D5A0(this, targetPos, arg2);
Math_StepToF(&this->actor.velocity.x, xVelTarget, 1.5f);
Math_StepToF(&this->actor.velocity.z, zVelTarget, 1.5f);
Actor_ApplyMovement(&this->actor);
Actor_UpdatePos(&this->actor);
}
void func_8088D7F8(EnElf* this, Vec3f* targetPos) {
func_8088D5A0(this, targetPos, 0.2f);
this->actor.velocity.x = 0.0f;
this->actor.velocity.z = 0.0f;
Actor_ApplyMovement(&this->actor);
Actor_UpdatePos(&this->actor);
this->actor.world.pos.x = targetPos->x + this->unk_224.x;
this->actor.world.pos.z = targetPos->z + this->unk_224.z;
}
@@ -535,7 +535,7 @@ void func_8088D864(EnElf* this, Vec3f* targetPos) {
func_8088D5A0(this, targetPos, 0.2f);
this->actor.velocity.z = 0.0f;
this->actor.velocity.x = 0.0f;
Actor_ApplyMovement(&this->actor);
Actor_UpdatePos(&this->actor);
this->actor.world.pos.x = targetPos->x + this->unk_224.x;
this->actor.world.pos.z = targetPos->z + this->unk_224.z;
}
@@ -590,7 +590,7 @@ void func_8088D9BC(EnElf* this, GlobalContext* globalCtx) {
}
this->actor.world.rot.y = this->unk_258;
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
void func_8088DB4C(EnElf* this, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4) {
@@ -616,7 +616,7 @@ void func_8088DB4C(EnElf* this, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4) {
Math_StepToF(&this->actor.velocity.x, xVelTarget, 5.0f);
Math_StepToF(&this->actor.velocity.z, zVelTarget, 5.0f);
Actor_ApplyMovement(&this->actor);
Actor_UpdatePos(&this->actor);
}
s32 func_8088DCA4(EnElf* this) {
@@ -656,13 +656,13 @@ void func_8088DD34(EnElf* this, GlobalContext* globalCtx) {
func_8088D9BC(this, globalCtx);
if (Actor_HasParent(&this->actor, globalCtx)) {
if (this->fairyFlags & 0x400) {
Actor_SetCollectibleFlag(globalCtx, this->unk_260);
Flags_SetCollectible(globalCtx, this->unk_260);
}
Actor_MarkForDeath(&this->actor);
return;
}
if (func_801233E4(globalCtx)) {
if (Player_InCsMode(&globalCtx->state)) {
if ((this->fairyFlags & 0x4000) && (this->fairyFlags & 0x100) && func_8088DCA4(this)) {
return;
}
@@ -686,7 +686,7 @@ void func_8088DD34(EnElf* this, GlobalContext* globalCtx) {
this->unk_246 = 0;
EnElf_SetupAction(this, func_8088E0F0);
if (this->fairyFlags & 0x400) {
Actor_SetCollectibleFlag(globalCtx, this->unk_260);
Flags_SetCollectible(globalCtx, this->unk_260);
}
return;
}
@@ -700,7 +700,7 @@ void func_8088DD34(EnElf* this, GlobalContext* globalCtx) {
}
if (this->fairyFlags & 0x2000) {
func_800B8A1C(&this->actor, globalCtx, 0xBA, 80.0f, 60.0f);
Actor_PickUp(&this->actor, globalCtx, 0xBA, 80.0f, 60.0f);
}
}
@@ -768,7 +768,7 @@ void func_8088E0F0(EnElf* this, GlobalContext* globalCtx) {
this->unk_258 = Math_FAtan2F(this->actor.velocity.z, this->actor.velocity.x);
func_8088F5F4(this, globalCtx, 32);
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG);
}
void func_8088E304(EnElf* this, GlobalContext* globalCtx) {
@@ -802,7 +802,7 @@ void func_8088E304(EnElf* this, GlobalContext* globalCtx) {
func_8088D7F8(this, &player->bodyPartsPos[0]);
this->unk_258 = Math_FAtan2F(this->actor.velocity.z, this->actor.velocity.x);
func_8088F5F4(this, globalCtx, 0x20);
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG);
}
void func_8088E484(EnElf* this, GlobalContext* globalCtx) {
@@ -827,7 +827,7 @@ void func_8088E484(EnElf* this, GlobalContext* globalCtx) {
Actor_SetScale(&this->actor, (1.0f - (SQ(this->unk_250) * SQ(1.0f / 9.0f))) * 0.008f);
this->unk_258 = Math_FAtan2F(this->actor.velocity.z, this->actor.velocity.x);
func_8088F5F4(this, globalCtx, 32);
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG);
}
void func_8088E5A8(EnElf* this, GlobalContext* globalCtx) {
@@ -907,12 +907,12 @@ void func_8088E850(EnElf* this, GlobalContext* globalCtx) {
(globalCtx->csCtx.unk_12 == 0) &&
((globalCtx->csCtx.frames == 0x95) || (globalCtx->csCtx.frames == 0x17D) ||
(globalCtx->csCtx.frames == 0x24F))) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH);
}
if ((globalCtx->sceneNum == SCENE_SECOM) && (gSaveContext.sceneSetupIndex == 0) &&
(globalCtx->csCtx.unk_12 == 4) && (globalCtx->csCtx.frames == 0x5F)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH);
}
} else {
this->actor.shape.rot.x = 0;
@@ -967,7 +967,7 @@ void func_8088E850(EnElf* this, GlobalContext* globalCtx) {
break;
default:
arrowPointedActor = globalCtx->actorCtx.targetContext.unk38;
arrowPointedActor = globalCtx->actorCtx.targetContext.arrowPointedActor;
if ((player->stateFlags1 & 0x40) && (player->targetActor != NULL)) {
Math_Vec3f_Copy(&nextPos, &player->targetActor->focus.pos);
} else {
@@ -995,7 +995,7 @@ void func_8088E850(EnElf* this, GlobalContext* globalCtx) {
if (distFromLinksHead > 100.0f) {
this->fairyFlags |= 2;
if (this->unk_269 == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BELL_DASH_NORMAL);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BELL_DASH_NORMAL);
}
this->unk_25C = 100;
}
@@ -1036,7 +1036,7 @@ void func_8088EF18(Color_RGBAf* dest, Color_RGBAf* newColor, Color_RGBAf* curCol
}
void func_8088EFA4(EnElf* this, GlobalContext* globalCtx) {
Actor* arrayPointerActor = globalCtx->actorCtx.targetContext.unk38;
Actor* arrayPointerActor = globalCtx->actorCtx.targetContext.arrowPointedActor;
Player* player = GET_PLAYER(globalCtx);
f32 transitionRate;
@@ -1065,7 +1065,7 @@ void func_8088EFA4(EnElf* this, GlobalContext* globalCtx) {
this->unk_268 = 0;
this->unk_238 = 1.0f;
if (!this->unk_269) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BELL_DASH_NORMAL);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BELL_DASH_NORMAL);
}
} else if (this->unk_268 == 0) {
if ((arrayPointerActor == NULL) ||
@@ -1074,13 +1074,13 @@ void func_8088EFA4(EnElf* this, GlobalContext* globalCtx) {
}
} else if (this->unk_238 != 0.0f) {
if (Math_StepToF(&this->unk_238, 0.0f, 0.25f)) {
this->innerColor = globalCtx->actorCtx.targetContext.unk18;
this->outerColor = globalCtx->actorCtx.targetContext.unk28;
this->innerColor = globalCtx->actorCtx.targetContext.fairyInner;
this->outerColor = globalCtx->actorCtx.targetContext.fairyOuter;
} else {
transitionRate = 0.25f / this->unk_238;
func_8088EF18(&this->innerColor, &globalCtx->actorCtx.targetContext.unk18, &this->innerColor,
func_8088EF18(&this->innerColor, &globalCtx->actorCtx.targetContext.fairyInner, &this->innerColor,
transitionRate);
func_8088EF18(&this->outerColor, &globalCtx->actorCtx.targetContext.unk28, &this->outerColor,
func_8088EF18(&this->outerColor, &globalCtx->actorCtx.targetContext.fairyOuter, &this->outerColor,
transitionRate);
}
}
@@ -1094,7 +1094,7 @@ void func_8088EFA4(EnElf* this, GlobalContext* globalCtx) {
u16 targetSfxId = this->unk_269 == 0 ? NA_SE_PL_WALK_GROUND - SFX_FLAG : NA_SE_PL_WALK_GROUND - SFX_FLAG;
if (!temp) {
Audio_PlayActorSound2(&this->actor, targetSfxId);
Actor_PlaySfxAtPos(&this->actor, targetSfxId);
}
this->fairyFlags |= 1;
}
@@ -1133,7 +1133,7 @@ void func_8088F214(EnElf* this, GlobalContext* globalCtx) {
sp34 = 1;
func_800B9010(&this->actor, NA_SE_EV_BELL_ANGER - SFX_FLAG);
} else {
arrowPointedActor = globalCtx->actorCtx.targetContext.unk38;
arrowPointedActor = globalCtx->actorCtx.targetContext.arrowPointedActor;
if (player->stateFlags1 & 0x400) {
sp34 = 10;
this->unk_25C = 100;
@@ -1150,7 +1150,7 @@ void func_8088F214(EnElf* this, GlobalContext* globalCtx) {
sp34 = 0;
} else if (!(player->stateFlags1 & 0x40)) {
if (this->unk_269 == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_NAVY_VANISH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_NAVY_VANISH);
}
sp34 = 5;
} else {
@@ -1199,7 +1199,7 @@ void func_8088F214(EnElf* this, GlobalContext* globalCtx) {
if (!(player->stateFlags2 & 0x100000)) {
sp34 = 5;
if (this->unk_269 == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_NAVY_VANISH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_NAVY_VANISH);
}
}
break;
@@ -1209,7 +1209,7 @@ void func_8088F214(EnElf* this, GlobalContext* globalCtx) {
sp34 = 9;
this->unk_25C = 0x2A;
if (this->unk_269 == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BELL_DASH_NORMAL);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_BELL_DASH_NORMAL);
}
} else if (player->stateFlags1 & 0x40) {
player->stateFlags2 |= 0x100000;
@@ -1358,7 +1358,7 @@ void func_8088FE64(Actor* thisx, GlobalContext* globalCtx2) {
func_8088FA38(this, globalCtx);
switch (func_80152498(&globalCtx->msgCtx)) {
switch (Message_GetState(&globalCtx->msgCtx)) {
case 4:
if (func_80147624(globalCtx)) {
if (globalCtx->msgCtx.unk11F04 == 0x202) {
@@ -1467,7 +1467,7 @@ void func_8089010C(Actor* thisx, GlobalContext* globalCtx) {
thisx->flags |= 0x10000;
}
if (func_800B84D0(thisx, globalCtx)) {
if (Actor_ProcessTalkRequest(thisx, &globalCtx->state)) {
func_8019FDC8(&D_801DB4A4, NA_SE_VO_NA_LISTEN, 0x20);
thisx->focus.pos = thisx->world.pos;
@@ -1488,7 +1488,7 @@ void func_8089010C(Actor* thisx, GlobalContext* globalCtx) {
}
if (this->elfMsg->home.rot.x == -0x961) {
this->unk_234 = this->elfMsg;
func_800B86C8(thisx, globalCtx, this->elfMsg);
Actor_ChangeFocus(thisx, globalCtx, this->elfMsg);
}
} else {
thisx->cutscene = -1;
@@ -62,7 +62,7 @@ void EnElfbub_Init(Actor* thisx, GlobalContext* globalCtx) {
return;
}
ActorShape_Init(&this->actor.shape, 16.0f, func_800B3FC0, 0.2f);
ActorShape_Init(&this->actor.shape, 16.0f, ActorShadow_DrawCircle, 0.2f);
this->actor.hintId = 0x16;
Actor_SetScale(&this->actor, 1.25f);
@@ -143,7 +143,7 @@ void EnElfbub_Update(Actor* thisx, GlobalContext* globalCtx) {
EnElfbub* this = THIS;
Collider_UpdateCylinder(&this->actor, &this->collider);
this->actionFunc(this, globalCtx);
Actor_SetHeight(&this->actor, this->actor.shape.yOffset);
Actor_SetFocus(&this->actor, this->actor.shape.yOffset);
}
void EnElfbub_Draw(Actor* thisx, GlobalContext* globalCtx2) {
+11 -11
View File
@@ -87,7 +87,7 @@ void EnElforg_Init(Actor* thisx, GlobalContext* globalCtx) {
}
break;
case STRAY_FAIRY_TYPE_COLLECTIBLE:
if (Actor_GetCollectibleFlag(globalCtx, STRAY_FAIRY_FLAG(&this->actor))) {
if (Flags_GetCollectible(globalCtx, STRAY_FAIRY_FLAG(&this->actor))) {
Actor_MarkForDeath(&this->actor);
return;
}
@@ -226,7 +226,7 @@ void EnElforg_MoveToTargetFairyFountain(EnElforg* this, Vec3f* homePos) {
targetAngle += angleAdjustment;
Math_SmoothStepToS(&this->actor.world.rot.y, targetAngle, 2, 4000, 1000);
EnElforg_ApproachTargetSpeedXZ(this);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
/**
@@ -249,7 +249,7 @@ void EnElforg_MoveToTarget(EnElforg* this, Vec3f* targetPos) {
Math_SmoothStepToS(&this->actor.world.rot.y, targetAngle, 10, 0x200, 0x80);
}
EnElforg_ApproachTargetSpeedXZ(this);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
void func_80ACCBB8(EnElforg* this, GlobalContext* globalCtx) {
@@ -403,7 +403,7 @@ void EnElforg_ClockTownFairyCollected(EnElforg* this, GlobalContext* globalCtx)
EnElforg_CirclePlayer(this, globalCtx);
player->actor.freezeTimer = 100;
player->stateFlags1 |= 0x20000000;
if (func_800B867C(&this->actor, globalCtx)) {
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
player->actor.freezeTimer = 0;
player->stateFlags1 &= ~0x20000000;
Actor_MarkForDeath(&this->actor);
@@ -437,19 +437,19 @@ void EnElforg_FreeFloating(EnElforg* this, GlobalContext* globalCtx) {
}
scaledYDistance = this->actor.playerHeightRel - (this->actor.shape.yOffset * this->actor.scale.y);
if (!func_801233E4(globalCtx)) {
if (!Player_InCsMode(&globalCtx->state)) {
if ((this->actor.xzDistToPlayer < 30.0f) && (scaledYDistance < 12.0f) && (scaledYDistance > -68.0f)) {
EnElforg_SetupFairyCollected(this, globalCtx);
func_80115908(globalCtx, 48);
switch (STRAY_FAIRY_TYPE(&this->actor)) {
case STRAY_FAIRY_TYPE_COLLECTIBLE:
Actor_SetCollectibleFlag(globalCtx, STRAY_FAIRY_FLAG(&this->actor));
Flags_SetCollectible(globalCtx, STRAY_FAIRY_FLAG(&this->actor));
break;
case STRAY_FAIRY_TYPE_CHEST:
Actor_SetChestFlag(globalCtx, STRAY_FAIRY_FLAG(&this->actor));
Flags_SetTreasure(globalCtx, STRAY_FAIRY_FLAG(&this->actor));
break;
default:
Actor_SetSwitchFlag(globalCtx, STRAY_FAIRY_FLAG(&this->actor));
Flags_SetSwitch(globalCtx, STRAY_FAIRY_FLAG(&this->actor));
break;
}
@@ -493,7 +493,7 @@ void EnElforg_FreeFloating(EnElforg* this, GlobalContext* globalCtx) {
Actor* EnElforg_GetHoldingEnemy(EnElforg* this, GlobalContext* globalCtx) {
Actor* enemy;
for (enemy = globalCtx->actorCtx.actorList[ACTORCAT_ENEMY].first; enemy != NULL; enemy = enemy->next) {
for (enemy = globalCtx->actorCtx.actorLists[ACTORCAT_ENEMY].first; enemy != NULL; enemy = enemy->next) {
if ((enemy->home.pos.x == this->actor.home.pos.x) && (enemy->home.pos.y == this->actor.home.pos.y) &&
(enemy->home.pos.z == this->actor.home.pos.z)) {
return enemy;
@@ -509,7 +509,7 @@ void EnElforg_TrappedByEnemy(EnElforg* this, GlobalContext* globalCtx) {
EnElforg_InitializeParams(this);
this->actionFunc = EnElforg_FreeFloating;
this->actor.draw = EnElforg_Draw;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHIBI_FAIRY_SAVED);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_CHIBI_FAIRY_SAVED);
} else {
// The enemy is still alive, so have the Stray Fairy
// track the enemy in case it's moving around.
@@ -542,7 +542,7 @@ void EnElforg_HiddenByCollider(EnElforg* this, GlobalContext* globalCtx) {
this->actor.draw = EnElforg_Draw;
this->actor.world.pos.y += 40.0f;
this->actor.home.pos.y += 40.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHIBI_FAIRY_SAVED);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_CHIBI_FAIRY_SAVED);
} else {
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
@@ -109,7 +109,7 @@ void EnEncount2_Init(Actor* thisx, GlobalContext* globalCtx) {
DynaPolyActor_Init(&this->dyna, 0);
CollisionHeader_GetVirtual(&D_06002420, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
ActorShape_Init(&this->dyna.actor.shape, 0.0f, func_800B3FC0, 25.0f);
ActorShape_Init(&this->dyna.actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE;
Collider_InitAndSetJntSph(globalCtx, &this->collider, &this->dyna.actor, &sJntSphInit, &this->colElement);
@@ -172,7 +172,7 @@ void EnEncount2_Popped(EnEncount2* this, GlobalContext* globalCtx) {
EnEncount2_InitParticles(this, &curPos, 10);
}
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_MUJURA_BALLOON_BROKEN);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_MUJURA_BALLOON_BROKEN);
this->deathTimer = 30;
this->actionFunc = EnEncount2_Die;
}
@@ -180,7 +180,7 @@ void EnEncount2_Popped(EnEncount2* this, GlobalContext* globalCtx) {
void EnEncount2_Die(EnEncount2* this, GlobalContext* globalCtx) {
if (this->deathTimer == 0) {
if (this->switchFlag >= 0) {
Actor_SetSwitchFlag(globalCtx, this->switchFlag);
Flags_SetSwitch(globalCtx, this->switchFlag);
}
Actor_MarkForDeath(&this->dyna.actor);
}
@@ -193,10 +193,10 @@ void EnEncount2_Update(Actor* thisx, GlobalContext* globalCtx) {
DECR(this->deathTimer);
this->dyna.actor.shape.rot.y = this->dyna.actor.world.rot.y;
Actor_SetHeight(&this->dyna.actor, 30.0f);
Actor_SetFocus(&this->dyna.actor, 30.0f);
Actor_SetScale(&this->dyna.actor, this->scale);
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->dyna.actor);
Actor_MoveWithGravity(&this->dyna.actor);
EnEncount2_UpdateParticles(this, globalCtx);
if (!this->isPopped) {
@@ -209,8 +209,8 @@ void EnEncount2_Update(Actor* thisx, GlobalContext* globalCtx) {
void EnEncount2_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnEncount2* this = THIS;
if (this->isPopped != true) {
func_800BDFC0(globalCtx, D_06000A00);
func_800BDFC0(globalCtx, D_06000D78);
Gfx_DrawDListOpa(globalCtx, D_06000A00);
Gfx_DrawDListOpa(globalCtx, D_06000D78);
}
EnEncount2_DrawParticles(this, globalCtx);
}
@@ -49,7 +49,7 @@ void EnEndingHero_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.targetMode = 6;
this->actor.gravity = -3.0f;
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600B0CC, &D_06000BE0, this->jointTable, this->morphTable, 15);
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 25.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
func_80C1E748(this);
}
@@ -76,7 +76,7 @@ void EnEndingHero_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
}
@@ -41,7 +41,7 @@ void EnEndingHero2_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.targetMode = 6;
this->actor.gravity = -3.0f;
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06007908, &D_060011C0, this->jointTable, this->morphTable, 20);
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 25.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
func_80C232E8(this);
}
@@ -61,7 +61,7 @@ void EnEndingHero2_Update(Actor* thisx, GlobalContext* globalCtx) {
EnEndingHero2* this = THIS;
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
}
@@ -41,7 +41,7 @@ void EnEndingHero3_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.targetMode = 6;
this->actor.gravity = -3.0f;
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06007150, &D_06000E50, this->jointTable, this->morphTable, 17);
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 25.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
func_80C23518(this);
}
@@ -61,7 +61,7 @@ void EnEndingHero3_Update(Actor* thisx, GlobalContext* globalCtx) {
EnEndingHero3* this = THIS;
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
}
@@ -41,7 +41,7 @@ void EnEndingHero4_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.targetMode = 6;
this->actor.gravity = -3.0f;
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600D640, &D_06002A84, this->jointTable, this->morphTable, 17);
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 25.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
func_80C23748(this);
}
@@ -61,7 +61,7 @@ void EnEndingHero4_Update(Actor* thisx, GlobalContext* globalCtx) {
EnEndingHero4* this = THIS;
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
}
@@ -47,7 +47,7 @@ void EnEndingHero5_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.targetMode = 6;
this->actor.gravity = -3.0f;
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600A850, &D_06002FA0, this->jointTable, this->morphTable, 17);
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 25.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
this->unk25C = this->actor.params;
func_80C23980(this);
}
@@ -68,7 +68,7 @@ void EnEndingHero5_Update(Actor* thisx, GlobalContext* globalCtx) {
EnEndingHero5* this = THIS;
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
}
@@ -78,7 +78,7 @@ void EnEndingHero6_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.gravity = -3.0f;
SkelAnime_InitFlex(globalCtx, &this->skelAnime, sSkeletons[this->npcIndex], sAnimations[this->npcIndex],
this->jointTable, this->morphTable, sLimbCounts[this->npcIndex]);
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 25.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
EnEndingHero6_SetupIdle(this);
}
@@ -119,7 +119,7 @@ void EnEndingHero6_Update(Actor* thisx, GlobalContext* globalCtx) {
}
this->actionFunc(this, globalCtx);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1D);
}
+10 -10
View File
@@ -176,7 +176,7 @@ void EnFall_Destroy(Actor* thisx, GlobalContext* globalCtx) {
* Finds the Termina Field moon so the Moon's Tear can spawn in the correct place.
*/
Actor* EnFall_MoonsTear_GetTerminaFieldMoon(GlobalContext* globalCtx) {
Actor* itemAction = globalCtx->actorCtx.actorList[ACTORCAT_ITEMACTION].first;
Actor* itemAction = globalCtx->actorCtx.actorLists[ACTORCAT_ITEMACTION].first;
while (itemAction != NULL) {
if (itemAction->id == ACTOR_EN_FALL && EN_FALL_TYPE(itemAction) == EN_FALL_TYPE_TERMINA_FIELD_MOON) {
@@ -349,7 +349,7 @@ void EnFall_StoppedOpenMouthMoon_PerformCutsceneActions(EnFall* this, GlobalCont
switch (globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x85)]->unk0) {
case 3:
if (this->eyeGlowIntensity == 0.0f) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_MOON_EYE_FLASH);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_MOON_EYE_FLASH);
}
this->eyeGlowIntensity += 0.033333335f;
if (this->eyeGlowIntensity > 1.0f) {
@@ -380,13 +380,13 @@ void EnFall_StoppedClosedMouthMoon_PerformCutsceneActions(EnFall* this, GlobalCo
case 0:
switch (globalCtx->csCtx.frames) {
case 1060:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MOON_SCREAM1);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_MOON_SCREAM1);
break;
case 1089:
Audio_PlayActorSound2(&this->actor, NA_SE_EV_MOON_CRY);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_MOON_CRY);
break;
case 1303:
Audio_PlayActorSound2(&this->actor, NA_SE_EV_SLIP_MOON);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SLIP_MOON);
break;
}
if (globalCtx->csCtx.frames >= 1145) {
@@ -396,13 +396,13 @@ void EnFall_StoppedClosedMouthMoon_PerformCutsceneActions(EnFall* this, GlobalCo
case 1:
switch (globalCtx->csCtx.frames) {
case 561:
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MOON_SCREAM1);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_MOON_SCREAM1);
break;
case 590:
Audio_PlayActorSound2(&this->actor, NA_SE_EV_MOON_CRY);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_MOON_CRY);
break;
case 737:
Audio_PlayActorSound2(&this->actor, NA_SE_EV_SLIP_MOON);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SLIP_MOON);
break;
}
if (globalCtx->csCtx.frames >= 650) {
@@ -480,7 +480,7 @@ void EnFall_MoonsTear_Fall(EnFall* this, GlobalContext* globalCtx) {
if (this->actor.draw != NULL) {
if (Math_Vec3f_StepTo(&this->actor.world.pos, &this->actor.home.pos, this->actor.speedXZ) <= 0.0f) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_GORON_BOUND_1);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_GORON_BOUND_1);
gSaveContext.weekEventReg[0x4A] |= 0x80;
gSaveContext.weekEventReg[0x4A] |= 0x20;
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_TEST, this->actor.world.pos.x,
@@ -659,7 +659,7 @@ void EnFall_FireRing_Update(Actor* thisx, GlobalContext* globalCtx) {
if (func_800EE29C(globalCtx, 0x1C2) && globalCtx->csCtx.npcActions[func_800EE200(globalCtx, 0x1C2)]->unk0 == 5) {
if (!(this->flags & EN_FALL_FLAG_FIRE_RING_APPEARS)) {
Audio_PlayActorSound2(&this->actor, NA_SE_IT_DM_RING_EXPLOSION);
Actor_PlaySfxAtPos(&this->actor, NA_SE_IT_DM_RING_EXPLOSION);
}
this->flags |= EN_FALL_FLAG_FIRE_RING_APPEARS;
}
+8 -8
View File
@@ -184,7 +184,7 @@ void EnFg_Idle(EnFg* this, GlobalContext* globalCtx) {
switch (EnFg_GetDamageEffect(this)) {
case FG_DMGEFFECT_DEKUSTICK:
this->actor.flags &= ~1;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FROG_CRY_1);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FROG_CRY_1);
this->skelAnime.playSpeed = 0.0f;
this->actor.shape.shadowDraw = NULL;
this->actor.scale.x *= 1.5f;
@@ -210,7 +210,7 @@ void EnFg_Idle(EnFg* this, GlobalContext* globalCtx) {
break;
case FG_DMGEFFECT_EXPLOSION:
this->actor.flags &= ~1;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FROG_CRY_0);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FROG_CRY_0);
if (1) {}
this->actor.params = FG_BLACK;
this->skelAnime.playSpeed = 0.0f;
@@ -226,14 +226,14 @@ void EnFg_Idle(EnFg* this, GlobalContext* globalCtx) {
break;
default:
if (DECR(this->timer) == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FROG_JUMP);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FROG_JUMP);
EnFg_UpdateAnimation(&this->skelAnime, 3);
this->actor.velocity.y = 10.0f;
this->timer = Rand_S16Offset(30, 30);
this->actionFunc = EnFg_Jump;
}
}
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
void EnFg_Jump(EnFg* this, GlobalContext* globalCtx) {
@@ -261,7 +261,7 @@ void EnFg_Jump(EnFg* this, GlobalContext* globalCtx) {
break;
case FG_DMGEFFECT_EXPLOSION:
this->actor.flags &= ~1;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FROG_CRY_0);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FROG_CRY_0);
EnFg_UpdateAnimation(&this->skelAnime, 0);
this->actor.params = FG_BLACK;
this->skelAnime.playSpeed = 0.0f;
@@ -286,7 +286,7 @@ void EnFg_Jump(EnFg* this, GlobalContext* globalCtx) {
this->actionFunc = EnFg_Idle;
this->actor.velocity.y = 0.0f;
} else {
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
}
}
@@ -313,14 +313,14 @@ void EnFg_Knockback(EnFg* this, GlobalContext* globalCtx) {
EnFg_AddDust(&this->dustEffect[0], &this->actor.world.pos);
}
this->actor.shape.rot.x += 0x1000;
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
}
}
void EnFg_Init(Actor* thisx, GlobalContext* globalCtx) {
EnFg* this = THIS;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 10.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 10.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600B538, NULL, this->jointTable, this->morphTable, 24);
EnFg_UpdateAnimation(&this->skelAnime, 0);
Collider_InitCylinder(globalCtx, &this->collider);
@@ -127,7 +127,7 @@ void EnFirefly_Init(Actor* thisx, GlobalContext* globalCtx) {
EnFirefly* this = THIS;
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 25.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_060018B8, &D_0600017C, this->jointTable, this->morphTable, 28);
Collider_InitAndSetSphere(globalCtx, &this->collider, &this->actor, &sSphereInit);
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
@@ -173,7 +173,7 @@ void EnFirefly_SpawnIceEffects(EnFirefly* this, GlobalContext* globalCtx) {
if (this->unk_18F == 0xA) {
this->unk_18F = 0;
this->unk_2E8.x = 0.0f;
func_800BF7CC(globalCtx, &this->actor, &this->unk_2F8, 3, 2, 0.2f, 0.2f);
Actor_SpawnIceEffects(globalCtx, &this->actor, &this->unk_2F8, 3, 2, 0.2f, 0.2f);
}
}
@@ -223,7 +223,7 @@ s32 EnFirefly_ReturnToPerch(EnFirefly* this, GlobalContext* globalCtx) {
}
s32 EnFirefly_SeekTorch(EnFirefly* this, GlobalContext* globalCtx) {
ObjSyokudai* findTorch = (ObjSyokudai*)globalCtx->actorCtx.actorList[ACTORCAT_PROP].first;
ObjSyokudai* findTorch = (ObjSyokudai*)globalCtx->actorCtx.actorLists[ACTORCAT_PROP].first;
ObjSyokudai* closestTorch = NULL;
f32 currentMinDist = 35000.0f;
f32 currentDist;
@@ -332,13 +332,13 @@ void EnFirefly_SetupFall(EnFirefly* this, GlobalContext* globalCtx) {
this->timer = 40;
this->actor.velocity.y = 0.0f;
Animation_Change(&this->skelAnime, &D_0600017C, 0.0f, 6.0f, 6.0f, 2, 0.0f);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FFLY_DEAD);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_FFLY_DEAD);
this->actor.flags |= 0x10;
if (this->isInvisible) {
func_800BCB70(&this->actor, 0x4000, 255, 0x2000, 40);
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0x2000, 40);
} else {
func_800BCB70(&this->actor, 0x4000, 255, 0, 40);
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 40);
}
if (this->actor.colChkInfo.damageEffect == 3) {
@@ -431,7 +431,7 @@ void EnFirefly_DiveAttack(EnFirefly* this, GlobalContext* globalCtx) {
if (this->actor.bgCheckFlags & 8) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.wallYaw, 2, 0xC00, 0x300);
Math_ScaledStepToS(&this->actor.shape.rot.x, this->targetPitch, 0x100);
} else if (Actor_IsActorFacingLink(&this->actor, 0x2800)) {
} else if (Actor_IsFacingPlayer(&this->actor, 0x2800)) {
if (Animation_OnFrame(&this->skelAnime, 4.0f)) {
this->skelAnime.playSpeed = 0.0f;
this->skelAnime.curFrame = 4.0f;
@@ -534,9 +534,9 @@ void EnFirefly_FlyAway(EnFirefly* this, GlobalContext* globalCtx) {
void EnFirefly_SetupStunned(EnFirefly* this) {
if (this->isInvisible) {
func_800BCB70(&this->actor, 0, 255, 0x2000, this->timer);
Actor_SetColorFilter(&this->actor, 0, 255, 0x2000, this->timer);
} else {
func_800BCB70(&this->actor, 0, 255, 0, this->timer);
Actor_SetColorFilter(&this->actor, 0, 255, 0, this->timer);
}
if (this->actionFunc != EnFirefly_Stunned) {
@@ -545,7 +545,7 @@ void EnFirefly_SetupStunned(EnFirefly* this) {
}
this->auraType = KEESE_AURA_NONE;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_COMMON_FREEZE);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_COMMON_FREEZE);
this->actionFunc = EnFirefly_Stunned;
}
@@ -633,7 +633,7 @@ void EnFirefly_DisturbDiveAttack(EnFirefly* this, GlobalContext* globalCtx) {
void EnFirefly_UpdateDamage(EnFirefly* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
func_800BE258(&this->actor, &this->collider.info);
Actor_SetDropFlag(&this->actor, &this->collider.info);
if (this->actor.colChkInfo.damageEffect == 1) {
this->timer = 40;
@@ -666,7 +666,7 @@ void EnFirefly_Update(Actor* thisx, GlobalContext* globalCtx2) {
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FFLY_ATTACK);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_FFLY_ATTACK);
if (this->currentType != KEESE_NORMAL) {
EnFirefly_Extinguish(this);
@@ -682,13 +682,13 @@ void EnFirefly_Update(Actor* thisx, GlobalContext* globalCtx2) {
if (!(this->actor.flags & 0x8000)) {
if ((this->actor.colChkInfo.health == 0) || (this->actionFunc == EnFirefly_Stunned)) {
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
} else {
if (this->actionFunc != EnFirefly_Rebound) {
this->actor.world.rot.x = 0x1554 - this->actor.shape.rot.x;
}
Actor_SetVelocityAndMoveXYRotation(&this->actor);
Actor_MoveWithoutGravity(&this->actor);
}
}
@@ -706,7 +706,7 @@ void EnFirefly_Update(Actor* thisx, GlobalContext* globalCtx2) {
this->actor.world.rot.y = this->actor.shape.rot.y;
if (Animation_OnFrame(&this->skelAnime, 5.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FFLY_FLY);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_FFLY_FLY);
}
}
+17 -17
View File
@@ -147,7 +147,7 @@ Actor* func_8091D944(EnFish* this, GlobalContext* globalCtx) {
f32 distSq;
Actor* retActor = NULL;
f32 minDistSq = FLT_MAX;
Actor* foundActor = globalCtx->actorCtx.actorList[ACTORCAT_ITEMACTION].first;
Actor* foundActor = globalCtx->actorCtx.actorLists[ACTORCAT_ITEMACTION].first;
while (foundActor != NULL) {
if ((foundActor->id == ACTOR_EN_FISH) && (foundActor->params == ENFISH_2) &&
@@ -215,7 +215,7 @@ void EnFish_Init(Actor* thisx, GlobalContext* globalCtx) {
if (sp36 == ENFISH_0) {
this->actor.flags |= 0x10;
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 8.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 8.0f);
func_8091E810(this);
} else if (sp36 == ENFISH_1) {
func_8091F344(this);
@@ -262,7 +262,7 @@ void func_8091DEE4(EnFish* this) {
static s16 D_8091FACC[] = { 85, 60, 45 };
this->actor.gravity = 0.0f;
this->actor.minVelocityY = 0.0f;
this->actor.terminalVelocity = 0.0f;
this->unk_240 = Rand_S16Offset(5, D_8091FACC[this->unk_278]);
this->unk_248 = 0;
this->unk_26E = 400;
@@ -302,7 +302,7 @@ void func_8091E070(EnFish* this) {
s16 phi_a1;
this->actor.gravity = 0.0f;
this->actor.minVelocityY = 0.0f;
this->actor.terminalVelocity = 0.0f;
if ((Rand_Next() & 3) == 0) {
if (((Rand_Next() & 7) == 0) && (this->unk_278 != 0)) {
@@ -359,7 +359,7 @@ void func_8091E128(Actor* thisx, GlobalContext* globalCtx) {
void func_8091E2E0(EnFish* this) {
this->actor.gravity = 0.0f;
this->actor.minVelocityY = 0.0f;
this->actor.terminalVelocity = 0.0f;
this->unk_240 = Rand_S16Offset(10, 40);
this->unk_248 = 0;
this->unk_26E = 400;
@@ -433,7 +433,7 @@ void func_8091E34C(Actor* thisx, GlobalContext* globalCtx2) {
void func_8091E5EC(EnFish* this) {
this->actor.gravity = 0.0f;
this->actor.minVelocityY = 0.0f;
this->actor.terminalVelocity = 0.0f;
this->unk_26E = 400;
this->unk_272 = 400;
this->unk_268 = 0;
@@ -490,7 +490,7 @@ void func_8091E810(EnFish* this) {
this->unk_270 = 0;
this->unk_26A = 0;
this->actor.gravity = -1.0f;
this->actor.minVelocityY = -10.0f;
this->actor.terminalVelocity = -10.0f;
this->actor.shape.yOffset = 0.0f;
func_8091D6C4(this);
this->unk_248 = 5;
@@ -511,7 +511,7 @@ void func_8091E880(Actor* thisx, GlobalContext* globalCtx) {
this->unk_240 = 400;
func_8091E9A4(this);
} else if (this->actor.bgCheckFlags & 0x20) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_DIVE_INTO_WATER_L);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_DIVE_INTO_WATER_L);
func_8091D840(thisx, globalCtx, 10, 15.0f);
if (func_8091DA14(this, globalCtx)) {
func_8091EF30(this);
@@ -530,7 +530,7 @@ void func_8091E9A4(EnFish* this) {
f32 temp_f0;
this->actor.gravity = -1.0f;
this->actor.minVelocityY = -10.0f;
this->actor.terminalVelocity = -10.0f;
temp_f0 = Rand_ZeroOne();
if (temp_f0 < 0.1f) {
@@ -554,7 +554,7 @@ void func_8091E9A4(EnFish* this) {
this->unk_248 = 5;
this->unk_24C = 0.0f;
if (sp24 && (this->actor.draw != NULL)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FISH_LEAP);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FISH_LEAP);
}
}
@@ -603,7 +603,7 @@ void func_8091EAF0(Actor* thisx, GlobalContext* globalCtx) {
void func_8091ECF4(EnFish* this) {
this->actor.home.pos = this->actor.world.pos;
this->actor.gravity = 0.0f;
this->actor.minVelocityY = 0.0f;
this->actor.terminalVelocity = 0.0f;
this->actor.shape.yOffset = 0.0f;
this->actor.flags |= 0x10;
this->unk_240 = 200;
@@ -661,7 +661,7 @@ void func_8091ED70(Actor* thisx, GlobalContext* globalCtx) {
void func_8091EF30(EnFish* this) {
this->actor.gravity = -2.0f;
this->actor.minVelocityY = -10.0f;
this->actor.terminalVelocity = -10.0f;
this->actor.shape.yOffset = 0.0f;
if (this->actor.velocity.y < -1.0f) {
this->actor.velocity.y = -1.0f;
@@ -766,7 +766,7 @@ void func_8091EFE8(Actor* thisx, GlobalContext* globalCtx) {
void func_8091F344(EnFish* this) {
this->actor.gravity = 0.0f;
this->actor.minVelocityY = 0.0f;
this->actor.terminalVelocity = 0.0f;
this->unk_240 = Rand_S16Offset(5, 35);
this->unk_248 = 1;
this->unk_268 = 0;
@@ -851,7 +851,7 @@ void func_8091F5A4(Actor* thisx, GlobalContext* globalCtx) {
}
SkelAnime_Update(&this->skelAnime);
func_8091D7C4(this);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
if (this->unk_248 != 0) {
u32 temp = (globalCtx->sceneNum ^ SCENE_LABO) != 0;
phi_f0 = BREG(1) + 10.0f;
@@ -872,7 +872,7 @@ void func_8091F5A4(Actor* thisx, GlobalContext* globalCtx) {
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
Actor_SetHeight(&this->actor, this->actor.shape.yOffset * 0.01f);
Actor_SetFocus(&this->actor, this->actor.shape.yOffset * 0.01f);
if (Actor_HasParent(&this->actor, globalCtx)) {
this->actor.parent = NULL;
@@ -882,7 +882,7 @@ void func_8091F5A4(Actor* thisx, GlobalContext* globalCtx) {
func_8091D904(this);
}
} else if (func_8091DDF4(this, globalCtx)) {
func_800B8A1C(&this->actor, globalCtx, 0xBA, 80.0f, 25.0f);
Actor_PickUp(&this->actor, globalCtx, 0xBA, 80.0f, 25.0f);
}
}
}
@@ -901,7 +901,7 @@ void func_8091F830(Actor* thisx, GlobalContext* globalCtx) {
if ((this->unkFunc == NULL) || (this->unkFunc(&this->actor, globalCtx), (this->actor.update != NULL))) {
func_8091D7C4(this);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
if (this->unk_242 == 20) {
this->actor.draw = EnFish_Draw;
+10 -10
View File
@@ -160,7 +160,7 @@ void EnFish2_Init(Actor* thisx, GlobalContext* globalCtx) {
D_80B2B2F0++;
if (this->actor.params == 0) {
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 20.0f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06006190, &D_060013AC, this->jointTable, this->morphTable,
24);
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
@@ -328,10 +328,10 @@ void func_80B28B5C(EnFish2* this) {
}
void func_80B28C14(EnFish2* this, GlobalContext* globalCtx) {
Actor* itemAction = globalCtx->actorCtx.actorList[ACTORCAT_ITEMACTION].first;
Actor* itemAction = globalCtx->actorCtx.actorLists[ACTORCAT_ITEMACTION].first;
WaterBox* waterbox;
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
func_80B29128(this);
return;
}
@@ -438,7 +438,7 @@ void func_80B29128(EnFish2* this) {
}
void func_80B2913C(EnFish2* this, GlobalContext* globalCtx) {
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
func_80B28B5C(this);
}
@@ -533,7 +533,7 @@ void func_80B2951C(EnFish2* this) {
Actor_MarkForDeath(this->unk_350);
this->unk_350 = NULL;
D_80B2B2F4 = &this->actor;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_EAT);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_DODO_M_EAT);
this->actionFunc = func_80B295A4;
}
@@ -642,7 +642,7 @@ void func_80B297FC(EnFish2* this, GlobalContext* globalCtx) {
}
this->unk_2B6 = 4;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FISH_GROW_UP);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FISH_GROW_UP);
this->unk_2C4++;
}
break;
@@ -747,7 +747,7 @@ void func_80B297FC(EnFish2* this, GlobalContext* globalCtx) {
}
void func_80B29E5C(EnFish2* this, GlobalContext* globalCtx) {
Actor* prop = globalCtx->actorCtx.actorList[ACTORCAT_PROP].first;
Actor* prop = globalCtx->actorCtx.actorLists[ACTORCAT_PROP].first;
while (prop != NULL) {
if (prop->id != ACTOR_EN_FISH2) {
@@ -893,7 +893,7 @@ void func_80B2A498(EnFish2* this, GlobalContext* globalCtx) {
if (temp_v0 != NULL) {
temp_v0->speedXZ = 4.0f;
temp_v0->velocity.y = 15.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_SY_PIECE_OF_HEART);
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_PIECE_OF_HEART);
gSaveContext.weekEventReg[81] &= (u8)~0x10;
gSaveContext.weekEventReg[81] &= (u8)~0x20;
gSaveContext.weekEventReg[81] &= (u8)~0x40;
@@ -958,7 +958,7 @@ void EnFish2_Update(Actor* thisx, GlobalContext* globalCtx2) {
}
this->actionFunc(this, globalCtx);
Actor_SetHeight(&this->actor, 0);
Actor_SetFocus(&this->actor, 0);
if (this->actor.params != 1) {
WaterBox* sp6C;
@@ -990,7 +990,7 @@ void EnFish2_Update(Actor* thisx, GlobalContext* globalCtx2) {
this->unk_2F4.z += (Math_CosS(this->actor.world.rot.y) * 25.0f) - this->unk_330;
this->unk_33C = 25.0f - ((this->unk_330 - 0.01f) * 1000.0f);
Actor_SetScale(&this->actor, this->unk_330);
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
Actor_MoveWithGravity(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0, 15.0f, 10.0f, 7);
if (this->actor.params != 2) {
@@ -1126,8 +1126,8 @@ void EnFishing_UpdateEffects(FishingEffect* effect, GlobalContext* globalCtx) {
func_801518B0(globalCtx, 0x40B3, NULL);
}
if ((effect->unk_2C >= 100) && (func_80152498(&globalCtx->msgCtx) == 5)) {
if (func_80147624(globalCtx) || !func_80152498(&globalCtx->msgCtx)) {
if ((effect->unk_2C >= 100) && (Message_GetState(&globalCtx->msgCtx) == 5)) {
if (func_80147624(globalCtx) || !Message_GetState(&globalCtx->msgCtx)) {
func_801477B4(globalCtx);
func_801159EC(-50);
effect->unk_2C = -1;
@@ -2807,7 +2807,7 @@ void func_80903C60(EnFishing* this, u8 arg1) {
}
}
Audio_PlayActorSound2(&this->actor, sfxId);
Actor_PlaySfxAtPos(&this->actor, sfxId);
}
void EnFishing_HandleAquariumDialog(EnFishing* this, GlobalContext* globalCtx) {
@@ -2835,7 +2835,7 @@ void EnFishing_HandleAquariumDialog(EnFishing* this, GlobalContext* globalCtx) {
if (this->unk_1CC == 0) {
this->actor.flags |= 1;
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
D_8090CCF8 = D_809171CC;
this->unk_1CB = 1;
} else {
@@ -2845,7 +2845,7 @@ void EnFishing_HandleAquariumDialog(EnFishing* this, GlobalContext* globalCtx) {
this->unk_1CC--;
this->actor.flags &= ~1;
}
} else if (func_800B867C(&this->actor, globalCtx)) {
} else if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
this->unk_1CB = 0;
this->unk_1CC = 20;
}
@@ -3079,7 +3079,7 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
this->unk_172[1] = 50;
}
if (!func_80152498(&globalCtx->msgCtx)) {
if (!Message_GetState(&globalCtx->msgCtx)) {
if ((gSaveContext.time >= 0xC000) && (gSaveContext.time <= 0xC01B)) {
this->unk_150 = 7;
this->unk_172[3] = Rand_ZeroFloat(150.0f) + 200.0f;
@@ -3225,7 +3225,7 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
EnFishing_SpawnRipple(&this->actor.projectedPos, globalCtx->specialEffects, &spB8, 30.0f,
400.0f, 150, 90);
Audio_PlayActorSound2(&this->actor, NA_SE_PL_CATCH_BOOMERANG);
Actor_PlaySfxAtPos(&this->actor, NA_SE_PL_CATCH_BOOMERANG);
break;
}
}
@@ -3499,7 +3499,7 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
this->unk_18C = 2000.0f;
} else if (sp124 < 10.0f) {
if (sLurePos.y > (WATER_SURFACE_Y(globalCtx) - 10.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_JUMP_OUT_WATER);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_JUMP_OUT_WATER);
play_sound(NA_SE_PL_CATCH_BOOMERANG);
}
@@ -3875,7 +3875,7 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
if (this->unk_172[0] <= 50) {
switch (this->unk_1CD) {
case 0:
if ((func_80152498(&globalCtx->msgCtx) == 4) || !func_80152498(&globalCtx->msgCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) || !Message_GetState(&globalCtx->msgCtx)) {
if (func_80147624(globalCtx)) {
func_801477B4(globalCtx);
if (globalCtx->msgCtx.choiceIndex == 0) {
@@ -3906,7 +3906,7 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
}
break;
case 1:
if ((func_80152498(&globalCtx->msgCtx) == 4) || !func_80152498(&globalCtx->msgCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) || !Message_GetState(&globalCtx->msgCtx)) {
if (func_80147624(globalCtx)) {
func_801477B4(globalCtx);
if (globalCtx->msgCtx.choiceIndex != 0) {
@@ -4034,10 +4034,10 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
Math_ApproachS(&this->unk_166, spF6, 3, 0xBB8);
}
Actor_SetVelocityXYRotation(&this->actor);
Actor_UpdateVelocityWithoutGravity(&this->actor);
}
Actor_ApplyMovement(&this->actor);
Actor_UpdatePos(&this->actor);
this->actor.world.pos.y += (this->unk_17C * 1.5f);
@@ -4129,7 +4129,7 @@ void EnFishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) {
this->actor.velocity.x = this->actor.world.pos.x * -0.003f;
this->actor.velocity.z = this->actor.world.pos.z * -0.003f;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FISH_LEAP);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FISH_LEAP);
func_809036BC(this, globalCtx);
if (Rand_ZeroOne() < 0.5f) {
@@ -4324,7 +4324,7 @@ void EnFishing_UpdatePondProps(GlobalContext* globalCtx) {
if (prop->type == FS_PROP_REED) {
EnFishing_HandleReedContact(prop, &player->actor.world.pos);
actor = globalCtx->actorCtx.actorList[ACTORCAT_NPC].first;
actor = globalCtx->actorCtx.actorLists[ACTORCAT_NPC].first;
while (actor != NULL) {
if (!((actor->id == ACTOR_EN_FISHING) && (actor->params >= 100))) {
actor = actor->next;
@@ -4338,7 +4338,7 @@ void EnFishing_UpdatePondProps(GlobalContext* globalCtx) {
} else if (prop->type == FS_PROP_LILY_PAD) {
EnFishing_HandleLilyPadContact(prop, &player->actor.world.pos, 0);
actor = globalCtx->actorCtx.actorList[ACTORCAT_NPC].first;
actor = globalCtx->actorCtx.actorLists[ACTORCAT_NPC].first;
while (actor != NULL) {
if (!((actor->id == ACTOR_EN_FISHING) && (actor->params >= 100))) {
actor = actor->next;
@@ -4719,7 +4719,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
this->actor.textId = 0x4097;
}
if (func_800B84D0(&this->actor, globalCtx)) {
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
if (D_809171FC == 0) {
this->unk_154 = 1;
if (sLinkAge != 1) {
@@ -4736,7 +4736,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
break;
case 1:
if ((func_80152498(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
switch (globalCtx->msgCtx.choiceIndex) {
@@ -4764,7 +4764,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
break;
case 2:
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
func_80151938(globalCtx, 0x407F);
this->unk_154 = 4;
@@ -4772,17 +4772,17 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
break;
case 3:
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
this->unk_154 = 0;
}
if (func_80152498(&globalCtx->msgCtx) == 6) {
if (Message_GetState(&globalCtx->msgCtx) == 6) {
this->unk_154 = 0;
}
break;
case 4:
if ((func_80152498(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
switch (globalCtx->msgCtx.choiceIndex) {
@@ -4799,7 +4799,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
break;
case 5:
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
globalCtx->interfaceCtx.unk_27E = 1;
@@ -4816,7 +4816,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
case 10:
if (D_8090CD0C != 0) {
if ((func_80152498(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
switch (globalCtx->msgCtx.choiceIndex) {
@@ -4832,7 +4832,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
}
}
} else {
if ((func_80152498(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
switch (globalCtx->msgCtx.choiceIndex) {
@@ -4904,7 +4904,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
break;
case 11:
if (((func_80152498(&globalCtx->msgCtx) == 5) || !func_80152498(&globalCtx->msgCtx)) &&
if (((Message_GetState(&globalCtx->msgCtx) == 5) || !Message_GetState(&globalCtx->msgCtx)) &&
func_80147624(globalCtx)) {
s32 getItemId;
@@ -4975,20 +4975,20 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
}
this->actor.parent = NULL;
func_800B8A1C(&this->actor, globalCtx, getItemId, 2000.0f, 1000.0f);
Actor_PickUp(&this->actor, globalCtx, getItemId, 2000.0f, 1000.0f);
this->unk_154 = 23;
}
break;
case 20:
if ((func_80152498(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 5) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
this->unk_154 = 0;
}
break;
case 21:
if ((func_80152498(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) && func_80147624(globalCtx)) {
func_801477B4(globalCtx);
switch (globalCtx->msgCtx.choiceIndex) {
@@ -5008,7 +5008,7 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
break;
case 22:
if (!func_80152498(&globalCtx->msgCtx)) {
if (!Message_GetState(&globalCtx->msgCtx)) {
this->unk_154 = 0;
if (D_8090CD0C != 0) {
D_8090CD08 = 1;
@@ -5024,13 +5024,13 @@ void EnFishing_HandleOwnerDialog(EnFishing* this, GlobalContext* globalCtx) {
if (Actor_HasParent(&this->actor, globalCtx)) {
this->unk_154 = 24;
} else {
func_800B8A1C(&this->actor, globalCtx, GI_SCALE_GOLD, 2000.0f, 1000.0f);
Actor_PickUp(&this->actor, globalCtx, GI_SCALE_GOLD, 2000.0f, 1000.0f);
}
break;
case 24:
D_8090CCF4 = false;
if ((func_80152498(&globalCtx->msgCtx) == 6) && func_80147624(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 6) && func_80147624(globalCtx)) {
if (D_809171D0 == 0) {
this->unk_154 = 0;
} else {
@@ -5083,13 +5083,13 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
SkelAnime_Update(&this->skelAnime);
if ((D_8090CD04 != 0) || func_80152498(&globalCtx->msgCtx)) {
if ((D_8090CD04 != 0) || Message_GetState(&globalCtx->msgCtx)) {
this->actor.flags &= ~1;
} else {
this->actor.flags |= 0x21;
}
if ((this->actor.xzDistToPlayer < 120.0f) || func_80152498(&globalCtx->msgCtx)) {
if ((this->actor.xzDistToPlayer < 120.0f) || Message_GetState(&globalCtx->msgCtx)) {
headRotTarget = this->actor.shape.rot.y - this->actor.yawTowardsPlayer;
} else {
headRotTarget = 0;
@@ -5333,7 +5333,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
player->actor.world.pos.z = 1360.0f;
player->actor.speedXZ = 0.0f;
if (!func_80152498(&globalCtx->msgCtx)) {
if (!Message_GetState(&globalCtx->msgCtx)) {
camera = Play_GetCamera(globalCtx, MAIN_CAM);
camera->eye = sCameraEye;
@@ -5426,7 +5426,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
}
if (D_8090CD50 == 0) {
if ((func_80152498(&globalCtx->msgCtx) == 4) || !func_80152498(&globalCtx->msgCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == 4) || !Message_GetState(&globalCtx->msgCtx)) {
if (func_80147624(globalCtx)) {
Camera* camera = Play_GetCamera(globalCtx, MAIN_CAM);
@@ -5518,7 +5518,7 @@ void EnFishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) {
D_809171CB--;
}
if ((D_809171CB == 1) && !func_80152498(&globalCtx->msgCtx) && ((D_8090CD00 & 0xFFF) == 0xFFF)) {
if ((D_809171CB == 1) && !Message_GetState(&globalCtx->msgCtx) && ((D_8090CD00 & 0xFFF) == 0xFFF)) {
D_809171CB = 200;
if (Rand_ZeroOne() < 0.5f) {

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