1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-04 15:04:31 +00:00

Rename a few variables and functions

Signed-off-by: Anghelo <angheloalf95@gmail.com>
This commit is contained in:
Anghelo 2021-01-22 19:45:16 -03:00
parent 191c962c22
commit 4b81648341
2 changed files with 25 additions and 25 deletions

View file

@ -9,13 +9,13 @@ void EffDust_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EffDust_Update(Actor* thisx, GlobalContext* globalCtx); void EffDust_Update(Actor* thisx, GlobalContext* globalCtx);
void EffDust_Draw(Actor* thisx, GlobalContext* globalCtx); void EffDust_Draw(Actor* thisx, GlobalContext* globalCtx);
void func_8099D8E0(EffDust* this); void EffDust_InitPosAndDistance(EffDust* this);
void EffDust_UpdateFunc_8099DB28(EffDust* this, GlobalContext* globalCtx); void EffDust_UpdateFunc_8099DB28(EffDust* this, GlobalContext* globalCtx);
void EffDust_UpdateFunc_8099DD74(EffDust* this, GlobalContext* globalCtx); void EffDust_UpdateFunc_8099DD74(EffDust* this, GlobalContext* globalCtx);
void func_8099DFC0(EffDust* this, GlobalContext* globalCtx); void EffDust_UpdateFunc_8099DFC0(EffDust* this, GlobalContext* globalCtx);
void func_8099E4F4(EffDust* this, GlobalContext* globalCtx); void EffDust_DrawFunc_8099E4F4(EffDust* this, GlobalContext* globalCtx);
void func_8099E784(EffDust* this, GlobalContext* globalCtx); void EffDust_DrawFunc_8099E784(EffDust* this, GlobalContext* globalCtx);
extern Gfx D_04037880[]; extern Gfx D_04037880[];
@ -46,7 +46,7 @@ void EffDust_setDrawFunc(EffDust* this, EffDustActionFunc callback_drawFunc) {
// Members initializer (?) // Members initializer (?)
void func_8099D8E0(EffDust *this) { void EffDust_InitPosAndDistance(EffDust *this) {
s32 i; s32 i;
for (i = 0; i < 0x40; i++) { for (i = 0; i < 0x40; i++) {
@ -63,15 +63,15 @@ void func_8099D8E0(EffDust *this) {
void EffDust_Init(Actor *thisx, GlobalContext *globalCtx) { void EffDust_Init(Actor *thisx, GlobalContext *globalCtx) {
EffDust *this = THIS; EffDust *this = THIS;
u32 sp20; u32 dust_effect;
sp20 = this->actor.params; dust_effect = this->actor.params;
func_8099D8E0(this); EffDust_InitPosAndDistance(this);
switch(sp20){ switch (dust_effect) {
case 0: case 0:
EffDust_setUpdateFunc(this, EffDust_UpdateFunc_8099DB28); EffDust_setUpdateFunc(this, EffDust_UpdateFunc_8099DB28);
EffDust_setDrawFunc(this, func_8099E4F4); EffDust_setDrawFunc(this, EffDust_DrawFunc_8099E4F4);
this->dy = 0.8f; this->dy = 0.8f;
this->dz = 0.8f; this->dz = 0.8f;
this->dx = 1.0f; this->dx = 1.0f;
@ -80,7 +80,7 @@ void EffDust_Init(Actor *thisx, GlobalContext *globalCtx) {
case 1: case 1:
EffDust_setUpdateFunc(this, EffDust_UpdateFunc_8099DD74); EffDust_setUpdateFunc(this, EffDust_UpdateFunc_8099DD74);
EffDust_setDrawFunc(this, func_8099E4F4); EffDust_setDrawFunc(this, EffDust_DrawFunc_8099E4F4);
this->dx = 0.8f; this->dx = 0.8f;
this->dz = 0.8f; this->dz = 0.8f;
this->dy = 1.0f; this->dy = 1.0f;
@ -88,22 +88,22 @@ void EffDust_Init(Actor *thisx, GlobalContext *globalCtx) {
break; break;
case 2: case 2:
EffDust_setUpdateFunc(this, func_8099DFC0); EffDust_setUpdateFunc(this, EffDust_UpdateFunc_8099DFC0);
EffDust_setDrawFunc(this, func_8099E784); EffDust_setDrawFunc(this, EffDust_DrawFunc_8099E784);
this->dx = 0.5f; this->dx = 0.5f;
this->scalingFactor = 15.0f; this->scalingFactor = 15.0f;
break; break;
case 3: case 3:
EffDust_setUpdateFunc(this, func_8099DFC0); EffDust_setUpdateFunc(this, EffDust_UpdateFunc_8099DFC0);
EffDust_setDrawFunc(this, func_8099E784); EffDust_setDrawFunc(this, EffDust_DrawFunc_8099E784);
this->dx = 0.5f; this->dx = 0.5f;
this->scalingFactor = 10.0f; this->scalingFactor = 10.0f;
break; break;
case 4: case 4:
EffDust_setUpdateFunc(this, func_8099DFC0); EffDust_setUpdateFunc(this, EffDust_UpdateFunc_8099DFC0);
EffDust_setDrawFunc(this, func_8099E784); EffDust_setDrawFunc(this, EffDust_DrawFunc_8099E784);
this->actor.room = -1; this->actor.room = -1;
this->dx = 0.5f; this->dx = 0.5f;
this->scalingFactor = 20.0f; this->scalingFactor = 20.0f;
@ -197,7 +197,7 @@ void EffDust_UpdateFunc_8099DD74(EffDust *this, GlobalContext *globalCtx) {
} }
void func_8099DFC0(EffDust *this, GlobalContext *globalCtx) { void EffDust_UpdateFunc_8099DFC0(EffDust *this, GlobalContext *globalCtx) {
s16 theta; s16 theta;
Player *player; Player *player;
@ -296,7 +296,7 @@ void EffDust_Update(Actor *thisx, GlobalContext *globalCtx) {
} }
void func_8099E4F4(EffDust *this, GlobalContext *globalCtx) { void EffDust_DrawFunc_8099E4F4(EffDust *this, GlobalContext *globalCtx) {
EffDust *this2; EffDust *this2;
GlobalContext *glb_ctx; GlobalContext *glb_ctx;
@ -328,7 +328,7 @@ void func_8099E4F4(EffDust *this, GlobalContext *globalCtx) {
for (i = 0; i < 0x40; i++) { for (i = 0; i < 0x40; i++) {
if (*distanceTraveled < 1.0f) { if (*distanceTraveled < 1.0f) {
// TODO: find a way to match without needing to do this. // Needed to match.
if (!this2) { } if (!this2) { }
aux = 1.0f - (*distanceTraveled * *distanceTraveled); aux = 1.0f - (*distanceTraveled * *distanceTraveled);
@ -354,7 +354,7 @@ void func_8099E4F4(EffDust *this, GlobalContext *globalCtx) {
CLOSE_DISPS(gfx_ctx, "../z_eff_dust.c", 458); CLOSE_DISPS(gfx_ctx, "../z_eff_dust.c", 458);
} }
void func_8099E784(EffDust *this, GlobalContext *globalCtx) { void EffDust_DrawFunc_8099E784(EffDust *this, GlobalContext *globalCtx) {
EffDust *this2; EffDust *this2;
GlobalContext *glb_ctx; GlobalContext *glb_ctx;
GraphicsContext *gfx_ctx; GraphicsContext *gfx_ctx;
@ -394,7 +394,7 @@ void func_8099E784(EffDust *this, GlobalContext *globalCtx) {
if (*distanceTraveled < 1.0f) { if (*distanceTraveled < 1.0f) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0xFF, 0xFF, 0xFF, ((255.0f * (*distanceTraveled)))); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0xFF, 0xFF, 0xFF, ((255.0f * (*distanceTraveled))));
// TODO: find a way to match without needing to do this. // Needed to match.
this2 = this; this2 = this;
if (!this2) { } if (!this2) { }

View file

@ -15,9 +15,9 @@ typedef struct EffDust {
/* 0x054C */ u8 index; /* 0x054C */ u8 index;
/* 0x054D */ u8 life; // only considered if actor.params is 2, 3 or 4. /* 0x054D */ u8 life; // only considered if actor.params is 2, 3 or 4.
/* 0x054E */ char padding[0x02]; /* 0x054E */ char padding[0x02];
/* 0x0550 */ f32 dx; // x translate (?) /* 0x0550 */ f32 dx; // normalized. 0.0f to 1.0f
/* 0x0554 */ f32 dy; // y translate (?) /* 0x0554 */ f32 dy; // normalized. 0.0f to 1.0f
/* 0x0558 */ f32 dz; // z translate (?) /* 0x0558 */ f32 dz; // normalized. 0.0f to 1.0f
/* 0x055C */ f32 scalingFactor; /* 0x055C */ f32 scalingFactor;
/* 0x0560 */ EffDustActionFunc updateFunc; // function to be called by EffDust_Update() /* 0x0560 */ EffDustActionFunc updateFunc; // function to be called by EffDust_Update()
/* 0x0560 */ EffDustActionFunc drawFunc; // function to be called by EffDust_Draw() /* 0x0560 */ EffDustActionFunc drawFunc; // function to be called by EffDust_Draw()