1
0
Fork 0
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:
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

@ -22,7 +22,7 @@ void func_809C1CAC(EnBird* this, s16 params);
const ActorInit En_Bird_InitVars = {
ACTOR_EN_BIRD,
ACTORTYPE_PROP,
ACTORCAT_PROP,
FLAGS,
OBJECT_BIRD,
sizeof(EnBird),
@ -33,7 +33,7 @@ const ActorInit En_Bird_InitVars = {
};
static InitChainEntry sInitChain[] = {
ICHAIN_F32(unk_4C, 5600, ICHAIN_STOP),
ICHAIN_F32(targetArrowOffset, 5600, ICHAIN_STOP),
};
extern AnimationHeader D_0600006C;
@ -49,7 +49,7 @@ void EnBird_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->actor, sInitChain);
Actor_SetScale(&this->actor, 0.01);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_06002190, &D_0600006C, NULL, NULL, 0);
ActorShape_Init(&this->actor.shape, 5500, ActorShadow_DrawFunc_Circle, 4);
ActorShape_Init(&this->actor.shape, 5500, ActorShadow_DrawCircle, 4);
this->unk_194 = 0;
this->unk_198 = 0;
this->unk_1C0 = 0x9C4;
@ -80,7 +80,7 @@ void func_809C1CAC(EnBird* this, s16 params) {
void func_809C1D60(EnBird* this, GlobalContext* globalCtx) {
f32 fVar2 = sinf(this->unk_1B4);
this->actor.shape.unk_08 = this->actor.shape.unk_08 + fVar2 * this->unk_1A0;
this->actor.shape.yOffset = this->actor.shape.yOffset + fVar2 * this->unk_1A0;
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.1f, 0.5f, 0.0f);
if (this->unk_19C != 0) {
@ -102,18 +102,18 @@ void func_809C1E00(EnBird* this, s16 params) {
void func_809C1E40(EnBird* this, GlobalContext* globalCtx) {
f32 fVar4 = sinf(this->unk_1B4);
this->actor.shape.unk_08 += fVar4 * this->unk_1A0;
this->actor.shape.yOffset += fVar4 * this->unk_1A0;
Math_SmoothStepToF(&this->actor.speedXZ, this->unk_1A8, 0.1f, this->unk_1AC, 0.0f);
if (this->unk_1B0 < Math_Vec3f_DistXZ(&this->actor.posRot.pos, &this->actor.initPosRot.pos) || this->unk_198 < 4) {
Math_StepToAngleS(&this->actor.posRot.rot.y,
Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->actor.initPosRot.pos), this->unk_1C0);
if (this->unk_1B0 < Math_Vec3f_DistXZ(&this->actor.world.pos, &this->actor.home.pos) || this->unk_198 < 4) {
Math_StepToAngleS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos),
this->unk_1C0);
} else {
fVar4 = sinf(this->unk_1B4);
this->actor.posRot.rot.y += (s16)(fVar4 * this->unk_1A4);
this->actor.world.rot.y += (s16)(fVar4 * this->unk_1A4);
}
this->actor.shape.rot.y = this->actor.posRot.rot.y;
this->actor.shape.rot.y = this->actor.world.rot.y;
SkelAnime_Update(&this->skelAnime);
this->unk_198 -= 1;
if (this->unk_198 < 0) {