mirror of
https://github.com/zeldaret/oot.git
synced 2025-01-26 02:27:02 +00:00
Fix Draw Callbacks, fix segmented address in z_en_bird
This commit is contained in:
parent
095924d05a
commit
582b32d39c
7 changed files with 32 additions and 32 deletions
|
@ -397,10 +397,10 @@ Hilite* func_8003435C(Vec3f* object, GlobalContext* globalCtx);
|
|||
s32 func_800343CC(GlobalContext* globalCtx, Actor* actor, s16* arg2, f32 arg3, u16 (*unkFunc1)(GlobalContext*, Actor*),
|
||||
s16 (*unkFunc2)(GlobalContext*, Actor*));
|
||||
s16 func_800347E8(s16 arg0);
|
||||
void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc1, void* unkFunc2, Actor* actor,
|
||||
s16 alpha);
|
||||
void func_80034CC4(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);
|
||||
void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, SkelAnime_LimbUpdateMatrix2 unkFunc1,
|
||||
SkelAnime_LimbAppendDlist2 unkFunc2, Actor* actor, s16 alpha);
|
||||
void func_80034EC0(SkelAnime* skelAnime, struct_80034EC0_Entry* arg1, s32 arg2);
|
||||
void Actor_Noop(Actor* actor, GlobalContext* globalCtx);
|
||||
void Draw_DListOpa(GlobalContext* globalCtx, u32 dlist);
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
@ -3904,8 +3904,8 @@ void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, void* unkFunc
|
|||
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];
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ void EnBird_Destroy(EnBird* this, GlobalContext* globalCtx) {
|
|||
void func_809C1CAC(EnBird* this, s16 params) {
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_0600006C);
|
||||
f32 playbackSpeed = this->unk_19C ? 0.0f : 1.0f;
|
||||
u32* anim = &D_0600006C;
|
||||
AnimationHeader* anim = &D_0600006C;
|
||||
|
||||
this->unk_198 = Math_Rand_S16Offset(5, 0x23);
|
||||
SkelAnime_ChangeAnimation(&this->skelAnime, anim, playbackSpeed, 0.0f, frameCount, 0, 0.0f);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -191,6 +191,6 @@ static void EnMs_Update(EnMs* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnMs_Draw(EnMs* this, GlobalContext* globalCtx) {
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, 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);
|
||||
}
|
||||
|
|
|
@ -712,36 +712,36 @@ void func_80B1D200(GlobalContext* globalCtx) {
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -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 = {
|
||||
|
@ -591,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);
|
||||
|
|
Loading…
Reference in a new issue