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

EffDust_Update, EffDust_Draw, renaming and cleanup

Signed-off-by: angie <angheloalf95@gmail.com>
This commit is contained in:
angie 2021-01-17 17:33:02 -03:00
parent c57b9e2946
commit 2127777234
No known key found for this signature in database
GPG key ID: E5212BA1B6FEA700
7 changed files with 25 additions and 56 deletions

View file

@ -1,4 +0,0 @@
glabel EffDust_Destroy
/* 0024C 8099DB1C AFA40000 */ sw $a0, 0x0000($sp)
/* 00250 8099DB20 03E00008 */ jr $ra
/* 00254 8099DB24 AFA50004 */ sw $a1, 0x0004($sp)

View file

@ -1,10 +0,0 @@
glabel EffDust_Draw
/* 0124C 8099EB1C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 01250 8099EB20 AFBF0014 */ sw $ra, 0x0014($sp)
/* 01254 8099EB24 8C990564 */ lw $t9, 0x0564($a0) ## 00000564
/* 01258 8099EB28 0320F809 */ jalr $ra, $t9
/* 0125C 8099EB2C 00000000 */ nop
/* 01260 8099EB30 8FBF0014 */ lw $ra, 0x0014($sp)
/* 01264 8099EB34 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 01268 8099EB38 03E00008 */ jr $ra
/* 0126C 8099EB3C 00000000 */ nop

View file

@ -1,10 +0,0 @@
glabel EffDust_Update
/* 00C00 8099E4D0 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00C04 8099E4D4 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00C08 8099E4D8 8C990560 */ lw $t9, 0x0560($a0) ## 00000560
/* 00C0C 8099E4DC 0320F809 */ jalr $ra, $t9
/* 00C10 8099E4E0 00000000 */ nop
/* 00C14 8099E4E4 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00C18 8099E4E8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00C1C 8099E4EC 03E00008 */ jr $ra
/* 00C20 8099E4F0 00000000 */ nop

View file

@ -1,3 +0,0 @@
glabel func_8099D8D0
/* 00000 8099D8D0 03E00008 */ jr $ra
/* 00004 8099D8D4 AC850560 */ sw $a1, 0x0560($a0) ## 00000560

View file

@ -1,3 +0,0 @@
glabel func_8099D8D8
/* 00008 8099D8D8 03E00008 */ jr $ra
/* 0000C 8099D8DC AC850564 */ sw $a1, 0x0564($a0) ## 00000564

View file

@ -35,17 +35,13 @@ static Gfx *D_8099EB60[] = {
0xDF000000, 0x00000000, 0x00000000, 0x00000000
};
//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Eff_Dust/func_8099D8D0.s")
void func_8099D8D0(EffDust* this, EffDustActionFunc callback) {
this->unk_0560 = callback;
void EffDust_setUpdateFunc(EffDust* this, EffDustActionFunc callback_updateFunc) {
this->updateFunc = callback_updateFunc;
}
//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Eff_Dust/func_8099D8D8.s")
void func_8099D8D8(EffDust* this, EffDustActionFunc callback) {
this->unk_0564 = callback;
void EffDust_setDrawFunc(EffDust* this, EffDustActionFunc callback_drawFunc) {
this->drawFunc = callback_drawFunc;
}
@ -62,8 +58,8 @@ void EffDust_Init(Actor *thisx, GlobalContext *globalCtx) {
switch(sp20){
case 0:
func_8099D8D0(this, func_8099DB28);
func_8099D8D8(this, func_8099E4F4);
EffDust_setUpdateFunc(this, func_8099DB28);
EffDust_setDrawFunc(this, func_8099E4F4);
this->unk_0554 = 0.8f;
this->unk_0558 = 0.8f;
this->unk_0550 = 1.0f;
@ -71,8 +67,8 @@ void EffDust_Init(Actor *thisx, GlobalContext *globalCtx) {
break;
case 1:
func_8099D8D0(this, func_8099DD74);
func_8099D8D8(this, func_8099E4F4);
EffDust_setUpdateFunc(this, func_8099DD74);
EffDust_setDrawFunc(this, func_8099E4F4);
this->unk_0550 = 0.8f;
this->unk_0558 = 0.8f;
this->unk_0554 = 1.0f;
@ -80,22 +76,22 @@ void EffDust_Init(Actor *thisx, GlobalContext *globalCtx) {
break;
case 2:
func_8099D8D0(this, func_8099DFC0);
func_8099D8D8(this, func_8099E784);
EffDust_setUpdateFunc(this, func_8099DFC0);
EffDust_setDrawFunc(this, func_8099E784);
this->unk_0550 = 0.5f;
this->unk_055C = 15.0f;
break;
case 3:
func_8099D8D0(this, func_8099DFC0);
func_8099D8D8(this, func_8099E784);
EffDust_setUpdateFunc(this, func_8099DFC0);
EffDust_setDrawFunc(this, func_8099E784);
this->unk_0550 = 0.5f;
this->unk_055C = 10.0f;
break;
case 4:
func_8099D8D0(this, func_8099DFC0);
func_8099D8D8(this, func_8099E784);
EffDust_setUpdateFunc(this, func_8099DFC0);
EffDust_setDrawFunc(this, func_8099E784);
this->actor.room = -1;
this->unk_0550 = 0.5f;
this->unk_055C = 20.0f;
@ -111,10 +107,7 @@ void EffDust_Init(Actor *thisx, GlobalContext *globalCtx) {
}
//#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Eff_Dust/EffDust_Destroy.s")
void EffDust_Destroy(Actor *thisx, GlobalContext *globalCtx) {
}
@ -124,10 +117,16 @@ void EffDust_Destroy(Actor *thisx, GlobalContext *globalCtx) {
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Eff_Dust/func_8099DFC0.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Eff_Dust/EffDust_Update.s")
void EffDust_Update(Actor *thisx, GlobalContext *globalCtx) {
EffDust *this = THIS;
this->updateFunc(this, globalCtx);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Eff_Dust/func_8099E4F4.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Eff_Dust/func_8099E784.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Eff_Dust/EffDust_Draw.s")
void EffDust_Draw(Actor *thisx, GlobalContext *globalCtx) {
EffDust *this = THIS;
this->drawFunc(this, globalCtx);
}

View file

@ -17,8 +17,8 @@ typedef struct EffDust {
/* 0x0554 */ f32 unk_0554;
/* 0x0558 */ f32 unk_0558;
/* 0x055C */ f32 unk_055C;
/* 0x0560 */ EffDustActionFunc unk_0560;
/* 0x0560 */ EffDustActionFunc unk_0564;
/* 0x0560 */ EffDustActionFunc updateFunc;
/* 0x0560 */ EffDustActionFunc drawFunc;
} EffDust; // size = 0x0568
extern const ActorInit Eff_Dust_InitVars;