mirror of https://github.com/zeldaret/mm.git
Effect Hitmark Ok (#874)
* OK * gameplay keep * undef syms * Cleanup * format * HitMark -> Hitmark * Remove EffectSsHitmark_Spawn from functions.h * PR
This commit is contained in:
parent
a4d93ee3eb
commit
94372c3670
|
@ -1014,31 +1014,31 @@
|
|||
<Texture Name="gameplay_keep_Tex_031E70" OutName="tex_031E70" Format="ia8" Width="32" Height="32" Offset="0x31E70" />
|
||||
<DList Name="gameplay_keep_DL_032270" Offset="0x32270" />
|
||||
<Texture Name="gameplay_keep_Tex_032310" OutName="tex_032310" Format="rgba32" Width="16" Height="64" Offset="0x32310" />
|
||||
<Texture Name="gameplay_keep_Tex_033310" OutName="tex_033310" Format="i4" Width="32" Height="24" Offset="0x33310" />
|
||||
<Texture Name="gameplay_keep_Tex_033490" OutName="tex_033490" Format="i4" Width="32" Height="24" Offset="0x33490" />
|
||||
<Texture Name="gameplay_keep_Tex_033610" OutName="tex_033610" Format="i4" Width="32" Height="24" Offset="0x33610" />
|
||||
<Texture Name="gameplay_keep_Tex_033790" OutName="tex_033790" Format="i4" Width="32" Height="24" Offset="0x33790" />
|
||||
<Texture Name="gameplay_keep_Tex_033910" OutName="tex_033910" Format="i4" Width="32" Height="24" Offset="0x33910" />
|
||||
<Texture Name="gameplay_keep_Tex_033A90" OutName="tex_033A90" Format="i4" Width="32" Height="24" Offset="0x33A90" />
|
||||
<Texture Name="gameplay_keep_Tex_033C10" OutName="tex_033C10" Format="i4" Width="32" Height="24" Offset="0x33C10" />
|
||||
<Texture Name="gameplay_keep_Tex_033D90" OutName="tex_033D90" Format="i4" Width="32" Height="24" Offset="0x33D90" />
|
||||
<Texture Name="gameplay_keep_Tex_033F10" OutName="tex_033F10" Format="i4" Width="32" Height="24" Offset="0x33F10" />
|
||||
<Texture Name="gameplay_keep_Tex_034090" OutName="tex_034090" Format="i4" Width="32" Height="24" Offset="0x34090" />
|
||||
<Texture Name="gameplay_keep_Tex_034210" OutName="tex_034210" Format="i4" Width="32" Height="24" Offset="0x34210" />
|
||||
<Texture Name="gameplay_keep_Tex_034390" OutName="tex_034390" Format="i4" Width="32" Height="24" Offset="0x34390" />
|
||||
<Texture Name="gameplay_keep_Tex_034510" OutName="tex_034510" Format="i4" Width="32" Height="24" Offset="0x34510" />
|
||||
<Texture Name="gameplay_keep_Tex_034690" OutName="tex_034690" Format="i4" Width="32" Height="24" Offset="0x34690" />
|
||||
<Texture Name="gameplay_keep_Tex_034810" OutName="tex_034810" Format="i4" Width="32" Height="24" Offset="0x34810" />
|
||||
<Texture Name="gameplay_keep_Tex_034990" OutName="tex_034990" Format="i4" Width="32" Height="24" Offset="0x34990" />
|
||||
<Texture Name="gameplay_keep_Tex_034B10" OutName="tex_034B10" Format="i4" Width="32" Height="24" Offset="0x34B10" />
|
||||
<Texture Name="gameplay_keep_Tex_034C90" OutName="tex_034C90" Format="i4" Width="32" Height="24" Offset="0x34C90" />
|
||||
<Texture Name="gameplay_keep_Tex_034E10" OutName="tex_034E10" Format="i4" Width="32" Height="24" Offset="0x34E10" />
|
||||
<Texture Name="gameplay_keep_Tex_034F90" OutName="tex_034F90" Format="i4" Width="32" Height="24" Offset="0x34F90" />
|
||||
<Texture Name="gameplay_keep_Tex_035110" OutName="tex_035110" Format="i4" Width="32" Height="24" Offset="0x35110" />
|
||||
<Texture Name="gameplay_keep_Tex_035290" OutName="tex_035290" Format="i4" Width="32" Height="24" Offset="0x35290" />
|
||||
<Texture Name="gameplay_keep_Tex_035410" OutName="tex_035410" Format="i4" Width="32" Height="24" Offset="0x35410" />
|
||||
<Texture Name="gameplay_keep_Tex_035590" OutName="tex_035590" Format="i4" Width="32" Height="24" Offset="0x35590" />
|
||||
<DList Name="gameplay_keep_DL_035710" Offset="0x35710" />
|
||||
<Texture Name="gEffHitmarkWhiteMetal1Tex" OutName="eff_hitmark_white_metal_1" Format="i4" Width="32" Height="24" Offset="0x33310" />
|
||||
<Texture Name="gEffHitmarkWhiteMetal2Tex" OutName="eff_hitmark_white_metal_2" Format="i4" Width="32" Height="24" Offset="0x33490" />
|
||||
<Texture Name="gEffHitmarkWhiteMetal3Tex" OutName="eff_hitmark_white_metal_3" Format="i4" Width="32" Height="24" Offset="0x33610" />
|
||||
<Texture Name="gEffHitmarkWhiteMetal4Tex" OutName="eff_hitmark_white_metal_4" Format="i4" Width="32" Height="24" Offset="0x33790" />
|
||||
<Texture Name="gEffHitmarkWhiteMetal5Tex" OutName="eff_hitmark_white_metal_5" Format="i4" Width="32" Height="24" Offset="0x33910" />
|
||||
<Texture Name="gEffHitmarkWhiteMetal6Tex" OutName="eff_hitmark_white_metal_6" Format="i4" Width="32" Height="24" Offset="0x33A90" />
|
||||
<Texture Name="gEffHitmarkWhiteMetal7Tex" OutName="eff_hitmark_white_metal_7" Format="i4" Width="32" Height="24" Offset="0x33C10" />
|
||||
<Texture Name="gEffHitmarkWhiteMetal8Tex" OutName="eff_hitmark_white_metal_8" Format="i4" Width="32" Height="24" Offset="0x33D90" />
|
||||
<Texture Name="gEffHitmarkDust1Tex" OutName="eff_hitmark_dust_1" Format="i4" Width="32" Height="24" Offset="0x33F10" />
|
||||
<Texture Name="gEffHitmarkDust2Tex" OutName="eff_hitmark_dust_2" Format="i4" Width="32" Height="24" Offset="0x34090" />
|
||||
<Texture Name="gEffHitmarkDust3Tex" OutName="eff_hitmark_dust_3" Format="i4" Width="32" Height="24" Offset="0x34210" />
|
||||
<Texture Name="gEffHitmarkDust4Tex" OutName="eff_hitmark_dust_4" Format="i4" Width="32" Height="24" Offset="0x34390" />
|
||||
<Texture Name="gEffHitmarkDust5Tex" OutName="eff_hitmark_dust_5" Format="i4" Width="32" Height="24" Offset="0x34510" />
|
||||
<Texture Name="gEffHitmarkDust6Tex" OutName="eff_hitmark_dust_6" Format="i4" Width="32" Height="24" Offset="0x34690" />
|
||||
<Texture Name="gEffHitmarkDust7Tex" OutName="eff_hitmark_dust_7" Format="i4" Width="32" Height="24" Offset="0x34810" />
|
||||
<Texture Name="gEffHitmarkDust8Tex" OutName="eff_hitmark_dust_8" Format="i4" Width="32" Height="24" Offset="0x34990" />
|
||||
<Texture Name="gEffHitmarkRed1Tex" OutName="eff_hitmark_red_1" Format="i4" Width="32" Height="24" Offset="0x34B10" />
|
||||
<Texture Name="gEffHitmarkRed2Tex" OutName="eff_hitmark_red_2" Format="i4" Width="32" Height="24" Offset="0x34C90" />
|
||||
<Texture Name="gEffHitmarkRed3Tex" OutName="eff_hitmark_red_3" Format="i4" Width="32" Height="24" Offset="0x34E10" />
|
||||
<Texture Name="gEffHitmarkRed4Tex" OutName="eff_hitmark_red_4" Format="i4" Width="32" Height="24" Offset="0x34F90" />
|
||||
<Texture Name="gEffHitmarkRed5Tex" OutName="eff_hitmark_red_5" Format="i4" Width="32" Height="24" Offset="0x35110" />
|
||||
<Texture Name="gEffHitmarkRed6Tex" OutName="eff_hitmark_red_6" Format="i4" Width="32" Height="24" Offset="0x35290" />
|
||||
<Texture Name="gEffHitmarkRed7Tex" OutName="eff_hitmark_red_7" Format="i4" Width="32" Height="24" Offset="0x35410" />
|
||||
<Texture Name="gEffHitmarkRed8Tex" OutName="eff_hitmark_red_8" Format="i4" Width="32" Height="24" Offset="0x35590" />
|
||||
<DList Name="gEffHitmarkDL" Offset="0x35710" />
|
||||
<Texture Name="gameplay_keep_Tex_0357B0" OutName="tex_0357B0" Format="ia8" Width="32" Height="64" Offset="0x357B0" />
|
||||
<Texture Name="gameplay_keep_Tex_035FB0" OutName="tex_035FB0" Format="ia8" Width="32" Height="64" Offset="0x35FB0" />
|
||||
<Texture Name="gameplay_keep_Tex_0367B0" OutName="tex_0367B0" Format="i8" Width="64" Height="64" Offset="0x367B0" />
|
||||
|
|
|
@ -553,9 +553,8 @@ void EffectSsHahen_SpawnBurst(PlayState* play, Vec3f* pos, f32 burstScale, s16 u
|
|||
// void EffectSsSibuki_Spawn(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
|
||||
void EffectSsSibuki_SpawnBurst(PlayState* play, Vec3f* pos);
|
||||
void EffectSsStone1_Spawn(PlayState* play, Vec3f* pos, s32 reg0);
|
||||
// void EffectSsHitMark_Spawn(UNK_TYPE4 uParm1, UNK_TYPE4 uParm2, UNK_TYPE2 uParm3, Vec3f* pzParm4);
|
||||
void EffectSsHitMark_SpawnFixedScale(PlayState* play, s32 type, Vec3f* pos);
|
||||
void EffectSsHitMark_SpawnCustomScale(PlayState* play, s32 type, s16 scale, Vec3f* pos);
|
||||
void EffectSsHitmark_SpawnFixedScale(PlayState* play, s32 type, Vec3f* pos);
|
||||
void EffectSsHitmark_SpawnCustomScale(PlayState* play, s32 type, s16 scale, Vec3f* pos);
|
||||
// void EffectSsFhgFlash_SpawnShock(UNK_TYPE4 uParm1, UNK_TYPE4 uParm2, Vec3f* pzParm3, UNK_TYPE2 uParm4, UNK_TYPE1 param_5);
|
||||
// void EffectSsKFire_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4, UNK_TYPE2 param_5, UNK_TYPE1 param_6);
|
||||
void EffectSsSolderSrchBall_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16* linkDetected, s16 drawFlag);
|
||||
|
|
3
spec
3
spec
|
@ -1888,8 +1888,7 @@ beginseg
|
|||
name "ovl_Effect_Ss_Hitmark"
|
||||
compress
|
||||
include "build/src/overlays/effects/ovl_Effect_Ss_Hitmark/z_eff_ss_hitmark.o"
|
||||
include "build/data/ovl_Effect_Ss_Hitmark/ovl_Effect_Ss_Hitmark.data.o"
|
||||
include "build/data/ovl_Effect_Ss_Hitmark/ovl_Effect_Ss_Hitmark.reloc.o"
|
||||
include "build/src/overlays/effects/ovl_Effect_Ss_Hitmark/ovl_Effect_Ss_Hitmark_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
@ -1516,28 +1516,28 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderInfo* info, Collider* coll
|
|||
s32 flags = info->toucherFlags & TOUCH_SFX_NONE;
|
||||
|
||||
if (flags == TOUCH_SFX_NORMAL && collider->colType != COLTYPE_METAL) {
|
||||
EffectSsHitMark_SpawnFixedScale(play, 0, hitPos);
|
||||
EffectSsHitmark_SpawnFixedScale(play, 0, hitPos);
|
||||
if (collider->actor == NULL) {
|
||||
play_sound(NA_SE_IT_SHIELD_BOUND);
|
||||
} else {
|
||||
Audio_PlaySfxAtPos(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
|
||||
}
|
||||
} else if (flags == TOUCH_SFX_NORMAL) {
|
||||
EffectSsHitMark_SpawnFixedScale(play, 3, hitPos);
|
||||
EffectSsHitmark_SpawnFixedScale(play, 3, hitPos);
|
||||
if (collider->actor == NULL) {
|
||||
CollisionCheck_SpawnShieldParticlesMetal(play, hitPos);
|
||||
} else {
|
||||
CollisionCheck_SpawnShieldParticlesMetalSound(play, hitPos, &collider->actor->projectedPos);
|
||||
}
|
||||
} else if (flags == TOUCH_SFX_HARD) {
|
||||
EffectSsHitMark_SpawnFixedScale(play, 0, hitPos);
|
||||
EffectSsHitmark_SpawnFixedScale(play, 0, hitPos);
|
||||
if (collider->actor == NULL) {
|
||||
play_sound(NA_SE_IT_SHIELD_BOUND);
|
||||
} else {
|
||||
Audio_PlaySfxAtPos(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
|
||||
}
|
||||
} else if (flags == TOUCH_SFX_WOOD) {
|
||||
EffectSsHitMark_SpawnFixedScale(play, 1, hitPos);
|
||||
EffectSsHitmark_SpawnFixedScale(play, 1, hitPos);
|
||||
if (collider->actor == NULL) {
|
||||
play_sound(NA_SE_IT_REFLECTION_WOOD);
|
||||
} else {
|
||||
|
@ -1603,13 +1603,13 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* at, ColliderInfo* atIn
|
|||
CollisionCheck_SpawnShieldParticlesWood(play, hitPos, &at->actor->projectedPos);
|
||||
}
|
||||
} else if (sHitInfo[ac->colType].effect != HIT_NONE) {
|
||||
EffectSsHitMark_SpawnFixedScale(play, sHitInfo[ac->colType].effect, hitPos);
|
||||
EffectSsHitmark_SpawnFixedScale(play, sHitInfo[ac->colType].effect, hitPos);
|
||||
if (!(acInfo->bumperFlags & BUMP_NO_SWORD_SFX)) {
|
||||
CollisionCheck_SwordHitAudio(at, acInfo);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
EffectSsHitMark_SpawnFixedScale(play, 0, hitPos);
|
||||
EffectSsHitmark_SpawnFixedScale(play, 0, hitPos);
|
||||
if (ac->actor == NULL) {
|
||||
play_sound(NA_SE_IT_SHIELD_BOUND);
|
||||
} else {
|
||||
|
|
|
@ -631,10 +631,10 @@ void EffectSsStone1_Spawn(PlayState* play, Vec3f* pos, s32 reg0) {
|
|||
EffectSs_Spawn(play, EFFECT_SS_STONE1, 128, &initParams);
|
||||
}
|
||||
|
||||
// EffectSsHitMark Spawn Functions
|
||||
// EffectSsHitmark Spawn Functions
|
||||
|
||||
void EffectSsHitMark_Spawn(PlayState* play, s32 type, s16 scale, Vec3f* pos) {
|
||||
EffectSsHitMarkInitParams initParams;
|
||||
void EffectSsHitmark_Spawn(PlayState* play, s32 type, s16 scale, Vec3f* pos) {
|
||||
EffectSsHitmarkInitParams initParams;
|
||||
|
||||
initParams.type = type;
|
||||
initParams.scale = scale;
|
||||
|
@ -643,12 +643,12 @@ void EffectSsHitMark_Spawn(PlayState* play, s32 type, s16 scale, Vec3f* pos) {
|
|||
EffectSs_Spawn(play, EFFECT_SS_HITMARK, 128, &initParams);
|
||||
}
|
||||
|
||||
void EffectSsHitMark_SpawnFixedScale(PlayState* play, s32 type, Vec3f* pos) {
|
||||
EffectSsHitMark_Spawn(play, type, 300, pos);
|
||||
void EffectSsHitmark_SpawnFixedScale(PlayState* play, s32 type, Vec3f* pos) {
|
||||
EffectSsHitmark_Spawn(play, type, 300, pos);
|
||||
}
|
||||
|
||||
void EffectSsHitMark_SpawnCustomScale(PlayState* play, s32 type, s16 scale, Vec3f* pos) {
|
||||
EffectSsHitMark_Spawn(play, type, scale, pos);
|
||||
void EffectSsHitmark_SpawnCustomScale(PlayState* play, s32 type, s16 scale, Vec3f* pos) {
|
||||
EffectSsHitmark_Spawn(play, type, scale, pos);
|
||||
}
|
||||
|
||||
// EffectSsFhgFlash Spawn Functions
|
||||
|
|
|
@ -389,7 +389,7 @@ void func_8088ACE0(EnArrow* this, PlayState* play) {
|
|||
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, sp82);
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
} else {
|
||||
EffectSsHitMark_SpawnCustomScale(play, 0, 150, &this->actor.world.pos);
|
||||
EffectSsHitmark_SpawnCustomScale(play, 0, 150, &this->actor.world.pos);
|
||||
|
||||
if (sp50 && (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
|
||||
sp7C = this->collider.base.at;
|
||||
|
|
|
@ -414,7 +414,7 @@ void func_80BFEB64(EnBomjima* this, PlayState* play) {
|
|||
sp40.z = (Math_CosS(sp3E) * (Rand_ZeroFloat(20.0f) + 40.0f)) + this->unk_2F0->actor.world.pos.z;
|
||||
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &sp40, 50, NA_SE_EV_BOMBERS_SHOT_EXPLOSUIN);
|
||||
EffectSsHitMark_SpawnFixedScale(play, 0, &sp40);
|
||||
EffectSsHitmark_SpawnFixedScale(play, 0, &sp40);
|
||||
this->unk_2BC++;
|
||||
|
||||
if (((s16)Rand_ZeroFloat(2.0f) + 3) < this->unk_2BC) {
|
||||
|
|
|
@ -957,9 +957,9 @@ void EnDodongo_UpdateDamage(EnDodongo* this, PlayState* play) {
|
|||
Math_Vec3s_ToVec3f(&sp3C, &this->collider2.elements[i].info.bumper.hitPos);
|
||||
if (this->actor.colChkInfo.damageEffect == 0xF) {
|
||||
CollisionCheck_BlueBlood(play, NULL, &sp3C);
|
||||
EffectSsHitMark_SpawnFixedScale(play, 0, &sp3C);
|
||||
EffectSsHitmark_SpawnFixedScale(play, 0, &sp3C);
|
||||
} else if (this->actor.colChkInfo.damageEffect != 14) {
|
||||
EffectSsHitMark_SpawnFixedScale(play, 3, &sp3C);
|
||||
EffectSsHitmark_SpawnFixedScale(play, 3, &sp3C);
|
||||
CollisionCheck_SpawnShieldParticlesMetalSound(play, &sp3C, &this->actor.projectedPos);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ void func_80A1DA50(PlayState* play, ObjSpinyroll* this, Vec3f* arg2, Vec3f* arg3
|
|||
|
||||
Math_Vec3f_Sum(arg2, arg3, &sp1C);
|
||||
Math_Vec3f_Scale(&sp1C, 0.5f);
|
||||
EffectSsHitMark_SpawnFixedScale(play, 3, &sp1C);
|
||||
EffectSsHitmark_SpawnFixedScale(play, 3, &sp1C);
|
||||
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_IT_SHIELD_REFLECT_SW);
|
||||
}
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ s32 func_80A3C8D8(ObjVspinyroll* this, PlayState* play, Vec3f* arg2, s32 arg3) {
|
|||
spB4.y += this->dyna.actor.world.pos.y;
|
||||
spB4.z += this->dyna.actor.world.pos.z;
|
||||
|
||||
EffectSsHitMark_SpawnFixedScale(play, 3, &spB4);
|
||||
EffectSsHitmark_SpawnFixedScale(play, 3, &spB4);
|
||||
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_IT_SHIELD_REFLECT_SW);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,27 +1,163 @@
|
|||
/*
|
||||
* File: z_eff_ss_hitmark.c
|
||||
* Overlay: ovl_Effect_Ss_Hitmark
|
||||
* Description:
|
||||
* Description: Hit Marks
|
||||
*/
|
||||
|
||||
#include "z_eff_ss_hitmark.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
#define rTexIndex regs[0]
|
||||
#define rType regs[1]
|
||||
#define rPrimColorR regs[2]
|
||||
#define rPrimColorG regs[3]
|
||||
#define rPrimColorB regs[4]
|
||||
#define rEnvColorR regs[5]
|
||||
#define rEnvColorG regs[6]
|
||||
#define rEnvColorB regs[7]
|
||||
#define rScale regs[8]
|
||||
|
||||
#define PARAMS ((EffectSsHitmarkInitParams*)initParamsx)
|
||||
|
||||
s32 EffectSsHitmark_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx);
|
||||
u32 EffectSsHitmark_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx);
|
||||
void EffectSsHitmark_Update(PlayState* play, u32 index, EffectSs* this);
|
||||
void EffectSsHitmark_Draw(PlayState* play, u32 index, EffectSs* this);
|
||||
|
||||
#if 0
|
||||
static Color_RGB8 sColors[] = {
|
||||
{ 255, 255, 255 }, { 255, 255, 0 }, // EFFECT_HITMARK_WHITE Init
|
||||
{ 255, 255, 255 }, { 255, 0, 0 }, // EFFECT_HITMARK_WHITE Update
|
||||
{ 255, 200, 100 }, { 200, 150, 0 }, // EFFECT_HITMARK_DUST Init
|
||||
{ 150, 100, 0 }, { 100, 50, 0 }, // EFFECT_HITMARK_DUST Update
|
||||
{ 255, 255, 255 }, { 255, 0, 0 }, // EFFECT_HITMARK_RED Init
|
||||
{ 255, 255, 0 }, { 255, 0, 0 }, // EFFECT_HITMARK_RED Update
|
||||
{ 255, 255, 255 }, { 0, 255, 200 }, // EFFECT_HITMARK_METAL Init
|
||||
{ 255, 255, 255 }, { 150, 0, 255 }, // EFFECT_HITMARK_METAL Update
|
||||
};
|
||||
|
||||
static TexturePtr sTextures[] = {
|
||||
// EFFECT_HITMARK_WHITE
|
||||
gEffHitmarkWhiteMetal1Tex,
|
||||
gEffHitmarkWhiteMetal2Tex,
|
||||
gEffHitmarkWhiteMetal3Tex,
|
||||
gEffHitmarkWhiteMetal4Tex,
|
||||
gEffHitmarkWhiteMetal5Tex,
|
||||
gEffHitmarkWhiteMetal6Tex,
|
||||
gEffHitmarkWhiteMetal7Tex,
|
||||
gEffHitmarkWhiteMetal8Tex,
|
||||
// EFFECT_HITMARK_DUST
|
||||
gEffHitmarkDust1Tex,
|
||||
gEffHitmarkDust2Tex,
|
||||
gEffHitmarkDust3Tex,
|
||||
gEffHitmarkDust4Tex,
|
||||
gEffHitmarkDust5Tex,
|
||||
gEffHitmarkDust6Tex,
|
||||
gEffHitmarkDust7Tex,
|
||||
gEffHitmarkDust8Tex,
|
||||
// EFFECT_HITMARK_RED
|
||||
gEffHitmarkRed1Tex,
|
||||
gEffHitmarkRed2Tex,
|
||||
gEffHitmarkRed3Tex,
|
||||
gEffHitmarkRed4Tex,
|
||||
gEffHitmarkRed5Tex,
|
||||
gEffHitmarkRed6Tex,
|
||||
gEffHitmarkRed7Tex,
|
||||
gEffHitmarkRed8Tex,
|
||||
// EFFECT_HITMARK_METAL
|
||||
gEffHitmarkWhiteMetal1Tex,
|
||||
gEffHitmarkWhiteMetal2Tex,
|
||||
gEffHitmarkWhiteMetal3Tex,
|
||||
gEffHitmarkWhiteMetal4Tex,
|
||||
gEffHitmarkWhiteMetal5Tex,
|
||||
gEffHitmarkWhiteMetal6Tex,
|
||||
gEffHitmarkWhiteMetal7Tex,
|
||||
gEffHitmarkWhiteMetal8Tex,
|
||||
};
|
||||
|
||||
const EffectSsInit Effect_Ss_Hitmark_InitVars = {
|
||||
EFFECT_SS_HITMARK,
|
||||
EffectSsHitmark_Init,
|
||||
};
|
||||
|
||||
#endif
|
||||
u32 EffectSsHitmark_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx) {
|
||||
EffectSsHitmarkInitParams* initParams = PARAMS;
|
||||
s32 colorIndex;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Hitmark/EffectSsHitmark_Init.s")
|
||||
this->pos = initParams->pos;
|
||||
this->gfx = gEffHitmarkDL;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Hitmark/EffectSsHitmark_Draw.s")
|
||||
if (initParams->type == EFFECT_HITMARK_DUST) {
|
||||
this->life = 16;
|
||||
} else {
|
||||
this->life = 8;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Hitmark/EffectSsHitmark_Update.s")
|
||||
this->draw = EffectSsHitmark_Draw;
|
||||
this->update = EffectSsHitmark_Update;
|
||||
|
||||
colorIndex = initParams->type * 4;
|
||||
this->rTexIndex = 0;
|
||||
this->rType = initParams->type;
|
||||
this->rPrimColorR = sColors[colorIndex].r;
|
||||
this->rPrimColorG = sColors[colorIndex].g;
|
||||
this->rPrimColorB = sColors[colorIndex].b;
|
||||
this->rEnvColorR = sColors[colorIndex + 1].r;
|
||||
this->rEnvColorG = sColors[colorIndex + 1].g;
|
||||
this->rEnvColorB = sColors[colorIndex + 1].b;
|
||||
this->rScale = initParams->scale;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void EffectSsHitmark_Draw(PlayState* play, u32 index, EffectSs* this) {
|
||||
GraphicsContext* gfxCtx = play->state.gfxCtx;
|
||||
MtxF mfTrans;
|
||||
MtxF mfScale;
|
||||
MtxF mfResult;
|
||||
MtxF mfTransBillboard;
|
||||
Mtx* mtx;
|
||||
f32 scale;
|
||||
TexturePtr tex;
|
||||
s32 pad;
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z);
|
||||
scale = this->rScale / 100.0f;
|
||||
SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f);
|
||||
SkinMatrix_MtxFMtxFMult(&mfTrans, &play->billboardMtxF, &mfTransBillboard);
|
||||
SkinMatrix_MtxFMtxFMult(&mfTransBillboard, &mfScale, &mfResult);
|
||||
gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);
|
||||
|
||||
if (mtx != NULL) {
|
||||
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
tex = sTextures[(this->rType * 8) + (this->rTexIndex)];
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(tex));
|
||||
func_8012C9BC(gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, 0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, this->gfx);
|
||||
}
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
void EffectSsHitmark_Update(PlayState* play, u32 index, EffectSs* this) {
|
||||
s32 colorIndex;
|
||||
|
||||
if (this->rType == EFFECT_HITMARK_DUST) {
|
||||
this->rTexIndex = (15 - this->life) / 2;
|
||||
} else {
|
||||
this->rTexIndex = 7 - this->life;
|
||||
}
|
||||
|
||||
if (this->rTexIndex != 0) {
|
||||
colorIndex = this->rType * 4 + 2;
|
||||
this->rPrimColorR = func_800B096C(this->rPrimColorR, sColors[colorIndex].r, this->life + 1);
|
||||
this->rPrimColorG = func_800B096C(this->rPrimColorG, sColors[colorIndex].g, this->life + 1);
|
||||
this->rPrimColorB = func_800B096C(this->rPrimColorB, sColors[colorIndex].b, this->life + 1);
|
||||
this->rEnvColorR = func_800B096C(this->rEnvColorR, sColors[colorIndex + 1].r, this->life + 1);
|
||||
this->rEnvColorG = func_800B096C(this->rEnvColorG, sColors[colorIndex + 1].g, this->life + 1);
|
||||
this->rEnvColorB = func_800B096C(this->rEnvColorB, sColors[colorIndex + 1].b, this->life + 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ typedef struct {
|
|||
/* 0x00 */ s32 type;
|
||||
/* 0x04 */ s16 scale;
|
||||
/* 0x08 */ Vec3f pos;
|
||||
} EffectSsHitMarkInitParams; // size = 0x14
|
||||
} EffectSsHitmarkInitParams; // size = 0x14
|
||||
|
||||
extern const EffectSsInit Effect_Ss_Hitmark_InitVars;
|
||||
|
||||
|
|
|
@ -626,9 +626,9 @@
|
|||
0x800B242C:("EffectSsSibuki_Spawn",),
|
||||
0x800B249C:("EffectSsSibuki_SpawnBurst",),
|
||||
0x800B25D8:("EffectSsStone1_Spawn",),
|
||||
0x800B262C:("EffectSsHitMark_Spawn",),
|
||||
0x800B2684:("EffectSsHitMark_SpawnFixedScale",),
|
||||
0x800B26A8:("EffectSsHitMark_SpawnCustomScale",),
|
||||
0x800B262C:("EffectSsHitmark_Spawn",),
|
||||
0x800B2684:("EffectSsHitmark_SpawnFixedScale",),
|
||||
0x800B26A8:("EffectSsHitmark_SpawnCustomScale",),
|
||||
0x800B26D4:("EffectSsFhgFlash_SpawnShock",),
|
||||
0x800B2738:("EffectSsKFire_Spawn",),
|
||||
0x800B27A0:("EffectSsSolderSrchBall_Spawn",),
|
||||
|
|
|
@ -543,6 +543,9 @@ wordReplace = {
|
|||
"EffectSsKiraKira_SpawnDispersed": "EffectSsKirakira_SpawnDispersed",
|
||||
"EffectSsKiraKira_SpawnFocused": "EffectSsKirakira_SpawnFocused",
|
||||
"Effect_GetGlobalCtx": "Effect_GetPlayState",
|
||||
"EffectSsHitMark_Spawn": "EffectSsHitmark_Spawn",
|
||||
"EffectSsHitMark_SpawnFixedScale": "EffectSsHitmark_SpawnFixedScale",
|
||||
"EffectSsHitMark_SpawnCustomScale": "EffectSsHitmark_SpawnCustomScale",
|
||||
|
||||
"func_800E8F08": "Actor_TrackNone",
|
||||
"func_800E8FA4": "Actor_TrackPoint",
|
||||
|
|
|
@ -140,9 +140,9 @@ asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsStick_Spawn.s,Effec
|
|||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsSibuki_Spawn.s,EffectSsSibuki_Spawn,0x800B242C,0x1C
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsSibuki_SpawnBurst.s,EffectSsSibuki_SpawnBurst,0x800B249C,0x4F
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsStone1_Spawn.s,EffectSsStone1_Spawn,0x800B25D8,0x15
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsHitMark_Spawn.s,EffectSsHitMark_Spawn,0x800B262C,0x16
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsHitMark_SpawnFixedScale.s,EffectSsHitMark_SpawnFixedScale,0x800B2684,0x9
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsHitMark_SpawnCustomScale.s,EffectSsHitMark_SpawnCustomScale,0x800B26A8,0xB
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsHitmark_Spawn.s,EffectSsHitmark_Spawn,0x800B262C,0x16
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsHitmark_SpawnFixedScale.s,EffectSsHitmark_SpawnFixedScale,0x800B2684,0x9
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsHitmark_SpawnCustomScale.s,EffectSsHitmark_SpawnCustomScale,0x800B26A8,0xB
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsFhgFlash_SpawnShock.s,EffectSsFhgFlash_SpawnShock,0x800B26D4,0x19
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsKFire_Spawn.s,EffectSsKFire_Spawn,0x800B2738,0x1A
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsSolderSrchBall_Spawn.s,EffectSsSolderSrchBall_Spawn,0x800B27A0,0x1C
|
||||
|
|
|
|
@ -425,7 +425,6 @@ D_0402F0EC = 0x0402F0EC;
|
|||
D_04030100 = 0x04030100;
|
||||
D_040301B0 = 0x040301B0;
|
||||
D_04032270 = 0x04032270;
|
||||
D_04035710 = 0x04035710;
|
||||
D_040367B0 = 0x040367B0;
|
||||
D_040377B0 = 0x040377B0;
|
||||
D_04037850 = 0x04037850;
|
||||
|
|
Loading…
Reference in New Issue