mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 23:10:22 +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
|
@ -21,7 +21,7 @@ void func_80A6E6B0(EnHs* this, GlobalContext* globalCtx);
|
|||
|
||||
const ActorInit En_Hs_InitVars = {
|
||||
ACTOR_EN_HS,
|
||||
ACTORTYPE_NPC,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_HS,
|
||||
sizeof(EnHs),
|
||||
|
@ -64,7 +64,7 @@ void EnHs_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnHs* this = THIS;
|
||||
s32 pad;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 36.0f);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06006260, &D_060005C0, this->jointTable, this->morphTable, 16);
|
||||
Animation_PlayLoop(&this->skelAnime, &D_060005C0);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
|
@ -94,7 +94,7 @@ void EnHs_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
this->unk_2A8 = 0;
|
||||
this->actor.unk_1F = 6;
|
||||
this->actor.targetMode = 6;
|
||||
}
|
||||
|
||||
void EnHs_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
@ -112,8 +112,8 @@ s32 func_80A6E53C(EnHs* this, GlobalContext* globalCtx, u16 textId, EnHsActionFu
|
|||
}
|
||||
|
||||
this->actor.textId = textId;
|
||||
yawDiff = this->actor.yawTowardsLink - this->actor.shape.rot.y;
|
||||
if ((ABS(yawDiff) <= 0x2150) && (this->actor.xzDistToLink < 100.0f)) {
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
if ((ABS(yawDiff) <= 0x2150) && (this->actor.xzDistToPlayer < 100.0f)) {
|
||||
this->unk_2A8 |= 1;
|
||||
func_8002F2CC(&this->actor, globalCtx, 100.0f);
|
||||
}
|
||||
|
@ -223,9 +223,9 @@ void func_80A6E9AC(EnHs* this, GlobalContext* globalCtx) {
|
|||
func_80A6E3A0(this, func_80A6E6D8);
|
||||
}
|
||||
} else {
|
||||
yawDiff = this->actor.yawTowardsLink - this->actor.shape.rot.y;
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
this->actor.textId = 0x10B1;
|
||||
if ((ABS(yawDiff) <= 0x2150) && (this->actor.xzDistToLink < 100.0f)) {
|
||||
if ((ABS(yawDiff) <= 0x2150) && (this->actor.xzDistToPlayer < 100.0f)) {
|
||||
func_8002F298(&this->actor, globalCtx, 100.0f, 7);
|
||||
}
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ void EnHs_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Collider_UpdateCylinder(thisx, &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 (SkelAnime_Update(&this->skelAnime)) {
|
||||
this->skelAnime.curFrame = 0.0f;
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ void EnHs_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actionFunc(this, 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_2A8 &= ~1;
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_29C.x, 12800, 6, 6200, 100);
|
||||
|
@ -291,7 +291,7 @@ void EnHs_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
|||
EnHs* this = THIS;
|
||||
|
||||
if (limbIndex == 9) {
|
||||
Matrix_MultVec3f(&D_80A6EDFC, &this->actor.posRot2.pos);
|
||||
Matrix_MultVec3f(&D_80A6EDFC, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue