1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-20 14:01:15 +00:00

Match En actors D-G (#1889)

* Match entity actors D-G

* Remove SET_EN_GOROIWA_SPEED

* Actually match z_en_elf.c

* GET_EN_GOROIWA_SPEED -> EN_GOROIWA_SPEED
This commit is contained in:
cadmic 2024-02-26 18:55:30 -08:00 committed by GitHub
parent c86bf5011b
commit 1da87b1e7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 160 additions and 98 deletions

View file

@ -183,6 +183,8 @@ void EnGb_Init(Actor* thisx, PlayState* play) {
this->actionTimer = (s16)Rand_ZeroFloat(100.0f) + 100;
for (i = 0; i < ARRAY_COUNT(sCagedSoulPositions); i++) {
s32 pad;
this->cagedSouls[i].infoIdx = (s32)Rand_ZeroFloat(30.0f) % 3;
this->cagedSouls[i].unk_14.x = this->cagedSouls[i].translation.x =
sCagedSoulPositions[i].x + this->dyna.actor.world.pos.x;
@ -280,6 +282,8 @@ void func_80A2F83C(EnGb* this, PlayState* play) {
}
}
if (Actor_TalkOfferAccepted(&this->dyna.actor, play)) {
s32 pad;
switch (func_8002F368(play)) {
case EXCH_ITEM_NONE:
func_80A2F180(this);
@ -294,9 +298,7 @@ void func_80A2F83C(EnGb* this, PlayState* play) {
this->actionFunc = func_80A2FA50;
break;
}
return;
}
if (this->dyna.actor.xzDistToPlayer < 100.0f) {
} else if (this->dyna.actor.xzDistToPlayer < 100.0f) {
Actor_OfferTalkExchangeEquiCylinder(&this->dyna.actor, play, 100.0f, EXCH_ITEM_BOTTLE_POE);
}
}
@ -440,7 +442,6 @@ void EnGb_Draw(Actor* thisx, PlayState* play) {
void EnGb_UpdateCagedSouls(EnGb* this, PlayState* play) {
f32 temp_f20;
s16 rot;
s32 i;
for (i = 0; i < 4; i++) {
@ -499,12 +500,14 @@ void EnGb_UpdateCagedSouls(EnGb* this, PlayState* play) {
this->cagedSouls[i].translation.y = this->cagedSouls[i].unk_14.y + temp_f20;
this->cagedSouls[i].translation.z = this->cagedSouls[i].unk_14.z;
} else if (i == 1) {
rot = this->dyna.actor.world.rot.y - 0x4000;
s16 rot = this->dyna.actor.world.rot.y - 0x4000;
this->cagedSouls[i].translation.x = this->cagedSouls[i].unk_14.x + Math_SinS(rot) * temp_f20;
this->cagedSouls[i].translation.z = this->cagedSouls[i].unk_14.z + Math_CosS(rot) * temp_f20;
this->cagedSouls[i].translation.y = this->cagedSouls[i].unk_14.y;
} else {
rot = this->dyna.actor.world.rot.y + 0x4000;
s16 rot = this->dyna.actor.world.rot.y + 0x4000;
this->cagedSouls[i].translation.x = this->cagedSouls[i].unk_14.x + Math_SinS(rot) * temp_f20;
this->cagedSouls[i].translation.z = this->cagedSouls[i].unk_14.z + Math_CosS(rot) * temp_f20;
this->cagedSouls[i].translation.y = this->cagedSouls[i].unk_14.y;