mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-16 04:44:44 +00:00
Merge branch 'master' into ovl_En_Ru2_new
This commit is contained in:
commit
a4be535164
731 changed files with 32380 additions and 35358 deletions
|
@ -1,14 +1,15 @@
|
|||
#include <global.h>
|
||||
|
||||
volatile u32 sSysCfbFbPtr[2]; // may not be volatile but it currently gets SysCfb_Init closer from matching
|
||||
u32 sSysCfbFbPtr[2];
|
||||
u32 sSysCfbEnd;
|
||||
|
||||
// small reaordering
|
||||
#ifdef NON_MATCHING
|
||||
void SysCfb_Init(s32 n64dd) {
|
||||
u32 screenSize;
|
||||
u32 tmpFbEnd;
|
||||
if (osMemSize >= 0x800000U) {
|
||||
// 8MB or more memory is installed
|
||||
osSyncPrintf("8Mバイト以上のメモリが搭載されています\n");
|
||||
tmpFbEnd = 0x8044BE80;
|
||||
if (n64dd == 1) {
|
||||
// RAM 8M mode (N64DD compatible)
|
||||
osSyncPrintf("RAM 8M mode (N64DD対応)\n");
|
||||
|
@ -16,26 +17,24 @@ void SysCfb_Init(s32 n64dd) {
|
|||
} else {
|
||||
// The margin for this version is% dK bytes
|
||||
osSyncPrintf("このバージョンのマージンは %dK バイトです\n", (0x4BC00 / 1024));
|
||||
sSysCfbEnd = 0x8044BE80;
|
||||
sSysCfbEnd = tmpFbEnd;
|
||||
}
|
||||
} else if (osMemSize >= 0x400000U) {
|
||||
sSysCfbEnd = 0x80400000;
|
||||
osSyncPrintf("RAM4M mode\n");
|
||||
sSysCfbEnd = 0x80400000;
|
||||
} else {
|
||||
LogUtils_HungupThread("../sys_cfb.c", 0x162);
|
||||
}
|
||||
|
||||
screenSize = SCREEN_WIDTH * SCREEN_HEIGHT;
|
||||
sSysCfbEnd &= ~0x3f;
|
||||
// The final address used by the system is% 08x
|
||||
osSyncPrintf("システムが使用する最終アドレスは %08x です\n", sSysCfbEnd);
|
||||
sSysCfbFbPtr[0] = sSysCfbEnd - (SCREEN_WIDTH * SCREEN_HEIGHT * 4);
|
||||
sSysCfbFbPtr[1] = sSysCfbEnd - (SCREEN_WIDTH * SCREEN_HEIGHT * 2);
|
||||
sSysCfbFbPtr[0] = sSysCfbEnd - (screenSize * 4);
|
||||
sSysCfbFbPtr[1] = sSysCfbEnd - (screenSize * 2);
|
||||
// Frame buffer addresses are% 08x and% 08x
|
||||
osSyncPrintf("フレームバッファのアドレスは %08x と %08x です\n", sSysCfbFbPtr[0], sSysCfbFbPtr[1]);
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_cfb/SysCfb_Init.s")
|
||||
#endif
|
||||
|
||||
void SysCfb_Reset() {
|
||||
sSysCfbFbPtr[0] = 0;
|
||||
|
|
|
@ -8,6 +8,7 @@ Mtx gMtxClear = {
|
|||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
};
|
||||
|
||||
MtxF gMtxFClear = {
|
||||
1.0f, 0.0f, 0.0f, 0.0f,
|
||||
0.0f, 1.0f, 0.0f, 0.0f,
|
||||
|
@ -58,23 +59,28 @@ void Matrix_Mult(MtxF* mf, u8 mode) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// minor ordering and regalloc differences
|
||||
void Matrix_Translate(f32 x, f32 y, f32 z, u8 mode) {
|
||||
MtxF* cmf = sCurrentMatrix;
|
||||
f32 tx;
|
||||
f32 ty;
|
||||
|
||||
if (mode == MTXMODE_APPLY) {
|
||||
cmf->wx += cmf->xx * x + cmf->yx * y + cmf->zx * z;
|
||||
cmf->wy += cmf->xy * x + cmf->yy * y + cmf->zy * z;
|
||||
cmf->wz += cmf->xz * x + cmf->yz * y + cmf->zz * z;
|
||||
cmf->ww += cmf->xw * x + cmf->yw * y + cmf->zw * z;
|
||||
tx = cmf->xx;
|
||||
ty = cmf->yx;
|
||||
cmf->wx += tx * x + ty * y + cmf->zx * z;
|
||||
tx = cmf->xy;
|
||||
ty = cmf->yy;
|
||||
cmf->wy += tx * x + ty * y + cmf->zy * z;
|
||||
tx = cmf->xz;
|
||||
ty = cmf->yz;
|
||||
cmf->wz += tx * x + ty * y + cmf->zz * z;
|
||||
tx = cmf->xw;
|
||||
ty = cmf->yw;
|
||||
cmf->ww += tx * x + ty * y + cmf->zw * z;
|
||||
} else {
|
||||
func_800A7A24(cmf, x, y, z);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_matrix/Matrix_Translate.s")
|
||||
#endif
|
||||
|
||||
void Matrix_Scale(f32 x, f32 y, f32 z, u8 mode) {
|
||||
MtxF* cmf = sCurrentMatrix;
|
||||
|
@ -289,7 +295,13 @@ void Matrix_RotateZ(f32 z, u8 mode) {
|
|||
}
|
||||
}
|
||||
|
||||
void Matrix_RotateXYZ(s16 x, s16 y, s16 z, u8 mode) {
|
||||
/*
|
||||
* Rotates the top of the matrix stack by `z` degrees, then
|
||||
* rotates that matrix by `y` degrees, then rotates that matrix
|
||||
* by `x` degrees.
|
||||
* Original Name: Matrix_RotateXYZ, changed to reflect rotation order.
|
||||
*/
|
||||
void Matrix_RotateZYX(s16 x, s16 y, s16 z, u8 mode) {
|
||||
MtxF* cmf = sCurrentMatrix;
|
||||
f32 temp1;
|
||||
f32 temp2;
|
||||
|
@ -374,43 +386,47 @@ void Matrix_RotateXYZ(s16 x, s16 y, s16 z, u8 mode) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_800D1340(Vec3f* arg0, Vec3s* arg1) {
|
||||
/*
|
||||
* Translates the top of the matrix stack by `translation` units,
|
||||
* then rotates that matrix by `rotation` in Z-Y-X order
|
||||
*/
|
||||
void Matrix_TranslateThenRotateZYX(Vec3f* translation, Vec3s* rotation) {
|
||||
MtxF* cmf = sCurrentMatrix;
|
||||
f32 sin;
|
||||
f32 cos;
|
||||
f32 temp1;
|
||||
f32 temp2;
|
||||
|
||||
sin = Math_Sins(arg1->z);
|
||||
cos = Math_Coss(arg1->z);
|
||||
sin = Math_Sins(rotation->z);
|
||||
cos = Math_Coss(rotation->z);
|
||||
|
||||
temp1 = cmf->xx;
|
||||
temp2 = cmf->yx;
|
||||
cmf->wx += temp1 * arg0->x + temp2 * arg0->y + cmf->zx * arg0->z;
|
||||
cmf->wx += temp1 * translation->x + temp2 * translation->y + cmf->zx * translation->z;
|
||||
cmf->xx = temp1 * cos + temp2 * sin;
|
||||
cmf->yx = temp2 * cos - temp1 * sin;
|
||||
|
||||
temp1 = cmf->xy;
|
||||
temp2 = cmf->yy;
|
||||
cmf->wy += temp1 * arg0->x + temp2 * arg0->y + cmf->zy * arg0->z;
|
||||
cmf->wy += temp1 * translation->x + temp2 * translation->y + cmf->zy * translation->z;
|
||||
cmf->xy = temp1 * cos + temp2 * sin;
|
||||
cmf->yy = temp2 * cos - temp1 * sin;
|
||||
|
||||
temp1 = cmf->xz;
|
||||
temp2 = cmf->yz;
|
||||
cmf->wz += temp1 * arg0->x + temp2 * arg0->y + cmf->zz * arg0->z;
|
||||
cmf->wz += temp1 * translation->x + temp2 * translation->y + cmf->zz * translation->z;
|
||||
cmf->xz = temp1 * cos + temp2 * sin;
|
||||
cmf->yz = temp2 * cos - temp1 * sin;
|
||||
|
||||
temp1 = cmf->xw;
|
||||
temp2 = cmf->yw;
|
||||
cmf->ww += temp1 * arg0->x + temp2 * arg0->y + cmf->zw * arg0->z;
|
||||
cmf->ww += temp1 * translation->x + temp2 * translation->y + cmf->zw * translation->z;
|
||||
cmf->xw = temp1 * cos + temp2 * sin;
|
||||
cmf->yw = temp2 * cos - temp1 * sin;
|
||||
|
||||
if (arg1->y != 0) {
|
||||
sin = Math_Sins(arg1->y);
|
||||
cos = Math_Coss(arg1->y);
|
||||
if (rotation->y != 0) {
|
||||
sin = Math_Sins(rotation->y);
|
||||
cos = Math_Coss(rotation->y);
|
||||
|
||||
temp1 = cmf->xx;
|
||||
temp2 = cmf->zx;
|
||||
|
@ -433,9 +449,9 @@ void func_800D1340(Vec3f* arg0, Vec3s* arg1) {
|
|||
cmf->zw = temp1 * sin + temp2 * cos;
|
||||
}
|
||||
|
||||
if (arg1->x != 0) {
|
||||
sin = Math_Sins(arg1->x);
|
||||
cos = Math_Coss(arg1->x);
|
||||
if (rotation->x != 0) {
|
||||
sin = Math_Sins(rotation->x);
|
||||
cos = Math_Coss(rotation->x);
|
||||
|
||||
temp1 = cmf->yx;
|
||||
temp2 = cmf->zx;
|
||||
|
|
|
@ -9,7 +9,7 @@ void ActorShape_Init(ActorShape* shape, f32 arg1, void* shadowDrawFunc, f32 arg3
|
|||
shape->unk_14 = -1;
|
||||
}
|
||||
|
||||
void func_8002B200(Actor* actor, LightMapper* lightMapper, GlobalContext* globalCtx, u32 dlist, Color_RGBA8* color) {
|
||||
void func_8002B200(Actor* actor, LightMapper* lightMapper, GlobalContext* globalCtx, Gfx* dlist, Color_RGBA8* color) {
|
||||
f32 temp1;
|
||||
f32 temp2;
|
||||
MtxF sp60;
|
||||
|
@ -41,7 +41,7 @@ void func_8002B200(Actor* actor, LightMapper* lightMapper, GlobalContext* global
|
|||
func_80038A28(actor->floorPoly, actor->posRot.pos.x, actor->unk_80, actor->posRot.pos.z, &sp60);
|
||||
Matrix_Put(&sp60);
|
||||
|
||||
if (dlist != (u32)&D_04049210) {
|
||||
if (dlist != D_04049210) {
|
||||
Matrix_RotateY(actor->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
|
@ -909,7 +909,7 @@ void func_8002D9A4(Actor* actor, f32 arg1) {
|
|||
|
||||
void func_8002D9F8(Actor* actor, UNK_PTR arg1) {
|
||||
Vec3f sp1C;
|
||||
func_800A54FC(arg1, &sp1C, actor->shape.rot.y, actor);
|
||||
func_800A54FC(arg1, &sp1C, actor->shape.rot.y);
|
||||
actor->posRot.pos.x += sp1C.x * actor->scale.x;
|
||||
actor->posRot.pos.y += sp1C.y * actor->scale.y;
|
||||
actor->posRot.pos.z += sp1C.z * actor->scale.z;
|
||||
|
@ -3884,8 +3884,8 @@ Gfx* func_80034B54(GraphicsContext* gfxCtx) {
|
|||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_80034B54.s")
|
||||
#endif
|
||||
|
||||
void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc1, void* unkFunc2, Actor* actor,
|
||||
s16 alpha) {
|
||||
void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, SkelAnime_LimbUpdateMatrix2 unkFunc1,
|
||||
SkelAnime_LimbAppendDlist2 unkFunc2, Actor* actor, s16 alpha) {
|
||||
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
|
||||
Gfx* gfxArr[4];
|
||||
|
||||
|
@ -3898,14 +3898,14 @@ void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc
|
|||
gDPPipeSync(gfxCtx->polyOpa.p++);
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x0C, func_80034B28(globalCtx->state.gfxCtx));
|
||||
|
||||
gfxCtx->polyOpa.p = func_800A273C(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount,
|
||||
unkFunc1, unkFunc2, actor, gfxCtx->polyOpa.p);
|
||||
gfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl,
|
||||
skelAnime->dListCount, unkFunc1, unkFunc2, actor, gfxCtx->polyOpa.p);
|
||||
|
||||
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_actor.c", 8860);
|
||||
}
|
||||
|
||||
void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc1, void* unkFunc2, Actor* actor,
|
||||
s16 alpha) {
|
||||
void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, SkelAnime_LimbUpdateMatrix2 unkFunc1,
|
||||
SkelAnime_LimbAppendDlist2 unkFunc2, Actor* actor, s16 alpha) {
|
||||
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
|
||||
Gfx* gfxArr[4];
|
||||
|
||||
|
@ -3917,8 +3917,8 @@ void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc
|
|||
gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, alpha);
|
||||
gSPSegment(gfxCtx->polyXlu.p++, 0x0C, func_80034B54(globalCtx->state.gfxCtx));
|
||||
|
||||
gfxCtx->polyXlu.p = func_800A273C(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount,
|
||||
unkFunc1, unkFunc2, actor, gfxCtx->polyXlu.p);
|
||||
gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl,
|
||||
skelAnime->dListCount, unkFunc1, unkFunc2, actor, gfxCtx->polyXlu.p);
|
||||
|
||||
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_actor.c", 8904);
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ static void DebugDisplay_DrawSpriteI8(DebugDispObject* dispObj, u32 texture, Glo
|
|||
Matrix_Translate(dispObj->pos.x, dispObj->pos.y, dispObj->pos.z, MTXMODE_NEW);
|
||||
Matrix_Scale(dispObj->scale.x, dispObj->scale.y, dispObj->scale.z, MTXMODE_APPLY);
|
||||
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
|
||||
Matrix_RotateXYZ(dispObj->rot.x, dispObj->rot.y, dispObj->rot.z, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(dispObj->rot.x, dispObj->rot.y, dispObj->rot.z, MTXMODE_APPLY);
|
||||
|
||||
gDPLoadTextureBlock(gfxCtx->polyXlu.p++, texture, G_IM_FMT_I, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
|
|
@ -34,10 +34,11 @@ void Sample_Draw(SampleContext* this) {
|
|||
|
||||
gfxCtx->polyOpa.p = func_80093708(gfxCtx->polyOpa.p, 0xFF, 0xFF, 0xFF, 0, 0, 0);
|
||||
func_80093D18(gfxCtx);
|
||||
|
||||
|
||||
gDPSetCycleType(gfxCtx->polyOpa.p++, G_CYC_1CYCLE);
|
||||
gDPSetRenderMode(gfxCtx->polyOpa.p++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gDPSetCombineLERP(gfxCtx->polyOpa.p++, 0, 0, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE);
|
||||
gDPSetCombineLERP(gfxCtx->polyOpa.p++, 0, 0, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE, 0, 0, 0,
|
||||
PRIMITIVE);
|
||||
gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 0xFF, 0xFF, 0x00, 0x00);
|
||||
|
||||
func_800C6B54(gfxArr, gfxCtx, "../z_sample.c", 111);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,14 +1,23 @@
|
|||
/*
|
||||
* File: z_bg_spot09_obj.c
|
||||
* Overlay: ovl_Bg_Spot09_Obj
|
||||
* Description:
|
||||
*/
|
||||
|
||||
#include "z_bg_spot09_obj.h"
|
||||
|
||||
#define ROOM 0x00
|
||||
#define FLAGS 0x00000000
|
||||
|
||||
void BgSpot09Obj_Init(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
void BgSpot09Obj_Update(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
void BgSpot09Obj_Draw(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
static void BgSpot09Obj_Init(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
static void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
static void BgSpot09Obj_Update(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
static void BgSpot09Obj_Draw(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
|
||||
static s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
static s32 func_808B1BA0(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
static s32 func_808B1BEC(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
|
||||
/*
|
||||
const ActorInit Bg_Spot09_Obj_InitVars = {
|
||||
ACTOR_BG_SPOT09_OBJ,
|
||||
ACTORTYPE_BG,
|
||||
|
@ -21,25 +30,155 @@ const ActorInit Bg_Spot09_Obj_InitVars = {
|
|||
(ActorFunc)BgSpot09Obj_Update,
|
||||
(ActorFunc)BgSpot09Obj_Draw,
|
||||
};
|
||||
*/
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1AE0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1BA0.s")
|
||||
static u32 D_808B1F90[] = { 0x00000000, 0x06005520, 0x0600283C, 0x06008458, 0x06007580 };
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1BEC.s")
|
||||
static s32 (*D_808B1FA4[])(BgSpot09Obj* this, GlobalContext* globalCtx) = {
|
||||
func_808B1BEC,
|
||||
func_808B1AE0,
|
||||
func_808B1BA0,
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1C70.s")
|
||||
static InitChainEntry initChain1[] = {
|
||||
ICHAIN_F32(unk_F4, 7200, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk_F8, 3000, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk_FC, 7200, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1CEC.s")
|
||||
static InitChainEntry initChain2[] = {
|
||||
ICHAIN_F32(unk_F4, 7200, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk_F8, 800, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk_FC, 1500, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1D18.s")
|
||||
static u32 dlists[] = { 0x06000100, 0x06003970, 0x06001120, 0x06007D40, 0x06006210 };
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1D44.s")
|
||||
extern UNK_TYPE D_06008010;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/BgSpot09Obj_Init.s")
|
||||
static s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
s32 carpentersRescued;
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/BgSpot09Obj_Destroy.s")
|
||||
if (gSaveContext.scene_setup_index >= 4) {
|
||||
return thisx->params == 0;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/BgSpot09Obj_Update.s")
|
||||
carpentersRescued = (gSaveContext.event_chk_inf[9] & 0xF) == 0xF;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/BgSpot09Obj_Draw.s")
|
||||
if (LINK_AGE_IN_YEARS == YEARS_ADULT) {
|
||||
switch (thisx->params) {
|
||||
case 0:
|
||||
return 0;
|
||||
case 1:
|
||||
return !carpentersRescued;
|
||||
case 4:
|
||||
return carpentersRescued;
|
||||
case 3:
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
return thisx->params == 2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static s32 func_808B1BA0(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
if (thisx->params == 3) {
|
||||
Actor_SetScale(thisx, 0.1f);
|
||||
} else {
|
||||
Actor_SetScale(thisx, 1.0f);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static s32 func_808B1BEC(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
s32 localC = 0;
|
||||
s32 pad[2];
|
||||
|
||||
if (D_808B1F90[thisx->params] != 0) {
|
||||
DynaPolyInfo_SetActorMove(thisx, 0);
|
||||
DynaPolyInfo_Alloc(D_808B1F90[thisx->params], &localC);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, localC);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static s32 func_808B1C70(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
s32 i;
|
||||
for (i = 0; i < ARRAY_COUNT(D_808B1FA4); i++) {
|
||||
if (!D_808B1FA4[i](this, globalCtx)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static s32 func_808B1CEC(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
Actor_ProcessInitChain(&this->dyna.actor, &initChain1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static s32 func_808B1D18(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
Actor_ProcessInitChain(&this->dyna.actor, &initChain2);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static s32 func_808B1D44(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
if (this->dyna.actor.params == 3) {
|
||||
return func_808B1D18(this, globalCtx);
|
||||
} else {
|
||||
return func_808B1CEC(this, globalCtx);
|
||||
}
|
||||
}
|
||||
|
||||
static void BgSpot09Obj_Init(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
osSyncPrintf("Spot09 Object [arg_data : 0x%04x](大工救出フラグ 0x%x)\n", thisx->params,
|
||||
gSaveContext.event_chk_inf[9] & 0xF);
|
||||
thisx->params &= 0xFF;
|
||||
if ((thisx->params < 0) || (thisx->params >= 5)) {
|
||||
osSyncPrintf("Error : Spot 09 object の arg_data が判別出来ない(%s %d)(arg_data 0x%04x)\n",
|
||||
"../z_bg_spot09_obj.c", 322, thisx->params);
|
||||
}
|
||||
|
||||
if (!func_808B1C70(this, globalCtx)) {
|
||||
Actor_Kill(thisx);
|
||||
} else if (!func_808B1D44(this, globalCtx)) {
|
||||
Actor_Kill(thisx);
|
||||
}
|
||||
}
|
||||
|
||||
static void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
DynaCollisionContext* dynaColCtx = &globalCtx->colCtx.dyna;
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
if (thisx->params != 0) {
|
||||
DynaPolyInfo_Free(globalCtx, dynaColCtx, this->dyna.dynaPolyId);
|
||||
}
|
||||
}
|
||||
|
||||
static void BgSpot09Obj_Update(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
static void BgSpot09Obj_Draw(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* gfxArr[3];
|
||||
|
||||
Draw_DListOpa(globalCtx, dlists[thisx->params]);
|
||||
if (thisx->params == 3) {
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 388);
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
|
||||
gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 391),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, &D_06008010);
|
||||
|
||||
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 396);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#include <global.h>
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0x1C];
|
||||
/* 0x0000 */ DynaPolyActor dyna;
|
||||
/* 0x0164 */ char unk_164[0x04];
|
||||
} BgSpot09Obj; // size = 0x0168
|
||||
|
||||
extern const ActorInit Bg_Spot09_Obj_InitVars;
|
||||
|
|
|
@ -1,14 +1,28 @@
|
|||
/*
|
||||
* File: z_bg_spot12_gate.c
|
||||
* Overlay: Bg_Spot12_Gate
|
||||
* Description:
|
||||
*/
|
||||
|
||||
#include "z_bg_spot12_gate.h"
|
||||
|
||||
#define ROOM 0x00
|
||||
#define FLAGS 0x00000000
|
||||
|
||||
void BgSpot12Gate_Init(BgSpot12Gate* this, GlobalContext* globalCtx);
|
||||
void BgSpot12Gate_Destroy(BgSpot12Gate* this, GlobalContext* globalCtx);
|
||||
void BgSpot12Gate_Update(BgSpot12Gate* this, GlobalContext* globalCtx);
|
||||
void BgSpot12Gate_Draw(BgSpot12Gate* this, GlobalContext* globalCtx);
|
||||
static void BgSpot12Gate_Init(BgSpot12Gate* this, GlobalContext* globalCtx);
|
||||
static void BgSpot12Gate_Destroy(BgSpot12Gate* this, GlobalContext* globalCtx);
|
||||
static void BgSpot12Gate_Update(BgSpot12Gate* this, GlobalContext* globalCtx);
|
||||
static void BgSpot12Gate_Draw(BgSpot12Gate* this, GlobalContext* globalCtx);
|
||||
|
||||
static void func_808B30C0(BgSpot12Gate* this);
|
||||
static void func_808B30D8(BgSpot12Gate* this, GlobalContext* globalCtx);
|
||||
static void func_808B3134(BgSpot12Gate* this);
|
||||
static void func_808B314C(BgSpot12Gate* this, GlobalContext* globalCtx);
|
||||
static void func_808B317C(BgSpot12Gate* this);
|
||||
static void func_808B318C(BgSpot12Gate* this, GlobalContext* globalCtx);
|
||||
static void func_808B3274(BgSpot12Gate* this);
|
||||
static void func_808B3298(BgSpot12Gate* this, GlobalContext* globalCtx);
|
||||
|
||||
/*
|
||||
const ActorInit Bg_Spot12_Gate_InitVars = {
|
||||
ACTOR_BG_SPOT12_GATE,
|
||||
ACTORTYPE_BG,
|
||||
|
@ -21,29 +35,113 @@ const ActorInit Bg_Spot12_Gate_InitVars = {
|
|||
(ActorFunc)BgSpot12Gate_Update,
|
||||
(ActorFunc)BgSpot12Gate_Draw,
|
||||
};
|
||||
*/
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B2F90.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/BgSpot12Gate_Init.s")
|
||||
static InitChainEntry initChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk_F4, 2500, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk_F8, 500, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk_FC, 1200, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/BgSpot12Gate_Destroy.s")
|
||||
extern UNK_TYPE D_06001080;
|
||||
extern UNK_TYPE D_060011EC;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B30C0.s")
|
||||
static void func_808B2F90(BgSpot12Gate* this, GlobalContext* globalCtx, UNK_TYPE collision, DynaPolyMoveFlag flags) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
s32 localC = 0;
|
||||
s32 pad[2];
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B30D8.s")
|
||||
DynaPolyInfo_SetActorMove(thisx, flags);
|
||||
DynaPolyInfo_Alloc(collision, &localC);
|
||||
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, localC);
|
||||
if (this->dyna.dynaPolyId == 0x32) {
|
||||
osSyncPrintf("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_spot12_gate.c", 145,
|
||||
thisx->id, thisx->params);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B3134.s")
|
||||
static void BgSpot12Gate_Init(BgSpot12Gate* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B314C.s")
|
||||
func_808B2F90(this, globalCtx, &D_060011EC, 0);
|
||||
Actor_ProcessInitChain(thisx, initChain);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B317C.s")
|
||||
if (Flags_GetSwitch(globalCtx, thisx->params & 0x3F)) {
|
||||
func_808B3274(this);
|
||||
} else {
|
||||
func_808B30C0(this);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B318C.s")
|
||||
static void BgSpot12Gate_Destroy(BgSpot12Gate* this, GlobalContext* globalCtx) {
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B3274.s")
|
||||
static void func_808B30C0(BgSpot12Gate* this) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/func_808B3298.s")
|
||||
this->actionFunc = (ActorFunc)func_808B30D8;
|
||||
thisx->posRot.pos.y = thisx->initPosRot.pos.y;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/BgSpot12Gate_Update.s")
|
||||
static void func_808B30D8(BgSpot12Gate* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot12_Gate/BgSpot12Gate_Draw.s")
|
||||
if (Flags_GetSwitch(globalCtx, thisx->params & 0x3F)) {
|
||||
func_808B3134(this);
|
||||
func_800800F8(globalCtx, 0x1040, -0x63, thisx, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void func_808B3134(BgSpot12Gate* this) {
|
||||
this->actionFunc = (ActorFunc)func_808B314C;
|
||||
this->unk_168 = 0x28;
|
||||
}
|
||||
|
||||
static void func_808B314C(BgSpot12Gate* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_168 <= 0) {
|
||||
func_808B317C(this);
|
||||
}
|
||||
}
|
||||
|
||||
static void func_808B317C(BgSpot12Gate* this) {
|
||||
this->actionFunc = (ActorFunc)func_808B318C;
|
||||
}
|
||||
|
||||
static void func_808B318C(BgSpot12Gate* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
s32 var;
|
||||
|
||||
Math_ApproxF(&thisx->velocity.y, 1.6f, 0.03f);
|
||||
if (Math_ApproxF(&thisx->posRot.pos.y, thisx->initPosRot.pos.y + 200.0f, thisx->velocity.y)) {
|
||||
func_808B3274(this);
|
||||
var = func_80092F88(globalCtx->cameraCtx.activeCameraPtrs[globalCtx->cameraCtx.unk_5C0], 3);
|
||||
func_80092DAC(var, -0x3CB0);
|
||||
func_80092E70(var, 3, 0, 0, 0);
|
||||
func_80092DF0(var, 0xC);
|
||||
Audio_PlayActorSound2(thisx, NA_SE_EV_BRIDGE_OPEN_STOP);
|
||||
} else {
|
||||
func_8002F974(thisx, 0x2067);
|
||||
}
|
||||
}
|
||||
|
||||
static void func_808B3274(BgSpot12Gate* this) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
this->actionFunc = (ActorFunc)func_808B3298;
|
||||
thisx->posRot.pos.y = thisx->initPosRot.pos.y + 200.0f;
|
||||
}
|
||||
|
||||
static void func_808B3298(BgSpot12Gate* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
static void BgSpot12Gate_Update(BgSpot12Gate* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_168 > 0) {
|
||||
this->unk_168 -= 1;
|
||||
}
|
||||
this->actionFunc(this, globalCtx);
|
||||
}
|
||||
|
||||
static void BgSpot12Gate_Draw(BgSpot12Gate* this, GlobalContext* globalCtx) {
|
||||
Draw_DListOpa(globalCtx, &D_06001080);
|
||||
}
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
#include <global.h>
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0x20];
|
||||
/* 0x0000 */ DynaPolyActor dyna;
|
||||
/* 0x0164 */ ActorFunc actionFunc;
|
||||
/* 0x0168 */ s16 unk_168;
|
||||
} BgSpot12Gate; // size = 0x016C
|
||||
|
||||
extern const ActorInit Bg_Spot12_Gate_InitVars;
|
||||
|
|
|
@ -51,10 +51,10 @@ const ActorInit Demo_Go_InitVars = {
|
|||
(ActorFunc)DemoGo_Draw,
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_060029A8;
|
||||
extern UNK_TYPE D_06004930;
|
||||
extern AnimationHeader D_060029A8;
|
||||
extern AnimationHeader D_06004930;
|
||||
extern UNK_TYPE D_0600E680;
|
||||
extern UNK_TYPE D_0600FEF0;
|
||||
extern SkeletonHeader D_0600FEF0;
|
||||
|
||||
UNK_TYPE func_8097C870(DemoGo* this) {
|
||||
s32 ret;
|
||||
|
@ -87,7 +87,7 @@ void func_8097C8A8(DemoGo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void DemoGo_Destroy(DemoGo* this, GlobalContext* globalCtx) {
|
||||
func_800A56F0(&this->skelAnime, globalCtx);
|
||||
SkelAnime_Free(&this->skelAnime, globalCtx);
|
||||
}
|
||||
|
||||
void func_8097C930(DemoGo* this) {
|
||||
|
@ -246,10 +246,10 @@ void func_8097CEEC(DemoGo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_8097CF20(DemoGo* this, GlobalContext* globalCtx, UNK_TYPE arg2) {
|
||||
UNK_PTR animation = &D_060029A8;
|
||||
AnimationHeader* animation = &D_060029A8;
|
||||
if (arg2 != 0) {
|
||||
SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 0,
|
||||
-8.0f);
|
||||
SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f,
|
||||
SkelAnime_GetFrameCount(&animation->genericHeader), 0, -8.0f);
|
||||
this->action = 5;
|
||||
this->unk_19C = 0.0f;
|
||||
}
|
||||
|
@ -316,12 +316,13 @@ void DemoGo_Update(DemoGo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void DemoGo_Init(DemoGo* this, GlobalContext* globalCtx) {
|
||||
UNK_PTR animation = &D_06004930;
|
||||
s16 pad;
|
||||
AnimationHeader* animation = &D_06004930;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
|
||||
func_800A46F8(globalCtx, &this->skelAnime, &D_0600FEF0, 0, 0, 0, 0);
|
||||
SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 2, 0.0f);
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600FEF0, NULL, NULL, NULL, 0);
|
||||
SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f,
|
||||
SkelAnime_GetFrameCount(&animation->genericHeader), 2, 0.0f);
|
||||
this->action = 0;
|
||||
}
|
||||
|
||||
|
@ -343,8 +344,8 @@ void func_8097D29C(DemoGo* this, GlobalContext* globalCtx) {
|
|||
gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(srcSegment8));
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(srcSegment9));
|
||||
|
||||
func_800A1AC8(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL,
|
||||
&this->actor);
|
||||
SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL,
|
||||
&this->actor);
|
||||
|
||||
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_demo_go.c", 746);
|
||||
}
|
||||
|
|
|
@ -57,8 +57,8 @@ static InitChainEntry initChain[] = {
|
|||
ICHAIN_F32(unk_4C, 5600, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern u32 D_0600006C;
|
||||
extern u32 D_06002190;
|
||||
extern AnimationHeader D_0600006C;
|
||||
extern SkeletonHeader D_06002190;
|
||||
|
||||
void EnBird_SetNewUpdate(EnBird* this, ActorFunc newUpdateFunc) {
|
||||
this->updateFunc = newUpdateFunc;
|
||||
|
@ -86,19 +86,15 @@ void EnBird_Init(EnBird* this, GlobalContext* globalCtx) {
|
|||
void EnBird_Destroy(EnBird* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// D_0600006C address is reused when it shouldn't be
|
||||
// also minor ordering differences
|
||||
void func_809C1CAC(EnBird* this, s16 params) {
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_0600006C);
|
||||
f32 playbackSpeed = this->unk_19C ? 0.0f : 1.0f;
|
||||
AnimationHeader* anim = &D_0600006C;
|
||||
|
||||
this->unk_198 = Math_Rand_S16Offset(5, 0x23);
|
||||
SkelAnime_ChangeAnimation(&this->skelAnime, &D_0600006C, playbackSpeed, 0.0f, frameCount, 0, 0.0f);
|
||||
SkelAnime_ChangeAnimation(&this->skelAnime, anim, playbackSpeed, 0.0f, frameCount, 0, 0.0f);
|
||||
EnBird_SetNewUpdate(this, func_809C1D60);
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Bird/func_809C1CAC.s")
|
||||
#endif
|
||||
|
||||
void func_809C1D60(EnBird* this, GlobalContext* globalCtx) {
|
||||
f32 fVar2 = sinf(this->unk_1B4);
|
||||
|
@ -150,5 +146,5 @@ void EnBird_Update(EnBird* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnBird_Draw(EnBird* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Draw(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, 0, NULL, NULL);
|
||||
SkelAnime_Draw(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, 0, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -79,14 +79,14 @@ typedef enum {
|
|||
/* 0x06 */ DOG_BOW_2,
|
||||
} DogBehavior;
|
||||
|
||||
extern UNK_PTR D_06007290;
|
||||
extern UNK_PTR D_06001368;
|
||||
extern UNK_PTR D_06000D78;
|
||||
extern UNK_PTR D_06000278;
|
||||
extern SkeletonHeader D_06007290;
|
||||
extern AnimationHeader D_06001368;
|
||||
extern AnimationHeader D_06000D78;
|
||||
extern AnimationHeader D_06000278;
|
||||
|
||||
static void EnDog_PlayWalkSFX(EnDog* this) {
|
||||
u32* walk = &D_06001368;
|
||||
if (this->skelAnime.animCurrent == walk) {
|
||||
AnimationHeader* walk = &D_06001368;
|
||||
if (this->skelAnime.animCurrentSeg == walk) {
|
||||
if ((this->skelAnime.animCurrentFrame == 1.0f) || (this->skelAnime.animCurrentFrame == 7.0f)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHIBI_WALK);
|
||||
}
|
||||
|
@ -94,8 +94,8 @@ static void EnDog_PlayWalkSFX(EnDog* this) {
|
|||
}
|
||||
|
||||
static void EnDog_PlayRunSFX(EnDog* this) {
|
||||
u32* run = &D_06000D78;
|
||||
if (this->skelAnime.animCurrent == run) {
|
||||
AnimationHeader* run = &D_06000D78;
|
||||
if (this->skelAnime.animCurrentSeg == run) {
|
||||
if ((this->skelAnime.animCurrentFrame == 2.0f) || (this->skelAnime.animCurrentFrame == 4.0f)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHIBI_WALK);
|
||||
}
|
||||
|
@ -103,8 +103,8 @@ static void EnDog_PlayRunSFX(EnDog* this) {
|
|||
}
|
||||
|
||||
static void EnDog_PlayBarkSFX(EnDog* this) {
|
||||
u32* bark = &D_06000278;
|
||||
if (this->skelAnime.animCurrent == bark) {
|
||||
AnimationHeader* bark = &D_06000278;
|
||||
if (this->skelAnime.animCurrentSeg == bark) {
|
||||
if ((this->skelAnime.animCurrentFrame == 13.0f) || (this->skelAnime.animCurrentFrame == 19.0f)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_SMALL_DOG_BARK);
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ static void EnDog_Init(EnDog* this, GlobalContext* globalCtx) {
|
|||
collider = &this->collider;
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 24.0f);
|
||||
skelAnime = &this->skelAnime;
|
||||
func_800A46F8(globalCtx, skelAnime, &D_06007290, 0, &this->unk_1F4, &this->unk_242, 13);
|
||||
SkelAnime_InitSV(globalCtx, skelAnime, &D_06007290, NULL, &this->unk_1F4, &this->unk_242, 13);
|
||||
func_80034EC0(skelAnime, animations, 0);
|
||||
|
||||
if ((this->actor.params & 0x8000) == 0) {
|
||||
|
@ -457,11 +457,12 @@ static void EnDog_Update(EnDog* this, GlobalContext* globalCtx) {
|
|||
Actor_CollisionCheck_SetOT(globalCtx, &globalCtx->sub_11E60, &this->collider);
|
||||
}
|
||||
|
||||
static UNK_TYPE EnDog_Callback1(UNK_TYPE unused1, UNK_TYPE unused2, UNK_TYPE unused3, UNK_TYPE unused4) {
|
||||
static UNK_TYPE EnDog_Callback1(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
||||
Actor* actor) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void EnDog_Callback2(UNK_TYPE unused1, UNK_TYPE unused2, UNK_TYPE unused3, UNK_TYPE unused4) {
|
||||
static void EnDog_Callback2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor) {
|
||||
}
|
||||
|
||||
static void EnDog_Draw(EnDog* this, GlobalContext* globalCtx) {
|
||||
|
@ -479,7 +480,7 @@ static void EnDog_Draw(EnDog* this, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(gfxCtx->polyOpa.p++, colors[this->actor.params & 0xF].r, colors[this->actor.params & 0xF].g,
|
||||
colors[this->actor.params & 0xF].b, colors[this->actor.params & 0xF].a);
|
||||
|
||||
func_800A1AC8(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount,
|
||||
EnDog_Callback1, EnDog_Callback2, &this->actor);
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount,
|
||||
EnDog_Callback1, EnDog_Callback2, &this->actor);
|
||||
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_en_dog.c", 994);
|
||||
}
|
||||
|
|
|
@ -63,8 +63,8 @@ static InitChainEntry initChain[] = {
|
|||
ICHAIN_F32(unk_4C, 500, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern D_060005EC;
|
||||
extern D_06003DC0;
|
||||
extern AnimationHeader D_060005EC;
|
||||
extern SkeletonHeader D_06003DC0;
|
||||
|
||||
static void EnMs_SetOfferText(EnMs* this, GlobalContext* globalCtx) {
|
||||
this->actor.textId = Text_GetFaceReaction(globalCtx, 0x1B);
|
||||
|
@ -86,8 +86,8 @@ static void EnMs_Init(EnMs* this, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
Actor_ProcessInitChain(&this->actor, initChain);
|
||||
func_800A46F8(globalCtx, &this->skelAnime, &D_06003DC0, &D_060005EC, &this->unkSkelAnimeStruct, &this->unk_1C6,
|
||||
9); // skelanime_mtx_init
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06003DC0, &D_060005EC, &this->unkSkelAnimeStruct, &this->unk_1C6,
|
||||
9);
|
||||
ActorCollider_AllocCylinder(globalCtx, &this->collider);
|
||||
func_8005C450(globalCtx, &this->collider, this, &unk_col_80AB0320);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 35.0f);
|
||||
|
@ -191,6 +191,6 @@ static void EnMs_Update(EnMs* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnMs_Draw(EnMs* this, GlobalContext* globalCtx) {
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
func_800A1AC8(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, 0, 0,
|
||||
&this->actor);
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount,
|
||||
NULL, NULL, &this->actor);
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ const ActorInit En_Ru2_InitVars = {
|
|||
};
|
||||
|
||||
extern u32 D_060004CC;
|
||||
extern u32 D_0600C700;
|
||||
extern SkeletonHeader* D_0600C700;
|
||||
extern u32 D_0600D3DC;
|
||||
extern u32 D_0600DCAC;
|
||||
extern u32 D_06000DE8;
|
||||
|
@ -481,8 +481,8 @@ static void func_80AF321C(EnRu2* this, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, this->unk_2B4);
|
||||
gSPSegment(gfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]);
|
||||
|
||||
gfxCtx->polyXlu.p = func_800A273C(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount,
|
||||
0, 0, 0, gfxCtx->polyXlu.p);
|
||||
gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl,
|
||||
skelAnime->dListCount, NULL, NULL, NULL, gfxCtx->polyXlu.p);
|
||||
|
||||
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_en_ru2_inKenjyanomaDemo02.c", 291);
|
||||
}
|
||||
|
@ -759,7 +759,7 @@ static void EnRu2_Update(EnRu2* this, GlobalContext* globalCtx) {
|
|||
static void EnRu2_Init(EnRu2* this, GlobalContext* globalCtx) {
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
|
||||
func_80AF2550(this, globalCtx);
|
||||
func_800A46F8(globalCtx, &this->skelAnime, &D_0600C700, 0, &this->unk_190, &this->unk_21A, 0x17);
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600C700, NULL, &this->unk_190, &this->unk_21A, 0x17);
|
||||
|
||||
switch (func_80AF26A0(this)) {
|
||||
case 2:
|
||||
|
@ -799,8 +799,8 @@ static void func_80AF3F20(EnRu2* this, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x00, 0x00, 0x00, 0xFF);
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]);
|
||||
|
||||
func_800A1AC8(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL,
|
||||
&this->actor);
|
||||
SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL,
|
||||
&this->actor);
|
||||
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_en_ru2.c", 663);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,16 +31,16 @@ extern UNK_TYPE D_04052DB0;
|
|||
extern UNK_TYPE D_040531B0;
|
||||
extern UNK_TYPE D_040535B0;
|
||||
extern UNK_TYPE D_040539B0;
|
||||
extern UNK_TYPE D_06001144;
|
||||
extern UNK_TYPE D_06001FA8;
|
||||
extern UNK_TYPE D_06002F84;
|
||||
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 UNK_TYPE D_0600ACE0;
|
||||
extern UNK_TYPE D_0600BC90;
|
||||
extern UNK_TYPE D_0600BCA0;
|
||||
extern UNK_TYPE D_0600BE40;
|
||||
extern Gfx D_0600ACE0[];
|
||||
extern Gfx D_0600BC90[];
|
||||
extern Gfx D_0600BCA0[];
|
||||
extern SkeletonHeader D_0600BE40;
|
||||
|
||||
const ActorInit En_Tk_InitVars = {
|
||||
ACTOR_EN_TK,
|
||||
|
@ -136,7 +136,7 @@ void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) {
|
|||
if (eff->active != 0) {
|
||||
if (gfxSetup == 0) {
|
||||
gfxCtx->polyXlu.p = func_80093774(gfxCtx->polyXlu.p, 0);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, &D_0600BC90);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, D_0600BC90);
|
||||
gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x64, 0x3C, 0x14, 0x00);
|
||||
gfxSetup = 1;
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) {
|
|||
imageIdx = eff->timeLeft * ((f32)ARRAY_COUNT(images) / eff->timeTotal);
|
||||
gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(images[imageIdx]));
|
||||
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, &D_0600BCA0);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, D_0600BCA0);
|
||||
}
|
||||
eff++;
|
||||
}
|
||||
|
@ -186,9 +186,9 @@ static EnTk_SubActorStruct98Init D_80B1D534 = {
|
|||
};
|
||||
|
||||
void EnTk_RestAnim(EnTk* this, GlobalContext* globalCtx) {
|
||||
UNK_PTR anim = &D_06002F84;
|
||||
AnimationHeader* anim = &D_06002F84;
|
||||
|
||||
SkelAnime_ChangeAnimation(&this->skelAnim, (u32)anim, 1.f, 0.f, SkelAnime_GetFrameCount((u32)&D_06002F84), 0,
|
||||
SkelAnime_ChangeAnimation(&this->skelAnim, anim, 1.f, 0.f, SkelAnime_GetFrameCount(&D_06002F84.genericHeader), 0,
|
||||
-10.f);
|
||||
|
||||
this->actionCountdown = Math_Rand_S16Offset(60, 60);
|
||||
|
@ -196,18 +196,18 @@ void EnTk_RestAnim(EnTk* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnTk_WalkAnim(EnTk* this, GlobalContext* globalCtx) {
|
||||
UNK_PTR anim = &D_06001FA8;
|
||||
AnimationHeader* anim = &D_06001FA8;
|
||||
|
||||
SkelAnime_ChangeAnimation(&this->skelAnim, (u32)anim, 1.f, 0.f, SkelAnime_GetFrameCount((u32)&D_06002F84), 0,
|
||||
SkelAnime_ChangeAnimation(&this->skelAnim, anim, 1.f, 0.f, SkelAnime_GetFrameCount(&D_06002F84.genericHeader), 0,
|
||||
-10.f);
|
||||
|
||||
this->actionCountdown = Math_Rand_S16Offset(240, 240);
|
||||
}
|
||||
|
||||
void EnTk_DigAnim(EnTk* this, GlobalContext* globalCtx) {
|
||||
UNK_PTR anim = &D_06001144;
|
||||
AnimationHeader* anim = &D_06001144;
|
||||
|
||||
SkelAnime_ChangeAnimation(&this->skelAnim, (u32)anim, 1.f, 0.f, SkelAnime_GetFrameCount((u32)&D_06001144), 0,
|
||||
SkelAnime_ChangeAnimation(&this->skelAnim, anim, 1.f, 0.f, SkelAnime_GetFrameCount(&D_06001144.genericHeader), 0,
|
||||
-10.f);
|
||||
|
||||
if (EnTk_CheckNextSpot(this, globalCtx) >= 0) {
|
||||
|
@ -306,7 +306,7 @@ f32 EnTk_Step(EnTk* this, GlobalContext* globalCtx) {
|
|||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_WALK);
|
||||
}
|
||||
|
||||
if (this->skelAnim.animCurrent != (u32*)&D_06001FA8) {
|
||||
if (this->skelAnim.animCurrentSeg != &D_06001FA8) {
|
||||
return 0.f;
|
||||
}
|
||||
|
||||
|
@ -504,13 +504,13 @@ void EnTk_DigEff(EnTk* this) {
|
|||
|
||||
void EnTk_Init(EnTk* this, GlobalContext* globalCtx) {
|
||||
EnTk* thisAgain = this;
|
||||
UNK_PTR anim = &D_06002F84;
|
||||
AnimationHeader* anim = &D_06002F84;
|
||||
|
||||
ActorShape_Init(&thisAgain->actor.shape, 0, ActorShadow_DrawFunc_Circle, 24.f);
|
||||
|
||||
func_800A46F8(globalCtx, &thisAgain->skelAnim, (u32)&D_0600BE40, 0, thisAgain->hz_22A, thisAgain->hz_296, 18);
|
||||
SkelAnime_ChangeAnimation(&thisAgain->skelAnim, (u32)anim, 1.f, 0.f, SkelAnime_GetFrameCount((u32)&D_06002F84), 0,
|
||||
0.f);
|
||||
SkelAnime_InitSV(globalCtx, &thisAgain->skelAnim, &D_0600BE40, NULL, thisAgain->hz_22A, thisAgain->hz_296, 18);
|
||||
SkelAnime_ChangeAnimation(&thisAgain->skelAnim, anim, 1.f, 0.f, SkelAnime_GetFrameCount(&D_06002F84.genericHeader),
|
||||
0, 0.f);
|
||||
|
||||
ActorCollider_AllocCylinder(globalCtx, &thisAgain->collider);
|
||||
ActorCollider_InitCylinder(globalCtx, &thisAgain->collider, &thisAgain->actor, &D_80B1D508);
|
||||
|
@ -707,41 +707,41 @@ void func_80B1D200(GlobalContext* globalCtx) {
|
|||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
func_800C6AC4(pgdl, globalCtx->state.gfxCtx, "../z_en_tk.c", 1188);
|
||||
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, &D_0600ACE0);
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, D_0600ACE0);
|
||||
|
||||
func_800C6B54(pgdl, globalCtx->state.gfxCtx, "../z_en_tk.c", 1190);
|
||||
}
|
||||
|
||||
s32 func_80B1D278(s16 a0, UNK_TYPE a1, UNK_TYPE a2, UNK_TYPE a3, Vec3s* sp10, Actor* actor) {
|
||||
s32 func_80B1D278(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor) {
|
||||
EnTk* tk = (EnTk*)actor;
|
||||
|
||||
switch (a1) {
|
||||
switch (limbIndex) {
|
||||
/* Limb 15 - Head */
|
||||
case 15:
|
||||
tk->h_21E = sp10->y;
|
||||
tk->h_21E = rot->y;
|
||||
break;
|
||||
/* Limb 16 - Jaw */
|
||||
case 16:
|
||||
tk->h_21E += sp10->y;
|
||||
sp10->y += tk->headRot;
|
||||
tk->h_21E += rot->y;
|
||||
rot->y += tk->headRot;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void func_80B1D2E4(GlobalContext* globalCtx, UNK_TYPE a1, UNK_TYPE a2, UNK_TYPE a3, Actor* actor) {
|
||||
void func_80B1D2E4(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor) {
|
||||
EnTk* this = (EnTk*)actor;
|
||||
Vec3f sp28 = { 0.f, 0.f, 4600.f };
|
||||
Vec3f sp1C = { 0.f, 0.f, 0.f };
|
||||
|
||||
/* Limb 16 - Jaw */
|
||||
if (a1 == 16) {
|
||||
if (limbIndex == 16) {
|
||||
Matrix_MultVec3f(&sp1C, &this->actor.posRot2.pos);
|
||||
}
|
||||
|
||||
/* Limb 14 - Neck */
|
||||
if (a1 == 14) {
|
||||
if (limbIndex == 14) {
|
||||
Matrix_MultVec3f(&sp28, &this->v3f_304);
|
||||
func_80B1D200(globalCtx);
|
||||
}
|
||||
|
@ -769,8 +769,8 @@ void EnTk_Draw(EnTk* this, GlobalContext* globalCtx) {
|
|||
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(eyeImages[thisAgain->eyeImageIdx]));
|
||||
|
||||
func_800A1AC8(globalCtx, thisAgain->skelAnim.limbIndex, thisAgain->skelAnim.actorDrawTbl,
|
||||
thisAgain->skelAnim.dListCount, func_80B1D278, func_80B1D2E4, &thisAgain->actor);
|
||||
SkelAnime_DrawSV(globalCtx, thisAgain->skelAnim.skeleton, thisAgain->skelAnim.actorDrawTbl,
|
||||
thisAgain->skelAnim.dListCount, func_80B1D278, func_80B1D2E4, &thisAgain->actor);
|
||||
|
||||
func_800C6B54(pgdl, globalCtx->state.gfxCtx, "../z_en_tk.c", 1312);
|
||||
}
|
||||
|
|
|
@ -36,8 +36,6 @@ static void EnWallmas_WaitForSwitchFlag(EnWallmas* this, GlobalContext* globalCt
|
|||
static void EnWallmas_Stun(EnWallmas* this, GlobalContext* globalCtx);
|
||||
static void EnWallmas_Update(EnWallmas* this, GlobalContext* globalCtx);
|
||||
static void EnWallmas_Walk(EnWallmas* this, GlobalContext* globalCtx);
|
||||
static s32 EnWallMas_UpdatePos(GlobalContext* globalCtx, s32 arg1, s32 arg2, Actor* arg3, void* arg4, EnWallmas* arg5);
|
||||
static void EnWallmas_DrawOpa(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32 arg3);
|
||||
static void EnWallmas_Draw(EnWallmas* this, GlobalContext* globalCtx);
|
||||
|
||||
const ActorInit En_Wallmas_InitVars = {
|
||||
|
@ -76,26 +74,25 @@ static InitChainEntry initChain[3] = {
|
|||
|
||||
static Vec3f D_80B30D70 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
extern u32 D_06000EA4;
|
||||
extern u32 D_06000590;
|
||||
extern u32 D_0600299C;
|
||||
extern u32 D_06008FB0;
|
||||
extern u32 D_06009DB0;
|
||||
extern u32 D_060019CC;
|
||||
extern u32 D_06009520;
|
||||
extern u32 D_06009244;
|
||||
extern u32 D_060041F4;
|
||||
extern u32 D_0600A054;
|
||||
extern u32 D_06008688;
|
||||
extern u32 D_04049210;
|
||||
extern AnimationHeader D_06000EA4;
|
||||
extern AnimationHeader D_06000590;
|
||||
extern AnimationHeader D_0600299C;
|
||||
extern SkeletonHeader D_06008FB0;
|
||||
extern AnimationHeader D_06009DB0;
|
||||
extern AnimationHeader D_060019CC;
|
||||
extern AnimationHeader D_06009520;
|
||||
extern AnimationHeader D_06009244;
|
||||
extern AnimationHeader D_060041F4;
|
||||
extern AnimationHeader D_0600A054;
|
||||
extern Gfx D_06008688[];
|
||||
|
||||
static void EnWallmas_Init(EnWallmas* this, GlobalContext* globalCtx) {
|
||||
EnWallmas* this2 = this;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, initChain);
|
||||
ActorShape_Init(&this->actor.shape, 0, NULL, 0.5f);
|
||||
func_800A46F8(globalCtx, &this->skelAnime, &D_06008FB0, &D_06009DB0, &this->unkSkelAnimeStruct, &this->unk_22e,
|
||||
0x19);
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06008FB0, &D_06009DB0, &this->unkSkelAnimeStruct, &this->unk_22e,
|
||||
0x19);
|
||||
|
||||
ActorCollider_AllocCylinder(globalCtx, &this->colCylinder);
|
||||
ActorCollider_InitCylinder(globalCtx, &this->colCylinder, &this->actor, &colCylinderInit);
|
||||
|
@ -137,7 +134,7 @@ static void EnWallmas_TimerInit(EnWallmas* this, GlobalContext* globalCtx) {
|
|||
|
||||
static void EnWallmas_DropStart(EnWallmas* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
u32* objSegChangeAnime = &D_0600299C;
|
||||
AnimationHeader* objSegChangeAnime = &D_0600299C;
|
||||
|
||||
SkelAnime_ChangeAnimation(&this->skelAnime, objSegChangeAnime, 0.0f, 20.0f,
|
||||
(f32)SkelAnime_GetFrameCount(&D_0600299C), 2, 0.0f);
|
||||
|
@ -152,8 +149,8 @@ static void EnWallmas_DropStart(EnWallmas* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
static void EnWallmas_LandStart(EnWallmas* this, GlobalContext* globalCtx) {
|
||||
u32* objSegFrameCount = &D_060019CC;
|
||||
u32* objSegChangeAnime = &D_060019CC;
|
||||
AnimationHeader* objSegFrameCount = &D_060019CC;
|
||||
AnimationHeader* objSegChangeAnime = &D_060019CC;
|
||||
|
||||
SkelAnime_ChangeAnimation(&this->skelAnime, objSegChangeAnime, 1.0f, 41.0f,
|
||||
SkelAnime_GetFrameCount(objSegFrameCount), 2, -3.0f);
|
||||
|
@ -169,7 +166,7 @@ static void EnWallmas_StandStart(EnWallmas* this) {
|
|||
}
|
||||
|
||||
static void EnWallmas_WalkStart(EnWallmas* this) {
|
||||
func_800A529C(&this->skelAnime, &D_060041F4, 3.0f, &this->actor);
|
||||
func_800A529C(&this->skelAnime, &D_060041F4, 3.0f);
|
||||
this->actionFunc = (ActorFunc)&EnWallmas_Walk;
|
||||
this->actor.speedXZ = 3.0f;
|
||||
}
|
||||
|
@ -180,8 +177,8 @@ static void EnWallmas_JumpToCeilingStart(EnWallmas* this) {
|
|||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
static void EnWallmas_ReturnToCeilingStart(EnWallmas* this) {
|
||||
u32* objSegFrameCount = &D_060019CC;
|
||||
u32* objSegChangeAnime = &D_060019CC;
|
||||
AnimationHeader* objSegFrameCount = &D_060019CC;
|
||||
AnimationHeader* objSegChangeAnime = &D_060019CC;
|
||||
|
||||
this->timer = 0;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
|
@ -592,24 +589,25 @@ static void EnWallmas_DrawXlu(EnWallmas* this, GlobalContext* globalCtx) {
|
|||
func_800C6B54(gfx, globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1426);
|
||||
}
|
||||
|
||||
static s32 EnWallMas_UpdatePos(GlobalContext* globalCtx, s32 arg1, s32 arg2, Actor* arg3, void* arg4, EnWallmas* arg5) {
|
||||
if (arg1 == 1) {
|
||||
if (arg5->actionFunc != (ActorFunc)EnWallmas_TakePlayer) {
|
||||
arg3->initPosRot.pos.x = arg3->initPosRot.pos.x - 1600.0f;
|
||||
static s32 EnWallMas_UpdatePos(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
|
||||
Actor* actor) {
|
||||
EnWallmas* this = (EnWallmas*)actor;
|
||||
if (limbIndex == 1) {
|
||||
if (this->actionFunc != (ActorFunc)EnWallmas_TakePlayer) {
|
||||
pos->z -= 1600.0f;
|
||||
} else {
|
||||
arg3->initPosRot.pos.x = arg3->initPosRot.pos.x -
|
||||
((1600.0f * (arg5->skelAnime.animFrameCount - arg5->skelAnime.animCurrentFrame)) /
|
||||
arg5->skelAnime.animFrameCount);
|
||||
pos->z -= ((1600.0f * (this->skelAnime.animFrameCount - this->skelAnime.animCurrentFrame)) /
|
||||
this->skelAnime.animFrameCount);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void EnWallmas_DrawOpa(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32 arg3) {
|
||||
static void EnWallmas_DrawOpa(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor) {
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* gfx[4];
|
||||
|
||||
if (arg1 == 2) {
|
||||
if (limbIndex == 2) {
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
|
||||
func_800C6AC4(&gfx, globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1478);
|
||||
|
@ -620,7 +618,7 @@ static void EnWallmas_DrawOpa(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32
|
|||
Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1489), G_MTX_LOAD);
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, &D_06008688);
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, D_06008688);
|
||||
|
||||
Matrix_Pull();
|
||||
func_800C6B54(&gfx, globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1495);
|
||||
|
@ -630,8 +628,8 @@ static void EnWallmas_DrawOpa(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32
|
|||
static void EnWallmas_Draw(EnWallmas* this, GlobalContext* globalCtx) {
|
||||
if (this->actionFunc != (ActorFunc)&EnWallmas_WaitToDrop) {
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
func_800A1AC8(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount,
|
||||
&EnWallMas_UpdatePos, &EnWallmas_DrawOpa, &this->actor);
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount,
|
||||
&EnWallMas_UpdatePos, &EnWallmas_DrawOpa, &this->actor);
|
||||
}
|
||||
|
||||
EnWallmas_DrawXlu(this, globalCtx);
|
||||
|
|
|
@ -95,7 +95,7 @@ void Title_Draw(TitleContext* this) {
|
|||
func_80093D18(this->state.gfxCtx);
|
||||
Matrix_Translate(-53.0, -5.0, 0, MTXMODE_NEW);
|
||||
Matrix_Scale(1.0, 1.0, 1.0, MTXMODE_APPLY);
|
||||
Matrix_RotateXYZ(0, sTitleRotY, 0, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(0, sTitleRotY, 0, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(this->state.gfxCtx, "../z_title.c", 424), G_MTX_LOAD);
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, &D_01002720);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue