mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 14:50:15 +00:00
Actor Struct Changes (and a few related things) (#617)
* reformat header * type -> category * done for now i think * some more stuff * first -> head * focus * flag comment * ground -> floor * remove asm, name wrapper funcs * name func, format * review * targetPriority, format * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "0305ec2c2" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "0305ec2c2" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * comment * review * feet flags * horse shadow
This commit is contained in:
parent
20206fba0d
commit
00a5edea71
697 changed files with 8157 additions and 7942 deletions
|
@ -34,7 +34,7 @@ extern AnimationHeader D_060076EC;
|
|||
|
||||
const ActorInit En_Ani_InitVars = {
|
||||
ACTOR_EN_ANI,
|
||||
ACTORTYPE_NPC,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_ANI,
|
||||
sizeof(EnAni),
|
||||
|
@ -86,7 +86,7 @@ void EnAni_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
ActorShape_Init(&this->actor.shape, -2800.0f, ActorShadow_DrawFunc_Circle, 36.0f);
|
||||
ActorShape_Init(&this->actor.shape, -2800.0f, ActorShadow_DrawCircle, 36.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_060000F0, &D_060076EC, this->jointTable, this->morphTable, 0x10);
|
||||
Animation_PlayOnce(&this->skelAnime, &D_060076EC);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
|
@ -164,7 +164,7 @@ void func_809B064C(EnAni* this, GlobalContext* globalCtx) {
|
|||
// "...all I can do is look at Death Mountain."
|
||||
}
|
||||
|
||||
yawDiff = this->actor.yawTowardsLink - this->actor.shape.rot.y;
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (this->actor.textId == 0x5056) { // "To get a good view..."
|
||||
EnAni_SetupAction(this, func_809B04F0);
|
||||
|
@ -173,14 +173,14 @@ void func_809B064C(EnAni* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
EnAni_SetupAction(this, func_809B04F0);
|
||||
}
|
||||
} else if (yawDiff >= -0x36AF && yawDiff < 0 && this->actor.xzDistToLink < 150.0f &&
|
||||
-80.0f < this->actor.yDistToLink) {
|
||||
} else if (yawDiff >= -0x36AF && yawDiff < 0 && this->actor.xzDistToPlayer < 150.0f &&
|
||||
-80.0f < this->actor.yDistToPlayer) {
|
||||
if (gSaveContext.itemGetInf[1] & 0x20) {
|
||||
EnAni_SetText(this, globalCtx, 0x5056); // "To get a good view..."
|
||||
} else {
|
||||
EnAni_SetText(this, globalCtx, 0x5055); // "...I'll give you this as a memento."
|
||||
}
|
||||
} else if (yawDiff >= -0x3E7 && yawDiff < 0x36B0 && this->actor.xzDistToLink < 350.0f) {
|
||||
} else if (yawDiff >= -0x3E7 && yawDiff < 0x36B0 && this->actor.xzDistToPlayer < 350.0f) {
|
||||
EnAni_SetText(this, globalCtx, textId);
|
||||
}
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ void func_809B07F8(EnAni* this, GlobalContext* globalCtx) {
|
|||
s16 yawDiff;
|
||||
u16 textId;
|
||||
|
||||
yawDiff = this->actor.yawTowardsLink - this->actor.shape.rot.y;
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
if (func_8002F194(&this->actor, globalCtx) != 0) {
|
||||
if (this->actor.textId == 0x5056) { // "To get a good view..."
|
||||
EnAni_SetupAction(this, func_809B0524);
|
||||
|
@ -199,14 +199,14 @@ void func_809B07F8(EnAni* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
EnAni_SetupAction(this, func_809B0524);
|
||||
}
|
||||
} else if (yawDiff >= -0x36AF && yawDiff < 0 && this->actor.xzDistToLink < 150.0f &&
|
||||
-80.0f < this->actor.yDistToLink) {
|
||||
} else if (yawDiff >= -0x36AF && yawDiff < 0 && this->actor.xzDistToPlayer < 150.0f &&
|
||||
-80.0f < this->actor.yDistToPlayer) {
|
||||
if ((gSaveContext.itemGetInf[1] & 0x20) != 0) {
|
||||
EnAni_SetText(this, globalCtx, 0x5056); // "To get a good view..."
|
||||
} else {
|
||||
EnAni_SetText(this, globalCtx, 0x5055); // "...I'll give you this as a memento."
|
||||
}
|
||||
} else if (yawDiff >= -0x3E7 && yawDiff < 0x36B0 && this->actor.xzDistToLink < 350.0f) {
|
||||
} else if (yawDiff >= -0x3E7 && yawDiff < 0x36B0 && this->actor.xzDistToPlayer < 350.0f) {
|
||||
if ((gSaveContext.eventChkInf[2] & 0x8000) == 0) {
|
||||
textId = 0x5052; // "...Something is happening on Death Mountain!"
|
||||
} else {
|
||||
|
@ -225,7 +225,7 @@ void func_809B0994(EnAni* this, GlobalContext* globalCtx) {
|
|||
Animation_Change(&this->skelAnime, &D_060070F0, 1.0f, 0.0f, Animation_GetLastFrame(&D_060070F0), ANIMMODE_ONCE,
|
||||
-4.0f);
|
||||
this->unk_2AA++;
|
||||
this->actor.shape.shadowDrawFunc = ActorShadow_DrawFunc_Circle;
|
||||
this->actor.shape.shadowDraw = ActorShadow_DrawCircle;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ void func_809B0A6C(EnAni* this, GlobalContext* globalCtx) {
|
|||
if (globalCtx->csCtx.npcActions[0]->action == 2) {
|
||||
Animation_Change(&this->skelAnime, &D_060067B8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060067B8), ANIMMODE_ONCE,
|
||||
0.0f);
|
||||
this->actor.shape.shadowDrawFunc = NULL;
|
||||
this->actor.shape.shadowDraw = NULL;
|
||||
this->unk_2AA++;
|
||||
}
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ void EnAni_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
|
||||
Actor_MoveForward(&this->actor);
|
||||
func_8002E4B4(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[0] != NULL)) {
|
||||
switch (this->unk_2AA) {
|
||||
case 0:
|
||||
|
@ -285,7 +285,7 @@ void EnAni_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->unk_2A8 & 1) {
|
||||
func_80038290(globalCtx, &this->actor, &this->unk_29C, &this->unk_2A2, this->actor.posRot2.pos);
|
||||
func_80038290(globalCtx, &this->actor, &this->unk_29C, &this->unk_2A2, this->actor.focus.pos);
|
||||
this->unk_2A2.z = 0;
|
||||
this->unk_2A2.y = this->unk_2A2.z;
|
||||
this->unk_2A2.x = this->unk_2A2.z;
|
||||
|
@ -319,7 +319,7 @@ void EnAni_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
|
|||
EnAni* this = THIS;
|
||||
|
||||
if (limbIndex == 15) {
|
||||
Matrix_MultVec3f(&sMultVec, &this->actor.posRot2.pos);
|
||||
Matrix_MultVec3f(&sMultVec, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue