1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-08 15:30:14 +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

@ -57,7 +57,7 @@ void EnElf_GetCutsceneNextPos(Vec3f* vec, GlobalContext* globalCtx, s32 action);
const ActorInit En_Elf_InitVars = {
ACTOR_EN_ELF,
ACTORTYPE_ITEMACTION,
ACTORCAT_ITEMACTION,
FLAGS,
OBJECT_GAMEPLAY_KEEP,
sizeof(EnElf),
@ -215,7 +215,7 @@ s32 func_80A01F90(Vec3f* this, Vec3f* arg1, f32 arg2) {
void func_80A01FE0(EnElf* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
if (!func_80A01F90(&this->actor.posRot.pos, &player->actor.posRot.pos, 30.0f)) {
if (!func_80A01F90(&this->actor.world.pos, &player->actor.world.pos, 30.0f)) {
this->unk_2B8 = 0.5f;
} else {
this->unk_2B8 = 2.0f;
@ -235,7 +235,7 @@ void func_80A01FE0(EnElf* this, GlobalContext* globalCtx) {
void func_80A020A4(EnElf* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
if (func_80A01F90(&this->actor.posRot.pos, &player->actor.posRot.pos, 50.0f)) {
if (func_80A01F90(&this->actor.world.pos, &player->actor.world.pos, 50.0f)) {
if (this->unk_2C0 > 0) {
this->unk_2C0--;
} else {
@ -249,13 +249,13 @@ void func_80A020A4(EnElf* this, GlobalContext* globalCtx) {
}
void func_80A0214C(EnElf* this, GlobalContext* globalCtx) {
f32 xzDistToLink;
f32 xzDistToPlayer;
if (this->unk_2C0 > 0) {
this->unk_2C0--;
} else {
xzDistToLink = this->actor.xzDistToLink;
if (xzDistToLink < 50.0f) {
xzDistToPlayer = this->actor.xzDistToPlayer;
if (xzDistToPlayer < 50.0f) {
if (Rand_ZeroOne() < 0.2f) {
this->unk_2A8 = 2;
this->unk_2AC = 0x400;
@ -267,16 +267,16 @@ void func_80A0214C(EnElf* this, GlobalContext* globalCtx) {
this->unk_2C0 = 10;
}
} else {
if (xzDistToLink > 150.0f) {
xzDistToLink = 150.0f;
if (xzDistToPlayer > 150.0f) {
xzDistToPlayer = 150.0f;
}
xzDistToLink = ((xzDistToLink - 50.0f) * 0.95f) + 0.05f;
xzDistToPlayer = ((xzDistToPlayer - 50.0f) * 0.95f) + 0.05f;
if (Rand_ZeroOne() < xzDistToLink) {
if (Rand_ZeroOne() < xzDistToPlayer) {
this->unk_2A8 = 3;
this->unk_2AC = 0x200;
this->unk_2B8 = (xzDistToLink * 2.0f) + 1.0f;
this->unk_2B8 = (xzDistToPlayer * 2.0f) + 1.0f;
this->func_2C8 = func_80A01FE0;
this->unk_2C0 = (s16)Rand_ZeroFloat(16.0f) + 0x10;
} else {
@ -294,7 +294,7 @@ void func_80A0214C(EnElf* this, GlobalContext* globalCtx) {
}
void func_80A0232C(EnElf* this, GlobalContext* globalCtx) {
if (func_80A01F90(&this->unk_28C, &this->actor.posRot.pos, 100.0f)) {
if (func_80A01F90(&this->unk_28C, &this->actor.world.pos, 100.0f)) {
this->unk_2A8 = 0;
this->unk_2AC = 0x200;
this->func_2C8 = func_80A0214C;
@ -325,14 +325,14 @@ void EnElf_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(thisx, sInitChain);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_04016A48, &D_04014BA4, this->jointTable, this->morphTable, 15);
ActorShape_Init(&thisx->shape, 0.0f, NULL, 15.0f);
thisx->shape.unk_14 = 0xFF;
thisx->shape.shadowAlpha = 0xFF;
Lights_PointGlowSetInfo(&this->lightInfoGlow, thisx->posRot.pos.x, thisx->posRot.pos.y, thisx->posRot.pos.z, 255,
255, 255, 0);
Lights_PointGlowSetInfo(&this->lightInfoGlow, thisx->world.pos.x, thisx->world.pos.y, thisx->world.pos.z, 255, 255,
255, 0);
this->lightNodeGlow = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, &this->lightInfoGlow);
Lights_PointNoGlowSetInfo(&this->lightInfoNoGlow, thisx->posRot.pos.x, thisx->posRot.pos.y, thisx->posRot.pos.z,
255, 255, 255, 0);
Lights_PointNoGlowSetInfo(&this->lightInfoNoGlow, thisx->world.pos.x, thisx->world.pos.y, thisx->world.pos.z, 255,
255, 255, 0);
this->lightNodeNoGlow = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, &this->lightInfoNoGlow);
this->fairyFlags = 0;
@ -357,10 +357,10 @@ void EnElf_Init(Actor* thisx, GlobalContext* globalCtx) {
case FAIRY_REVIVE_BOTTLE:
colorConfig = -1;
EnElf_SetupAction(this, func_80A03610);
this->unk_2B8 = Math_Vec3f_DistXZ(&thisx->posRot.pos, &player->actor.posRot.pos);
this->unk_2B8 = Math_Vec3f_DistXZ(&thisx->world.pos, &player->actor.world.pos);
this->unk_2AC = player->actor.shape.rot.y;
this->unk_2B0 = -0x1000;
this->unk_28C.y = thisx->posRot.pos.y - player->actor.posRot.pos.y;
this->unk_28C.y = thisx->world.pos.y - player->actor.world.pos.y;
this->unk_2AA = 0;
this->unk_2B4 = 0.0f;
break;
@ -370,13 +370,13 @@ void EnElf_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_2B8 = 0.0f;
this->unk_2AC = player->actor.shape.rot.y;
this->unk_2B0 = 0;
this->unk_28C.y = thisx->posRot.pos.y - player->actor.posRot.pos.y;
this->unk_28C.y = thisx->world.pos.y - player->actor.world.pos.y;
this->unk_2AA = 0;
this->unk_2B4 = 7.0f;
break;
case FAIRY_HEAL_BIG:
this->fairyFlags |= FAIRY_FLAG_BIG;
thisx->shape.shadowDrawFunc = ActorShadow_DrawFunc_WhiteCircle;
thisx->shape.shadowDraw = ActorShadow_DrawWhiteCircle;
case FAIRY_HEAL_TIMED:
this->fairyFlags |= FAIRY_FLAG_TIMED;
case FAIRY_HEAL:
@ -385,7 +385,7 @@ void EnElf_Init(Actor* thisx, GlobalContext* globalCtx) {
this->unk_2B4 = Rand_ZeroFloat(10.0f) + 10.0f;
this->unk_2AA = 0;
this->unk_2AE = (s16)(Rand_ZeroFloat(1048.0f)) + 0x200;
this->unk_28C = thisx->posRot.pos;
this->unk_28C = thisx->world.pos;
this->unk_2BC = Rand_CenteredFloat(32767.0f);
this->func_2C8 = func_80A0214C;
func_80A0232C(this, globalCtx);
@ -402,8 +402,8 @@ void EnElf_Init(Actor* thisx, GlobalContext* globalCtx) {
func_80A01C38(this, 8);
for (i = 0; i < 8; i++) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, thisx->posRot.pos.x,
thisx->posRot.pos.y - 30.0f, thisx->posRot.pos.z, 0, 0, 0, FAIRY_HEAL);
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, thisx->world.pos.x,
thisx->world.pos.y - 30.0f, thisx->world.pos.z, 0, 0, 0, FAIRY_HEAL);
}
break;
default:
@ -478,7 +478,7 @@ void func_80A02BD8(EnElf* this, Vec3f* targetPos, f32 arg2) {
f32 yVelTarget;
f32 yVelDirection;
yVelTarget = ((targetPos->y + this->unk_28C.y) - this->actor.posRot.pos.y) * arg2;
yVelTarget = ((targetPos->y + this->unk_28C.y) - this->actor.world.pos.y) * arg2;
yVelDirection = (yVelTarget >= 0.0f) ? 1.0f : -1.0f;
yVelTarget = fabsf(yVelTarget);
yVelTarget = CLAMP(yVelTarget, 0.0f, 20.0f) * yVelDirection;
@ -491,8 +491,8 @@ void func_80A02C98(EnElf* this, Vec3f* targetPos, f32 arg2) {
f32 xVelDirection;
f32 zVelDirection;
xVelTarget = ((targetPos->x + this->unk_28C.x) - this->actor.posRot.pos.x) * arg2;
zVelTarget = ((targetPos->z + this->unk_28C.z) - this->actor.posRot.pos.z) * arg2;
xVelTarget = ((targetPos->x + this->unk_28C.x) - this->actor.world.pos.x) * arg2;
zVelTarget = ((targetPos->z + this->unk_28C.z) - this->actor.world.pos.z) * arg2;
xVelDirection = (xVelTarget >= 0.0f) ? 1.0f : -1.0f;
zVelDirection = (zVelTarget >= 0.0f) ? 1.0f : -1.0f;
@ -511,26 +511,26 @@ void func_80A02C98(EnElf* this, Vec3f* targetPos, f32 arg2) {
void func_80A02E30(EnElf* this, Vec3f* targetPos) {
func_80A02BD8(this, targetPos, 0.2f);
this->actor.velocity.x = (targetPos->x + this->unk_28C.x) - this->actor.posRot.pos.x;
this->actor.velocity.z = (targetPos->z + this->unk_28C.z) - this->actor.posRot.pos.z;
this->actor.velocity.x = (targetPos->x + this->unk_28C.x) - this->actor.world.pos.x;
this->actor.velocity.z = (targetPos->z + this->unk_28C.z) - this->actor.world.pos.z;
func_8002D7EC(&this->actor);
this->actor.posRot.pos.x = targetPos->x + this->unk_28C.x;
this->actor.posRot.pos.z = targetPos->z + this->unk_28C.z;
this->actor.world.pos.x = targetPos->x + this->unk_28C.x;
this->actor.world.pos.z = targetPos->z + this->unk_28C.z;
}
void func_80A02EC0(EnElf* this, Vec3f* targetPos) {
func_80A02BD8(this, targetPos, 0.2f);
this->actor.velocity.x = this->actor.velocity.z = 0.0f;
func_8002D7EC(&this->actor);
this->actor.posRot.pos.x = targetPos->x + this->unk_28C.x;
this->actor.posRot.pos.z = targetPos->z + this->unk_28C.z;
this->actor.world.pos.x = targetPos->x + this->unk_28C.x;
this->actor.world.pos.z = targetPos->z + this->unk_28C.z;
}
void func_80A02F2C(EnElf* this, Vec3f* targetPos) {
f32 yVelTarget;
f32 yVelDirection;
yVelTarget = (((Math_SinS(this->unk_2AA) * this->unk_2B4) + targetPos->y) - this->actor.posRot.pos.y) * 0.2f;
yVelTarget = (((Math_SinS(this->unk_2AA) * this->unk_2B4) + targetPos->y) - this->actor.world.pos.y) * 0.2f;
yVelDirection = (yVelTarget >= 0.0f) ? 1.0f : -1.0f;
this->unk_2AA += this->unk_2AE;
yVelTarget = fabsf(yVelTarget);
@ -548,17 +548,17 @@ void func_80A03018(EnElf* this, GlobalContext* globalCtx) {
switch (this->unk_2A8) {
case 0:
targetYaw = Math_Atan2S(-(this->actor.posRot.pos.z - unk_28C->z), -(this->actor.posRot.pos.x - unk_28C->x));
targetYaw = Math_Atan2S(-(this->actor.world.pos.z - unk_28C->z), -(this->actor.world.pos.x - unk_28C->x));
break;
case 3:
targetYaw = Math_Atan2S(-(this->actor.posRot.pos.z - player->actor.posRot.pos.z),
-(this->actor.posRot.pos.x - player->actor.posRot.pos.x));
targetYaw = Math_Atan2S(-(this->actor.world.pos.z - player->actor.world.pos.z),
-(this->actor.world.pos.x - player->actor.world.pos.x));
break;
case 2:
targetYaw = Math_Atan2S(this->actor.posRot.pos.z - player->actor.posRot.pos.z,
this->actor.posRot.pos.x - player->actor.posRot.pos.x);
targetYaw = Math_Atan2S(this->actor.world.pos.z - player->actor.world.pos.z,
this->actor.world.pos.x - player->actor.world.pos.x);
break;
default:
@ -567,7 +567,7 @@ void func_80A03018(EnElf* this, GlobalContext* globalCtx) {
}
Math_SmoothStepToS(&this->unk_2BC, targetYaw, 10, this->unk_2AC, 0x20);
this->actor.posRot.rot.y = this->unk_2BC;
this->actor.world.rot.y = this->unk_2BC;
Actor_MoveForward(&this->actor);
}
@ -577,8 +577,8 @@ void func_80A03148(EnElf* this, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4) {
f32 xzVelocity;
f32 clampedXZ;
xVelTarget = ((arg1->x + this->unk_28C.x) - this->actor.posRot.pos.x) * arg4;
zVelTarget = ((arg1->z + this->unk_28C.z) - this->actor.posRot.pos.z) * arg4;
xVelTarget = ((arg1->x + this->unk_28C.x) - this->actor.world.pos.x) * arg4;
zVelTarget = ((arg1->z + this->unk_28C.z) - this->actor.world.pos.z) * arg4;
arg4 += 0.3f;
arg3 += 30.0f;
@ -627,10 +627,10 @@ void func_80A0329C(EnElf* this, GlobalContext* globalCtx) {
}
if (!Player_InCsMode(globalCtx)) {
heightDiff = this->actor.posRot.pos.y - refActor->actor.posRot.pos.y;
heightDiff = this->actor.world.pos.y - refActor->actor.world.pos.y;
if ((heightDiff > 0.0f) && (heightDiff < 60.0f)) {
if (!func_80A01F90(&this->actor.posRot.pos, &refActor->actor.posRot.pos, 10.0f)) {
if (!func_80A01F90(&this->actor.world.pos, &refActor->actor.world.pos, 10.0f)) {
Health_ChangeBy(globalCtx, 128);
if (this->fairyFlags & FAIRY_FLAG_BIG) {
Magic_Fill(globalCtx);
@ -676,7 +676,7 @@ void func_80A0353C(EnElf* this, GlobalContext* globalCtx) {
parent = this->actor.parent;
if ((parent != NULL) && (parent->update != NULL)) {
parentPos = this->actor.parent->posRot.pos;
parentPos = this->actor.parent->world.pos;
parentPos.y += ((1500.0f * this->actor.scale.y) + 40.0f);
func_80A02C98(this, &parentPos, 0.2f);
} else {
@ -714,7 +714,7 @@ void func_80A03610(EnElf* this, GlobalContext* globalCtx) {
this->unk_28C.z = Math_SinS(this->unk_2AC) * -this->unk_2B8;
this->unk_2AC += this->unk_2B0;
func_80A02C98(this, &player->actor.posRot.pos, 0.2f);
func_80A02C98(this, &player->actor.world.pos, 0.2f);
if (this->unk_2B4 < 0.0f) {
if ((this->unk_28C.y < 20.0f) && (this->unk_28C.y > 0.0f)) {
@ -818,16 +818,16 @@ void EnElf_UpdateLights(EnElf* this, GlobalContext* globalCtx) {
if (this->fairyFlags & 0x20) {
player = PLAYER;
Lights_PointNoGlowSetInfo(&this->lightInfoNoGlow, player->actor.posRot.pos.x,
(s16)(player->actor.posRot.pos.y) + 60.0f, player->actor.posRot.pos.z, 255, 255, 255,
Lights_PointNoGlowSetInfo(&this->lightInfoNoGlow, player->actor.world.pos.x,
(s16)(player->actor.world.pos.y) + 60.0f, player->actor.world.pos.z, 255, 255, 255,
200);
} else {
Lights_PointNoGlowSetInfo(&this->lightInfoNoGlow, this->actor.posRot.pos.x, this->actor.posRot.pos.y,
this->actor.posRot.pos.z, 255, 255, 255, -1);
Lights_PointNoGlowSetInfo(&this->lightInfoNoGlow, this->actor.world.pos.x, this->actor.world.pos.y,
this->actor.world.pos.z, 255, 255, 255, -1);
}
Lights_PointGlowSetInfo(&this->lightInfoGlow, this->actor.posRot.pos.x, this->actor.posRot.pos.y,
this->actor.posRot.pos.z, 255, 255, 255, glowLightRadius);
Lights_PointGlowSetInfo(&this->lightInfoGlow, this->actor.world.pos.x, this->actor.world.pos.y,
this->actor.world.pos.z, 255, 255, 255, glowLightRadius);
this->unk_2BC = Math_Atan2S(this->actor.velocity.z, this->actor.velocity.x);
@ -855,7 +855,7 @@ void func_80A03CF8(EnElf* this, GlobalContext* globalCtx) {
EnElf_SpawnSparkles(this, globalCtx, 16);
}
prevPos = this->actor.posRot.pos;
prevPos = this->actor.world.pos;
if (this->unk_2A8 == 0xA) {
func_80A02EC0(this, &nextPos);
@ -873,11 +873,11 @@ void func_80A03CF8(EnElf* this, GlobalContext* globalCtx) {
// play dash sound in intervals as Navi is waking up Link in the intro
if (this->unk_2A8 == 6) {
if (this->fairyFlags & 0x40) {
if (prevPos.y < this->actor.posRot.pos.y) {
if (prevPos.y < this->actor.world.pos.y) {
this->fairyFlags &= ~0x40;
}
} else {
if (this->actor.posRot.pos.y < prevPos.y) {
if (this->actor.world.pos.y < prevPos.y) {
this->fairyFlags |= 0x40;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FAIRY_DASH);
}
@ -885,12 +885,12 @@ void func_80A03CF8(EnElf* this, GlobalContext* globalCtx) {
}
}
} else {
distFromLinksHead = Math_Vec3f_DistXYZ(&player->bodyPartsPos[8], &this->actor.posRot.pos);
distFromLinksHead = Math_Vec3f_DistXYZ(&player->bodyPartsPos[8], &this->actor.world.pos);
switch (this->unk_2A8) {
case 7:
func_80A02C98(this, &player->bodyPartsPos[8], 1.0f - this->unk_2AE * 0.033333335f);
xScale = Math_Vec3f_DistXYZ(&player->bodyPartsPos[8], &this->actor.posRot.pos);
xScale = Math_Vec3f_DistXYZ(&player->bodyPartsPos[8], &this->actor.world.pos);
if (distFromLinksHead < 7.0f) {
this->unk_2C0 = 0;
@ -906,7 +906,7 @@ void func_80A03CF8(EnElf* this, GlobalContext* globalCtx) {
break;
case 8:
func_80A02C98(this, &player->bodyPartsPos[8], 0.2f);
this->actor.posRot.pos = player->bodyPartsPos[8];
this->actor.world.pos = player->bodyPartsPos[8];
func_80A029A8(this, 1);
break;
case 11:
@ -1016,7 +1016,7 @@ void func_80A04414(EnElf* this, GlobalContext* globalCtx) {
} else {
if (this->unk_2C6 == 0) {
if ((arrowPointedActor == NULL) ||
(Math_Vec3f_DistXYZ(&this->actor.posRot.pos, &globalCtx->actorCtx.targetCtx.naviRefPos) < 50.0f)) {
(Math_Vec3f_DistXYZ(&this->actor.world.pos, &globalCtx->actorCtx.targetCtx.naviRefPos) < 50.0f)) {
this->unk_2C6 = 1;
}
} else if (this->unk_29C != 0.0f) {
@ -1039,10 +1039,11 @@ void func_80A04414(EnElf* this, GlobalContext* globalCtx) {
}
} else {
if ((arrowPointedActor != NULL) && (player->unk_664 != NULL)) {
if (arrowPointedActor->type == ACTORTYPE_NPC) {
if (arrowPointedActor->category == ACTORCAT_NPC) {
targetSound = NA_SE_VO_NAVY_HELLO;
} else {
targetSound = (arrowPointedActor->type == ACTORTYPE_ENEMY) ? NA_SE_VO_NAVY_ENEMY : NA_SE_VO_NAVY_HEAR;
targetSound =
(arrowPointedActor->category == ACTORCAT_ENEMY) ? NA_SE_VO_NAVY_ENEMY : NA_SE_VO_NAVY_HEAR;
}
if (this->unk_2C7 == 0) {
@ -1088,7 +1089,7 @@ void func_80A0461C(EnElf* this, GlobalContext* globalCtx) {
if ((player->stateFlags1 & 0x400) || ((YREG(15) & 0x10) && func_800BC56C(globalCtx, 2))) {
temp = 12;
this->unk_2C0 = 100;
} else if ((arrowPointedActor == NULL) || (temp = 1, (arrowPointedActor->type == ACTORTYPE_NPC))) {
} else if ((arrowPointedActor == NULL) || (temp = 1, (arrowPointedActor->category == ACTORCAT_NPC))) {
if (arrowPointedActor != NULL) {
this->unk_2C0 = 100;
player->stateFlags2 |= 0x100000;
@ -1170,8 +1171,8 @@ void func_80A0461C(EnElf* this, GlobalContext* globalCtx) {
func_80A01C38(this, temp);
if (temp == 11) {
this->unk_2B8 = Math_Vec3f_DistXZ(&player->bodyPartsPos[8], &this->actor.posRot.pos);
this->unk_2AC = Math_Vec3f_Yaw(&this->actor.posRot.pos, &player->bodyPartsPos[8]);
this->unk_2B8 = Math_Vec3f_DistXZ(&player->bodyPartsPos[8], &this->actor.world.pos);
this->unk_2AC = Math_Vec3f_Yaw(&this->actor.world.pos, &player->bodyPartsPos[8]);
}
}
}
@ -1187,9 +1188,9 @@ void EnElf_SpawnSparkles(EnElf* this, GlobalContext* globalCtx, s32 sparkleLife)
Color_RGBA8 primColor;
Color_RGBA8 envColor;
sparklePos.x = Rand_CenteredFloat(6.0f) + this->actor.posRot.pos.x;
sparklePos.y = (Rand_ZeroOne() * 6.0f) + this->actor.posRot.pos.y;
sparklePos.z = Rand_CenteredFloat(6.0f) + this->actor.posRot.pos.z;
sparklePos.x = Rand_CenteredFloat(6.0f) + this->actor.world.pos.x;
sparklePos.y = (Rand_ZeroOne() * 6.0f) + this->actor.world.pos.y;
sparklePos.z = Rand_CenteredFloat(6.0f) + this->actor.world.pos.z;
primColor.r = this->innerColor.r;
primColor.g = this->innerColor.g;
@ -1207,14 +1208,14 @@ void func_80A04D90(EnElf* this, GlobalContext* globalCtx) {
s32 pad;
s32 bgId;
this->actor.groundY = BgCheck_EntityRaycastFloor5(globalCtx, &globalCtx->colCtx, &this->actor.floorPoly, &bgId,
&this->actor, &this->actor.posRot.pos);
this->actor.shape.unk_14 = 0x32;
this->actor.floorHeight = BgCheck_EntityRaycastFloor5(globalCtx, &globalCtx->colCtx, &this->actor.floorPoly, &bgId,
&this->actor, &this->actor.world.pos);
this->actor.shape.shadowAlpha = 0x32;
}
// move to talk to player
void func_80A04DE4(EnElf* this, GlobalContext* globalCtx) {
Vec3f posRot2Copy;
Vec3f headCopy;
Player* player = PLAYER;
Vec3f naviRefPos;
@ -1227,14 +1228,14 @@ void func_80A04DE4(EnElf* this, GlobalContext* globalCtx) {
naviRefPos.z = player->bodyPartsPos[7].z + (Math_CosS(player->actor.shape.rot.y) * 20.0f);
}
this->actor.posRot2.pos = naviRefPos;
this->actor.focus.pos = naviRefPos;
this->fairyFlags &= ~0x10;
}
func_80A03AB0(this, globalCtx);
posRot2Copy = this->actor.posRot2.pos;
headCopy = this->actor.focus.pos;
func_80A03148(this, &posRot2Copy, 0, 20.0f, 0.2f);
func_80A03148(this, &headCopy, 0, 20.0f, 0.2f);
if (this->actor.speedXZ >= 5.0f) {
EnElf_SpawnSparkles(this, globalCtx, 16);
@ -1389,7 +1390,7 @@ void func_80A053F0(Actor* thisx, GlobalContext* globalCtx) {
if (func_8002F194(thisx, globalCtx)) {
func_800F4524(&D_801333D4, NA_SE_VO_SK_LAUGH, 0x20);
thisx->posRot2.pos = thisx->posRot.pos;
thisx->focus.pos = thisx->world.pos;
if (thisx->textId == ElfMessage_GetCUpText(globalCtx)) {
this->fairyFlags |= 0x80;