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

Decompiles ovl_En_St (#349)

* decompile and match En_St

* document ovl_En_St

* Implement OPEN_DISPS, and remove useless comments

* styling updates, inline some declarations

* PR suggestions as well as changing the BlureInit colors to u8 arrays over RGBA types

* remove pointer from EnSt_SetupAction
This commit is contained in:
krimtonz 2020-09-14 11:17:34 -05:00 committed by GitHub
parent 2fd56429eb
commit 4d9f83da1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 1084 additions and 2961 deletions

View file

@ -116,22 +116,22 @@ void EffectBlure_Init1(void* thisx, void* initParamsx) {
if ((this != NULL) && (initParams != NULL)) {
EffectBlure_InitElements(this);
this->p1StartColor.r = initParams->p1StartColor.r;
this->p2StartColor.r = initParams->p2StartColor.r;
this->p1EndColor.r = initParams->p1EndColor.r;
this->p2EndColor.r = initParams->p2EndColor.r;
this->p1StartColor.g = initParams->p1StartColor.g;
this->p2StartColor.g = initParams->p2StartColor.g;
this->p1EndColor.g = initParams->p1EndColor.g;
this->p2EndColor.g = initParams->p2EndColor.g;
this->p1StartColor.b = initParams->p1StartColor.b;
this->p2StartColor.b = initParams->p2StartColor.b;
this->p1EndColor.b = initParams->p1EndColor.b;
this->p2EndColor.b = initParams->p2EndColor.b;
this->p1StartColor.a = initParams->p1StartColor.a;
this->p2StartColor.a = initParams->p2StartColor.a;
this->p1EndColor.a = initParams->p1EndColor.a;
this->p2EndColor.a = initParams->p2EndColor.a;
this->p1StartColor.r = initParams->p1StartColor[0];
this->p2StartColor.r = initParams->p2StartColor[0];
this->p1EndColor.r = initParams->p1EndColor[0];
this->p2EndColor.r = initParams->p2EndColor[0];
this->p1StartColor.g = initParams->p1StartColor[1];
this->p2StartColor.g = initParams->p2StartColor[1];
this->p1EndColor.g = initParams->p1EndColor[1];
this->p2EndColor.g = initParams->p2EndColor[1];
this->p1StartColor.b = initParams->p1StartColor[2];
this->p2StartColor.b = initParams->p2StartColor[2];
this->p1EndColor.b = initParams->p1EndColor[2];
this->p2EndColor.b = initParams->p2EndColor[2];
this->p1StartColor.a = initParams->p1StartColor[3];
this->p2StartColor.a = initParams->p2StartColor[3];
this->p1EndColor.a = initParams->p1EndColor[3];
this->p2EndColor.a = initParams->p2EndColor[3];
this->elemDuration = initParams->elemDuration;
this->unkFlag = initParams->unkFlag;
this->calcMode = initParams->calcMode;
@ -157,22 +157,22 @@ void EffectBlure_Init2(void* thisx, void* initParamsx) {
if ((this != NULL) && (initParams != NULL)) {
EffectBlure_InitElements(this);
this->p1StartColor.r = initParams->p1StartColor.r;
this->p2StartColor.r = initParams->p2StartColor.r;
this->p1EndColor.r = initParams->p1EndColor.r;
this->p2EndColor.r = initParams->p2EndColor.r;
this->p1StartColor.g = initParams->p1StartColor.g;
this->p2StartColor.g = initParams->p2StartColor.g;
this->p1EndColor.g = initParams->p1EndColor.g;
this->p2EndColor.g = initParams->p2EndColor.g;
this->p1StartColor.b = initParams->p1StartColor.b;
this->p2StartColor.b = initParams->p2StartColor.b;
this->p1EndColor.b = initParams->p1EndColor.b;
this->p2EndColor.b = initParams->p2EndColor.b;
this->p1StartColor.a = initParams->p1StartColor.a;
this->p2StartColor.a = initParams->p2StartColor.a;
this->p1EndColor.a = initParams->p1EndColor.a;
this->p2EndColor.a = initParams->p2EndColor.a;
this->p1StartColor.r = initParams->p1StartColor[0];
this->p2StartColor.r = initParams->p2StartColor[0];
this->p1EndColor.r = initParams->p1EndColor[0];
this->p2EndColor.r = initParams->p2EndColor[0];
this->p1StartColor.g = initParams->p1StartColor[1];
this->p2StartColor.g = initParams->p2StartColor[1];
this->p1EndColor.g = initParams->p1EndColor[1];
this->p2EndColor.g = initParams->p2EndColor[1];
this->p1StartColor.b = initParams->p1StartColor[2];
this->p2StartColor.b = initParams->p2StartColor[2];
this->p1EndColor.b = initParams->p1EndColor[2];
this->p2EndColor.b = initParams->p2EndColor[2];
this->p1StartColor.a = initParams->p1StartColor[3];
this->p2StartColor.a = initParams->p2StartColor[3];
this->p1EndColor.a = initParams->p1EndColor[3];
this->p2EndColor.a = initParams->p2EndColor[3];
this->elemDuration = initParams->elemDuration;
this->unkFlag = initParams->unkFlag;
this->calcMode = initParams->calcMode;

View file

@ -111,8 +111,8 @@ void func_808AC2BC(BgSpot01Objects2* this, GlobalContext* globalCtx) {
if (gSaveContext.nightFlag == 0) {
func_808AC22C(globalCtx->setupPathList, &position, ((s32)thisx->params >> 8) & 0xFF, 0);
Actor_SpawnAsChild(&globalCtx->actorCtx, thisx, globalCtx, ACTOR_EN_DAIKU_KAKARIKO, position.x,
position.y, position.z, thisx->posRot.rot.x, thisx->posRot.rot.y,
thisx->posRot.rot.z, ((((s32)thisx->params >> 8) & 0xFF) << 8) + 1);
position.y, position.z, thisx->posRot.rot.x, thisx->posRot.rot.y,
thisx->posRot.rot.z, ((((s32)thisx->params >> 8) & 0xFF) << 8) + 1);
}
break;
case 0: // Potion Shop Poster

View file

@ -54,25 +54,25 @@ void EnBoom_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->actor, sInitChain);
trail.p1StartColor.r = 255;
trail.p1StartColor.g = 255;
trail.p1StartColor.b = 100;
trail.p1StartColor.a = 255;
trail.p1StartColor[0] = 255;
trail.p1StartColor[1] = 255;
trail.p1StartColor[2] = 100;
trail.p1StartColor[3] = 255;
trail.p2StartColor.r = 255;
trail.p2StartColor.g = 255;
trail.p2StartColor.b = 100;
trail.p2StartColor.a = 64;
trail.p2StartColor[0] = 255;
trail.p2StartColor[1] = 255;
trail.p2StartColor[2] = 100;
trail.p2StartColor[3] = 64;
trail.p1EndColor.r = 255;
trail.p1EndColor.g = 255;
trail.p1EndColor.b = 100;
trail.p1EndColor.a = 0;
trail.p1EndColor[0] = 255;
trail.p1EndColor[1] = 255;
trail.p1EndColor[2] = 100;
trail.p1EndColor[3] = 0;
trail.p2EndColor.r = 255;
trail.p2EndColor.g = 255;
trail.p2EndColor.b = 100;
trail.p2EndColor.a = 0;
trail.p2EndColor[0] = 255;
trail.p2EndColor[1] = 255;
trail.p2EndColor[2] = 100;
trail.p2EndColor[3] = 0;
trail.elemDuration = 8;
trail.unkFlag = 0;

File diff suppressed because it is too large Load diff

View file

@ -6,9 +6,45 @@
struct EnSt;
typedef void (*EnStActionFunc)(struct EnSt* this, GlobalContext* globalCtx);
typedef struct EnSt {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x430];
/* 0x014C */ SkelAnime skelAnime;
/* 0x0190 */ EnStActionFunc actionFunc;
/* 0x0194 */ ColliderCylinder colCylinder[6];
/* 0x035C */ ColliderJntSph colSph;
/* 0x037C */ ColliderJntSphItem colSphItems[1];
/* 0x03BC */ s16 initalYaw;
/* 0x03BE */ s16 deathYawTarget;
/* 0x03C0 */ s16 groundBounces;
/* 0x03C2 */ s16 animFrames;
/* 0x03C4 */ s16 swayTimer;
/* 0x03C6 */ s16 setTargetYawTimer;
/* 0x03C8 */ s16 rotAwayTimer;
/* 0x03CA */ s16 rotTowardsTimer;
/* 0x03CC */ s16 takeDamageSpinTimer;
/* 0x03CE */ s16 stunTimer;
/* 0x03D0 */ s16 invulnerableTimer;
/* 0x03D2 */ s16 sfxTimer;
/* 0x03D4 */ s16 gaveDamageSpinTimer;
/* 0x03D6 */ s16 finishDeathTimer;
/* 0x03D8 */ s16 deathTimer;
/* 0x03DA */ s16 absPrevSwayAngle;
/* 0x03DC */ u8 playSwayFlag;
/* 0x03DD */ u8 teethR;
/* 0x03DE */ u8 teethG;
/* 0x03DF */ u8 teethB;
/* 0x03DD */ char unk_3E0[4];
/* 0x03E4 */ Vec3f unusedPos;
/* 0x03F0 */ Vec3f ceilingPos;
/* 0x03FC */ char unk_3FC[0x8];
/* 0x0404 */ s32 blureIdx;
/* 0x0408 */ f32 colliderScale;
/* 0x040C */ f32 groundYOffset;
/* 0x0410 */ s16 swayAngle;
/* 0x0412 */ Vec3s limbDrawTable[30];
/* 0x04C6 */ Vec3s transDrawTable[30];
} EnSt; // size = 0x057C
extern const ActorInit En_St_InitVars;