1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-07 06:40: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:
fig02 2021-01-18 16:04:04 -05:00 committed by GitHub
parent 20206fba0d
commit 00a5edea71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
697 changed files with 8157 additions and 7942 deletions

View file

@ -19,7 +19,7 @@ void func_80A6F1A4(EnHs2* this, GlobalContext* globalCtx);
const ActorInit En_Hs2_InitVars = {
ACTOR_EN_HS2,
ACTORTYPE_NPC,
ACTORCAT_NPC,
FLAGS,
OBJECT_HS,
sizeof(EnHs2),
@ -56,7 +56,7 @@ void EnHs2_Init(Actor* thisx, GlobalContext* globalCtx) {
EnHs2* 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);
@ -66,7 +66,7 @@ void EnHs2_Init(Actor* thisx, GlobalContext* globalCtx) {
osSyncPrintf(VT_FGCOL(CYAN) " ヒヨコの店(子人の時) \n" VT_RST);
this->actionFunc = func_80A6F1A4;
this->unk_2A8 = 0;
this->actor.unk_1F = 6;
this->actor.targetMode = 6;
}
void EnHs2_Destroy(Actor* thisx, GlobalContext* globalCtx) {
@ -82,8 +82,8 @@ s32 func_80A6F0B4(EnHs2* this, GlobalContext* globalCtx, u16 textId, EnHs2Action
}
this->actor.textId = textId;
if (ABS((s16)(this->actor.yawTowardsLink - this->actor.shape.rot.y)) < 0x2151 &&
this->actor.xzDistToLink < 100.0f) {
if (ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) < 0x2151 &&
this->actor.xzDistToPlayer < 100.0f) {
this->unk_2A8 |= 0x1;
func_8002F2CC(&this->actor, globalCtx, 100.0f);
}
@ -115,13 +115,13 @@ void EnHs2_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 (SkelAnime_Update(&this->skelAnime) != 0) {
this->skelAnime.curFrame = 0.0f;
}
this->actionFunc(this, globalCtx);
if (this->unk_2A8 & 0x1) {
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);
@ -158,7 +158,7 @@ void EnHs2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
EnHs2* this = THIS;
if (limbIndex == 9) {
Matrix_MultVec3f(&D_80A6F4CC, &this->actor.posRot2.pos);
Matrix_MultVec3f(&D_80A6F4CC, &this->actor.focus.pos);
}
}