1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-17 20:41:28 +00:00

Poe Objects (#743)

* poe objects

* Last unaccounted resolved, name suffix fixes

* remove _tex

* missed 2

* format

Co-authored-by: Fig02 <fig02srl@gmail.com>
This commit is contained in:
Tharo 2021-04-04 22:48:12 +01:00 committed by GitHub
parent 8b87e53b76
commit 208167361b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 318 additions and 241 deletions

View file

@ -0,0 +1,17 @@
<Root>
<File Name="object_po_composer" Segment="6">
<Animation Name="gPoeComposerAttackAnim" Offset="0x020C"/>
<Animation Name="gPoeComposerDamagedAnim" Offset="0x0570"/>
<Animation Name="gPoeComposerFleeAnim" Offset="0x0708"/>
<Animation Name="gPoeComposerFloatAnim" Offset="0x09DC"/>
<Animation Name="gPoeComposerAppearAnim" Offset="0x0FE4"/>
<Animation Name="gPoeComposerDisappearAnim" Offset="0x1440"/>
<DList Name="gPoeComposerSoulDL" Offset="0x1C90"/>
<DList Name="gPoeComposerLanternBottomDL" Offset="0x4498"/>
<DList Name="gPoeComposerLanternTopDL" Offset="0x4530"/>
<DList Name="gPoeComposerLanternDL" Offset="0x45A0"/>
<DList Name="gPoeComposerFlatHeadDL" Offset="0x4638"/>
<DList Name="gPoeComposerBurnDL" Offset="0x5220"/>
<Skeleton Name="gPoeComposerSkel" Type="Flex" LimbType="Standard" Offset="0x6F90"/>
</File>
</Root>

View file

@ -0,0 +1,20 @@
<Root>
<File Name="object_po_field" Segment="6">
<Animation Name="gPoeFieldAttackAnim" Offset="0x0158"/>
<Animation Name="gPoeFieldDamagedAnim" Offset="0x0454"/>
<Animation Name="gPoeFieldFleeAnim" Offset="0x0608"/>
<Animation Name="gPoeFieldFloatAnim" Offset="0x0924"/>
<Animation Name="gPoeFieldAppearAnim" Offset="0x0F9C"/>
<Animation Name="gPoeFieldDisappearAnim" Offset="0x1360"/>
<Texture Name="gBigPoeSoulTex" Offset="0x1370" OutName="big_poe_soul" Format="i8" Width="32" Height="64"/>
<Texture Name="gPoeFieldSoulTex" Offset="0x1B70" OutName="poe_field_soul" Format="i8" Width="32" Height="64"/>
<DList Name="gPoeFieldSoulDL" Offset="0x23B0"/>
<DList Name="gPoeFieldLanternDL" Offset="0x4BA0"/>
<DList Name="gPoeFieldLanternTopDL" Offset="0x4CC0"/>
<DList Name="gBigPoeCloakDL" Offset="0x5620"/>
<DList Name="gBigPoeFaceDL" Offset="0x5900"/>
<DList Name="gBigPoeBodyDL" Offset="0x59F0"/>
<DList Name="gPoeFieldBurnDL" Offset="0x66D0"/>
<Skeleton Name="gPoeFieldSkel" Type="Standard" LimbType="Standard" Offset="0x6A30"/>
</File>
</Root>

View file

@ -0,0 +1,28 @@
<Root>
<File Name="object_po_sisters" Segment="6">
<Animation Name="gPoeSistersAttackAnim" Offset="0x0114"/>
<Animation Name="gPoeSistersMegCryAnim" Offset="0x0680"/>
<Animation Name="gPoeSistersDamagedAnim" Offset="0x08C0"/>
<Animation Name="gPoeSistersFleeAnim" Offset="0x0A54"/>
<Animation Name="gPoeSistersFloatAnim" Offset="0x0D40"/>
<Animation Name="gPoeSistersAppearDisappearAnim" Offset="0x119C"/>
<Animation Name="gPoeSistersSwayAnim" Offset="0x14CC"/>
<DList Name="gPoeSistersMegFaceDL" Offset="0x1CB0"/>
<DList Name="gPoeSistersMegBodyDL" Offset="0x1DE0"/>
<DList Name="gPoSistersTorchDL" Offset="0x27B0"/>
<DList Name="gPoeSistersJoelleFaceDL" Offset="0x2EB8"/>
<DList Name="gPoeSistersJoelleBodyDL" Offset="0x2F88"/>
<DList Name="gPoeSistersBethBodyDL" Offset="0x3628"/>
<DList Name="gPoeSistersBethFaceDL" Offset="0x3880"/>
<DList Name="gPoeSistersAmyBodyDL" Offset="0x3DC8"/>
<DList Name="gPoSistersAmyFaceDL" Offset="0x4020"/>
<DList Name="gPoSistersBurnDL" Offset="0x46E0"/>
<Skeleton Name="gPoeSistersSkel" Type="Standard" LimbType="Standard" Offset="0x65C8"/>
<DList Name="gPoSistersJoellePaintingDL" Offset="0x6830"/>
<DList Name="gPoSistersBethPaintingDL" Offset="0x6D60"/>
<DList Name="gPoSistersAmyPaintingDL" Offset="0x7230"/>
<DList Name="gPoSistersAmyBlockDL" Offset="0x75A0"/>
<Collision Name="gPoSistersAmyBlockCol" Offset="0x7860"/>
<DList Name="gPoSistersAmyBethBlockDL" Offset="0x79E0"/>
</File>
</Root>

View file

@ -0,0 +1,14 @@
<Root>
<File Name="object_poh" Segment="6">
<Animation Name="gPoeAttackAnim" Offset="0x01A8"/>
<Animation Name="gPoeDamagedAnim" Offset="0x04EC"/>
<Animation Name="gPoeFleeAnim" Offset="0x06E0"/>
<Animation Name="gPoeFloatAnim" Offset="0x0A60"/>
<Animation Name="gPoeAppearAnim" Offset="0x11C4"/>
<Animation Name="gPoeDisappearAnim" Offset="0x15B0"/>
<DList Name="gPoeBurnDL" Offset="0x2608"/>
<DList Name="gPoeLanternDL" Offset="0x2D28"/>
<DList Name="gPoeSoulDL" Offset="0x3850"/>
<Skeleton Name="gPoeSkel" Type="Standard" LimbType="Standard" Offset="0x50D0"/>
</File>
</Root>

View file

@ -0,0 +1,19 @@
<Root>
<File Name="object_ps" Segment="6">
<Animation Name="gPoeSellerIdleAnim" Offset="0x049C"/>
<Texture Name="gPoeSellerMetalFrameTex" OutName="poe_seller_metal_frame" Format="rgb5a1" Width="8" Height="8" Offset="0x5A80"/>
<Texture Name="gPoeSellerMattressTex" OutName="poe_seller_mattress" Format="rgb5a1" Width="8" Height="8" Offset="0x5B00"/>
<Texture Name="gPoeSellerClothTex" OutName="poe_seller_cloth" Format="rgb5a1" Width="32" Height="32" Offset="0x5B80"/>
<Texture Name="gPoeSellerCarpetTex" OutName="poe_seller_carpet" Format="rgb5a1" Width="16" Height="16" Offset="0x6380"/>
<Texture Name="gPoeSellerBottleLabelTex" OutName="poe_seller_bottle_label" Format="rgb5a1" Width="16" Height="16" Offset="0x6580"/>
<Texture Name="gPoeSellerWoodenPanelTex" OutName="poe_seller_wooden_panel" Format="rgb5a1" Width="32" Height="32" Offset="0x6780"/>
<Texture Name="gPoeSellerLanternTex" OutName="poe_seller_lantern" Format="rgb5a1" Width="16" Height="16" Offset="0x6F80"/>
<Texture Name="gPoeSellerAngrySoulTex" OutName="poe_seller_angry_soul" Format="i8" Width="32" Height="64" Offset="0xA870"/>
<Texture Name="gPoeSellerHappySoulTex" OutName="poe_seller_happy_soul" Format="i8" Width="32" Height="64" Offset="0xB070"/>
<Texture Name="gPoeSellerSadSoulTex" OutName="poe_seller_sad_soul" Format="i8" Width="32" Height="64" Offset="0xB870"/>
<DList Name="gPoeSellerCagedSoulDL" Offset="0xC0B0"/>
<Skeleton Name="gPoeSellerSkel" Type="Flex" LimbType="Standard" Offset="0xC220"/>
<Collision Name="gPoeSellerCol" Offset="0xC2D0"/>
<Animation Name="gPoeSellerSwingStickAnim" Offset="0xC8EC"/>
</File>
</Root>

View file

@ -0,0 +1,18 @@
<Root>
<File Name="object_tk" Segment="6">
<Animation Name="gDampeDigAnim" Offset="0x1144"/>
<Animation Name="gDampeWalkAnim" Offset="0x1FA8"/>
<Animation Name="gDampeRestAnim" Offset="0x2F84"/>
<Animation Name="gDampeFloatAnim" Offset="0x3768"/>
<Texture Name="gDampeEyeOpenTex" Offset="0x3B40" OutName="dampe_eye_open" Format="rgb5a1" Width="32" Height="32"/>
<Texture Name="gDampeEyeHalfOpenTex" Offset="0x4340" OutName="dampe_eye_half_open" Format="rgb5a1" Width="32" Height="32"/>
<Texture Name="gDampeEyeClosedTex" Offset="0x4B40" OutName="dampe_eye_closed" Format="rgb5a1" Width="32" Height="32"/>
<Texture Name="gDampeUnkTex" OutName="dampe_unk" Format="ci8" Width="16" Height="16" Offset="0x5540"/>
<DList Name="gDampeShovelDL" Offset="0xACE0"/>
<DList Name="gDampeLanternDL" Offset="0xB838"/>
<DList Name="gDampeHaloDL" Offset="0xBBA0"/>
<DList Name="gDampeEff1DL" Offset="0xBC90"/>
<DList Name="gDampeEff2DL" Offset="0xBCA0"/>
<Skeleton Name="gDampeSkel" Type="Flex" LimbType="Standard" Offset="0xBE40"/>
</File>
</Root>

18
spec
View file

@ -3531,7 +3531,8 @@ endseg
beginseg
name "object_poh"
romalign 0x1000
include "build/baserom/object_poh.o"
include "build/assets/objects/object_poh/object_poh.o"
number 6
endseg
beginseg
@ -4210,7 +4211,8 @@ endseg
beginseg
name "object_tk"
romalign 0x1000
include "build/baserom/object_tk.o"
include "build/assets/objects/object_tk/object_tk.o"
number 6
endseg
beginseg
@ -4318,7 +4320,8 @@ endseg
beginseg
name "object_po_sisters"
romalign 0x1000
include "build/baserom/object_po_sisters.o"
include "build/assets/objects/object_po_sisters/object_po_sisters.o"
number 6
endseg
beginseg
@ -5720,7 +5723,8 @@ endseg
beginseg
name "object_po_field"
romalign 0x1000
include "build/baserom/object_po_field.o"
include "build/assets/objects/object_po_field/object_po_field.o"
number 6
endseg
beginseg
@ -5783,7 +5787,8 @@ endseg
beginseg
name "object_po_composer"
romalign 0x1000
include "build/baserom/object_po_composer.o"
include "build/assets/objects/object_po_composer/object_po_composer.o"
number 6
endseg
beginseg
@ -5832,7 +5837,8 @@ endseg
beginseg
name "object_ps"
romalign 0x1000
include "build/baserom/object_ps.o"
include "build/assets/objects/object_ps/object_ps.o"
number 6
endseg
beginseg

View file

@ -6178,8 +6178,8 @@ s32 Camera_Demo9(Camera* camera) {
// Run the at and eye cs interpoloation functions, if either of them return 1 (that no more points
// exist) change the animation state to 2 (standby)
if (func_800BB2B4(&csEyeUpdate, &newRoll, camFOV, demo9OnePoint->onePointCs.eyePoints,
&anim->keyframe, &anim->curFrame) != 0 ||
if (func_800BB2B4(&csEyeUpdate, &newRoll, camFOV, demo9OnePoint->onePointCs.eyePoints, &anim->keyframe,
&anim->curFrame) != 0 ||
func_800BB2B4(&csAtUpdate, &newRoll, camFOV, demo9OnePoint->onePointCs.atPoints, &anim->keyframe,
&anim->curFrame) != 0) {
camera->animState = 2;

View file

@ -47,7 +47,7 @@ f32 OnePointCutscene_RaycastFloor(CollisionContext* colCtx, Vec3f* pos) {
}
void OnePointCutscene_SetCsCamPoints(Camera* camera, s16 actionParameters, s16 initTimer, CutsceneCameraPoint* atPoints,
CutsceneCameraPoint* eyePoints) {
CutsceneCameraPoint* eyePoints) {
OnePointCsCamera* onePointCamData = (OnePointCsCamera*)&camera->paramData;
onePointCamData->atPoints = atPoints;

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_po_event.h"
#include "objects/object_po_sisters/object_po_sisters.h"
#define FLAGS 0x00000000
@ -29,13 +30,6 @@ void BgPoEvent_PaintingAppear(BgPoEvent* this, GlobalContext* globalCtx);
void BgPoEvent_PaintingPresent(BgPoEvent* this, GlobalContext* globalCtx);
void BgPoEvent_PaintingBurn(BgPoEvent* this, GlobalContext* globalCtx);
extern Gfx D_060075A0[];
extern Gfx D_060079E0[];
extern Gfx D_06006830[];
extern Gfx D_06006D60[];
extern Gfx D_06007230[];
extern CollisionHeader D_06007860;
const ActorInit Bg_Po_Event_InitVars = {
ACTOR_BG_PO_EVENT,
ACTORCAT_BG,
@ -164,7 +158,7 @@ void BgPoEvent_InitBlocks(BgPoEvent* this, GlobalContext* globalCtx) {
s32 bgId;
this->dyna.actor.flags |= 0x30;
CollisionHeader_GetVirtual(&D_06007860, &colHeader);
CollisionHeader_GetVirtual(&gPoSistersAmyBlockCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
if ((this->type == 0) && (this->index != 3)) {
newBlock = Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_BG_PO_EVENT,
@ -599,7 +593,10 @@ void BgPoEvent_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgPoEvent_Draw(Actor* thisx, GlobalContext* globalCtx) {
static Gfx* displayLists[] = { D_060075A0, D_060079E0, D_06006830, D_06006D60, D_06007230 };
static Gfx* displayLists[] = {
gPoSistersAmyBlockDL, gPoSistersAmyBethBlockDL, gPoSistersJoellePaintingDL,
gPoSistersBethPaintingDL, gPoSistersAmyPaintingDL,
};
s32 pad;
BgPoEvent* this = THIS;
u8 alpha;

View file

@ -1,4 +1,11 @@
/*
* File: z_en_gb.c
* Overlay: ovl_En_Gb
* Description: Poe Seller
*/
#include "z_en_gb.h"
#include "objects/object_ps/object_ps.h"
#define FLAGS 0x00000009
@ -34,9 +41,9 @@ const ActorInit En_Gb_InitVars = {
};
static EnGbCagedSoulInfo sCagedSoulInfo[] = {
{ { 255, 255, 170, 255 }, { 255, 200, 0, 255 }, 0x0600A870, -15 },
{ { 255, 255, 170, 255 }, { 0, 150, 0, 255 }, 0x0600B070, -12 },
{ { 255, 170, 255, 255 }, { 100, 0, 150, 255 }, 0x0600B870, -8 },
{ { 255, 255, 170, 255 }, { 255, 200, 0, 255 }, gPoeSellerAngrySoulTex, -15 },
{ { 255, 255, 170, 255 }, { 0, 150, 0, 255 }, gPoeSellerHappySoulTex, -12 },
{ { 255, 170, 255, 255 }, { 100, 0, 150, 255 }, gPoeSellerSadSoulTex, -8 },
};
static ColliderCylinderInitType1 sCylinderInit = {
@ -135,12 +142,6 @@ static Vec3f sBottlesPositions[] = {
{ -48.0f, 0.0f, 60.0f },
};
extern AnimationHeader D_0600049C;
extern Gfx D_0600C0B0[];
extern FlexSkeletonHeader D_0600C220;
extern CollisionHeader D_0600C2D0;
extern AnimationHeader D_0600C8EC;
void func_80A2F180(EnGb* this) {
if (gSaveContext.infTable[0xB] & 0x40) {
this->textId = 0x70F5;
@ -159,9 +160,10 @@ void EnGb_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, DPM_UNK);
CollisionHeader_GetVirtual(&D_0600C2D0, &colHeader);
CollisionHeader_GetVirtual(&gPoeSellerCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600C220, &D_0600049C, this->jointTable, this->morphTable, 12);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gPoeSellerSkel, &gPoeSellerIdleAnim, this->jointTable,
this->morphTable, 12);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinderType1(globalCtx, &this->collider, &this->dyna.actor, &sCylinderInit);
@ -183,7 +185,7 @@ void EnGb_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actionTimer = (s16)Rand_ZeroFloat(100.0f) + 100;
for (i = 0; i < ARRAY_COUNT(sCagedSoulPositions); i++) {
this->cagedSouls[i].unk_0 = (s32)Rand_ZeroFloat(30.0f) % 3;
this->cagedSouls[i].infoIdx = (s32)Rand_ZeroFloat(30.0f) % 3;
this->cagedSouls[i].unk_14.x = this->cagedSouls[i].translation.x =
sCagedSoulPositions[i].x + this->dyna.actor.world.pos.x;
this->cagedSouls[i].unk_14.y = this->cagedSouls[i].translation.y =
@ -262,8 +264,8 @@ s32 func_80A2F760(EnGb* this) {
}
void func_80A2F7C0(EnGb* this) {
Animation_Change(&this->skelAnime, &D_0600C8EC, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600C8EC), ANIMMODE_ONCE,
0.0f);
Animation_Change(&this->skelAnime, &gPoeSellerSwingStickAnim, 1.0f, 0.0f,
Animation_GetLastFrame(&gPoeSellerSwingStickAnim), ANIMMODE_ONCE, 0.0f);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_NALE_MAGIC);
this->actionFunc = func_80A2FC70;
}
@ -373,8 +375,9 @@ void func_80A2FC0C(EnGb* this, GlobalContext* globalCtx) {
}
void func_80A2FC70(EnGb* this, GlobalContext* globalCtx) {
if (this->skelAnime.curFrame == Animation_GetLastFrame(&D_0600C8EC)) {
Animation_Change(&this->skelAnime, &D_0600049C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600049C), 0, 0.0f);
if (this->skelAnime.curFrame == Animation_GetLastFrame(&gPoeSellerSwingStickAnim)) {
Animation_Change(&this->skelAnime, &gPoeSellerIdleAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gPoeSellerIdleAnim),
0, 0.0f);
this->actionFunc = func_80A2F83C;
} else if (this->skelAnime.curFrame == 18.0f) {
this->cagedSouls[1].unk_1 = 3;
@ -520,12 +523,12 @@ void EnGb_DrawCagedSouls(EnGb* this, GlobalContext* globalCtx) {
func_80093D84(globalCtx->state.gfxCtx);
for (i = 0; i < 4; i++) {
s32 idx = this->cagedSouls[i].unk_0;
s32 idx = this->cagedSouls[i].infoIdx;
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0,
(u32)(sCagedSoulInfo[idx].unk_C * this->frameTimer) % 512, 32, 128));
gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sCagedSoulInfo[idx].unk_8));
(u32)(sCagedSoulInfo[idx].timerMultiplier * this->frameTimer) % 512, 32, 128));
gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sCagedSoulInfo[idx].texture));
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, sCagedSoulInfo[idx].prim.r, sCagedSoulInfo[idx].prim.g,
sCagedSoulInfo[idx].prim.b, sCagedSoulInfo[idx].prim.a);
gDPSetEnvColor(POLY_XLU_DISP++, sCagedSoulInfo[idx].env.r, sCagedSoulInfo[idx].env.g, sCagedSoulInfo[idx].env.b,
@ -543,7 +546,7 @@ void EnGb_DrawCagedSouls(EnGb* this, GlobalContext* globalCtx) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gb.c", 955),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, D_0600C0B0);
gSPDisplayList(POLY_XLU_DISP++, gPoeSellerCagedSoulDL);
Matrix_Pop();
}

View file

@ -11,12 +11,12 @@ typedef void (*EnGbActionFunc)(struct EnGb*, GlobalContext*);
typedef struct {
/* 0x00 */ Color_RGBA8 prim;
/* 0x04 */ Color_RGBA8 env;
/* 0x08 */ UNK_TYPE unk_8;
/* 0x0C */ s16 unk_C;
/* 0x08 */ u64* texture;
/* 0x0C */ s16 timerMultiplier;
} EnGbCagedSoulInfo; // size = 0x10
typedef struct {
/* 0x00 */ u8 unk_0;
/* 0x00 */ u8 infoIdx;
/* 0x01 */ u8 unk_1;
/* 0x02 */ u8 unk_2;
/* 0x03 */ u8 unk_3;

View file

@ -5,6 +5,7 @@
*/
#include "z_en_po_desert.h"
#include "objects/object_po_field/object_po_field.h"
#define FLAGS 0x00001090
@ -58,19 +59,13 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(targetArrowOffset, 3200, ICHAIN_STOP),
};
extern SkeletonHeader D_06006A30;
extern AnimationHeader D_06000924;
extern AnimationHeader D_06001360;
extern Gfx D_06004BA0[];
extern Gfx D_06004CC0[];
void EnPoDesert_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnPoDesert* this = THIS;
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_06006A30, &D_06000924, this->jointTable, this->morphTable, 10);
SkelAnime_Init(globalCtx, &this->skelAnime, &gPoeFieldSkel, &gPoeFieldFloatAnim, this->jointTable, this->morphTable,
10);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sColliderInit);
this->lightColor.r = 255;
@ -98,7 +93,7 @@ void EnPoDesert_SetNextPathPoint(EnPoDesert* this, GlobalContext* globalCtx) {
Path* path = &globalCtx->setupPathList[this->actor.params];
Vec3s* pathPoint;
Animation_MorphToLoop(&this->skelAnime, &D_06001360, -6.0f);
Animation_MorphToLoop(&this->skelAnime, &gPoeFieldDisappearAnim, -6.0f);
pathPoint = &((Vec3s*)SEGMENTED_TO_VIRTUAL(path->points))[this->currentPathPoint];
this->actor.home.pos.x = pathPoint->x;
this->actor.home.pos.y = pathPoint->y;
@ -115,12 +110,12 @@ void EnPoDesert_SetNextPathPoint(EnPoDesert* this, GlobalContext* globalCtx) {
}
void EnPoDesert_SetupMoveToNextPoint(EnPoDesert* this) {
Animation_MorphToLoop(&this->skelAnime, &D_06000924, -5.0f);
Animation_MorphToLoop(&this->skelAnime, &gPoeFieldFloatAnim, -5.0f);
this->actionFunc = EnPoDesert_MoveToNextPoint;
}
void EnPoDesert_SetupDisappear(EnPoDesert* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06001360, -6.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gPoeFieldDisappearAnim, -6.0f);
this->actionTimer = 16;
this->actor.speedXZ = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_DISAPPEAR);
@ -248,8 +243,8 @@ void EnPoDesert_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
gDPSetEnvColor((*gfxP)++, color.r, color.g, color.b, 255);
gSPMatrix((*gfxP)++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_po_desert.c", 523),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList((*gfxP)++, D_06004BA0);
gSPDisplayList((*gfxP)++, D_06004CC0);
gSPDisplayList((*gfxP)++, gPoeFieldLanternDL);
gSPDisplayList((*gfxP)++, gPoeFieldLanternTopDL);
gDPPipeSync((*gfxP)++);
gDPSetEnvColor((*gfxP)++, this->lightColor.r, this->lightColor.g, this->lightColor.b, this->lightColor.a);
}

View file

@ -6,6 +6,7 @@
#include "z_en_po_field.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_po_field/object_po_field.h"
#define FLAGS 0x00001035
@ -136,8 +137,8 @@ static Vec3f D_80AD7114 = { 0.0f, 3.0f, 0.0f };
static Vec3f D_80AD7120 = { 0.0f, 0.0f, 0.0f };
static EnPoFieldInfo sPoFieldInfo[2] = {
{ { 255, 170, 255 }, { 100, 0, 150 }, { 255, 85, 0 }, 248, 0x06001B70 },
{ { 255, 255, 170 }, { 255, 200, 0 }, { 160, 0, 255 }, 241, 0x06001370 },
{ { 255, 170, 255 }, { 100, 0, 150 }, { 255, 85, 0 }, 248, gPoeFieldSoulTex },
{ { 255, 255, 170 }, { 255, 200, 0 }, { 160, 0, 255 }, 241, gBigPoeSoulTex },
};
static Vec3f D_80AD714C = { 0.0f, 1400.0f, 0.0f };
@ -146,20 +147,6 @@ static Vec3s sSpawnPositions[10];
static u8 sSpawnSwitchFlags[10];
static MtxF sLimb7Mtx;
extern AnimationHeader D_06000924;
extern SkeletonHeader D_06006A30;
extern AnimationHeader D_06000F9C;
extern AnimationHeader D_06000608;
extern AnimationHeader D_06000454;
extern AnimationHeader D_06001360;
extern Gfx D_060059F0[];
extern Gfx D_06005900[];
extern Gfx D_06005620[];
extern Gfx D_060066D0[];
extern Gfx D_06004BA0[];
extern Gfx D_06004CC0[];
extern Gfx D_060023B0[];
void EnPoField_Init(Actor* thisx, GlobalContext* globalCtx) {
EnPoField* this = THIS;
s32 pad;
@ -177,7 +164,8 @@ void EnPoField_Init(Actor* thisx, GlobalContext* globalCtx) {
return;
}
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_06006A30, &D_06000924, this->jointTable, this->morphTable, 10);
SkelAnime_Init(globalCtx, &this->skelAnime, &gPoeFieldSkel, &gPoeFieldFloatAnim, this->jointTable, this->morphTable,
10);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &D_80AD7080);
Collider_InitCylinder(globalCtx, &this->flameCollider);
@ -217,7 +205,7 @@ void EnPoField_SetupWaitForSpawn(EnPoField* this, GlobalContext* globalCtx) {
}
void EnPoField_SetupAppear(EnPoField* this) {
Animation_PlayOnce(&this->skelAnime, &D_06000F9C);
Animation_PlayOnce(&this->skelAnime, &gPoeFieldAppearAnim);
this->actor.draw = EnPoField_Draw;
this->lightColor.r = 255;
this->lightColor.g = 255;
@ -250,7 +238,7 @@ void EnPoField_SetupAppear(EnPoField* this) {
void EnPoField_SetupCirclePlayer(EnPoField* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
Animation_PlayLoop(&this->skelAnime, &D_06000924);
Animation_PlayLoop(&this->skelAnime, &gPoeFieldFloatAnim);
this->collider.base.acFlags |= AC_ON;
this->scaleModifier = this->actor.xzDistToPlayer;
Math_Vec3f_Copy(&this->actor.home.pos, &player->actor.world.pos);
@ -264,7 +252,7 @@ void EnPoField_SetupCirclePlayer(EnPoField* this, GlobalContext* globalCtx) {
}
void EnPoField_SetupFlee(EnPoField* this) {
Animation_MorphToLoop(&this->skelAnime, &D_06000608, -5.0f);
Animation_MorphToLoop(&this->skelAnime, &gPoeFieldFleeAnim, -5.0f);
this->collider.base.acFlags |= AC_ON;
this->actionFunc = EnPoField_Flee;
this->actor.speedXZ = 12.0f;
@ -277,7 +265,7 @@ void EnPoField_SetupFlee(EnPoField* this) {
}
void EnPoField_SetupDamage(EnPoField* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06000454, -6.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gPoeFieldDamagedAnim, -6.0f);
if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x1F824) {
this->actor.world.rot.y = this->collider.base.ac->world.rot.y;
} else {
@ -302,7 +290,7 @@ void EnPoField_SetupDeath(EnPoField* this) {
}
void EnPoField_SetupDisappear(EnPoField* this) {
Animation_MorphToLoop(&this->skelAnime, &D_06001360, -6.0f);
Animation_MorphToLoop(&this->skelAnime, &gPoeFieldDisappearAnim, -6.0f);
this->actionTimer = 16;
this->collider.base.acFlags &= ~(AC_HIT | AC_ON);
this->actor.speedXZ = 0.0f;
@ -616,7 +604,8 @@ void EnPoField_SoulIdle(EnPoField* this, GlobalContext* globalCtx) {
this->actionTimer--;
}
if (this->actor.bgCheckFlags & 1) {
EffectSsHahen_SpawnBurst(globalCtx, &this->actor.world.pos, 6.0f, 0, 1, 1, 15, OBJECT_PO_FIELD, 10, D_06004BA0);
EffectSsHahen_SpawnBurst(globalCtx, &this->actor.world.pos, 6.0f, 0, 1, 1, 15, OBJECT_PO_FIELD, 10,
gPoeFieldLanternDL);
func_80AD42B0(this);
} else if (this->actionTimer == 0) {
EnPoField_SetupWaitForSpawn(this, globalCtx);
@ -890,11 +879,11 @@ s32 EnPoField_OverrideLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** d
*dList = NULL;
} else if (this->actor.params == EN_PO_FIELD_BIG) {
if (limbIndex == 1) {
*dList = D_06005900;
*dList = gBigPoeFaceDL;
} else if (limbIndex == 8) {
*dList = D_06005620;
*dList = gBigPoeCloakDL;
} else if (limbIndex == 9) {
*dList = D_060059F0;
*dList = gBigPoeBodyDL;
}
}
if (this->actionFunc == EnPoField_Disappear && limbIndex == 7) {
@ -909,7 +898,7 @@ void EnPoField_PostLimDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
if (this->actionFunc == EnPoField_Death && this->actionTimer >= 2 && limbIndex == 8) {
gSPMatrix((*gfxP)++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_po_field.c", 1916),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList((*gfxP)++, D_060066D0);
gSPDisplayList((*gfxP)++, gPoeFieldBurnDL);
}
if (limbIndex == 7) {
Vec3f vec;
@ -961,8 +950,8 @@ void EnPoField_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Put(&sLimb7Mtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_po_field.c", 2033),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_06004BA0);
gSPDisplayList(POLY_OPA_DISP++, D_06004CC0);
gSPDisplayList(POLY_OPA_DISP++, gPoeFieldLanternDL);
gSPDisplayList(POLY_OPA_DISP++, gPoeFieldLanternTopDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_po_field.c", 2039);
}
EnPoField_DrawFlame(this, globalCtx);
@ -993,21 +982,21 @@ void EnPoField_DrawSoul(Actor* thisx, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_OPA_DISP++, this->soulColor.r, this->soulColor.g, this->soulColor.b, 255);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_po_field.c", 2104),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_06004BA0);
gSPDisplayList(POLY_OPA_DISP++, D_06004CC0);
gSPDisplayList(POLY_OPA_DISP++, gPoeFieldLanternDL);
gSPDisplayList(POLY_OPA_DISP++, gPoeFieldLanternTopDL);
} else {
func_80093D84(globalCtx->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0,
(globalCtx->gameplayFrames * info->unk_9) & 0x1FF, 0x20, 0x80));
gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(info->unk_C));
gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(info->soulTexture));
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, info->primColor.r, info->primColor.g, info->primColor.b,
this->lightColor.a);
gDPSetEnvColor(POLY_XLU_DISP++, this->lightColor.r, this->lightColor.g, this->lightColor.b, 255);
Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000) * 9.58738e-05f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_po_field.c", 2143),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, D_060023B0);
gSPDisplayList(POLY_XLU_DISP++, gPoeFieldSoulDL);
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_po_field.c", 2149);
EnPoField_DrawFlame(this, globalCtx);

View file

@ -18,7 +18,7 @@ typedef struct {
/* 0x0003 */ Color_RGB8 lightColor;
/* 0x0006 */ Color_RGB8 envColor;
/* 0x0009 */ s8 unk_9;
/* 0x000C */ UNK_PTR unk_C;
/* 0x000C */ u64* soulTexture;
} EnPoFieldInfo; // size = 0x10
typedef struct EnPoField {

View file

@ -6,6 +6,7 @@
#include "z_en_po_relay.h"
#include "overlays/actors/ovl_En_Honotrap/z_en_honotrap.h"
#include "objects/object_tk/object_tk.h"
#define FLAGS 0x00011019
@ -79,24 +80,20 @@ static Vec3f D_80AD8D3C = { 0.0f, 0.0f, 0.0f };
static Vec3f D_80AD8D48 = { 0.0f, 1200.0f, 0.0f };
static UNK_PTR sEyesSegments[] = {
0x06003B40,
0x06004340,
0x06004B40,
static u64* sEyesSegments[] = {
gDampeEyeOpenTex,
gDampeEyeHalfOpenTex,
gDampeEyeClosedTex,
};
extern FlexSkeletonHeader D_0600BE40;
extern AnimationHeader D_06003768;
extern Gfx D_0600B838[];
extern Gfx D_0600BBA0[];
void EnPoRelay_Init(Actor* thisx, GlobalContext* globalCtx) {
EnPoRelay* this = THIS;
s32 temp;
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 42.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600BE40, &D_06003768, this->jointTable, this->morphTable, 18);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gDampeSkel, &gDampeFloatAnim, this->jointTable, this->morphTable,
18);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
this->lightNode = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, &this->lightInfo);
@ -387,7 +384,7 @@ void EnPoRelay_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
this->lightColor.b = (s16)(rand * 160.0f) + 95;
gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, this->lightColor.r, this->lightColor.g, this->lightColor.b, 128);
gSPDisplayList(POLY_OPA_DISP++, D_0600B838);
gSPDisplayList(POLY_OPA_DISP++, gDampeLanternDL);
if (1) {}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_po_relay.c", 901);
Matrix_MultVec3f(&D_80AD8D48, &vec);
@ -397,7 +394,7 @@ void EnPoRelay_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_po_relay.c", 916);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_po_relay.c", 918),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_0600BBA0);
gSPDisplayList(POLY_OPA_DISP++, gDampeHaloDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_po_relay.c", 922);
}
}

View file

@ -6,6 +6,7 @@
#include "z_en_po_sisters.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_po_sisters/object_po_sisters.h"
#define FLAGS 0x00005215
@ -151,9 +152,19 @@ static Vec3s D_80ADD7A4[4] = {
static Vec3f D_80ADD7BC = { 120.0f, 250.0f, -1420.0f };
static Gfx* D_80ADD7C8[4] = { 0x06001DE0, 0x06002F88, 0x06003628, 0x06003DC8 };
static Gfx* D_80ADD7C8[4] = {
gPoeSistersMegBodyDL,
gPoeSistersJoelleBodyDL,
gPoeSistersBethBodyDL,
gPoeSistersAmyBodyDL,
};
static Gfx* D_80ADD7D8[4] = { 0x06001CB0, 0x06002EB8, 0x06003880, 0x06004020 };
static Gfx* D_80ADD7D8[4] = {
gPoeSistersMegFaceDL,
gPoeSistersJoelleFaceDL,
gPoeSistersBethFaceDL,
gPoSistersAmyFaceDL,
};
static Color_RGBA8 D_80ADD7E8[4] = {
{ 80, 0, 100, 0 },
@ -164,25 +175,14 @@ static Color_RGBA8 D_80ADD7E8[4] = {
static Vec3f D_80ADD7F8 = { 1000.0f, -1700.0f, 0.0f };
extern SkeletonHeader D_060065C8;
extern AnimationHeader D_060014CC;
extern AnimationHeader D_06000D40;
extern AnimationHeader D_06000114;
extern AnimationHeader D_060008C0;
extern AnimationHeader D_06000A54;
extern AnimationHeader D_0600119C;
extern AnimationHeader D_06000680;
extern Gfx D_060027B0[];
extern Gfx D_060046E0[];
void EnPoSisters_Init(Actor* thisx, GlobalContext* globalCtx) {
EnPoSisters* this = THIS;
s32 pad;
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 50.0f);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_060065C8, &D_060014CC, this->jointTable, this->morphTable, 12);
SkelAnime_Init(globalCtx, &this->skelAnime, &gPoeSistersSkel, &gPoeSistersSwayAnim, this->jointTable,
this->morphTable, 12);
this->unk_22E.r = 255;
this->unk_22E.g = 255;
this->unk_22E.b = 210;
@ -246,7 +246,7 @@ void func_80AD9240(EnPoSisters* this, s32 arg1, Vec3f* arg2) {
}
void func_80AD9368(EnPoSisters* this) {
Animation_MorphToLoop(&this->skelAnime, &D_060014CC, -3.0f);
Animation_MorphToLoop(&this->skelAnime, &gPoeSistersSwayAnim, -3.0f);
this->unk_19A = Rand_S16Offset(2, 3);
this->actionFunc = func_80ADA4A8;
this->actor.speedXZ = 0.0f;
@ -254,7 +254,7 @@ void func_80AD9368(EnPoSisters* this) {
void func_80AD93C4(EnPoSisters* this) {
if (this->actionFunc != func_80ADA6A0) {
Animation_MorphToLoop(&this->skelAnime, &D_06000D40, -3.0f);
Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f);
}
this->unk_19A = Rand_S16Offset(0xF, 3);
this->unk_199 |= 7;
@ -270,9 +270,9 @@ void func_80AD944C(EnPoSisters* this) {
this->collider.base.colType = COLTYPE_METAL;
this->collider.base.acFlags |= AC_HARD;
}
Animation_MorphToLoop(&this->skelAnime, &D_06000114, -5.0f);
Animation_MorphToLoop(&this->skelAnime, &gPoeSistersAttackAnim, -5.0f);
this->actor.speedXZ = 0.0f;
this->unk_19A = Animation_GetLastFrame(&D_06000114) * 3 + 3;
this->unk_19A = Animation_GetLastFrame(&gPoeSistersAttackAnim) * 3 + 3;
this->unk_199 &= ~2;
this->actionFunc = func_80ADA7F0;
}
@ -282,7 +282,7 @@ void func_80AD94E0(EnPoSisters* this) {
if (this->unk_194 == 0) {
this->collider.base.colType = COLTYPE_METAL;
this->collider.base.acFlags |= AC_HARD;
Animation_MorphToLoop(&this->skelAnime, &D_06000114, -5.0f);
Animation_MorphToLoop(&this->skelAnime, &gPoeSistersAttackAnim, -5.0f);
}
this->unk_19A = 5;
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
@ -291,7 +291,7 @@ void func_80AD94E0(EnPoSisters* this) {
}
void func_80AD9568(EnPoSisters* this) {
Animation_MorphToLoop(&this->skelAnime, &D_06000D40, -3.0f);
Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f);
this->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000;
if (this->unk_194 != 0) {
this->collider.base.colType = COLTYPE_HIT3;
@ -301,7 +301,7 @@ void func_80AD9568(EnPoSisters* this) {
}
void func_80AD95D8(EnPoSisters* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_060008C0, -3.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gPoeSistersDamagedAnim, -3.0f);
if (this->collider.base.ac != NULL) {
this->actor.world.rot.y = (this->collider.info.acHitInfo->toucher.dmgFlags & 0x1F824)
? this->collider.base.ac->world.rot.y
@ -316,7 +316,7 @@ void func_80AD95D8(EnPoSisters* this) {
}
void func_80AD96A4(EnPoSisters* this) {
Animation_MorphToLoop(&this->skelAnime, &D_06000A54, -3.0f);
Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFleeAnim, -3.0f);
this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000;
this->unk_19A = 5;
this->unk_199 |= 0xB;
@ -325,8 +325,8 @@ void func_80AD96A4(EnPoSisters* this) {
}
void func_80AD9718(EnPoSisters* this) {
Animation_Change(&this->skelAnime, &D_0600119C, 1.5f, 0.0f, Animation_GetLastFrame(&D_0600119C), ANIMMODE_ONCE,
-3.0f);
Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 1.5f, 0.0f,
Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE, -3.0f);
this->actor.speedXZ = 0.0f;
this->unk_19C = 100;
this->actor.world.rot.y = this->actor.shape.rot.y;
@ -356,8 +356,8 @@ void func_80AD97C8(EnPoSisters* this, GlobalContext* globalCtx) {
}
void func_80AD98F4(EnPoSisters* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_0600119C, 1.5f, 0.0f, Animation_GetLastFrame(&D_0600119C), ANIMMODE_ONCE,
-3.0f);
Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 1.5f, 0.0f,
Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE, -3.0f);
if (this->unk_194 == 0) {
this->unk_294 = 110.0f;
func_80AD97C8(this, globalCtx);
@ -417,7 +417,7 @@ void func_80AD9AA8(EnPoSisters* this, GlobalContext* globalCtx) {
actor3->parent = &this->actor;
actor2->parent = &this->actor;
actor1->parent = &this->actor;
Animation_PlayLoop(&this->skelAnime, &D_06000680);
Animation_PlayLoop(&this->skelAnime, &gPoeSistersMegCryAnim);
this->unk_198 = 0;
this->unk_199 = 160;
this->actionFunc = func_80ADB2B8;
@ -446,11 +446,11 @@ void func_80AD9C24(EnPoSisters* this, GlobalContext* globalCtx) {
void func_80AD9D44(EnPoSisters* this) {
if (this->unk_194 == 3) {
Animation_PlayOnce(&this->skelAnime, &D_0600119C);
Animation_PlayOnce(&this->skelAnime, &gPoeSistersAppearDisappearAnim);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_APPEAR);
} else {
Animation_Change(&this->skelAnime, &D_0600119C, 0.5f, 0.0f, Animation_GetLastFrame(&D_0600119C),
ANIMMODE_ONCE_INTERP, 0.0f);
Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 0.5f, 0.0f,
Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE_INTERP, 0.0f);
}
this->unk_22E.a = 0;
this->unk_199 = 32;
@ -458,7 +458,7 @@ void func_80AD9D44(EnPoSisters* this) {
}
void func_80AD9DF0(EnPoSisters* this, GlobalContext* globalCtx) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_0600119C, -5.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gPoeSistersAppearDisappearAnim, -5.0f);
this->unk_198 = 1;
this->unk_199 &= ~0x80;
this->actionFunc = func_80ADB4B0;
@ -466,8 +466,8 @@ void func_80AD9DF0(EnPoSisters* this, GlobalContext* globalCtx) {
}
void func_80AD9E60(EnPoSisters* this) {
Animation_MorphToLoop(&this->skelAnime, &D_06000D40, -3.0f);
this->unk_19A = Animation_GetLastFrame(&D_06000D40) * 7 + 7;
Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f);
this->unk_19A = Animation_GetLastFrame(&gPoeSistersFloatAnim) * 7 + 7;
if (this->actor.parent != NULL) {
this->actor.world.pos = this->actor.parent->world.pos;
this->actor.shape.rot.y = this->actor.parent->shape.rot.y;
@ -482,7 +482,7 @@ void func_80AD9E60(EnPoSisters* this) {
}
void func_80AD9F1C(EnPoSisters* this) {
Animation_MorphToLoop(&this->skelAnime, &D_06000D40, -3.0f);
Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f);
this->unk_22E.a = 255;
this->unk_19A = 300;
this->unk_19C = 3;
@ -499,14 +499,14 @@ void func_80AD9F90(EnPoSisters* this) {
this->actor.home.pos.x = 752.0f;
this->actor.home.pos.z = -3440.0f;
}
Animation_PlayLoop(&this->skelAnime, &D_06000D40);
Animation_PlayLoop(&this->skelAnime, &gPoeSistersFloatAnim);
this->unk_199 |= 0xA;
this->actionFunc = func_80ADBB6C;
this->actor.speedXZ = 5.0f;
}
void func_80ADA028(EnPoSisters* this) {
Animation_MorphToLoop(&this->skelAnime, &D_060014CC, -3.0f);
Animation_MorphToLoop(&this->skelAnime, &gPoeSistersSwayAnim, -3.0f);
this->unk_22E.a = 255;
this->unk_199 |= 0x15;
this->actor.flags |= 1;
@ -535,8 +535,8 @@ void func_80ADA10C(EnPoSisters* this) {
}
void func_80ADA1B8(EnPoSisters* this) {
Animation_Change(&this->skelAnime, &D_0600119C, 0.833f, 0.0f, Animation_GetLastFrame(&D_0600119C),
ANIMMODE_ONCE_INTERP, 0.0f);
Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 0.833f, 0.0f,
Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim), ANIMMODE_ONCE_INTERP, 0.0f);
if (this->unk_194 == 0 || this->unk_194 == 1) {
this->unk_19A = 40;
} else {
@ -548,7 +548,7 @@ void func_80ADA1B8(EnPoSisters* this) {
}
void func_80ADA25C(EnPoSisters* this) {
Animation_PlayLoop(&this->skelAnime, &D_060014CC);
Animation_PlayLoop(&this->skelAnime, &gPoeSistersSwayAnim);
this->unk_198 = 8;
this->unk_19A = 32;
func_80AD9240(this, this->unk_19A, &this->actor.home.pos);
@ -556,7 +556,7 @@ void func_80ADA25C(EnPoSisters* this) {
}
void func_80ADA2BC(EnPoSisters* this, GlobalContext* globalCtx) {
Animation_MorphToLoop(&this->skelAnime, &D_06000D40, -3.0f);
Animation_MorphToLoop(&this->skelAnime, &gPoeSistersFloatAnim, -3.0f);
this->unk_198 = 0;
this->unk_199 = 40;
this->unk_19A = 90;
@ -1234,17 +1234,17 @@ void EnPoSisters_Update(Actor* thisx, GlobalContext* globalCtx) {
void func_80ADC55C(EnPoSisters* this) {
s16 temp_var;
if (this->skelAnime.animation == &D_06000114) {
if (this->skelAnime.animation == &gPoeSistersAttackAnim) {
this->unk_22E.r = CLAMP_MAX((s16)(this->unk_22E.r + 5), 255);
this->unk_22E.g = CLAMP_MIN((s16)(this->unk_22E.g - 5), 50);
temp_var = this->unk_22E.b - 5;
this->unk_22E.b = CLAMP_MIN(temp_var, 0);
} else if (this->skelAnime.animation == &D_06000A54) {
} else if (this->skelAnime.animation == &gPoeSistersFleeAnim) {
this->unk_22E.r = CLAMP_MAX((s16)(this->unk_22E.r + 5), 80);
this->unk_22E.g = CLAMP_MAX((s16)(this->unk_22E.g + 5), 255);
temp_var = this->unk_22E.b + 5;
this->unk_22E.b = CLAMP_MAX(temp_var, 225);
} else if (this->skelAnime.animation == &D_060008C0) {
} else if (this->skelAnime.animation == &gPoeSistersDamagedAnim) {
if (this->actor.colorFilterTimer & 2) {
this->unk_22E.r = 0;
this->unk_22E.g = 0;
@ -1304,7 +1304,7 @@ void EnPoSisters_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLi
if (this->actionFunc == func_80ADAFC0 && this->unk_19A >= 8 && limbIndex == 9) {
gSPMatrix((*gfxP)++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_po_sisters.c", 2876),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList((*gfxP)++, D_060046E0);
gSPDisplayList((*gfxP)++, gPoSistersBurnDL);
}
if (limbIndex == 8 && this->actionFunc != func_80ADB2B8) {
if (this->unk_199 & 0x20) {
@ -1369,7 +1369,7 @@ void EnPoSisters_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Put(&this->unk_2F8);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_po_sisters.c", 3034),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_060027B0);
gSPDisplayList(POLY_OPA_DISP++, gPoSistersTorchDL);
}
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0,

View file

@ -5,6 +5,8 @@
*/
#include "z_en_poh.h"
#include "objects/object_poh/object_poh.h"
#include "objects/object_po_composer/object_po_composer.h"
#define FLAGS 0x00001015
@ -145,13 +147,13 @@ static EnPohInfo sPoeInfo[2] = {
18,
5,
248,
0x060015B0,
0x06000A60,
0x060004EC,
0x060006E0,
0x06002D28,
0x06002608,
0x06003850,
&gPoeDisappearAnim,
&gPoeFloatAnim,
&gPoeDamagedAnim,
&gPoeFleeAnim,
gPoeLanternDL,
gPoeBurnDL,
gPoeSoulDL,
},
{
{ 255, 255, 170 },
@ -159,13 +161,13 @@ static EnPohInfo sPoeInfo[2] = {
9,
1,
244,
0x06001440,
0x060009DC,
0x06000570,
0x06000708,
0x060045A0,
0x06005220,
0x06001C90,
&gPoeComposerDisappearAnim,
&gPoeComposerFloatAnim,
&gPoeComposerDamagedAnim,
&gPoeComposerFleeAnim,
gPoeComposerLanternDL,
gPoeComposerBurnDL,
gPoeComposerSoulDL,
},
};
@ -181,23 +183,6 @@ static InitChainEntry sInitChain[] = {
static Vec3f D_80AE1B60 = { 0.0f, 3.0f, 0.0f };
static Vec3f D_80AE1B6C = { 0.0f, 0.0f, 0.0f };
extern FlexSkeletonHeader D_06006F90;
extern AnimationHeader D_060009DC;
extern SkeletonHeader D_060050D0;
extern AnimationHeader D_06000A60;
extern AnimationHeader D_060001A8;
extern AnimationHeader D_0600020C;
extern AnimationHeader D_060004EC;
extern AnimationHeader D_06000570;
extern AnimationHeader D_06000FE4;
extern AnimationHeader D_060011C4;
extern Gfx D_06004638[];
extern Gfx D_06004498[];
extern Gfx D_06004530[];
void EnPoh_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnItem00* collectible;
@ -273,20 +258,20 @@ void EnPoh_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void func_80ADE114(EnPoh* this) {
Animation_PlayLoop(&this->skelAnime, this->info->unk_C);
Animation_PlayLoop(&this->skelAnime, this->info->idleAnim);
this->unk_198 = Rand_S16Offset(2, 3);
this->actionFunc = func_80ADEAC4;
this->actor.speedXZ = 0.0f;
}
void EnPoh_SetupIdle(EnPoh* this) {
Animation_PlayLoop(&this->skelAnime, this->info->unk_10);
Animation_PlayLoop(&this->skelAnime, this->info->idleAnim2);
this->unk_198 = Rand_S16Offset(15, 3);
this->actionFunc = EnPoh_Idle;
}
void func_80ADE1BC(EnPoh* this) {
Animation_PlayLoop(&this->skelAnime, this->info->unk_10);
Animation_PlayLoop(&this->skelAnime, this->info->idleAnim2);
this->actionFunc = func_80ADEC9C;
this->unk_198 = 0;
this->actor.speedXZ = 2.0f;
@ -294,9 +279,9 @@ void func_80ADE1BC(EnPoh* this) {
void EnPoh_SetupAttack(EnPoh* this) {
if (this->infoIdx == EN_POH_INFO_NORMAL) {
Animation_MorphToLoop(&this->skelAnime, &D_060001A8, -6.0f);
Animation_MorphToLoop(&this->skelAnime, &gPoeAttackAnim, -6.0f);
} else {
Animation_PlayLoop(&this->skelAnime, &D_0600020C);
Animation_PlayLoop(&this->skelAnime, &gPoeComposerAttackAnim);
}
this->unk_198 = 12;
this->actor.speedXZ = 0.0f;
@ -306,9 +291,9 @@ void EnPoh_SetupAttack(EnPoh* this) {
void func_80ADE28C(EnPoh* this) {
if (this->infoIdx == EN_POH_INFO_NORMAL) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_060004EC, -6.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gPoeDamagedAnim, -6.0f);
} else {
Animation_PlayOnce(&this->skelAnime, &D_06000570);
Animation_PlayOnce(&this->skelAnime, &gPoeComposerDamagedAnim);
}
if (this->colliderCyl.info.acHitInfo->toucher.dmgFlags & 0x0001F824) {
this->actor.world.rot.y = this->colliderCyl.base.ac->world.rot.y;
@ -322,7 +307,7 @@ void func_80ADE28C(EnPoh* this) {
}
void func_80ADE368(EnPoh* this) {
Animation_MorphToLoop(&this->skelAnime, this->info->unk_18, -5.0f);
Animation_MorphToLoop(&this->skelAnime, this->info->fleeAnim, -5.0f);
this->actor.speedXZ = 5.0f;
this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000;
this->colliderCyl.base.acFlags |= AC_ON;
@ -334,10 +319,10 @@ void EnPoh_SetupInitialAction(EnPoh* this) {
this->lightColor.a = 0;
this->actor.flags &= ~1;
if (this->infoIdx == EN_POH_INFO_NORMAL) {
Animation_PlayOnceSetSpeed(&this->skelAnime, &D_060011C4, 0.0f);
Animation_PlayOnceSetSpeed(&this->skelAnime, &gPoeAppearAnim, 0.0f);
this->actionFunc = func_80ADEF38;
} else {
Animation_PlayOnceSetSpeed(&this->skelAnime, &D_06000FE4, 1.0f);
Animation_PlayOnceSetSpeed(&this->skelAnime, &gPoeComposerAppearAnim, 1.0f);
this->actor.world.pos.y = this->actor.home.pos.y + 20.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_LAUGH);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_APPEAR);
@ -355,13 +340,13 @@ void func_80ADE48C(EnPoh* this) {
}
void func_80ADE4C8(EnPoh* this) {
Animation_PlayOnce(&this->skelAnime, this->info->unk_10);
Animation_PlayOnce(&this->skelAnime, this->info->idleAnim2);
this->actionFunc = func_80ADF574;
this->actor.speedXZ = -5.0f;
}
void func_80ADE514(EnPoh* this) {
Animation_PlayLoop(&this->skelAnime, this->info->unk_C);
Animation_PlayLoop(&this->skelAnime, this->info->idleAnim);
this->unk_19C = this->actor.world.rot.y + 0x8000;
this->actionFunc = func_80ADF5E0;
this->actor.speedXZ = 0.0f;
@ -734,7 +719,8 @@ void EnPoh_Death(EnPoh* this, GlobalContext* globalCtx) {
}
if (this->actor.bgCheckFlags & 1) {
objId = (this->infoIdx == EN_POH_INFO_COMPOSER) ? OBJECT_PO_COMPOSER : OBJECT_POH;
EffectSsHahen_SpawnBurst(globalCtx, &this->actor.world.pos, 6.0f, 0, 1, 1, 15, objId, 10, this->info->unk_1C);
EffectSsHahen_SpawnBurst(globalCtx, &this->actor.world.pos, 6.0f, 0, 1, 1, 15, objId, 10,
this->info->lanternDisplayList);
func_80ADE6D4(this);
} else if (this->unk_198 == 0) {
Actor_Kill(&this->actor);
@ -925,11 +911,11 @@ void EnPoh_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actor.update = EnPoh_UpdateLiving;
Actor_SetObjectDependency(globalCtx, &this->actor);
if (this->infoIdx == EN_POH_INFO_NORMAL) {
SkelAnime_Init(globalCtx, &this->skelAnime, &D_060050D0, &D_06000A60, this->jointTable, this->morphTable,
SkelAnime_Init(globalCtx, &this->skelAnime, &gPoeSkel, &gPoeFloatAnim, this->jointTable, this->morphTable,
21);
this->actor.draw = EnPoh_DrawRegular;
} else {
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06006F90, &D_060009DC, this->jointTable,
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gPoeComposerSkel, &gPoeComposerFloatAnim, this->jointTable,
this->morphTable, 12);
this->actor.draw = EnPoh_DrawComposer;
this->colliderSph.elements[0].dim.limb = 9;
@ -1045,7 +1031,8 @@ s32 EnPoh_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
(this->actionFunc == func_80ADF15C && this->unk_198 >= 2)) {
*dList = NULL;
} else if (this->actor.params == EN_POH_FLAT && limbIndex == 0xA) {
*dList = D_06004638;
// Replace Sharp's head with Flat's
*dList = gPoeComposerFlatHeadDL;
}
if (limbIndex == 0x13 && this->infoIdx == EN_POH_INFO_NORMAL) {
gDPPipeSync((*gfxP)++);
@ -1061,7 +1048,7 @@ void EnPoh_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
if (this->actionFunc == func_80ADF15C && this->unk_198 >= 2 && limbIndex == this->info->unk_7) {
gSPMatrix((*gfxP)++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_poh.c", 2460),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList((*gfxP)++, this->info->unk_20);
gSPDisplayList((*gfxP)++, this->info->burnDisplayList);
}
if (limbIndex == this->info->unk_6) {
if (this->actionFunc == func_80ADF15C && this->unk_198 >= 19 && 0.0f != this->actor.scale.x) {
@ -1104,7 +1091,7 @@ void EnPoh_DrawRegular(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Put(&this->unk_368);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_poh.c", 2676),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, this->info->unk_1C);
gSPDisplayList(POLY_OPA_DISP++, this->info->lanternDisplayList);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_poh.c", 2681);
}
@ -1155,11 +1142,11 @@ void EnPoh_DrawComposer(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Put(&this->unk_368);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_poh.c", 2787),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, this->info->unk_1C);
gSPDisplayList(POLY_OPA_DISP++, D_06004498);
gSPDisplayList(POLY_OPA_DISP++, this->info->lanternDisplayList);
gSPDisplayList(POLY_OPA_DISP++, gPoeComposerLanternBottomDL);
gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, sp90->r, sp90->g, sp90->b, 255);
gSPDisplayList(POLY_OPA_DISP++, D_06004530);
gSPDisplayList(POLY_OPA_DISP++, gPoeComposerLanternTopDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_poh.c", 2802);
}
@ -1185,14 +1172,14 @@ void EnPoh_DrawSoul(Actor* thisx, GlobalContext* globalCtx) {
this->actor.world.pos.z, this->envColor.r, this->envColor.g, this->envColor.b, 200);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_poh.c", 2854),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, this->info->unk_1C);
gSPDisplayList(POLY_OPA_DISP++, this->info->lanternDisplayList);
if (this->infoIdx == EN_POH_INFO_COMPOSER) {
Color_RGBA8* envColor = (this->actor.params == EN_POH_SHARP) ? &D_80AE1B4C : &D_80AE1B50;
s32 pad;
gSPDisplayList(POLY_OPA_DISP++, D_06004498);
gSPDisplayList(POLY_OPA_DISP++, gPoeComposerLanternBottomDL);
gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, envColor->r, envColor->g, envColor->b, 255);
gSPDisplayList(POLY_OPA_DISP++, D_06004530);
gSPDisplayList(POLY_OPA_DISP++, gPoeComposerLanternTopDL);
}
} else {
func_80093D84(globalCtx->state.gfxCtx);

View file

@ -26,12 +26,12 @@ typedef struct {
/* 0x0006 */ u8 unk_6; // limb index
/* 0x0006 */ u8 unk_7; // limb index
/* 0x0008 */ s8 unk_8; // rate of some kind
/* 0x000C */ AnimationHeader* unk_C;
/* 0x0010 */ AnimationHeader* unk_10;
/* 0x0014 */ UNK_PTR unk_14;
/* 0x0018 */ AnimationHeader* unk_18;
/* 0x001C */ Gfx* unk_1C;
/* 0x0020 */ Gfx* unk_20;
/* 0x000C */ AnimationHeader* idleAnim;
/* 0x0010 */ AnimationHeader* idleAnim2;
/* 0x0014 */ AnimationHeader* damageAnim;
/* 0x0018 */ AnimationHeader* fleeAnim;
/* 0x001C */ Gfx* lanternDisplayList;
/* 0x0020 */ Gfx* burnDisplayList;
/* 0x0024 */ Gfx* soulDisplayList;
} EnPohInfo; // size = 0x28

View file

@ -6,6 +6,7 @@
#include "z_en_tk.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_tk/object_tk.h"
#define FLAGS 0x00000009
@ -21,17 +22,6 @@ void EnTk_Rest(EnTk* this, GlobalContext* globalCtx);
void EnTk_Walk(EnTk* this, GlobalContext* globalCtx);
void EnTk_Dig(EnTk* this, GlobalContext* globalCtx);
extern AnimationHeader D_06001144;
extern AnimationHeader D_06001FA8;
extern AnimationHeader D_06002F84;
extern UNK_TYPE D_06003B40;
extern UNK_TYPE D_06004340;
extern UNK_TYPE D_06004B40;
extern Gfx D_0600ACE0[];
extern Gfx D_0600BC90[];
extern Gfx D_0600BCA0[];
extern FlexSkeletonHeader D_0600BE40;
const ActorInit En_Tk_InitVars = {
ACTOR_EN_TK,
ACTORCAT_NPC,
@ -111,7 +101,7 @@ void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) {
if (eff->active != 0) {
if (gfxSetup == 0) {
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0);
gSPDisplayList(POLY_XLU_DISP++, D_0600BC90);
gSPDisplayList(POLY_XLU_DISP++, gDampeEff1DL);
gDPSetEnvColor(POLY_XLU_DISP++, 100, 60, 20, 0);
gfxSetup = 1;
}
@ -129,7 +119,7 @@ void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) {
imageIdx = eff->timeLeft * ((f32)ARRAY_COUNT(dustImages) / eff->timeTotal);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(dustImages[imageIdx]));
gSPDisplayList(POLY_XLU_DISP++, D_0600BCA0);
gSPDisplayList(POLY_XLU_DISP++, gDampeEff2DL);
}
eff++;
}
@ -173,26 +163,28 @@ static ColliderCylinderInit sCylinderInit = {
static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE };
void EnTk_RestAnim(EnTk* this, GlobalContext* globalCtx) {
AnimationHeader* anim = &D_06002F84;
AnimationHeader* anim = &gDampeRestAnim;
Animation_Change(&this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(&D_06002F84), ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(&gDampeRestAnim), ANIMMODE_LOOP,
-10.0f);
this->actionCountdown = Rand_S16Offset(60, 60);
this->actor.speedXZ = 0.0f;
}
void EnTk_WalkAnim(EnTk* this, GlobalContext* globalCtx) {
AnimationHeader* anim = &D_06001FA8;
AnimationHeader* anim = &gDampeWalkAnim;
Animation_Change(&this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(&D_06002F84), ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(&gDampeRestAnim), ANIMMODE_LOOP,
-10.0f);
this->actionCountdown = Rand_S16Offset(240, 240);
}
void EnTk_DigAnim(EnTk* this, GlobalContext* globalCtx) {
AnimationHeader* anim = &D_06001144;
AnimationHeader* anim = &gDampeDigAnim;
Animation_Change(&this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001144), ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(&gDampeDigAnim), ANIMMODE_LOOP, -10.0f);
if (EnTk_CheckNextSpot(this, globalCtx) >= 0) {
this->validDigHere = 1;
@ -290,7 +282,7 @@ f32 EnTk_Step(EnTk* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_WALK);
}
if (this->skelAnime.animation != &D_06001FA8) {
if (this->skelAnime.animation != &gDampeWalkAnim) {
return 0.0f;
}
@ -492,9 +484,9 @@ void EnTk_Init(Actor* thisx, GlobalContext* globalCtx) {
ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawCircle, 24.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600BE40, NULL, this->jointTable, this->morphTable, 18);
Animation_Change(&this->skelAnime, &D_06002F84, 1.0f, 0.0f, Animation_GetLastFrame(&D_06002F84), ANIMMODE_LOOP,
0.0f);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gDampeSkel, NULL, this->jointTable, this->morphTable, 18);
Animation_Change(&this->skelAnime, &gDampeRestAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gDampeRestAnim),
ANIMMODE_LOOP, 0.0f);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
@ -684,7 +676,7 @@ void EnTk_Update(Actor* thisx, GlobalContext* globalCtx) {
void func_80B1D200(GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tk.c", 1188);
gSPDisplayList(POLY_OPA_DISP++, D_0600ACE0);
gSPDisplayList(POLY_OPA_DISP++, gDampeShovelDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_tk.c", 1190);
}
@ -725,10 +717,10 @@ void EnTk_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
}
void EnTk_Draw(Actor* thisx, GlobalContext* globalCtx) {
static UNK_PTR sEyesSegments[] = {
0x06003B40,
0x06004340,
0x06004B40,
static u64* sEyesSegments[] = {
gDampeEyeOpenTex,
gDampeEyeHalfOpenTex,
gDampeEyeClosedTex,
};
EnTk* this = THIS;

View file

@ -8,11 +8,9 @@ all: $(PROGRAMS)
clean:
$(RM) $(PROGRAMS) $(addsuffix .exe,$(PROGRAMS))
$(RM) ZAPD/ZAPD.out
# Need to clean the above line later...
$(MAKE) -C ZAPD clean
distclean: clean
$(MAKE) -C ZAPD clean
.PHONY: all clean distclean
@ -22,9 +20,6 @@ yaz0_SOURCES := yaz0tool.c yaz0.c util.c
makeromfs_SOURCES := makeromfs.c n64chksum.c util.c
vtxdis_SOURCES := vtxdis.c
#$(ZAPD):
# cd ZAPD && $(MAKE)
define COMPILE =
$(1): $($1_SOURCES)
$(CC) $(CFLAGS) $$^ -o $$@