1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-06 06:10:21 +00:00

Some actor.c docs (in preparation for en_test) (#820)

* renames

* format

* format functions.h

* clean

* arg name

* remove asm
This commit is contained in:
fig02 2021-06-21 19:51:04 -04:00 committed by GitHub
parent 7984c1c514
commit 0a35c752e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
109 changed files with 424 additions and 359 deletions

View file

@ -337,7 +337,7 @@ void func_809CEA24(EnBw* this, GlobalContext* globalCtx) {
case 3:
Math_SmoothStepToF(&this->unk_248, 0.6f, 1.0f, 0.05f, 0.0f);
if ((this->unk_224 == 0) && (this->actor.xzDistToPlayer < 200.0f) &&
(ABS(this->actor.yDistToPlayer) < 50.0f) && func_8002E084(&this->actor, 0x1C70)) {
(ABS(this->actor.yDistToPlayer) < 50.0f) && Actor_IsFacingPlayer(&this->actor, 0x1C70)) {
func_809CF72C(this);
} else {
Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_236 + this->unk_238, 1,
@ -350,7 +350,7 @@ void func_809CEA24(EnBw* this, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1,
this->actor.speedXZ * 1000.0f, 0);
if ((this->actor.xzDistToPlayer < 90.0f) && (this->actor.yDistToPlayer < 50.0f) &&
func_8002E084(&this->actor, 0x1554) &&
Actor_IsFacingPlayer(&this->actor, 0x1554) &&
func_800339B8(&this->actor, globalCtx, 71.24802f, this->actor.yawTowardsPlayer)) {
func_809CF8F0(this);
}
@ -365,8 +365,8 @@ void func_809CEA24(EnBw* this, GlobalContext* globalCtx) {
}
break;
case 1:
if (((sp64 == 0) && !(this->actor.bgCheckFlags & 8)) || func_8002E084(&this->actor, 0x1C70)) {
if (func_8002E084(&this->actor, 0x1C70)) {
if (((sp64 == 0) && !(this->actor.bgCheckFlags & 8)) || Actor_IsFacingPlayer(&this->actor, 0x1C70)) {
if (Actor_IsFacingPlayer(&this->actor, 0x1C70)) {
this->unk_238 = -this->unk_238;
}
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer - 0x8000, 1,
@ -460,7 +460,7 @@ void func_809CF984(EnBw* this, GlobalContext* globalCtx) {
Actor_Kill(&this->actor);
return;
}
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
this->unk_222 = 3000;
this->actor.flags &= ~0x01000000;
this->actor.speedXZ = 0.0f;
@ -494,7 +494,7 @@ void func_809CFC4C(EnBw* this, GlobalContext* globalCtx) {
this->unk_258 += this->unk_25C;
Math_SmoothStepToF(&this->unk_260, 0.075f, 1.0f, 0.005f, 0.0f);
if (this->actor.bgCheckFlags & 2) {
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
}
if (this->unk_224 != 0) {
@ -544,7 +544,7 @@ void func_809CFF98(EnBw* this, GlobalContext* globalCtx) {
Math_SmoothStepToF(&this->unk_248, 0.6f, 1.0f, 0.05f, 0.0f);
SkelAnime_Update(&this->skelAnime);
if (this->actor.bgCheckFlags & 3) {
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
this->unk_222 = 0xBB8;
this->unk_250 = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
@ -667,7 +667,7 @@ void func_809D0424(EnBw* this, GlobalContext* globalCtx) {
if (func_800355E4(globalCtx, &this->collider2.base)) {
this->unk_230 = 0;
this->actor.scale.y -= 0.009f;
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
} else {
this->unk_230 = 1;
}
@ -681,7 +681,7 @@ void func_809D0584(EnBw* this, GlobalContext* globalCtx) {
if ((this->actor.bgCheckFlags & 0x10) && (this->actor.bgCheckFlags & 1)) {
this->unk_230 = 0;
this->actor.scale.y -= 0.009f;
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
func_809D00F4(this);
} else {
if (this->collider2.base.acFlags & AC_HIT) {
@ -690,7 +690,7 @@ void func_809D0584(EnBw* this, GlobalContext* globalCtx) {
return;
}
this->damageEffect = this->actor.colChkInfo.damageEffect;
func_80035650(&this->actor, &this->collider2.info, 0);
Actor_SetDropFlag(&this->actor, &this->collider2.info, 0);
if ((this->damageEffect == 1) || (this->damageEffect == 0xE)) {
if (this->unk_23C == 0) {
Actor_ApplyDamage(&this->actor);
@ -709,7 +709,8 @@ void func_809D0584(EnBw* this, GlobalContext* globalCtx) {
if (func_800355E4(globalCtx, &this->collider2.base)) {
this->unk_230 = 0;
this->actor.scale.y -= 0.009f;
func_80033260(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0);
Actor_SpawnFloorDust(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0,
0);
} else {
this->unk_230 = 1;
}