ClearTag cleanup (#830)

This commit is contained in:
engineer124 2022-06-18 18:37:31 -07:00 committed by GitHub
parent e729f10442
commit b6362cacbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 32 deletions

View File

@ -1044,15 +1044,15 @@
<Texture Name="gameplay_keep_Tex_0367B0" OutName="tex_0367B0" Format="i8" Width="64" Height="64" Offset="0x367B0" />
<DList Name="gameplay_keep_DL_0377B0" Offset="0x377B0" />
<DList Name="gameplay_keep_DL_037850" Offset="0x37850" />
<Texture Name="gExplosionSplashTex1" OutName="tex_0378F0" Format="i8" Width="32" Height="40" Offset="0x378F0" />
<Texture Name="gExplosionSplashTex2" OutName="tex_037DF0" Format="i8" Width="32" Height="40" Offset="0x37DF0" />
<Texture Name="gExplosionSplashTex3" OutName="tex_0382F0" Format="i8" Width="32" Height="40" Offset="0x382F0" />
<Texture Name="gExplosionSplashTex4" OutName="tex_0387F0" Format="i8" Width="32" Height="40" Offset="0x387F0" />
<Texture Name="gExplosionSplashTex5" OutName="tex_038CF0" Format="i8" Width="32" Height="40" Offset="0x38CF0" />
<Texture Name="gExplosionSplashTex6" OutName="tex_0391F0" Format="i8" Width="32" Height="40" Offset="0x391F0" />
<Texture Name="gExplosionSplashTex7" OutName="tex_0396F0" Format="i8" Width="32" Height="40" Offset="0x396F0" />
<Texture Name="gExplosionSplashTex8" OutName="tex_039BF0" Format="i8" Width="32" Height="40" Offset="0x39BF0" />
<DList Name="gExplosionSplashDL" Offset="0x3A0F0" />
<Texture Name="gEffWaterSplash1Tex" OutName="eff_water_splash_1" Format="i8" Width="32" Height="40" Offset="0x378F0" />
<Texture Name="gEffWaterSplash2Tex" OutName="eff_water_splash_2" Format="i8" Width="32" Height="40" Offset="0x37DF0" />
<Texture Name="gEffWaterSplash3Tex" OutName="eff_water_splash_3" Format="i8" Width="32" Height="40" Offset="0x382F0" />
<Texture Name="gEffWaterSplash4Tex" OutName="eff_water_splash_4" Format="i8" Width="32" Height="40" Offset="0x387F0" />
<Texture Name="gEffWaterSplash5Tex" OutName="eff_water_splash_5" Format="i8" Width="32" Height="40" Offset="0x38CF0" />
<Texture Name="gEffWaterSplash6Tex" OutName="eff_water_splash_6" Format="i8" Width="32" Height="40" Offset="0x391F0" />
<Texture Name="gEffWaterSplash7Tex" OutName="eff_water_splash_7" Format="i8" Width="32" Height="40" Offset="0x396F0" />
<Texture Name="gEffWaterSplash8Tex" OutName="eff_water_splash_8" Format="i8" Width="32" Height="40" Offset="0x39BF0" />
<DList Name="gEffWaterSplashDL" Offset="0x3A0F0" />
<Texture Name="gEffStone1Tex" OutName="eff_stone_1" Format="ia8" Width="32" Height="32" Offset="0x3A190" />
<Texture Name="gEffStone2Tex" OutName="eff_stone_2" Format="ia8" Width="32" Height="32" Offset="0x3A590" />
<Texture Name="gEffStone3Tex" OutName="eff_stone_3" Format="ia8" Width="32" Height="32" Offset="0x3A990" />

View File

@ -11,6 +11,18 @@
#define THIS ((EnClearTag*)thisx)
typedef enum {
/* 0x00 */ CLEAR_TAG_EFFECT_AVAILABLE,
/* 0x01 */ CLEAR_TAG_EFFECT_DEBRIS,
/* 0x02 */ CLEAR_TAG_EFFECT_FIRE, // never set to, remnant of OoT
/* 0x03 */ CLEAR_TAG_EFFECT_SMOKE,
/* 0x04 */ CLEAR_TAG_EFFECT_FLASH,
/* 0x05 */ CLEAR_TAG_EFFECT_LIGHT_RAYS,
/* 0x06 */ CLEAR_TAG_EFFECT_SHOCKWAVE,
/* 0x07 */ CLEAR_TAG_EFFECT_SPLASH,
/* 0x08 */ CLEAR_TAG_EFFECT_ISOLATED_SMOKE,
} ClearTagEffectType;
void EnClearTag_Init(Actor* thisx, GlobalContext* globalCtx);
void EnClearTag_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnClearTag_Update(Actor* thisx, GlobalContext* globalCtx);
@ -82,15 +94,15 @@ static f32 sLightRayMaxScale[] = {
25.0f, 100.0f, 48.0f, 20.0f, 32.0f,
};
static TexturePtr sSplashTex[] = {
gExplosionSplashTex1,
gExplosionSplashTex2,
gExplosionSplashTex3,
gExplosionSplashTex4,
gExplosionSplashTex5,
gExplosionSplashTex6,
gExplosionSplashTex7,
gExplosionSplashTex8,
static TexturePtr sWaterSplashTextures[] = {
gEffWaterSplash1Tex,
gEffWaterSplash2Tex,
gEffWaterSplash3Tex,
gEffWaterSplash4Tex,
gEffWaterSplash5Tex,
gEffWaterSplash6Tex,
gEffWaterSplash7Tex,
gEffWaterSplash8Tex,
NULL,
NULL,
NULL,
@ -972,7 +984,7 @@ void EnClearTag_DrawEffects(Actor* thisx, GlobalContext* globalCtx) {
gDPPipeSync(POLY_XLU_DISP++);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 200);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 200);
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(sSplashTex[effect->actionTimer]));
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(sWaterSplashTextures[effect->actionTimer]));
func_8012C9BC(gfxCtx);
gSPClearGeometryMode(POLY_XLU_DISP++, G_CULL_BACK);
isMaterialApplied++;
@ -996,7 +1008,7 @@ void EnClearTag_DrawEffects(Actor* thisx, GlobalContext* globalCtx) {
Matrix_RotateXFApply(effect->rotationX);
Matrix_Scale(effect->scale, effect->scale, effect->scale, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gExplosionSplashDL);
gSPDisplayList(POLY_XLU_DISP++, gEffWaterSplashDL);
}
}
}

View File

@ -5,18 +5,6 @@
struct EnClearTag;
typedef enum {
/* 0x00 */ CLEAR_TAG_EFFECT_AVAILABLE,
/* 0x01 */ CLEAR_TAG_EFFECT_DEBRIS,
/* 0x02 */ CLEAR_TAG_EFFECT_FIRE, // never set to, remnant of OoT
/* 0x03 */ CLEAR_TAG_EFFECT_SMOKE,
/* 0x04 */ CLEAR_TAG_EFFECT_FLASH,
/* 0x05 */ CLEAR_TAG_EFFECT_LIGHT_RAYS,
/* 0x06 */ CLEAR_TAG_EFFECT_SHOCKWAVE,
/* 0x07 */ CLEAR_TAG_EFFECT_SPLASH,
/* 0x08 */ CLEAR_TAG_EFFECT_ISOLATED_SMOKE,
} ClearTagEffectType;
typedef struct EnClearTagEffect {
/* 0x00 */ u8 type;
/* 0x01 */ u8 actionTimer;