1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-13 11:24:40 +00:00

En_Floormas OK (#97)

* EnFloorMas wip

* floormaster formatting

* floormaster wip

* ovl_En_Floormas OK

* pr recommendations

* pr updates
This commit is contained in:
krimtonz 2020-05-07 18:18:09 -05:00 committed by GitHub
parent 5acc4e2f66
commit 0ebe904d0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
67 changed files with 1110 additions and 3575 deletions

View file

@ -1253,7 +1253,7 @@ void func_8002E4B4(GlobalContext* globalCtx, Actor* actor, f32 arg2, f32 arg3, f
&actor->wallPoly, &sp60, actor, arg2))) {
sp5C = actor->wallPoly;
Math_Vec3f_Copy(&actor->posRot.pos, &sp64);
actor->unk_7E = atan2s(sp5C->norm.z, sp5C->norm.x);
actor->wallPolyRot = atan2s(sp5C->norm.z, sp5C->norm.x);
actor->bgCheckFlags |= 8;
actor->wallPolySource = sp60;
} else {

View file

@ -273,7 +273,8 @@ void func_8001D4A8(EnAObj* this, GlobalContext* globalCtx) {
if ((this->dyna.actor.speedXZ != 0.0f) && (this->dyna.actor.bgCheckFlags & 0x8)) {
if (1) { // Necessary to match
this->dyna.actor.posRot.rot.y =
((this->dyna.actor.unk_7E - this->dyna.actor.posRot.rot.y) + this->dyna.actor.unk_7E) - 0x8000;
((this->dyna.actor.wallPolyRot - this->dyna.actor.posRot.rot.y) + this->dyna.actor.wallPolyRot) -
0x8000;
}
this->dyna.actor.bgCheckFlags &= ~0x8;
}

File diff suppressed because it is too large Load diff

View file

@ -4,12 +4,22 @@
#include <ultra64.h>
#include <global.h>
struct EnFloormas;
typedef struct EnFloormas EnFloormas;
typedef struct EnFloormas {
typedef void (*EnFloormasActionFunc)(EnFloormas* this, GlobalContext* globalCtx);
struct EnFloormas{
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x1C8];
} EnFloormas; // size = 0x0314
/* 0x014C */ SkelAnime skelAnime;
/* 0x0190 */ EnFloormasActionFunc actionFunc;
/* 0x0194 */ s16 actionTimer;
/* 0x0196 */ s16 actionTarget;
/* 0x0198 */ s16 zOffset;
/* 0x019A */ s16 smActionTimer;
/* 0x019C */ Vec3s limbDrawTable[25];
/* 0x0232 */ Vec3s transitionDrawTable[25];
/* 0x02C8 */ ColliderCylinder collider;
}; // size = 0x0314
extern const ActorInit En_Floormas_InitVars;

View file

@ -82,7 +82,7 @@ void EnLightbox_Update(Actor* thisx, GlobalContext* globalCtx) {
} else {
if (thisx->speedXZ) {
if (thisx->bgCheckFlags & 8) {
thisx->posRot.rot.y = (thisx->posRot.rot.y + thisx->unk_7E) - thisx->posRot.rot.y;
thisx->posRot.rot.y = (thisx->posRot.rot.y + thisx->wallPolyRot) - thisx->posRot.rot.y;
Audio_PlaySoundGeneral(NA_SE_EV_BOMB_BOUND, &thisx->unk_E4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
thisx->speedXZ *= 0.7f;

View file

@ -1352,7 +1352,7 @@ void func_80AEDB30(EnRu1* this, GlobalContext* globalCtx) {
f32* velocityY;
f32* speedXZ;
f32* gravity;
s16 unk_7E;
s16 wallPolyRot;
s16 rotY;
s32 temp_a1_2;
s32 temp_a0;
@ -1411,13 +1411,13 @@ void func_80AEDB30(EnRu1* this, GlobalContext* globalCtx) {
speedXZ = &this->actor.speedXZ;
if (*speedXZ != 0.0f) {
rotY = this->actor.posRot.rot.y;
unk_7E = this->actor.unk_7E;
temp_a0 = (unk_7E * 2) - rotY;
wallPolyRot = this->actor.wallPolyRot;
temp_a0 = (wallPolyRot * 2) - rotY;
temp_a1_2 = temp_a0 + 0x8000;
if ((s16)((temp_a0 - unk_7E) + 0x8000) >= 0) {
phi_v1 = (s16)(temp_a1_2 - unk_7E);
if ((s16)((temp_a0 - wallPolyRot) + 0x8000) >= 0) {
phi_v1 = (s16)(temp_a1_2 - wallPolyRot);
} else {
phi_v1 = -(s16)(temp_a1_2 - unk_7E);
phi_v1 = -(s16)(temp_a1_2 - wallPolyRot);
}
if (phi_v1 < 0x4001) {
if (*speedXZ >= (kREG(27) * 0.01f) + 3.0f) {