mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-04 20:25:31 -04:00
Sob1 Objects Documented (#814)
* Start zora * Finish zora * BombShopkeeper with some cleanup * Goron and don gero mask * Small thing * format * PR comments * bombshopkeeper -> bomb_shopkeeper * gEffShockwaveDL
This commit is contained in:
@@ -843,7 +843,7 @@ void EnClearTag_DrawEffects(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Matrix_Put(&mtxF);
|
||||
Matrix_Scale(effect->scale, 1.0f, effect->scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_030100);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffShockwaveDL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1410,6 +1410,8 @@ void EnFsn_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnFsn* this = THIS;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
|
||||
|
||||
// Note: adding 1 to FSN_LIMB_MAX due to bug in object_fsn, see bug in object_fsn.xml
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gFsnSkel, &gFsnIdleAnim, this->jointTable, this->morphTable,
|
||||
FSN_LIMB_MAX + 1);
|
||||
if (ENFSN_IS_SHOP(&this->actor)) {
|
||||
|
||||
@@ -28,7 +28,7 @@ typedef struct EnFsn {
|
||||
/* 0x24E */ s16 limbRotZTable[19];
|
||||
/* 0x274 */ Vec3s headRot;
|
||||
/* 0x27A */ Vec3s unk27A; // Set but never used
|
||||
/* 0x280 */ Vec3s jointTable[FSN_LIMB_MAX + 1];
|
||||
/* 0x280 */ Vec3s jointTable[FSN_LIMB_MAX + 1]; // Note: adding 1 to FSN_LIMB_MAX due to bug in object_fsn, see bug in object_fsn.xml
|
||||
/* 0x2F2 */ Vec3s morphTable[FSN_LIMB_MAX + 1];
|
||||
/* 0x364 */ s16 eyeTextureIdx;
|
||||
/* 0x366 */ s16 blinkTimer;
|
||||
|
||||
@@ -126,14 +126,14 @@ static DamageTable sDamageTable = {
|
||||
};
|
||||
|
||||
static AnimationInfoS sAnimations[] = {
|
||||
{ &object_oF1d_map_Anim_011D98, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_oF1d_map_Anim_011D98, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_oF1d_map_Anim_012DE0, 2.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_oF1d_map_Anim_012DE0, 2.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_oF1d_map_Anim_012DE0, -2.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_oF1d_map_Anim_003E28, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_oF1d_map_Anim_003E28, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_oF1d_map_Anim_0039D8, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &gGoronLyingDownIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronLyingDownIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gGoronUnrollAnim, 2.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gGoronUnrollAnim, 2.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &gGoronUnrollAnim, -2.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &gGoronShiverAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronShiverAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gGoronDropKegAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_taisou_Anim_0016C8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_taisou_Anim_004DD4, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_taisou_Anim_00283C, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
@@ -142,11 +142,11 @@ static AnimationInfoS sAnimations[] = {
|
||||
{ &object_taisou_Anim_002C48, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_taisou_Anim_0031D8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_taisou_Anim_005790, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_oF1d_map_Anim_003650, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronCoverEarsAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_hakugin_demo_Anim_002704, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_hakugin_demo_Anim_003378, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_oF1d_map_Anim_0135E8, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_oF1d_map_Anim_014CE0, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronShiveringSurprisedAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gGoronStandingIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
};
|
||||
|
||||
u16 func_80BB16D0(EnGeg* this) {
|
||||
@@ -866,8 +866,8 @@ void EnGeg_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_oF1d_map_Skel_011AC8, &object_oF1d_map_Anim_012DE0,
|
||||
this->jointTable, this->morphTable, 18);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGoronSkel, &gGoronUnrollAnim, this->jointTable, this->morphTable,
|
||||
GORON_LIMB_MAX);
|
||||
|
||||
Collider_InitCylinder(globalCtx, &this->colliderCylinder);
|
||||
Collider_SetCylinder(globalCtx, &this->colliderCylinder, &this->actor, &sCylinderInit);
|
||||
@@ -954,7 +954,7 @@ void EnGeg_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_oF1d_map_DL_004DB0);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gGoronDonGeroMaskDL);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
@@ -1035,10 +1035,10 @@ void EnGeg_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thi
|
||||
|
||||
void func_80BB3BE0(EnGeg* this, GlobalContext* globalCtx) {
|
||||
static TexturePtr D_80BB4088[] = {
|
||||
object_oF1d_map_Tex_010438,
|
||||
object_oF1d_map_Tex_010C38,
|
||||
object_oF1d_map_Tex_011038,
|
||||
object_oF1d_map_Tex_010838,
|
||||
gGoronEyeOpenTex,
|
||||
gGoronEyeHalfTex,
|
||||
gGoronEyeClosedTex,
|
||||
gGoronEyeClosed2Tex,
|
||||
};
|
||||
s32 pad;
|
||||
|
||||
@@ -1072,7 +1072,7 @@ void func_80BB3CB4(EnGeg* this, GlobalContext* globalCtx) {
|
||||
Matrix_RotateXS(sp24, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_oF1d_map_DL_0091A8);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gGoronRolledUpDL);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -187,16 +187,16 @@ static DamageTable sDamageTable = {
|
||||
};
|
||||
|
||||
static AnimationInfoS sAnimations[] = {
|
||||
{ &object_oF1d_map_Anim_011D98, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_oF1d_map_Anim_011D98, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_oF1d_map_Anim_012DE0, 2.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_oF1d_map_Anim_012DE0, 2.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_oF1d_map_Anim_012DE0, -2.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_oF1d_map_Anim_003E28, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_oF1d_map_Anim_003E28, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &object_oF1d_map_Anim_0039D8, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &object_oF1d_map_Anim_003650, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_oF1d_map_Anim_0135E8, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &gGoronLyingDownIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronLyingDownIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gGoronUnrollAnim, 2.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gGoronUnrollAnim, 2.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &gGoronUnrollAnim, -2.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gGoronShiverAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronShiverAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 },
|
||||
{ &gGoronDropKegAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
{ &gGoronCoverEarsAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gGoronShiveringSurprisedAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 },
|
||||
|
||||
{ &object_taisou_Anim_004DD4, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &object_taisou_Anim_0016C8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
@@ -249,7 +249,7 @@ void func_80A11144(EnGoStruct* ptr, GlobalContext* globalCtx) {
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
|
||||
if (!flag) {
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_oF1d_map_DL_0031A0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronSteamMaterialDL);
|
||||
flag = true;
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ void func_80A11144(EnGoStruct* ptr, GlobalContext* globalCtx) {
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_oF1d_map_DL_003258);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronSteamModelDL);
|
||||
|
||||
Matrix_Pop();
|
||||
if (globalCtx->state.gfxCtx) {}
|
||||
@@ -325,7 +325,7 @@ void func_80A115B4(EnGoStruct* ptr, GlobalContext* globalCtx) {
|
||||
if ((ptr->unk_00 >= 4) && (ptr->unk_00 < 7)) {
|
||||
if (!flag) {
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_oF1d_map_DL_014CF0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronDustMaterialDL);
|
||||
flag = true;
|
||||
}
|
||||
Matrix_Push();
|
||||
@@ -344,7 +344,7 @@ void func_80A115B4(EnGoStruct* ptr, GlobalContext* globalCtx) {
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(D_80A16644[(s32)(temp * 7.0f)]));
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_oF1d_map_DL_014D00);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronDustModelDL);
|
||||
|
||||
Matrix_Pop();
|
||||
}
|
||||
@@ -516,9 +516,12 @@ void func_80A1203C(EnGo* this) {
|
||||
}
|
||||
|
||||
void func_80A1213C(EnGo* this, GlobalContext* globalCtx) {
|
||||
func_80A11EC0(this->unk_3F8, globalCtx, object_oF1d_map_DL_0003D0, object_oF1d_map_DL_000458, 1);
|
||||
func_80A11EC0(this->unk_3F8, globalCtx, object_oF1d_map_DL_0008C0, object_oF1d_map_DL_000948, 2);
|
||||
func_80A11EC0(this->unk_3F8, globalCtx, object_oF1d_map_DL_000D50, object_oF1d_map_DL_000DD8, 3);
|
||||
func_80A11EC0(this->unk_3F8, globalCtx, gGoronLargeSnowballFragmentMaterialDL, gGoronLargeSnowballFragmentModelDL,
|
||||
1);
|
||||
func_80A11EC0(this->unk_3F8, globalCtx, gGoronMediumSnowballFragmentMaterialDL, gGoronMediumSnowballFragmentModelDL,
|
||||
2);
|
||||
func_80A11EC0(this->unk_3F8, globalCtx, gGoronSmallSnowballFragmentMaterialDL, gGoronSmallSnowballFragmentModelDL,
|
||||
3);
|
||||
func_80A11144(this->unk_3F8, globalCtx);
|
||||
func_80A115B4(this->unk_3F8, globalCtx);
|
||||
}
|
||||
@@ -1459,8 +1462,8 @@ void func_80A14798(EnGo* this, GlobalContext* globalCtx) {
|
||||
if ((this->unk_288 < 0) || SubS_IsObjectLoaded(this->unk_288, globalCtx) || (this->unk_289 < 0) ||
|
||||
SubS_IsObjectLoaded(this->unk_289, globalCtx)) {
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_oF1d_map_Skel_011AC8, NULL, this->jointTable,
|
||||
this->morphTable, 18);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable,
|
||||
GORON_LIMB_MAX);
|
||||
|
||||
this->unk_3DC = -1;
|
||||
func_80A12C48(this, globalCtx, 2);
|
||||
@@ -1966,7 +1969,7 @@ void func_80A15B80(EnGo* this, GlobalContext* globalCtx) {
|
||||
Matrix_RotateXS(this->actor.shape.rot.x, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, (this->unk_390 & 0x100) ? object_oF1d_map_DL_001560 : object_oF1d_map_DL_0091A8);
|
||||
gSPDisplayList(POLY_OPA_DISP++, (this->unk_390 & 0x100) ? gGoronSnowballDL : gGoronRolledUpDL);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
@@ -2059,8 +2062,7 @@ void EnGo_TransfromLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* this
|
||||
|
||||
void func_80A15FEC(Actor* thisx, GlobalContext* globalCtx) {
|
||||
static TexturePtr D_80A1670C[] = {
|
||||
object_oF1d_map_Tex_010438, object_oF1d_map_Tex_010C38, object_oF1d_map_Tex_011038,
|
||||
object_oF1d_map_Tex_010C38, object_oF1d_map_Tex_010838,
|
||||
gGoronEyeOpenTex, gGoronEyeHalfTex, gGoronEyeClosedTex, gGoronEyeHalfTex, gGoronEyeClosed2Tex,
|
||||
};
|
||||
EnGo* this = THIS;
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
#include "objects/object_ani/object_ani.h"
|
||||
#include "objects/object_fsn/object_fsn.h"
|
||||
|
||||
#define ENOSSAN_LIMB_MAX MAX(FSN_LIMB_MAX + 1, ANI_LIMB_MAX)
|
||||
// Note: adding 1 to FSN_LIMB_MAX due to bug in object_fsn, see bug in object_fsn.xml
|
||||
#define ENOSSAN_LIMB_MAX MAX((s32)FSN_LIMB_MAX + 1, (s32)ANI_LIMB_MAX)
|
||||
|
||||
struct EnOssan;
|
||||
|
||||
|
||||
@@ -119,8 +119,8 @@ s32 D_80BF57E4[][4] = {
|
||||
};
|
||||
|
||||
AnimationInfoS D_80BF5914[] = {
|
||||
{ &object_oF1d_map_Anim_012DE0, 2.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_oF1d_map_Anim_012DE0, -2.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gGoronUnrollAnim, 2.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gGoronUnrollAnim, -2.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
};
|
||||
|
||||
TexturePtr D_80BF5934[] = {
|
||||
@@ -153,8 +153,7 @@ EffectTireMarkInit D_80BF59F0 = {
|
||||
};
|
||||
|
||||
TexturePtr D_80BF59F8[] = {
|
||||
object_oF1d_map_Tex_010438, object_oF1d_map_Tex_010C38, object_oF1d_map_Tex_011038,
|
||||
object_oF1d_map_Tex_010C38, object_oF1d_map_Tex_010838,
|
||||
gGoronEyeOpenTex, gGoronEyeHalfTex, gGoronEyeClosedTex, gGoronEyeHalfTex, gGoronEyeClosed2Tex,
|
||||
};
|
||||
|
||||
void func_80BF3920(EnRgStruct* ptr, GlobalContext* globalCtx) {
|
||||
@@ -170,8 +169,8 @@ void func_80BF3920(EnRgStruct* ptr, GlobalContext* globalCtx) {
|
||||
for (i = 0; i < 32; i++, ptr++) {
|
||||
if ((ptr->unk_00 >= 4) && (ptr->unk_00 < 7)) {
|
||||
if (!phi_fp) {
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, sizeof(Gfx) * 0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_oF1d_map_DL_014CF0);
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronDustMaterialDL);
|
||||
phi_fp = true;
|
||||
}
|
||||
|
||||
@@ -193,7 +192,7 @@ void func_80BF3920(EnRgStruct* ptr, GlobalContext* globalCtx) {
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
idx = temp_f20 * 7.0f;
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(D_80BF5934[idx]));
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_oF1d_map_DL_014D00);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronDustModelDL);
|
||||
|
||||
Matrix_Pop();
|
||||
}
|
||||
@@ -728,8 +727,8 @@ void EnRg_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
if (gSaveContext.save.entranceIndex == 0xD010) {
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_oF1d_map_Skel_011AC8, NULL, this->jointTable,
|
||||
this->morphTable, 18);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable,
|
||||
GORON_LIMB_MAX);
|
||||
|
||||
this->unk_334 = -1;
|
||||
func_80BF409C(this, 0);
|
||||
@@ -814,7 +813,7 @@ void func_80BF547C(EnRg* this, GlobalContext* globalCtx) {
|
||||
Matrix_RotateXS(this->actor.shape.rot.x, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_oF1d_map_DL_0091A8);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gGoronRolledUpDL);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ const ActorInit En_Rsn_InitVars = {
|
||||
(ActorFunc)EnRsn_Draw,
|
||||
};
|
||||
|
||||
static AnimationInfo sAnimations[] = { { &object_rs_Anim_00788C, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f } };
|
||||
static AnimationInfo sAnimations[] = { { &gBombShopkeeperSwayAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f } };
|
||||
|
||||
void func_80C25D40(EnRsn* this) {
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0);
|
||||
@@ -44,7 +44,7 @@ void EnRsn_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnRsn* this = THIS;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_rs_Skel_009220, &object_rs_Anim_009120, NULL, NULL, 0);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gBombShopkeeperSkel, &gBombShopkeeperWalkAnim, NULL, NULL, 0);
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
func_80C25D40(this);
|
||||
}
|
||||
@@ -67,20 +67,18 @@ void EnRsn_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 EnRsn_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnRsn* this = THIS;
|
||||
|
||||
if (limbIndex == 14) {
|
||||
if (limbIndex == BOMB_SHOPKEEPER_LIMB_RIGHT_HAND) {
|
||||
Matrix_RotateXS(this->unk1D8.y, MTXMODE_APPLY);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static Vec3f D_80C26028 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
void EnRsn_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
EnRsn* this = THIS;
|
||||
Vec3f sp18 = D_80C26028;
|
||||
Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
if (limbIndex == 14) {
|
||||
Matrix_MultVec3f(&sp18, &this->actor.focus.pos);
|
||||
if (limbIndex == BOMB_SHOPKEEPER_LIMB_RIGHT_HAND) {
|
||||
Matrix_MultVec3f(&zeroVec, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +87,7 @@ void EnRsn_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
func_8012C5B0(globalCtx->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(object_rs_Tex_005458));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gBombShopkeeperEyeTex));
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnRsn_OverrideLimbDraw, EnRsn_PostLimbDraw, &this->actor);
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
@@ -9,7 +9,7 @@ typedef void (*EnRsnActionFunc)(struct EnRsn*, GlobalContext*);
|
||||
|
||||
typedef struct EnRsn {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk144[0x4C];
|
||||
/* 0x144 */ UNK_TYPE1 unk144[0x4C];
|
||||
/* 0x190 */ SkelAnime skelAnime;
|
||||
/* 0x1D4 */ EnRsnActionFunc actionFunc;
|
||||
/* 0x1D8 */ Vec3s unk1D8;
|
||||
|
||||
@@ -5,11 +5,8 @@
|
||||
*/
|
||||
|
||||
#include "z_en_sob1.h"
|
||||
#include "objects/object_rs/object_rs.h"
|
||||
#include "objects/object_zo/object_zo.h"
|
||||
#include "objects/object_mastergolon/object_mastergolon.h"
|
||||
#include "objects/object_masterzoora/object_masterzoora.h"
|
||||
#include "objects/object_oF1d_map/object_oF1d_map.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10)
|
||||
@@ -53,12 +50,18 @@ void EnSob1_Blink(EnSob1* this);
|
||||
|
||||
s32 EnSob1_TakeItemOffShelf(EnSob1* this);
|
||||
s32 EnSob1_ReturnItemToShelf(EnSob1* this);
|
||||
s16 EnSob1_GetDistSqAndOrient(Path* path, s32 pointIdx, Vec3f* pos, f32* distSq);
|
||||
s16 EnSob1_GetDistSqAndOrient(Path* path, s32 pointIndex, Vec3f* pos, f32* distSq);
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ BOMB_SHOPKEEPER_ANIM_WALK,
|
||||
/* 1 */ BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_START,
|
||||
/* 2 */ BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_LOOP
|
||||
} BombShopkeeperAnimation;
|
||||
|
||||
static AnimationInfoS sAnimationsBombShopkeeper[] = {
|
||||
{ &object_rs_Anim_009120, 2.0f, 0, -1, ANIMMODE_LOOP, 20 },
|
||||
{ &object_rs_Anim_008268, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &object_rs_Anim_0087BC, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
{ &gBombShopkeeperWalkAnim, 2.0f, 0, -1, ANIMMODE_LOOP, 20 },
|
||||
{ &gBombShopkeeperSitAtCounterStartAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 },
|
||||
{ &gBombShopkeeperSitAtCounterLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 },
|
||||
};
|
||||
|
||||
const ActorInit En_Sob1_InitVars = {
|
||||
@@ -153,10 +156,10 @@ static Vec3f sPosOffset[] = {
|
||||
{ 0.0f, -4.0f, 0.0f },
|
||||
};
|
||||
|
||||
void EnSob1_ChangeAnim(SkelAnime* skelAnime, AnimationInfoS* animations, s32 idx) {
|
||||
void EnSob1_ChangeAnim(SkelAnime* skelAnime, AnimationInfoS* animations, s32 index) {
|
||||
f32 frameCount;
|
||||
|
||||
animations += idx;
|
||||
animations += index;
|
||||
if (animations->frameCount < 0) {
|
||||
frameCount = Animation_GetLastFrame(animations->animation);
|
||||
} else {
|
||||
@@ -355,20 +358,20 @@ void EnSob1_SpawnShopItems(EnSob1* this, GlobalContext* globalCtx, ShopItem* sho
|
||||
|
||||
s32 EnSob1_GetObjIndices(EnSob1* this, GlobalContext* globalCtx, s16* objIds) {
|
||||
if (objIds[1] != OBJECT_ID_MAX) {
|
||||
this->objIndices[1] = Object_GetIndex(&globalCtx->objectCtx, objIds[1]);
|
||||
if (this->objIndices[1] < 0) {
|
||||
this->unusedObjIndex = Object_GetIndex(&globalCtx->objectCtx, objIds[1]);
|
||||
if (this->unusedObjIndex < 0) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
this->objIndices[1] = -1;
|
||||
this->unusedObjIndex = -1;
|
||||
}
|
||||
if (objIds[2] != OBJECT_ID_MAX) {
|
||||
this->objIndices[2] = Object_GetIndex(&globalCtx->objectCtx, objIds[2]);
|
||||
if (this->objIndices[2] < 0) {
|
||||
this->shopkeeperAnimObjIndex = Object_GetIndex(&globalCtx->objectCtx, objIds[2]);
|
||||
if (this->shopkeeperAnimObjIndex < 0) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
this->objIndices[2] = -1;
|
||||
this->shopkeeperAnimObjIndex = -1;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -398,8 +401,8 @@ void EnSob1_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
objIds = sObjectIds[this->shopType];
|
||||
this->objIndices[0] = Object_GetIndex(&globalCtx->objectCtx, objIds[0]);
|
||||
if (this->objIndices[0] < 0) {
|
||||
this->mainObjIndex = Object_GetIndex(&globalCtx->objectCtx, objIds[0]);
|
||||
if (this->mainObjIndex < 0) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
return;
|
||||
}
|
||||
@@ -423,7 +426,7 @@ void EnSob1_UpdateCursorPos(GlobalContext* globalCtx, EnSob1* this) {
|
||||
f32 xOffset = 0.0f;
|
||||
f32 yOffset = 17.0f;
|
||||
|
||||
Actor_GetScreenPos(globalCtx, &this->items[this->cursorIdx]->actor, &x, &y);
|
||||
Actor_GetScreenPos(globalCtx, &this->items[this->cursorIndex]->actor, &x, &y);
|
||||
this->cursorPos.x = x + xOffset;
|
||||
this->cursorPos.y = y + yOffset;
|
||||
this->cursorPos.z = 1.2f;
|
||||
@@ -464,7 +467,7 @@ s32 EnSob1_TestEndInteraction(EnSob1* this, GlobalContext* globalCtx, Input* inp
|
||||
s32 EnSob1_TestCancelOption(EnSob1* this, GlobalContext* globalCtx, Input* input) {
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
this->actionFunc = this->tmpActionFunc;
|
||||
func_80151938(globalCtx, this->items[this->cursorIdx]->actor.textId);
|
||||
func_80151938(globalCtx, this->items[this->cursorIndex]->actor.textId);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -638,7 +641,7 @@ s32 EnSob1_FacingShopkeeperDialogResult(EnSob1* this, GlobalContext* globalCtx)
|
||||
void EnSob1_FaceShopkeeper(EnSob1* this, GlobalContext* globalCtx) {
|
||||
s32 pad[2];
|
||||
u8 talkState = Message_GetState(&globalCtx->msgCtx);
|
||||
u8 cursorIdx;
|
||||
u8 cursorIndex;
|
||||
|
||||
if (this->cutsceneState == ENSOB1_CUTSCENESTATE_WAITING) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->cutscene)) {
|
||||
@@ -661,9 +664,9 @@ void EnSob1_FaceShopkeeper(EnSob1* this, GlobalContext* globalCtx) {
|
||||
if (!EnSob1_TestEndInteraction(this, globalCtx, CONTROLLER1(globalCtx))) {
|
||||
if (!Message_ShouldAdvance(globalCtx) || !EnSob1_FacingShopkeeperDialogResult(this, globalCtx)) {
|
||||
if (this->stickAccumX > 0) {
|
||||
cursorIdx = EnSob1_SetCursorIndexFromNeutral(this, 2);
|
||||
if (cursorIdx != CURSOR_INVALID) {
|
||||
this->cursorIdx = cursorIdx;
|
||||
cursorIndex = EnSob1_SetCursorIndexFromNeutral(this, 2);
|
||||
if (cursorIndex != CURSOR_INVALID) {
|
||||
this->cursorIndex = cursorIndex;
|
||||
EnSob1_SetupAction(this, EnSob1_LookToShelf);
|
||||
func_8011552C(globalCtx, 6);
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
@@ -709,17 +712,17 @@ void EnSob1_EndWalk(EnSob1* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
f32 distSq;
|
||||
s16 curFrame = this->skelAnime.curFrame / this->skelAnime.playSpeed;
|
||||
s16 animLastFrame = Animation_GetLastFrame(&object_rs_Anim_009120) / (s16)this->skelAnime.playSpeed;
|
||||
s16 animLastFrame = Animation_GetLastFrame(&gBombShopkeeperWalkAnim) / (s16)this->skelAnime.playSpeed;
|
||||
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y,
|
||||
EnSob1_GetDistSqAndOrient(this->path, this->pathPointsIdx - 1, &this->actor.world.pos, &distSq),
|
||||
4, 1000, 1);
|
||||
EnSob1_GetDistSqAndOrient(this->path, this->waypoint - 1, &this->actor.world.pos, &distSq), 4,
|
||||
1000, 1);
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
Math_ApproachF(&this->actor.speedXZ, 0.5f, 0.2f, 1.0f);
|
||||
if (distSq < 12.0f) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
if (animLastFrame == curFrame) {
|
||||
EnSob1_ChangeAnim(&this->skelAnime, sAnimationsBombShopkeeper, 1);
|
||||
EnSob1_ChangeAnim(&this->skelAnime, sAnimationsBombShopkeeper, BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_START);
|
||||
EnSob1_SetupAction(this, EnSob1_SetupIdle);
|
||||
}
|
||||
}
|
||||
@@ -729,8 +732,8 @@ void EnSob1_EndWalk(EnSob1* this, GlobalContext* globalCtx) {
|
||||
void EnSob1_SetupIdle(EnSob1* this, GlobalContext* globalCtx) {
|
||||
s16 curFrame = this->skelAnime.curFrame;
|
||||
|
||||
if (Animation_GetLastFrame(&object_rs_Anim_008268) == curFrame) {
|
||||
EnSob1_ChangeAnim(&this->skelAnime, sAnimationsBombShopkeeper, 2);
|
||||
if (Animation_GetLastFrame(&gBombShopkeeperSitAtCounterStartAnim) == curFrame) {
|
||||
EnSob1_ChangeAnim(&this->skelAnime, sAnimationsBombShopkeeper, BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_LOOP);
|
||||
EnSob1_SetupAction(this, EnSob1_Idle);
|
||||
}
|
||||
EnSob1_Walking(this, globalCtx);
|
||||
@@ -750,13 +753,13 @@ void EnSob1_Walk(EnSob1* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
if (this->path != NULL) {
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y,
|
||||
EnSob1_GetDistSqAndOrient(this->path, this->pathPointsIdx, &this->actor.world.pos, &distSq),
|
||||
4, 1000, 1);
|
||||
EnSob1_GetDistSqAndOrient(this->path, this->waypoint, &this->actor.world.pos, &distSq), 4,
|
||||
1000, 1);
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
this->actor.speedXZ = 2.0f;
|
||||
if (distSq < SQ(5.0f)) {
|
||||
this->pathPointsIdx++;
|
||||
if ((this->path->count - 1) < this->pathPointsIdx) {
|
||||
this->waypoint++;
|
||||
if ((this->path->count - 1) < this->waypoint) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
EnSob1_SetupAction(this, EnSob1_EndWalk);
|
||||
}
|
||||
@@ -842,7 +845,7 @@ void EnSob1_LookToShelf(EnSob1* this, GlobalContext* globalCtx) {
|
||||
this->cutsceneState = ENSOB1_CUTSCENESTATE_PLAYING;
|
||||
EnSob1_UpdateCursorPos(globalCtx, this);
|
||||
EnSob1_SetupAction(this, EnSob1_BrowseShelf);
|
||||
func_80151938(globalCtx, this->items[this->cursorIdx]->actor.textId);
|
||||
func_80151938(globalCtx, this->items[this->cursorIndex]->actor.textId);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->cutscene);
|
||||
}
|
||||
@@ -850,7 +853,7 @@ void EnSob1_LookToShelf(EnSob1* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void EnSob1_CursorLeftRight(GlobalContext* globalCtx, EnSob1* this) {
|
||||
u8 curTemp = this->cursorIdx;
|
||||
u8 curTemp = this->cursorIndex;
|
||||
|
||||
if (this->stickAccumX < 0) {
|
||||
if (curTemp != 2) {
|
||||
@@ -859,20 +862,20 @@ void EnSob1_CursorLeftRight(GlobalContext* globalCtx, EnSob1* this) {
|
||||
EnSob1_SetupLookToShopkeeperFromShelf(globalCtx, this);
|
||||
}
|
||||
if (this->items[curTemp] != NULL) {
|
||||
this->cursorIdx = curTemp;
|
||||
this->cursorIndex = curTemp;
|
||||
}
|
||||
} else if (this->stickAccumX > 0) {
|
||||
if (curTemp != 0) {
|
||||
curTemp--;
|
||||
}
|
||||
if (this->items[curTemp] != NULL) {
|
||||
this->cursorIdx = curTemp;
|
||||
this->cursorIndex = curTemp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s32 EnSob1_HasPlayerSelectedItem(GlobalContext* globalCtx, EnSob1* this, Input* input) {
|
||||
EnGirlA* item = this->items[this->cursorIdx];
|
||||
EnGirlA* item = this->items[this->cursorIndex];
|
||||
|
||||
if (EnSob1_TestEndInteraction(this, globalCtx, input)) {
|
||||
return true;
|
||||
@@ -880,7 +883,7 @@ s32 EnSob1_HasPlayerSelectedItem(GlobalContext* globalCtx, EnSob1* this, Input*
|
||||
if (EnSob1_TestItemSelected(globalCtx)) {
|
||||
if (!item->isOutOfStock) {
|
||||
this->tmpActionFunc = this->actionFunc;
|
||||
func_80151938(globalCtx, this->items[this->cursorIdx]->choiceTextId);
|
||||
func_80151938(globalCtx, this->items[this->cursorIndex]->choiceTextId);
|
||||
play_sound(NA_SE_SY_DECIDE);
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
@@ -897,8 +900,8 @@ s32 EnSob1_HasPlayerSelectedItem(GlobalContext* globalCtx, EnSob1* this, Input*
|
||||
void EnSob1_BrowseShelf(EnSob1* this, GlobalContext* globalCtx) {
|
||||
u8 talkState = Message_GetState(&globalCtx->msgCtx);
|
||||
s32 pad;
|
||||
u8 prevCursorIdx = this->cursorIdx;
|
||||
u8 cursorIdx;
|
||||
u8 prevCursorIndex = this->cursorIndex;
|
||||
u8 cursorIndex;
|
||||
|
||||
if (!EnSob1_ReturnItemToShelf(this)) {
|
||||
this->delayTimer = 3;
|
||||
@@ -912,9 +915,9 @@ void EnSob1_BrowseShelf(EnSob1* this, GlobalContext* globalCtx) {
|
||||
func_8011552C(globalCtx, 6);
|
||||
if (!EnSob1_HasPlayerSelectedItem(globalCtx, this, CONTROLLER1(globalCtx))) {
|
||||
EnSob1_CursorLeftRight(globalCtx, this);
|
||||
cursorIdx = this->cursorIdx;
|
||||
if (cursorIdx != prevCursorIdx) {
|
||||
func_80151938(globalCtx, this->items[cursorIdx]->actor.textId);
|
||||
cursorIndex = this->cursorIndex;
|
||||
if (cursorIndex != prevCursorIndex) {
|
||||
func_80151938(globalCtx, this->items[cursorIndex]->actor.textId);
|
||||
play_sound(NA_SE_SY_CURSOR);
|
||||
}
|
||||
}
|
||||
@@ -925,7 +928,7 @@ void EnSob1_BrowseShelf(EnSob1* this, GlobalContext* globalCtx) {
|
||||
void EnSob1_SetupBuyItemWithFanfare(GlobalContext* globalCtx, EnSob1* this) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
|
||||
Actor_PickUp(&this->actor, globalCtx, this->items[this->cursorIdx]->getItemId, 300.0f, 300.0f);
|
||||
Actor_PickUp(&this->actor, globalCtx, this->items[this->cursorIndex]->getItemId, 300.0f, 300.0f);
|
||||
globalCtx->msgCtx.msgMode = 0x43;
|
||||
globalCtx->msgCtx.unk12023 = 4;
|
||||
player->stateFlags2 &= ~0x20000000;
|
||||
@@ -945,7 +948,7 @@ void EnSob1_SetupCanBuy(GlobalContext* globalCtx, EnSob1* this, u16 textId) {
|
||||
}
|
||||
|
||||
void EnSob1_HandleCanBuyItem(GlobalContext* globalCtx, EnSob1* this) {
|
||||
EnGirlA* item = this->items[this->cursorIdx];
|
||||
EnGirlA* item = this->items[this->cursorIndex];
|
||||
EnGirlA* item2;
|
||||
|
||||
switch (item->canBuyFunc(globalCtx, item)) {
|
||||
@@ -955,7 +958,7 @@ void EnSob1_HandleCanBuyItem(GlobalContext* globalCtx, EnSob1* this) {
|
||||
this->cutsceneState = ENSOB1_CUTSCENESTATE_STOPPED;
|
||||
}
|
||||
func_8019F208();
|
||||
item2 = this->items[this->cursorIdx];
|
||||
item2 = this->items[this->cursorIndex];
|
||||
item2->buyFanfareFunc(globalCtx, item2);
|
||||
EnSob1_SetupBuyItemWithFanfare(globalCtx, this);
|
||||
this->drawCursor = 0;
|
||||
@@ -1026,7 +1029,7 @@ void EnSob1_SelectItem(EnSob1* this, GlobalContext* globalCtx) {
|
||||
case 1:
|
||||
func_8019F230();
|
||||
this->actionFunc = this->tmpActionFunc;
|
||||
func_80151938(globalCtx, this->items[this->cursorIdx]->actor.textId);
|
||||
func_80151938(globalCtx, this->items[this->cursorIndex]->actor.textId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1037,7 +1040,7 @@ void EnSob1_CannotBuy(EnSob1* this, GlobalContext* globalCtx) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == 5) {
|
||||
if (Message_ShouldAdvance(globalCtx)) {
|
||||
this->actionFunc = this->tmpActionFunc;
|
||||
func_80151938(globalCtx, this->items[this->cursorIdx]->actor.textId);
|
||||
func_80151938(globalCtx, this->items[this->cursorIndex]->actor.textId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1048,10 +1051,10 @@ void EnSob1_CanBuy(EnSob1* this, GlobalContext* globalCtx) {
|
||||
if (Message_GetState(&globalCtx->msgCtx) == 5 && Message_ShouldAdvance(globalCtx)) {
|
||||
this->shopItemSelectedTween = 0.0f;
|
||||
EnSob1_ResetItemPosition(this);
|
||||
item = this->items[this->cursorIdx];
|
||||
item = this->items[this->cursorIndex];
|
||||
item->restockFunc(globalCtx, item);
|
||||
this->actionFunc = this->tmpActionFunc;
|
||||
func_80151938(globalCtx, this->items[this->cursorIdx]->actor.textId);
|
||||
func_80151938(globalCtx, this->items[this->cursorIndex]->actor.textId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1060,7 +1063,7 @@ void EnSob1_BuyItemWithFanfare(EnSob1* this, GlobalContext* globalCtx) {
|
||||
this->actor.parent = NULL;
|
||||
EnSob1_SetupAction(this, EnSob1_SetupItemPurchased);
|
||||
} else {
|
||||
Actor_PickUp(&this->actor, globalCtx, this->items[this->cursorIdx]->getItemId, 300.0f, 300.0f);
|
||||
Actor_PickUp(&this->actor, globalCtx, this->items[this->cursorIndex]->getItemId, 300.0f, 300.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1086,7 +1089,7 @@ void EnSob1_ContinueShopping(EnSob1* this, GlobalContext* globalCtx) {
|
||||
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == 5) && Message_ShouldAdvance(globalCtx)) {
|
||||
EnSob1_ResetItemPosition(this);
|
||||
item = this->items[this->cursorIdx];
|
||||
item = this->items[this->cursorIndex];
|
||||
item->restockFunc(globalCtx, item);
|
||||
player->actor.shape.rot.y += 0x8000;
|
||||
player->stateFlags2 |= 0x20000000;
|
||||
@@ -1098,7 +1101,7 @@ void EnSob1_ContinueShopping(EnSob1* this, GlobalContext* globalCtx) {
|
||||
|
||||
void EnSob1_PositionSelectedItem(EnSob1* this) {
|
||||
Vec3f selectedItemPosition = sSelectedItemPositions[this->shopType];
|
||||
u8 i = this->cursorIdx;
|
||||
u8 i = this->cursorIndex;
|
||||
EnGirlA* item;
|
||||
ShopItem* shopItem = &sShops[this->shopType][i];
|
||||
Vec3f worldPos;
|
||||
@@ -1159,7 +1162,7 @@ void EnSob1_UpdateItemSelectedProperty(EnSob1* this) {
|
||||
this->drawCursor == 0) {
|
||||
item->isSelected = false;
|
||||
} else {
|
||||
item->isSelected = this->cursorIdx == i ? true : false;
|
||||
item->isSelected = this->cursorIndex == i ? true : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1247,14 +1250,14 @@ void EnSob1_UpdateStickDirectionPromptAnim(EnSob1* this) {
|
||||
this->stickLeftPrompt.stickTexY = 95.0f;
|
||||
}
|
||||
|
||||
s16 EnSob1_GetDistSqAndOrient(Path* path, s32 pointIdx, Vec3f* pos, f32* distSq) {
|
||||
s16 EnSob1_GetDistSqAndOrient(Path* path, s32 pointIndex, Vec3f* pos, f32* distSq) {
|
||||
Vec3s* points;
|
||||
f32 diffX;
|
||||
f32 diffZ;
|
||||
|
||||
if (path != NULL) {
|
||||
points = Lib_SegmentedToVirtual(path->points);
|
||||
points = &points[pointIdx];
|
||||
points = &points[pointIndex];
|
||||
diffX = points->x - pos->x;
|
||||
diffZ = points->z - pos->z;
|
||||
} else {
|
||||
@@ -1283,33 +1286,34 @@ void EnSob1_WaitForBlink(EnSob1* this) {
|
||||
|
||||
void EnSob1_Blink(EnSob1* this) {
|
||||
s16 decr = this->blinkTimer - 1;
|
||||
s16 eyeTextureIdxTemp;
|
||||
s16 eyeTextureIndexTemp;
|
||||
|
||||
if (decr != 0) {
|
||||
this->blinkTimer = decr;
|
||||
return;
|
||||
}
|
||||
eyeTextureIdxTemp = this->eyeTexIndex + 1;
|
||||
if (eyeTextureIdxTemp > 2) {
|
||||
eyeTextureIndexTemp = this->eyeTexIndex + 1;
|
||||
if (eyeTextureIndexTemp > 2) {
|
||||
this->eyeTexIndex = 0;
|
||||
this->blinkTimer = (s32)(Rand_ZeroOne() * 60.0f) + 20;
|
||||
this->blinkFunc = EnSob1_WaitForBlink;
|
||||
} else {
|
||||
this->eyeTexIndex = eyeTextureIdxTemp;
|
||||
this->eyeTexIndex = eyeTextureIndexTemp;
|
||||
this->blinkTimer = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void EnSob1_ChangeObject(EnSob1* this, GlobalContext* globalCtx) {
|
||||
gSegments[0x06] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->objIndices[2]].segment);
|
||||
gSegments[0x06] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->shopkeeperAnimObjIndex].segment);
|
||||
}
|
||||
|
||||
s32 EnSob1_AreObjectsLoaded(EnSob1* this, GlobalContext* globalCtx) {
|
||||
if (Object_IsLoaded(&globalCtx->objectCtx, this->objIndices[0])) {
|
||||
if (this->objIndices[1] >= 0 && !Object_IsLoaded(&globalCtx->objectCtx, this->objIndices[1])) {
|
||||
if (Object_IsLoaded(&globalCtx->objectCtx, this->mainObjIndex)) {
|
||||
if (this->unusedObjIndex >= 0 && !Object_IsLoaded(&globalCtx->objectCtx, this->unusedObjIndex)) {
|
||||
return false;
|
||||
}
|
||||
if (this->objIndices[2] >= 0 && !Object_IsLoaded(&globalCtx->objectCtx, this->objIndices[2])) {
|
||||
if (this->shopkeeperAnimObjIndex >= 0 &&
|
||||
!Object_IsLoaded(&globalCtx->objectCtx, this->shopkeeperAnimObjIndex)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1318,27 +1322,28 @@ s32 EnSob1_AreObjectsLoaded(EnSob1* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void EnSob1_ZoraShopkeeper_Init(EnSob1* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gZoraSkel, NULL, this->jointTable, this->morphTable, 20);
|
||||
gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->objIndices[2]].segment);
|
||||
Animation_Change(&this->skelAnime, &object_masterzoora_Anim_00078C, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&object_masterzoora_Anim_00078C), 0, 0.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gZoraSkel, NULL, this->jointTable, this->morphTable,
|
||||
ZORA_LIMB_MAX);
|
||||
gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->shopkeeperAnimObjIndex].segment);
|
||||
Animation_Change(&this->skelAnime, &gZoraShopkeeperAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gZoraShopkeeperAnim),
|
||||
ANIMMODE_LOOP, 0.0f);
|
||||
this->actor.draw = EnSob1_ZoraShopkeeper_Draw;
|
||||
this->changeObjectFunc = EnSob1_ChangeObject;
|
||||
}
|
||||
|
||||
void EnSob1_GoronShopkeeper_Init(EnSob1* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_oF1d_map_Skel_011AC8, NULL, this->jointTable,
|
||||
this->morphTable, 18);
|
||||
gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->objIndices[2]].segment);
|
||||
Animation_Change(&this->skelAnime, &object_mastergolon_Anim_0000FC, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(&object_mastergolon_Anim_0000FC), 0, 0.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable,
|
||||
GORON_LIMB_MAX);
|
||||
gSegments[6] = PHYSICAL_TO_VIRTUAL(globalCtx->objectCtx.status[this->shopkeeperAnimObjIndex].segment);
|
||||
Animation_Change(&this->skelAnime, &gGoronShopkeeperAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gGoronShopkeeperAnim),
|
||||
ANIMMODE_LOOP, 0.0f);
|
||||
this->actor.draw = EnSob1_GoronShopkeeper_Draw;
|
||||
this->changeObjectFunc = EnSob1_ChangeObject;
|
||||
}
|
||||
|
||||
void EnSob1_BombShopkeeper_Init(EnSob1* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_rs_Skel_009220, &object_rs_Anim_009120, this->jointTable,
|
||||
this->morphTable, 16);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gBombShopkeeperSkel, &gBombShopkeeperWalkAnim, this->jointTable,
|
||||
this->morphTable, BOMB_SHOPKEEPER_LIMB_MAX);
|
||||
this->actor.draw = EnSob1_BombShopkeeper_Draw;
|
||||
this->changeObjectFunc = NULL;
|
||||
this->skelAnime.playSpeed = 2.0f;
|
||||
@@ -1351,7 +1356,7 @@ void EnSob1_InitShop(EnSob1* this, GlobalContext* globalCtx) {
|
||||
|
||||
if (EnSob1_AreObjectsLoaded(this, globalCtx)) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_10;
|
||||
this->actor.objBankIndex = this->objIndices[0];
|
||||
this->actor.objBankIndex = this->mainObjIndex;
|
||||
Actor_SetObjectDependency(globalCtx, &this->actor);
|
||||
posOffset = &sPosOffset[this->shopType];
|
||||
this->actor.world.pos.x += posOffset->x;
|
||||
@@ -1370,7 +1375,7 @@ void EnSob1_InitShop(EnSob1* this, GlobalContext* globalCtx) {
|
||||
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
this->actor.colChkInfo.cylRadius = 50;
|
||||
this->wasTalkedToWhileWalking = false;
|
||||
this->pathPointsIdx = 0;
|
||||
this->waypoint = 0;
|
||||
|
||||
if (this->shopType == BOMB_SHOP) {
|
||||
this->path = SubS_GetPathByIndex(globalCtx, ENSOB1_GET_PATH(&this->actor), 0x1F);
|
||||
@@ -1385,7 +1390,7 @@ void EnSob1_InitShop(EnSob1* this, GlobalContext* globalCtx) {
|
||||
this->stickAccumY = 0;
|
||||
this->stickAccumX = 0;
|
||||
|
||||
this->cursorIdx = 0;
|
||||
this->cursorIndex = 0;
|
||||
this->cursorPos.z = 1.2f;
|
||||
this->cursorColor.r = 0;
|
||||
this->cursorColor.g = 80;
|
||||
@@ -1575,7 +1580,7 @@ s32 EnSob1_ZoraShopkeeper_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbInd
|
||||
Actor* thisx) {
|
||||
EnSob1* this = THIS;
|
||||
|
||||
if (limbIndex == 15) {
|
||||
if (limbIndex == ZORA_LIMB_HEAD) {
|
||||
rot->x += this->headRot;
|
||||
}
|
||||
return false;
|
||||
@@ -1585,7 +1590,7 @@ s32 EnSob1_BombShopkeeper_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbInd
|
||||
Actor* thisx) {
|
||||
EnSob1* this = THIS;
|
||||
|
||||
if (limbIndex == 15) {
|
||||
if (limbIndex == BOMB_SHOPKEEPER_LIMB_HEAD) {
|
||||
Matrix_RotateXS(this->headRot, MTXMODE_APPLY);
|
||||
}
|
||||
return false;
|
||||
@@ -1594,8 +1599,8 @@ s32 EnSob1_BombShopkeeper_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbInd
|
||||
void EnSob1_BombShopkeeper_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
Actor* thisx) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
if (limbIndex == 11) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_rs_DL_000970);
|
||||
if (limbIndex == BOMB_SHOPKEEPER_LIMB_LEFT_HAND) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, gBombShopkeeperBombDL);
|
||||
}
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
@@ -1634,8 +1639,7 @@ void EnSob1_ZoraShopkeeper_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void EnSob1_GoronShopkeeper_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
static TexturePtr sGoronShopkeeperEyeTextures[] = { object_oF1d_map_Tex_010438, object_oF1d_map_Tex_010C38,
|
||||
object_oF1d_map_Tex_011038 };
|
||||
static TexturePtr sGoronShopkeeperEyeTextures[] = { gGoronEyeOpenTex, gGoronEyeHalfTex, gGoronEyeClosedTex };
|
||||
EnSob1* this = THIS;
|
||||
s32 pad;
|
||||
s32 i;
|
||||
@@ -1663,7 +1667,7 @@ void EnSob1_BombShopkeeper_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
func_8012C28C(globalCtx->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(object_rs_Tex_005458));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gBombShopkeeperEyeTex));
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnSob1_BombShopkeeper_OverrideLimbDraw, EnSob1_BombShopkeeper_PostLimbDraw, &this->actor);
|
||||
for (i = 0; i < ARRAY_COUNT(this->items); i++) {
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "overlays/actors/ovl_En_GirlA/z_en_girla.h"
|
||||
#include "objects/object_rs/object_rs.h"
|
||||
#include "objects/object_zo/object_zo.h"
|
||||
#include "objects/object_oF1d_map/object_oF1d_map.h"
|
||||
|
||||
#define ENSOB1_LIMB_MAX MAX(MAX((s32)ZORA_LIMB_MAX, (s32)BOMB_SHOPKEEPER_LIMB_MAX), (s32)GORON_LIMB_MAX)
|
||||
|
||||
struct EnSob1;
|
||||
|
||||
@@ -27,13 +32,15 @@ typedef struct EnSob1 {
|
||||
/* 0x190 */ EnSob1ActionFunc changeObjectFunc;
|
||||
/* 0x194 */ ColliderCylinder collider;
|
||||
/* 0x1E0 */ Path* path;
|
||||
/* 0x1E4 */ s32 pathPointsIdx;
|
||||
/* 0x1E4 */ s32 waypoint;
|
||||
/* 0x1E8 */ s16 delayTimer;
|
||||
/* 0x1EA */ s8 objIndices[3];
|
||||
/* 0x1EA */ s8 mainObjIndex;
|
||||
/* 0x1EB */ s8 unusedObjIndex;
|
||||
/* 0x1EC */ s8 shopkeeperAnimObjIndex;
|
||||
/* 0x1EE */ s16 headRot;
|
||||
/* 0x1F0 */ s16 headRotTarget;
|
||||
/* 0x1F2 */ Vec3s jointTable[20];
|
||||
/* 0x26A */ Vec3s morphTable[20];
|
||||
/* 0x1F2 */ Vec3s jointTable[ENSOB1_LIMB_MAX];
|
||||
/* 0x26A */ Vec3s morphTable[ENSOB1_LIMB_MAX];
|
||||
/* 0x2E2 */ s16 eyeTexIndex;
|
||||
/* 0x2E4 */ s16 blinkTimer;
|
||||
/* 0x2E8 */ EnSob1BlinkFunc blinkFunc;
|
||||
@@ -45,7 +52,7 @@ typedef struct EnSob1 {
|
||||
/* 0x31C */ f32 cursorAnimTween;
|
||||
/* 0x320 */ u8 cursorAnimState;
|
||||
/* 0x321 */ u8 drawCursor;
|
||||
/* 0x322 */ u8 cursorIdx;
|
||||
/* 0x322 */ u8 cursorIndex;
|
||||
/* 0x324 */ StickDirectionPrompt stickLeftPrompt;
|
||||
/* 0x35C */ StickDirectionPrompt stickRightPrompt;
|
||||
/* 0x394 */ f32 arrowAnimTween;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include "z_en_zo.h"
|
||||
#include "objects/object_zo/object_zo.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10)
|
||||
|
||||
@@ -257,7 +256,8 @@ void EnZo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gZoraSkel, NULL, this->jointTable, this->morphTable, 20);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gZoraSkel, NULL, this->jointTable, this->morphTable,
|
||||
ZORA_LIMB_MAX);
|
||||
EnZo_SetAnimation(&this->skelAnime, 0);
|
||||
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
@@ -291,19 +291,20 @@ s32 EnZo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
||||
Gfx** gfx) {
|
||||
EnZo* this = THIS;
|
||||
|
||||
if (limbIndex == 15) {
|
||||
if (limbIndex == ZORA_LIMB_HEAD) {
|
||||
Matrix_Translate(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->headRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-this->headRot.x, MTXMODE_APPLY);
|
||||
Matrix_Translate(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == 8) {
|
||||
if (limbIndex == ZORA_LIMB_TORSO) {
|
||||
Matrix_RotateXS(-this->upperBodyRot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(-this->upperBodyRot.x, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if ((limbIndex == 8) || (limbIndex == 9) || (limbIndex == 12)) {
|
||||
if ((limbIndex == ZORA_LIMB_TORSO) || (limbIndex == ZORA_LIMB_LEFT_UPPER_ARM) ||
|
||||
(limbIndex == ZORA_LIMB_RIGHT_UPPER_ARM)) {
|
||||
rot->y += (s16)(Math_SinS(this->limbRotY[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->limbRotZ[limbIndex]) * 200.0f);
|
||||
}
|
||||
@@ -318,13 +319,13 @@ void EnZo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
||||
if (sBodyParts[limbIndex] >= 0) {
|
||||
Matrix_MultVec3f(&zeroVec, &this->bodyPartsPos[sBodyParts[limbIndex]]);
|
||||
}
|
||||
if (limbIndex == 15) {
|
||||
if (limbIndex == ZORA_LIMB_HEAD) {
|
||||
Matrix_MultVec3f(&sp30, &this->actor.focus.pos);
|
||||
}
|
||||
if (limbIndex == 4) {
|
||||
if (limbIndex == ZORA_LIMB_LEFT_FOOT) {
|
||||
Matrix_MultVec3f(&zeroVec, &this->leftFootPos);
|
||||
}
|
||||
if (limbIndex == 7) {
|
||||
if (limbIndex == ZORA_LIMB_RIGHT_FOOT) {
|
||||
Matrix_MultVec3f(&zeroVec, &this->rightFootPos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_ZO_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_zo/object_zo.h"
|
||||
|
||||
struct EnZo;
|
||||
|
||||
@@ -22,8 +23,8 @@ typedef struct EnZo {
|
||||
/* 0x01F0 */ Vec3f rightFootPos;
|
||||
/* 0x01FC */ u8 isLeftFootGrounded;
|
||||
/* 0x01FD */ u8 isRightFootGrounded;
|
||||
/* 0x01FE */ Vec3s jointTable[20];
|
||||
/* 0x0276 */ Vec3s morphTable[20];
|
||||
/* 0x01FE */ Vec3s jointTable[ZORA_LIMB_MAX];
|
||||
/* 0x0276 */ Vec3s morphTable[ZORA_LIMB_MAX];
|
||||
/* 0x02EE */ Vec3s turnTarget;
|
||||
/* 0x02F4 */ Vec3s headRot;
|
||||
/* 0x02FA */ Vec3s upperBodyRot;
|
||||
|
||||
@@ -87,7 +87,7 @@ void EnZot_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actionFunc = func_80B97100;
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gZoraSkel, &gZoraIdleAnim, this->jointTable, this->morphTable, 20);
|
||||
Animation_PlayLoop(&this->skelAnime, &object_zo_Anim_00DE20);
|
||||
Animation_PlayLoop(&this->skelAnime, &gZoraStandAnim);
|
||||
this->unk_2F0 = 0;
|
||||
Collider_InitAndSetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
|
||||
@@ -235,9 +235,9 @@ void EnZot_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
void func_80B96BEC(EnZot* this, s16 arg1, u8 arg2) {
|
||||
static AnimationHeader* sAnimations[] = {
|
||||
&object_zo_Anim_00DE20, &gZoraWalkAnim, &object_zo_Anim_00F4E8, &object_zo_Anim_00E400,
|
||||
&object_zo_Anim_00FDF0, &object_zo_Anim_010B18, &object_zo_Anim_011424, &object_zo_Anim_00EDF0,
|
||||
&object_zo_Anim_00DF54, &object_zo_Anim_00DF54,
|
||||
&gZoraStandAnim, &gZoraWalkAnim, &gZoraSitAnim, &gZoraRunAnim,
|
||||
&gZoraFixSpeakerStartAnim, &gZoraFixSpeakerLoopAnim, &gZoraFixSpeakerEndAnim, &gZoraBobHandAnim,
|
||||
&gZoraListenAnim, &gZoraListenAnim,
|
||||
};
|
||||
|
||||
if ((arg1 >= 0) && (arg1 < 10)) {
|
||||
|
||||
@@ -188,7 +188,7 @@ void func_80BDC830(EnZowStruct* ptr, GlobalContext* globalCtx) {
|
||||
if (ptr->unk_00 == 1) {
|
||||
if (!flag) {
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_zo_DL_00D220);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraRippleMaterialDL);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 155, 155, 155, 0);
|
||||
if (1) {}
|
||||
flag = true;
|
||||
@@ -201,7 +201,7 @@ void func_80BDC830(EnZowStruct* ptr, GlobalContext* globalCtx) {
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_zo_DL_00D288);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraRippleModelDL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ void func_80BDC9DC(EnZowStruct* ptr, GlobalContext* globalCtx) {
|
||||
for (i = 0; i < 15; i++, ptr++) {
|
||||
if (ptr->unk_00 == 3) {
|
||||
if (!flag) {
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_zo_DL_0029F0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraBubbleMaterialDL);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 150, 150, 150, 0);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255);
|
||||
@@ -233,7 +233,7 @@ void func_80BDC9DC(EnZowStruct* ptr, GlobalContext* globalCtx) {
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_zo_DL_002A50);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraBubbleModelDL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ void func_80BDCB84(EnZowStruct* ptr, GlobalContext* globalCtx) {
|
||||
for (i = 0; i < 15; i++, ptr++) {
|
||||
if (ptr->unk_00 == 2) {
|
||||
if (!flag) {
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_zo_DL_002BA0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraSplashMaterialDL);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 200, 200, 200, 0);
|
||||
if (1) {}
|
||||
@@ -266,7 +266,7 @@ void func_80BDCB84(EnZowStruct* ptr, GlobalContext* globalCtx) {
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, object_zo_DL_002C10);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZoraSplashModelDL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ void EnZow_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Collider_DestroyCylinder(globalCtx, &this->collider);
|
||||
}
|
||||
|
||||
static AnimationHeader* sAnimations[] = { &object_zo_Anim_004168, &gZoraSurfacingAnim, &gZoraSurfacingAnim };
|
||||
static AnimationHeader* sAnimations[] = { &gZoraTreadingWaterAnim, &gZoraSurfacingAnim, &gZoraSurfacingAnim };
|
||||
|
||||
void func_80BDD04C(EnZow* this, s16 arg1, u8 arg2) {
|
||||
if ((arg1 >= 0) && (arg1 < 3)) {
|
||||
|
||||
@@ -721,7 +721,7 @@ void func_808DDE9C(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_030100);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffShockwaveDL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user