mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 14:50:15 +00:00
Bomb Related Effect Overlays (#283)
* fix colliderinit typo * dead sound done * deadsound documentation * blast done * progress * spk init * progress * spark done * ss bomb ok * bomb done * cleanup * progress * progress * almost done with bomb2 * clean up gossip stone * more * cleanup and format * remove unused asm file * nonmatching reloc * done i think * mistakes * fix headers * idk how that got in here * match bomb2 * asm file * pr review
This commit is contained in:
parent
c76c584006
commit
19c990b852
82 changed files with 822 additions and 2416 deletions
|
@ -48,9 +48,7 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
static Vec3f sZeroVector = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
extern CollisionHeader D_060108B8;
|
||||
extern UNK_TYPE D_060108B8;
|
||||
extern Gfx D_0600FE40[];
|
||||
extern UNK_TYPE D_0400CD80;
|
||||
extern Gfx D_040184B0[];
|
||||
|
@ -82,6 +80,7 @@ void BgHakaTubo_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void BgHakaTubo_Idle(BgHakaTubo* this, GlobalContext* globalCtx) {
|
||||
static Vec3f sZeroVector = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3f pos;
|
||||
|
||||
if (this->dyna.actor.room == 12) { // 3 spinning pots room in Shadow Temple
|
||||
|
@ -104,7 +103,7 @@ void BgHakaTubo_Idle(BgHakaTubo* this, GlobalContext* globalCtx) {
|
|||
pos.x = this->dyna.actor.posRot.pos.x;
|
||||
pos.z = this->dyna.actor.posRot.pos.z;
|
||||
pos.y = this->dyna.actor.posRot.pos.y + 80.0f;
|
||||
func_80028E84(globalCtx, &pos, &sZeroVector, &sZeroVector, 100, 45);
|
||||
EffectSsBomb2_SpawnLayered(globalCtx, &pos, &sZeroVector, &sZeroVector, 100, 45);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.posRot.pos, 50, NA_SE_EV_BOX_BREAK);
|
||||
func_800297A4(globalCtx, &pos, 20.0f, 0, 350, 100, 50, 105, 40, &D_0400CD80);
|
||||
this->dropTimer = 5;
|
||||
|
|
|
@ -92,8 +92,8 @@ void BgMoriHineri_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
moriHineriObjIdx = Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_HINERI1A);
|
||||
} else {
|
||||
moriHineriObjIdx = (this->dyna.actor.params == 2)
|
||||
? Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_HINERI2)
|
||||
: Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_HINERI2A);
|
||||
? Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_HINERI2)
|
||||
: Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_HINERI2A);
|
||||
}
|
||||
this->moriHineriObjIdx = moriHineriObjIdx;
|
||||
}
|
||||
|
@ -128,8 +128,8 @@ void func_808A39FC(BgMoriHineri* this, GlobalContext* globalCtx) {
|
|||
this->moriHineriObjIdx = Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_HINERI1);
|
||||
} else {
|
||||
this->moriHineriObjIdx = (this->dyna.actor.params == 2)
|
||||
? Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_HINERI2A)
|
||||
: Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_HINERI2);
|
||||
? Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_HINERI2A)
|
||||
: Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_HINERI2);
|
||||
}
|
||||
if (this->moriHineriObjIdx < 0) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
|
@ -216,8 +216,7 @@ void func_808A3E54(BgMoriHineri* this, GlobalContext* globalCtx) {
|
|||
D_808A43E0 = -1;
|
||||
}
|
||||
}
|
||||
if ((D_808A43E0 > 0) &&
|
||||
((ACTIVE_CAM->eye.z - this->dyna.actor.posRot.pos.z) < 1100.0f)) {
|
||||
if ((D_808A43E0 > 0) && ((ACTIVE_CAM->eye.z - this->dyna.actor.posRot.pos.z) < 1100.0f)) {
|
||||
func_8002F948(&this->dyna.actor, NA_SE_EV_FLOOR_ROLLING - SFX_FLAG);
|
||||
}
|
||||
}
|
||||
|
@ -229,7 +228,7 @@ void BgMoriHineri_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void BgMoriHineri_DrawHallAndRoom(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
|
||||
BgMoriHineri* this = THIS;
|
||||
s8 objIndex;
|
||||
MtxF mtx;
|
||||
|
|
|
@ -279,7 +279,8 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
effPos.y += 30.0f;
|
||||
}
|
||||
|
||||
func_80028E84(globalCtx, &effPos, &effVelocity, &bomb2Accel, 0x64, (thisx->shape.rot.z * 6) + 0x13);
|
||||
EffectSsBomb2_SpawnLayered(globalCtx, &effPos, &effVelocity, &bomb2Accel, 100,
|
||||
(thisx->shape.rot.z * 6) + 19);
|
||||
|
||||
effPos.y = thisx->groundY;
|
||||
if (thisx->groundY > -32000.0f) {
|
||||
|
@ -313,7 +314,7 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if ((thisx->scale.x >= 0.01f) && (thisx->params != BOMB_EXPLOSION)) {
|
||||
if (thisx->waterY >= 20.0f) {
|
||||
func_8002A9F4(globalCtx, &thisx->projectedPos, NA_SE_IT_BOMB_UNEXPLOSION, 1, 1, 0xA);
|
||||
EffectSsDeadSound_SpawnStationary(globalCtx, &thisx->projectedPos, NA_SE_IT_BOMB_UNEXPLOSION, 1, 1, 10);
|
||||
Actor_Kill(thisx);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -391,7 +391,7 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
effPos.y += 30.0f;
|
||||
}
|
||||
|
||||
func_80028E84(globalCtx, &effPos, &effVelocity, &bomb2Accel, 0x64, 0x13);
|
||||
EffectSsBomb2_SpawnLayered(globalCtx, &effPos, &effVelocity, &bomb2Accel, 100, 19);
|
||||
|
||||
effPos.y = thisx->groundY;
|
||||
if (thisx->groundY > -32000.0f) {
|
||||
|
@ -426,7 +426,7 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if ((thisx->scale.x >= 0.01f) && (thisx->params != BOMBFLOWER_EXPLOSION)) {
|
||||
if (thisx->waterY >= 20.0f) {
|
||||
func_8002A9F4(globalCtx, &thisx->projectedPos, NA_SE_IT_BOMB_UNEXPLOSION, 1, 1, 0xA);
|
||||
EffectSsDeadSound_SpawnStationary(globalCtx, &thisx->projectedPos, NA_SE_IT_BOMB_UNEXPLOSION, 1, 1, 10);
|
||||
Actor_Kill(thisx);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/*
|
||||
* File: z_en_gs.c
|
||||
* Overlay: ovl_En_Gs
|
||||
* Description: Gossip Stone
|
||||
*/
|
||||
|
||||
#include "z_en_gs.h"
|
||||
|
||||
#define FLAGS 0x02000009
|
||||
|
@ -10,17 +16,10 @@ void EnGs_Update(Actor* thisx, GlobalContext* globalCtx);
|
|||
void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
void func_80A4F734(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4F77C(EnGs* this);
|
||||
|
||||
void func_80A4E910(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4EA08(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4EB3C(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4ED34(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4F13C(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4E648(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4E470(EnGs* this, GlobalContext* globalCtx);
|
||||
void func_80A4F700(EnGs* this, GlobalContext* globalCtx);
|
||||
|
||||
void func_80A4F77C(EnGs* this);
|
||||
|
||||
extern Gfx D_0404D4E0[];
|
||||
extern Gfx D_06000950[];
|
||||
extern Gfx D_060009D0[];
|
||||
|
@ -54,26 +53,6 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
Color_RGBA8 D_80A4FDFC = { 0xFF, 0x32, 0x32, 0x00 };
|
||||
|
||||
Color_RGBA8 D_80A4FE00 = { 0x32, 0x32, 0xFF, 0x00 };
|
||||
|
||||
Color_RGBA8 D_80A4FE04 = { 0xFF, 0xFF, 0xFF, 0x00 };
|
||||
|
||||
Vec3f D_80A4FE08 = { 0.0f, -0.3f, 0.0f };
|
||||
|
||||
Color_RGBA8 D_80A4FE14 = { 0xC8, 0xC8, 0xC8, 0x80 };
|
||||
|
||||
Color_RGBA8 D_80A4FE18 = { 0x64, 0x64, 0x64, 0x00 };
|
||||
|
||||
Vec3f D_80A4FE1C = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
Vec3f D_80A4FE28 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
Vec3s D_80A4FE34 = { 0x0000, 0x0000, 0x0000 };
|
||||
|
||||
Vec3f D_80A4FE3C = { 1.0f, 1.0f, 1.0f };
|
||||
|
||||
void EnGs_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnGs* this = THIS;
|
||||
|
||||
|
@ -267,10 +246,18 @@ void func_80A4EB3C(EnGs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A4ED34(EnGs* this, GlobalContext* globalCtx) {
|
||||
static Color_RGBA8 flashRed = { 255, 50, 50, 0 };
|
||||
static Color_RGBA8 flashBlue = { 50, 50, 255, 0 };
|
||||
static Color_RGBA8 baseWhite = { 255, 255, 255, 0 };
|
||||
static Vec3f dustAccel = { 0.0f, -0.3f, 0.0f };
|
||||
static Color_RGBA8 dustPrim = { 200, 200, 200, 128 };
|
||||
static Color_RGBA8 dustEnv = { 100, 100, 100, 0 };
|
||||
static Vec3f bomb2Velocity = { 0.0f, 0.0f, 0.0f };
|
||||
static Vec3f bomb2Accel = { 0.0f, 0.0f, 0.0f };
|
||||
u8 i;
|
||||
Vec3f sp60;
|
||||
Vec3f sp5C;
|
||||
Vec3f sp68;
|
||||
Vec3f dustPos;
|
||||
Vec3f dustVelocity;
|
||||
Vec3f bomb2Pos;
|
||||
|
||||
if (this->unk_19F == 0) {
|
||||
this->unk_200 = 0x28;
|
||||
|
@ -287,16 +274,16 @@ void func_80A4ED34(EnGs* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->unk_19F == 2) {
|
||||
this->unk_200--;
|
||||
Color_RGBA8_Copy(&this->unk_1E4, &D_80A4FE04);
|
||||
Color_RGBA8_Copy(&this->flashColor, &baseWhite);
|
||||
if ((this->unk_200 < 0x50) && ((this->unk_200 % 0x14) < 8)) {
|
||||
if (this->unk_200 < 0x14) {
|
||||
Color_RGBA8_Copy(&this->unk_1E4, &D_80A4FDFC);
|
||||
Color_RGBA8_Copy(&this->flashColor, &flashRed);
|
||||
if ((this->unk_200 % 0x14) == 7) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
}
|
||||
} else {
|
||||
Color_RGBA8_Copy(&this->unk_1E4, &D_80A4FE00);
|
||||
Color_RGBA8_Copy(&this->flashColor, &flashBlue);
|
||||
if ((this->unk_200 % 0x14) == 7) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
|
@ -312,14 +299,14 @@ void func_80A4ED34(EnGs* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->unk_19F == 3) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
sp5C.x = Math_Rand_CenteredFloat(15.0f);
|
||||
sp5C.y = Math_Rand_ZeroFloat(-1.0f);
|
||||
sp5C.z = Math_Rand_CenteredFloat(15.0f);
|
||||
sp60.x = this->actor.posRot.pos.x + (sp5C.x + sp5C.x);
|
||||
sp60.y = this->actor.posRot.pos.y + 7.0f;
|
||||
sp60.z = this->actor.posRot.pos.z + (sp5C.z + sp5C.z);
|
||||
func_8002836C(globalCtx, &sp60, &sp5C, &D_80A4FE08, &D_80A4FE14, &D_80A4FE18,
|
||||
(s16)Math_Rand_ZeroFloat(50.0f) + 0xC8, 0x28, 0xF);
|
||||
dustVelocity.x = Math_Rand_CenteredFloat(15.0f);
|
||||
dustVelocity.y = Math_Rand_ZeroFloat(-1.0f);
|
||||
dustVelocity.z = Math_Rand_CenteredFloat(15.0f);
|
||||
dustPos.x = this->actor.posRot.pos.x + (dustVelocity.x + dustVelocity.x);
|
||||
dustPos.y = this->actor.posRot.pos.y + 7.0f;
|
||||
dustPos.z = this->actor.posRot.pos.z + (dustVelocity.z + dustVelocity.z);
|
||||
func_8002836C(globalCtx, &dustPos, &dustVelocity, &dustAccel, &dustPrim, &dustEnv,
|
||||
(s16)Math_Rand_ZeroFloat(50.0f) + 200, 40, 15);
|
||||
}
|
||||
|
||||
func_8002F974(&this->actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG);
|
||||
|
@ -336,11 +323,11 @@ void func_80A4ED34(EnGs* this, GlobalContext* globalCtx) {
|
|||
if (this->unk_19F == 4) {
|
||||
func_8002E4B4(globalCtx, &this->actor, 20.0f, 20.0f, 60.0f, 3);
|
||||
if (this->actor.bgCheckFlags & 0x18) {
|
||||
sp68.x = this->actor.posRot.pos.x;
|
||||
sp68.y = this->actor.posRot.pos.y;
|
||||
sp68.z = this->actor.posRot.pos.z;
|
||||
bomb2Pos.x = this->actor.posRot.pos.x;
|
||||
bomb2Pos.y = this->actor.posRot.pos.y;
|
||||
bomb2Pos.z = this->actor.posRot.pos.z;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_IT_BOMB_EXPLOSION);
|
||||
func_80028E84(globalCtx, &sp68, &D_80A4FE1C, &D_80A4FE28, 0x64, 0x14);
|
||||
EffectSsBomb2_SpawnLayered(globalCtx, &bomb2Pos, &bomb2Velocity, &bomb2Accel, 100, 20);
|
||||
this->unk_200 = 10;
|
||||
this->unk_19E |= 8;
|
||||
this->actionFunc = func_80A4F700;
|
||||
|
@ -460,6 +447,7 @@ void func_80A4F13C(EnGs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
#else
|
||||
void func_80A4F13C(EnGs* this, GlobalContext* globalCtx);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Gs/func_80A4F13C.s")
|
||||
#endif
|
||||
|
||||
|
@ -476,6 +464,8 @@ void func_80A4F734(EnGs* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A4F77C(EnGs* this) {
|
||||
static Vec3s D_80A4FE34 = { 0, 0, 0 };
|
||||
static Vec3f D_80A4FE3C = { 1.0f, 1.0f, 1.0f };
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
|
@ -565,8 +555,8 @@ void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
gSPDisplayList(gfxCtx->polyOpa.p++, D_06000950);
|
||||
|
||||
if (this->unk_19E & 4) {
|
||||
gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, this->unk_1E4.r, this->unk_1E4.g, this->unk_1E4.b,
|
||||
this->unk_1E4.a);
|
||||
gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, this->flashColor.r, this->flashColor.g, this->flashColor.b,
|
||||
this->flashColor.a);
|
||||
} else {
|
||||
gDPSetPrimColor(gfxCtx->polyOpa.p++, 0, 0, 255, 255, 255, 255);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ typedef struct EnGs {
|
|||
/* 0x01B4 */ Vec3f unk_1B4[2];
|
||||
/* 0x01CC */ char unk_1CC[0xC];
|
||||
/* 0x01D8 */ Vec3f unk_1D8;
|
||||
/* 0x01E4 */ Color_RGBA8 unk_1E4;
|
||||
/* 0x01E4 */ Color_RGBA8 flashColor;
|
||||
/* 0x01E8 */ f32 unk_1E8;
|
||||
/* 0x01EC */ f32 unk_1EC;
|
||||
/* 0x01F0 */ f32 unk_1F0;
|
||||
|
|
|
@ -70,35 +70,35 @@ void func_80AF03F4(EnRu1* this, GlobalContext* globalCtx);
|
|||
void func_80AF0400(EnRu1* this, GlobalContext* globalCtx);
|
||||
void func_80AF05D4(EnRu1* this, GlobalContext* globalCtx);
|
||||
|
||||
ColliderCylinderInit_Set3 sCylinderInit1 = {
|
||||
static ColliderCylinderInit_Set3 sCylinderInit1 = {
|
||||
{ COLTYPE_UNK0, 0x00, 0x00, 0x09, COLSHAPE_CYLINDER },
|
||||
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000000, 0x00, 0x00 }, 0x00, 0x00, 0x01 },
|
||||
{ 25, 80, 0, { 0 } },
|
||||
};
|
||||
|
||||
ColliderCylinderInit_Set3 sCylinderInit2 = {
|
||||
static ColliderCylinderInit_Set3 sCylinderInit2 = {
|
||||
{ COLTYPE_UNK0, 0x09, 0x00, 0x09, COLSHAPE_CYLINDER },
|
||||
{ 0x00, { 0x00000101, 0x00, 0x00 }, { 0x00000000, 0x00, 0x00 }, 0x01, 0x00, 0x01 },
|
||||
{ 20, 30, 0, { 0 } },
|
||||
};
|
||||
|
||||
UNK_PTR D_80AF0858[] = {
|
||||
static UNK_PTR D_80AF0858[] = {
|
||||
0x0600E3B8, 0x0600F238, 0x0600F638, 0x0600FE38, 0x06010238, 0x06010A38,
|
||||
};
|
||||
|
||||
UNK_PTR D_80AF0870[] = {
|
||||
static UNK_PTR D_80AF0870[] = {
|
||||
0x0600E838,
|
||||
0x0600FA38,
|
||||
0x06010638,
|
||||
};
|
||||
|
||||
s32 sUnused = 0;
|
||||
static s32 sUnused = 0;
|
||||
|
||||
#include "z_en_ru1_cutscene_data.c" EARLY
|
||||
|
||||
u32 D_80AF1938 = 0;
|
||||
static u32 D_80AF1938 = 0;
|
||||
|
||||
EnRu1ActionFunc sActionFuncs[] = {
|
||||
static EnRu1ActionFunc sActionFuncs[] = {
|
||||
func_80AEC0B4, func_80AEC100, func_80AEC130, func_80AEC17C, func_80AEC1D4, func_80AEC244, func_80AEC2C0,
|
||||
func_80AECA94, func_80AECAB4, func_80AECAD4, func_80AECB18, func_80AECB60, func_80AECBB8, func_80AECC1C,
|
||||
func_80AECC84, func_80AED304, func_80AED324, func_80AED344, func_80AED374, func_80AED3A4, func_80AED3E0,
|
||||
|
@ -108,13 +108,13 @@ EnRu1ActionFunc sActionFuncs[] = {
|
|||
func_80AEFBC8, func_80AEFC24, func_80AEFECC, func_80AEFF40,
|
||||
};
|
||||
|
||||
EnRu1PreLimbDrawFunc sPreLimbDrawFuncs[] = {
|
||||
static EnRu1PreLimbDrawFunc sPreLimbDrawFuncs[] = {
|
||||
func_80AF0278,
|
||||
};
|
||||
|
||||
Vec3f sMultVec = { 0.0f, 10.0f, 0.0f };
|
||||
static Vec3f sMultVec = { 0.0f, 10.0f, 0.0f };
|
||||
|
||||
EnRu1DrawFunc sDrawFuncs[] = {
|
||||
static EnRu1DrawFunc sDrawFuncs[] = {
|
||||
func_80AF03F4,
|
||||
func_80AF0400,
|
||||
func_80AF05D4,
|
||||
|
|
|
@ -1,40 +1,95 @@
|
|||
/*
|
||||
* File: z_eff_ss_blast.c
|
||||
* Overlay: ovl_Effect_Ss_Blast
|
||||
* Description:
|
||||
* Description: Shockwave Effect
|
||||
*/
|
||||
|
||||
#include "z_eff_ss_blast.h"
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ SS_BLAST_0,
|
||||
/* 0x01 */ SS_BLAST_1,
|
||||
/* 0x02 */ SS_BLAST_2,
|
||||
/* 0x03 */ SS_BLAST_3,
|
||||
/* 0x04 */ SS_BLAST_4,
|
||||
/* 0x05 */ SS_BLAST_5,
|
||||
/* 0x06 */ SS_BLAST_6,
|
||||
/* 0x07 */ SS_BLAST_7,
|
||||
/* 0x08 */ SS_BLAST_8,
|
||||
/* 0x09 */ SS_BLAST_9,
|
||||
/* 0x0A */ SS_BLAST_A,
|
||||
/* 0x0B */ SS_BLAST_B,
|
||||
/* 0x0C */ SS_BLAST_C,
|
||||
/* 0x00 */ SS_BLAST_ENV_R,
|
||||
/* 0x01 */ SS_BLAST_ENV_G,
|
||||
/* 0x02 */ SS_BLAST_ENV_B,
|
||||
/* 0x03 */ SS_BLAST_ENV_A,
|
||||
/* 0x04 */ SS_BLAST_PRIM_R,
|
||||
/* 0x05 */ SS_BLAST_PRIM_G,
|
||||
/* 0x06 */ SS_BLAST_PRIM_B,
|
||||
/* 0x07 */ SS_BLAST_PRIM_A,
|
||||
/* 0x08 */ SS_BLAST_ALPHA_STEP,
|
||||
/* 0x09 */ SS_BLAST_RADIUS,
|
||||
/* 0x0A */ SS_BLAST_RADIUS_STEP,
|
||||
/* 0x0B */ SS_BLAST_RADIUS_STEP_DECR,
|
||||
} EffectSsBlastRegs;
|
||||
|
||||
u32 EffectSsBlast_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx);
|
||||
void EffectSsBlast_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
void EffectSsBlast_Update(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
void EffectSsBlast_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
|
||||
/*
|
||||
EffectSsInit Effect_Ss_Blast_InitVars = {
|
||||
EFFECT_SS_BLAST,
|
||||
EffectSsBlast_Init,
|
||||
};
|
||||
*/
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_Blast/EffectSsBlast_Init.s")
|
||||
extern Gfx D_0401A0B0[];
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_Blast/func_8099EF08.s")
|
||||
u32 EffectSsBlast_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
|
||||
EffectSsBlastParams* initParams = (EffectSsBlastParams*)initParamsx;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_Blast/func_8099F0AC.s")
|
||||
this->pos = initParams->pos;
|
||||
this->pos.y += 5.0f;
|
||||
this->velocity = initParams->velocity;
|
||||
this->accel = initParams->accel;
|
||||
this->displayList = SEGMENTED_TO_VIRTUAL(D_0401A0B0);
|
||||
this->life = initParams->life;
|
||||
this->draw = EffectSsBlast_Draw;
|
||||
this->update = EffectSsBlast_Update;
|
||||
this->regs[SS_BLAST_ENV_R] = initParams->envColor.r;
|
||||
this->regs[SS_BLAST_ENV_G] = initParams->envColor.g;
|
||||
this->regs[SS_BLAST_ENV_B] = initParams->envColor.b;
|
||||
this->regs[SS_BLAST_ENV_A] = initParams->envColor.a;
|
||||
this->regs[SS_BLAST_PRIM_R] = initParams->primColor.r;
|
||||
this->regs[SS_BLAST_PRIM_G] = initParams->primColor.g;
|
||||
this->regs[SS_BLAST_PRIM_B] = initParams->primColor.b;
|
||||
this->regs[SS_BLAST_PRIM_A] = initParams->primColor.a;
|
||||
this->regs[SS_BLAST_ALPHA_STEP] = initParams->envColor.a / initParams->life;
|
||||
this->regs[SS_BLAST_RADIUS] = initParams->radius;
|
||||
this->regs[SS_BLAST_RADIUS_STEP] = initParams->radiusStep;
|
||||
this->regs[SS_BLAST_RADIUS_STEP_DECR] = initParams->radiusStepDecr;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void EffectSsBlast_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
s32 pad;
|
||||
MtxF mtx;
|
||||
s32 pad1;
|
||||
f32 scale;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
Graph_OpenDisps(&dispRefs, gfxCtx, "../z_eff_ss_blast.c", 170);
|
||||
|
||||
scale = this->regs[SS_BLAST_RADIUS] * 0.0025f;
|
||||
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
gDPSetEnvColor(gfxCtx->polyXlu.p++, this->regs[SS_BLAST_PRIM_R], this->regs[SS_BLAST_PRIM_G],
|
||||
this->regs[SS_BLAST_PRIM_B], this->regs[SS_BLAST_PRIM_A]);
|
||||
func_800BFCB8(globalCtx, &mtx, &this->pos);
|
||||
gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, this->regs[SS_BLAST_ENV_R], this->regs[SS_BLAST_ENV_G],
|
||||
this->regs[SS_BLAST_ENV_B], this->regs[SS_BLAST_ENV_A]);
|
||||
Matrix_Put(&mtx);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_blast.c", 199),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, this->displayList);
|
||||
Graph_CloseDisps(&dispRefs, gfxCtx, "../z_eff_ss_blast.c", 204);
|
||||
}
|
||||
|
||||
void EffectSsBlast_Update(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
Math_ApproxS(&this->regs[SS_BLAST_ENV_A], 0, this->regs[SS_BLAST_ALPHA_STEP]);
|
||||
this->regs[SS_BLAST_RADIUS] += this->regs[SS_BLAST_RADIUS_STEP];
|
||||
|
||||
if (this->regs[SS_BLAST_RADIUS_STEP] != 0) {
|
||||
this->regs[SS_BLAST_RADIUS_STEP] -= this->regs[SS_BLAST_RADIUS_STEP_DECR];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,12 @@ typedef struct {
|
|||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ Vec3f velocity;
|
||||
/* 0x18 */ Vec3f accel;
|
||||
} EffectSsBlastInitParams; // size = 0x
|
||||
/* 0x24 */ Color_RGBA8 envColor;
|
||||
/* 0x28 */ Color_RGBA8 primColor;
|
||||
/* 0x2C */ s16 radius;
|
||||
/* 0x2E */ s16 radiusStep;
|
||||
/* 0x30 */ s16 radiusStepDecr;
|
||||
/* 0x32 */ s16 life;
|
||||
} EffectSsBlastParams; // size = 0x34
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,40 +1,102 @@
|
|||
/*
|
||||
* File: z_eff_ss_bomb.c
|
||||
* Overlay: ovl_Effect_Ss_Bomb
|
||||
* Description:
|
||||
* Description: Bomb Blast. Unused in the orignal game.
|
||||
*/
|
||||
|
||||
#include "z_eff_ss_bomb.h"
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ SS_BOMB_0,
|
||||
/* 0x01 */ SS_BOMB_1,
|
||||
/* 0x02 */ SS_BOMB_2,
|
||||
/* 0x03 */ SS_BOMB_3,
|
||||
/* 0x04 */ SS_BOMB_4,
|
||||
/* 0x05 */ SS_BOMB_5,
|
||||
/* 0x06 */ SS_BOMB_6,
|
||||
/* 0x07 */ SS_BOMB_7,
|
||||
/* 0x08 */ SS_BOMB_8,
|
||||
/* 0x09 */ SS_BOMB_9,
|
||||
/* 0x0A */ SS_BOMB_A,
|
||||
/* 0x0B */ SS_BOMB_B,
|
||||
/* 0x0C */ SS_BOMB_C,
|
||||
/* 0x00 */ SS_BOMB_SCALE,
|
||||
/* 0x01 */ SS_BOMB_TEX_IDX,
|
||||
} EffectSsBombRegs;
|
||||
|
||||
u32 EffectSsBomb_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx);
|
||||
void EffectSsBomb_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
void EffectSsBomb_Update(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
|
||||
/*
|
||||
EffectSsInit Effect_Ss_Bomb_InitVars = {
|
||||
EFFECT_SS_BOMB,
|
||||
EffectSsBomb_Init,
|
||||
};
|
||||
*/
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_Bomb/EffectSsBomb_Init.s")
|
||||
static UNK_PTR D_8099F588[] = {
|
||||
0x04007F80,
|
||||
0x04008780,
|
||||
0x04008F80,
|
||||
0x04009780,
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_Bomb/func_8099F274.s")
|
||||
extern Gfx D_0400BF80[];
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_Bomb/func_8099F4D8.s")
|
||||
u32 EffectSsBomb_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
|
||||
EffectSsBombInitParams* initParams = (EffectSsBombInitParams*)initParamsx;
|
||||
|
||||
Math_Vec3f_Copy(&this->pos, &initParams->pos);
|
||||
Math_Vec3f_Copy(&this->velocity, &initParams->velocity);
|
||||
Math_Vec3f_Copy(&this->accel, &initParams->accel);
|
||||
this->displayList = SEGMENTED_TO_VIRTUAL(D_0400BF80);
|
||||
this->life = 20;
|
||||
this->draw = EffectSsBomb_Draw;
|
||||
this->update = EffectSsBomb_Update;
|
||||
this->regs[SS_BOMB_SCALE] = 100;
|
||||
this->regs[SS_BOMB_TEX_IDX] = 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void EffectSsBomb_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
s32 pad;
|
||||
MtxF sp12C;
|
||||
MtxF spEC;
|
||||
MtxF spAC;
|
||||
MtxF sp6C;
|
||||
Mtx* mtx;
|
||||
s32 pad2;
|
||||
f32 scale;
|
||||
s16 color;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
if (1) {}
|
||||
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
Graph_OpenDisps(&dispRefs, gfxCtx, "../z_eff_ss_bomb.c", 168);
|
||||
|
||||
scale = this->regs[SS_BOMB_SCALE] / 100.0f;
|
||||
|
||||
func_800A7A24(&sp12C, this->pos.x, this->pos.y, this->pos.z);
|
||||
func_800A76A4(&spEC, scale, scale, 1.0f);
|
||||
func_800A6FA0(&sp12C, &globalCtx->mf_11DA0, &sp6C);
|
||||
func_800A6FA0(&sp6C, &spEC, &spAC);
|
||||
|
||||
gSPMatrix(gfxCtx->polyXlu.p++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
mtx = func_800A7E70(gfxCtx, &spAC);
|
||||
|
||||
if (mtx != NULL) {
|
||||
gSPMatrix(gfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8099F588[this->regs[SS_BOMB_TEX_IDX]]));
|
||||
gDPPipeSync(gfxCtx->polyXlu.p++);
|
||||
func_80094C50(gfxCtx);
|
||||
color = this->life * 12.75f;
|
||||
gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, color, color, color, color);
|
||||
gDPPipeSync(gfxCtx->polyXlu.p++);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, this->displayList);
|
||||
gDPPipeSync(gfxCtx->polyXlu.p++);
|
||||
}
|
||||
|
||||
Graph_CloseDisps(&dispRefs, gfxCtx, "../z_eff_ss_bomb.c", 214);
|
||||
}
|
||||
|
||||
void EffectSsBomb_Update(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
if ((this->life < 21) && (this->life >= 17)) {
|
||||
this->regs[SS_BOMB_TEX_IDX] = (20 - this->life);
|
||||
} else {
|
||||
this->regs[SS_BOMB_SCALE] += 0;
|
||||
this->regs[SS_BOMB_TEX_IDX] = 3;
|
||||
}
|
||||
|
||||
this->accel.x = ((Math_Rand_ZeroOne() * 0.4f) - 0.2f);
|
||||
this->accel.z = ((Math_Rand_ZeroOne() * 0.4f) - 0.2f);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@ typedef struct {
|
|||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ Vec3f velocity;
|
||||
/* 0x18 */ Vec3f accel;
|
||||
} EffectSsBombInitParams; // size = 0x
|
||||
} EffectSsBombInitParams; // size = 0x24
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,42 +1,207 @@
|
|||
/*
|
||||
* File: z_eff_ss_bomb2.c
|
||||
* Overlay: ovl_Effect_Ss_Bomb2
|
||||
* Description:
|
||||
* Description: Bomb Blast
|
||||
*/
|
||||
|
||||
#include "z_eff_ss_bomb2.h"
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ SS_BOMB2_0,
|
||||
/* 0x01 */ SS_BOMB2_1,
|
||||
/* 0x02 */ SS_BOMB2_2,
|
||||
/* 0x03 */ SS_BOMB2_3,
|
||||
/* 0x04 */ SS_BOMB2_4,
|
||||
/* 0x05 */ SS_BOMB2_5,
|
||||
/* 0x06 */ SS_BOMB2_6,
|
||||
/* 0x07 */ SS_BOMB2_7,
|
||||
/* 0x08 */ SS_BOMB2_8,
|
||||
/* 0x09 */ SS_BOMB2_9,
|
||||
/* 0x0A */ SS_BOMB2_A,
|
||||
/* 0x0B */ SS_BOMB2_B,
|
||||
/* 0x0C */ SS_BOMB2_C,
|
||||
/* 0x00 */ SS_BOMB2_SCALE,
|
||||
/* 0x01 */ SS_BOMB2_TEX_IDX,
|
||||
/* 0x02 */ SS_BOMB2_PRIM_R,
|
||||
/* 0x03 */ SS_BOMB2_PRIM_G,
|
||||
/* 0x04 */ SS_BOMB2_PRIM_B,
|
||||
/* 0x05 */ SS_BOMB2_PRIM_A,
|
||||
/* 0x06 */ SS_BOMB2_ENV_R,
|
||||
/* 0x07 */ SS_BOMB2_ENV_G,
|
||||
/* 0x08 */ SS_BOMB2_ENV_B,
|
||||
/* 0x09 */ SS_BOMB2_SCALE_STEP,
|
||||
/* 0x0A */ SS_BOMB2_A
|
||||
} EffectSsBomb2Regs;
|
||||
|
||||
u32 EffectSsBomb2_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx);
|
||||
void EffectSsBomb2_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
void EffectSsBomb2_DrawFade(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
void EffectSsBomb2_Update(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
|
||||
/*
|
||||
EffectSsInit Effect_Ss_Bomb2_InitVars = {
|
||||
EFFECT_SS_BOMB2,
|
||||
EffectSsBomb2_Init,
|
||||
};
|
||||
*/
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_Bomb2/EffectSsBomb2_Init.s")
|
||||
static void* sDrawFuncs[] = {
|
||||
EffectSsBomb2_DrawFade,
|
||||
EffectSsBomb2_DrawLayered,
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_Bomb2/func_8099F748.s")
|
||||
static UNK_PTR D_8099FEE0[] = {
|
||||
0x04007F80, 0x04008780, 0x04008F80, 0x04009780, 0x04009F80, 0x0400A780, 0x0400AF80, 0x0400B780,
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_Bomb2/func_8099F960.s")
|
||||
static UNK_PTR D_8099FF00[] = {
|
||||
0x04007F80, 0x04008780, 0x04008F80, 0x04009780, 0x04009F80, 0x0400A780, 0x0400AF80, 0x0400B780,
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_Bomb2/func_8099FCCC.s")
|
||||
extern Gfx D_0400BF80[];
|
||||
extern Gfx D_0400BFE8[];
|
||||
extern Gfx D_0400C040[];
|
||||
|
||||
u32 EffectSsBomb2_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
|
||||
EffectSsBomb2InitParams* initParams = (EffectSsBomb2InitParams*)initParamsx;
|
||||
|
||||
Math_Vec3f_Copy(&this->pos, &initParams->pos);
|
||||
Math_Vec3f_Copy(&this->velocity, &initParams->velocity);
|
||||
Math_Vec3f_Copy(&this->accel, &initParams->accel);
|
||||
this->displayList = SEGMENTED_TO_VIRTUAL(&D_0400BF80);
|
||||
this->life = 24;
|
||||
this->update = EffectSsBomb2_Update;
|
||||
this->draw = sDrawFuncs[initParams->drawMode];
|
||||
this->regs[SS_BOMB2_SCALE] = initParams->scale;
|
||||
this->regs[SS_BOMB2_SCALE_STEP] = initParams->scaleStep;
|
||||
this->regs[SS_BOMB2_PRIM_R] = 255;
|
||||
this->regs[SS_BOMB2_PRIM_G] = 255;
|
||||
this->regs[SS_BOMB2_PRIM_B] = 255;
|
||||
this->regs[SS_BOMB2_PRIM_A] = 255;
|
||||
this->regs[SS_BOMB2_ENV_R] = 0;
|
||||
this->regs[SS_BOMB2_ENV_G] = 0;
|
||||
this->regs[SS_BOMB2_ENV_B] = 200;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// unused in the original game. looks like EffectSsBomb but with color
|
||||
void EffectSsBomb2_DrawFade(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
s32 pad;
|
||||
MtxF sp11C;
|
||||
MtxF spDC;
|
||||
MtxF sp9C;
|
||||
MtxF sp5C;
|
||||
Mtx* mtx;
|
||||
s32 pad2;
|
||||
f32 scale;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
Graph_OpenDisps(&dispRefs, gfxCtx, "../z_eff_ss_bomb2.c", 298);
|
||||
|
||||
scale = this->regs[SS_BOMB2_SCALE] * 0.01f;
|
||||
func_800A7A24(&sp11C, this->pos.x, this->pos.y, this->pos.z);
|
||||
func_800A76A4(&spDC, scale, scale, 1.0f);
|
||||
func_800A6FA0(&sp11C, &globalCtx->mf_11DA0, &sp5C);
|
||||
|
||||
func_800A6FA0(&sp5C, &spDC, &sp9C);
|
||||
mtx = func_800A7E70(gfxCtx, &sp9C);
|
||||
|
||||
if (mtx != NULL) {
|
||||
gSPMatrix(gfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
func_80094BC4(gfxCtx);
|
||||
gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, this->regs[SS_BOMB2_PRIM_R], this->regs[SS_BOMB2_PRIM_G],
|
||||
this->regs[SS_BOMB2_PRIM_B], this->regs[SS_BOMB2_PRIM_A]);
|
||||
gDPSetEnvColor(gfxCtx->polyXlu.p++, this->regs[SS_BOMB2_ENV_R], this->regs[SS_BOMB2_ENV_G],
|
||||
this->regs[SS_BOMB2_ENV_B], 0);
|
||||
gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8099FEE0[this->regs[SS_BOMB2_TEX_IDX]]));
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, this->displayList);
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
}
|
||||
|
||||
Graph_CloseDisps(&dispRefs, gfxCtx, "../z_eff_ss_bomb2.c", 345);
|
||||
}
|
||||
|
||||
void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
s32 pad1;
|
||||
MtxF sp1B4;
|
||||
MtxF sp174;
|
||||
MtxF sp134;
|
||||
MtxF spF4;
|
||||
MtxF spB4;
|
||||
Mtx* mtx2;
|
||||
Mtx* mtx;
|
||||
s32 pad;
|
||||
s32 pad2;
|
||||
s32 pad3;
|
||||
f32 scale;
|
||||
f32 temp_f24;
|
||||
f32 mtxScale = 0.925f;
|
||||
s32 i;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
Graph_OpenDisps(&dispRefs, gfxCtx, "../z_eff_ss_bomb2.c", 386);
|
||||
|
||||
temp_f24 = this->regs[SS_BOMB2_A];
|
||||
scale = this->regs[SS_BOMB2_SCALE] * 0.01f;
|
||||
func_800A7A24(&sp1B4, this->pos.x, this->pos.y, this->pos.z);
|
||||
func_800A76A4(&sp174, scale, scale, 1.0f);
|
||||
func_800A6FA0(&sp1B4, &globalCtx->mf_11DA0, &spF4);
|
||||
func_800A6FA0(&spF4, &sp174, &sp134);
|
||||
mtx = func_800A7E70(gfxCtx, &sp134);
|
||||
|
||||
if (mtx != NULL) {
|
||||
gSPMatrix(gfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
mtx2 = func_800A7E70(gfxCtx, &sp134);
|
||||
|
||||
if (mtx2 != NULL) {
|
||||
func_80094BC4(gfxCtx);
|
||||
gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, this->regs[SS_BOMB2_PRIM_R], this->regs[SS_BOMB2_PRIM_G],
|
||||
this->regs[SS_BOMB2_PRIM_B], this->regs[SS_BOMB2_PRIM_A]);
|
||||
gDPSetEnvColor(gfxCtx->polyXlu.p++, this->regs[SS_BOMB2_ENV_R], this->regs[SS_BOMB2_ENV_G],
|
||||
this->regs[SS_BOMB2_ENV_B], 0);
|
||||
gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_8099FF00[this->regs[SS_BOMB2_TEX_IDX]]));
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, D_0400BFE8);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, D_0400C040);
|
||||
|
||||
Matrix_MtxToMtxF(mtx2, &spB4);
|
||||
Matrix_Put(&spB4);
|
||||
for (i = 1; i >= 0; i--) {
|
||||
Matrix_Translate(0.0f, 0.0f, temp_f24, MTXMODE_APPLY);
|
||||
Matrix_RotateZ((this->life * 0.02f) + 180.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
|
||||
gSPMatrix(gfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_ss_bomb2.c", 448),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, D_0400C040);
|
||||
mtxScale -= 0.15f;
|
||||
}
|
||||
}
|
||||
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
}
|
||||
Graph_CloseDisps(&dispRefs, gfxCtx, "../z_eff_ss_bomb2.c", 456);
|
||||
}
|
||||
|
||||
void EffectSsBomb2_Update(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
s32 divisor;
|
||||
|
||||
this->regs[SS_BOMB2_TEX_IDX] = (23 - this->life) / 3;
|
||||
this->regs[SS_BOMB2_SCALE] += this->regs[SS_BOMB2_SCALE_STEP];
|
||||
|
||||
if (this->regs[SS_BOMB2_SCALE_STEP] == 30) {
|
||||
this->regs[SS_BOMB2_A] += 4.0f;
|
||||
} else {
|
||||
this->regs[SS_BOMB2_A] += 2.0f;
|
||||
}
|
||||
|
||||
if ((this->life < 23) && (this->life >= 14)) {
|
||||
divisor = this->life - 13;
|
||||
this->regs[SS_BOMB2_PRIM_R] = func_80027DD4(this->regs[SS_BOMB2_PRIM_R], 255, divisor);
|
||||
this->regs[SS_BOMB2_PRIM_G] = func_80027DD4(this->regs[SS_BOMB2_PRIM_G], 255, divisor);
|
||||
this->regs[SS_BOMB2_PRIM_B] = func_80027DD4(this->regs[SS_BOMB2_PRIM_B], 150, divisor);
|
||||
this->regs[SS_BOMB2_PRIM_A] = func_80027DD4(this->regs[SS_BOMB2_PRIM_A], 255, divisor);
|
||||
this->regs[SS_BOMB2_ENV_R] = func_80027DD4(this->regs[SS_BOMB2_ENV_R], 150, divisor);
|
||||
this->regs[SS_BOMB2_ENV_G] = func_80027DD4(this->regs[SS_BOMB2_ENV_G], 0, divisor);
|
||||
this->regs[SS_BOMB2_ENV_B] = func_80027DD4(this->regs[SS_BOMB2_ENV_B], 0, divisor);
|
||||
} else if ((this->life < 14) && (this->life >= 0)) {
|
||||
divisor = this->life + 1;
|
||||
this->regs[SS_BOMB2_PRIM_R] = func_80027DD4(this->regs[SS_BOMB2_PRIM_R], 50, divisor);
|
||||
this->regs[SS_BOMB2_PRIM_G] = func_80027DD4(this->regs[SS_BOMB2_PRIM_G], 50, divisor);
|
||||
this->regs[SS_BOMB2_PRIM_B] = func_80027DD4(this->regs[SS_BOMB2_PRIM_B], 50, divisor);
|
||||
this->regs[SS_BOMB2_PRIM_A] = func_80027DD4(this->regs[SS_BOMB2_PRIM_A], 150, divisor);
|
||||
this->regs[SS_BOMB2_ENV_R] = func_80027DD4(this->regs[SS_BOMB2_ENV_R], 10, divisor);
|
||||
this->regs[SS_BOMB2_ENV_G] = func_80027DD4(this->regs[SS_BOMB2_ENV_G], 10, divisor);
|
||||
this->regs[SS_BOMB2_ENV_B] = func_80027DD4(this->regs[SS_BOMB2_ENV_B], 10, divisor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,9 @@ typedef struct {
|
|||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ Vec3f velocity;
|
||||
/* 0x18 */ Vec3f accel;
|
||||
} EffectSsBomb2InitParams; // size = 0x
|
||||
/* 0x24 */ s16 scale;
|
||||
/* 0x26 */ s16 scaleStep;
|
||||
/* 0x28 */ u8 drawMode;
|
||||
} EffectSsBomb2InitParams; // size = 0x30
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,38 +1,55 @@
|
|||
/*
|
||||
* File: z_eff_ss_dead_sound.c
|
||||
* Overlay: ovl_Effect_Ss_Dead_Sound
|
||||
* Description:
|
||||
* Description: Plays a sound effect.
|
||||
*
|
||||
* If repeat mode is on, the sound is replayed every update for the duration of life.
|
||||
* Repeat mode is unused in the original game.
|
||||
*/
|
||||
|
||||
#include "z_eff_ss_dead_sound.h"
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ SS_DEAD_SOUND_0,
|
||||
/* 0x01 */ SS_DEAD_SOUND_1,
|
||||
/* 0x02 */ SS_DEAD_SOUND_2,
|
||||
/* 0x03 */ SS_DEAD_SOUND_3,
|
||||
/* 0x04 */ SS_DEAD_SOUND_4,
|
||||
/* 0x05 */ SS_DEAD_SOUND_5,
|
||||
/* 0x06 */ SS_DEAD_SOUND_6,
|
||||
/* 0x07 */ SS_DEAD_SOUND_7,
|
||||
/* 0x08 */ SS_DEAD_SOUND_8,
|
||||
/* 0x09 */ SS_DEAD_SOUND_9,
|
||||
/* 0x0A */ SS_DEAD_SOUND_A,
|
||||
/* 0x0B */ SS_DEAD_SOUND_B,
|
||||
/* 0x0C */ SS_DEAD_SOUND_C,
|
||||
} EffectSsDead_SoundRegs;
|
||||
/* 0x0A */ SS_DEADSOUND_SFX_ID = 10,
|
||||
/* 0x0B */ SS_DEADSOUND_REPEAT_MODE,
|
||||
} EffectSsDeadSoundRegs;
|
||||
|
||||
#define REPEAT_MODE_OFF 1
|
||||
#define REPEAT_MODE_ON 2
|
||||
|
||||
u32 EffectSsDeadSound_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx);
|
||||
void EffectSsDeadSound_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
void EffectSsDeadSound_Update(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
|
||||
/*
|
||||
EffectSsInit Effect_Ss_Dead_Sound_InitVars = {
|
||||
EFFECT_SS_DEAD_SOUND,
|
||||
EffectSsDeadSound_Init,
|
||||
};
|
||||
*/
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_Dead_Sound/EffectSsDeadSound_Init.s")
|
||||
u32 EffectSsDeadSound_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
|
||||
EffectSsDeadSoundInitParams* initParams = (EffectSsDeadSoundInitParams*)initParamsx;
|
||||
this->pos = initParams->pos;
|
||||
this->velocity = initParams->velocity;
|
||||
this->accel = initParams->accel;
|
||||
this->flags = 2;
|
||||
this->life = initParams->life;
|
||||
this->draw = NULL;
|
||||
this->update = EffectSsDeadSound_Update;
|
||||
this->regs[SS_DEADSOUND_REPEAT_MODE] = initParams->repeatMode;
|
||||
this->regs[SS_DEADSOUND_SFX_ID] = initParams->sfxId;
|
||||
// "constructor 3"
|
||||
osSyncPrintf("コンストラクター3\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_Dead_Sound/func_809A1BD8.s")
|
||||
void EffectSsDeadSound_Update(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
switch (this->regs[SS_DEADSOUND_REPEAT_MODE]) {
|
||||
case REPEAT_MODE_OFF:
|
||||
this->regs[SS_DEADSOUND_REPEAT_MODE]--;
|
||||
break;
|
||||
case REPEAT_MODE_ON:
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
Audio_PlaySoundGeneral(this->regs[SS_DEADSOUND_SFX_ID], &this->pos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,11 @@ typedef struct {
|
|||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ Vec3f velocity;
|
||||
/* 0x18 */ Vec3f accel;
|
||||
} EffectSsDeadSoundInitParams; // size = 0x
|
||||
/* 0x24 */ u16 sfxId;
|
||||
/* 0x26 */ s16 lowerPriority;
|
||||
/* 0x28 */ s16 repeatMode;
|
||||
/* 0x26 */ s16 unused2;
|
||||
/* 0x2C */ s32 life;
|
||||
} EffectSsDeadSoundInitParams; // size = 0x30
|
||||
|
||||
#endif
|
||||
|
|
|
@ -34,9 +34,8 @@ EffectSsInit Effect_Ss_Dust_InitVars = {
|
|||
|
||||
static void* sUpdateFuncs[] = { EffectSsDust_Update, EffectSsBlast_UpdateFire };
|
||||
|
||||
UNK_PTR D_809A2A50[] = {
|
||||
0x04051DB0, 0x040521B0, 0x040525B0, 0x040529B0, 0x04052DB0, 0x040531B0, 0x040535B0, 0x040539B0
|
||||
};
|
||||
static UNK_PTR D_809A2A50[] = { 0x04051DB0, 0x040521B0, 0x040525B0, 0x040529B0,
|
||||
0x04052DB0, 0x040531B0, 0x040535B0, 0x040539B0 };
|
||||
|
||||
extern Gfx D_04010050[];
|
||||
|
||||
|
@ -47,7 +46,7 @@ u32 EffectSsDust_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void*
|
|||
Math_Vec3f_Copy(&this->pos, &initParams->pos);
|
||||
Math_Vec3f_Copy(&this->velocity, &initParams->velocity);
|
||||
Math_Vec3f_Copy(&this->accel, &initParams->accel);
|
||||
this->unk_38 = SEGMENTED_TO_VIRTUAL(&D_04010050);
|
||||
this->displayList = SEGMENTED_TO_VIRTUAL(&D_04010050);
|
||||
this->life = initParams->life;
|
||||
this->update = sUpdateFuncs[initParams->updateMode];
|
||||
this->draw = EffectSsDust_Draw;
|
||||
|
@ -129,7 +128,7 @@ void EffectSsDust_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
|||
this->regs[SS_DUST_PRIM_B], 255);
|
||||
gDPSetEnvColor(gfxCtx->polyXlu.p++, this->regs[SS_DUST_ENV_R], this->regs[SS_DUST_ENV_G],
|
||||
this->regs[SS_DUST_ENV_B], this->regs[SS_DUST_ENV_A]);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, this->unk_38);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, this->displayList);
|
||||
}
|
||||
|
||||
Graph_CloseDisps(dispRefs, gfxCtx, "../z_eff_ss_dust.c", 389);
|
||||
|
|
|
@ -1,42 +1,155 @@
|
|||
/*
|
||||
* File: z_eff_ss_g_spk.c
|
||||
* Overlay: ovl_Effect_Ss_G_Spk
|
||||
* Description:
|
||||
* Description: Fuse Sparks
|
||||
*/
|
||||
|
||||
#include "z_eff_ss_g_spk.h"
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ SS_G_SPK_0,
|
||||
/* 0x01 */ SS_G_SPK_1,
|
||||
/* 0x02 */ SS_G_SPK_2,
|
||||
/* 0x03 */ SS_G_SPK_3,
|
||||
/* 0x04 */ SS_G_SPK_4,
|
||||
/* 0x05 */ SS_G_SPK_5,
|
||||
/* 0x06 */ SS_G_SPK_6,
|
||||
/* 0x07 */ SS_G_SPK_7,
|
||||
/* 0x08 */ SS_G_SPK_8,
|
||||
/* 0x09 */ SS_G_SPK_9,
|
||||
/* 0x0A */ SS_G_SPK_A,
|
||||
/* 0x0B */ SS_G_SPK_B,
|
||||
/* 0x0C */ SS_G_SPK_C,
|
||||
} EffectSsG_SpkRegs;
|
||||
/* 0x00 */ SS_G_SPK_PRIM_R,
|
||||
/* 0x01 */ SS_G_SPK_PRIM_G,
|
||||
/* 0x02 */ SS_G_SPK_PRIM_B,
|
||||
/* 0x03 */ SS_G_SPK_PRIM_A,
|
||||
/* 0x04 */ SS_G_SPK_ENV_R,
|
||||
/* 0x05 */ SS_G_SPK_ENV_G,
|
||||
/* 0x06 */ SS_G_SPK_ENV_B,
|
||||
/* 0x07 */ SS_G_SPK_ENV_A,
|
||||
/* 0x08 */ SS_G_SPK_TEX_IDX,
|
||||
/* 0x09 */ SS_G_SPK_SCALE,
|
||||
/* 0x0A */ SS_G_SPK_SCALE_STEP,
|
||||
} EffectSsGSpkRegs;
|
||||
|
||||
#define SPARK_SOURCE ((Actor*)this->unk_3C)
|
||||
|
||||
u32 EffectSsGSpk_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx);
|
||||
void EffectSsGSpk_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
void EffectSsGSpk_Update(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
void EffectSsGSpk_UpdateNoAccel(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
void EffectSsGSpk_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
|
||||
/*
|
||||
EffectSsInit Effect_Ss_G_Spk_InitVars = {
|
||||
EFFECT_SS_G_SPK,
|
||||
EffectSsGSpk_Init,
|
||||
};
|
||||
*/
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_G_Spk/EffectSsGSpk_Init.s")
|
||||
static UNK_PTR D_809A7498[] = {
|
||||
0x04055FB0,
|
||||
0x040561B0,
|
||||
0x040563B0,
|
||||
0x040565B0,
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_G_Spk/func_809A70A0.s")
|
||||
extern Gfx D_04025550[];
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_G_Spk/func_809A72C0.s")
|
||||
u32 EffectSsGSpk_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
|
||||
EffectSsGSpkInitParams* initParams = (EffectSsGSpkInitParams*)initParamsx;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_G_Spk/func_809A73C8.s")
|
||||
Math_Vec3f_Copy(&this->pos, &initParams->pos);
|
||||
Math_Vec3f_Copy(&this->velocity, &initParams->velocity);
|
||||
Math_Vec3f_Copy(&this->accel, &initParams->accel);
|
||||
this->displayList = SEGMENTED_TO_VIRTUAL(&D_04025550);
|
||||
|
||||
if (initParams->updateMode == 0) {
|
||||
this->life = 10;
|
||||
this->unk_2C.x = initParams->pos.x - initParams->actor->posRot.pos.x;
|
||||
this->unk_2C.y = initParams->pos.y - initParams->actor->posRot.pos.y;
|
||||
this->unk_2C.z = initParams->pos.z - initParams->actor->posRot.pos.z;
|
||||
this->update = EffectSsGSpk_Update;
|
||||
} else {
|
||||
this->life = 5;
|
||||
this->update = EffectSsGSpk_UpdateNoAccel;
|
||||
}
|
||||
|
||||
this->draw = EffectSsGSpk_Draw;
|
||||
this->regs[SS_G_SPK_PRIM_R] = initParams->primColor.r;
|
||||
this->regs[SS_G_SPK_PRIM_G] = initParams->primColor.g;
|
||||
this->regs[SS_G_SPK_PRIM_B] = initParams->primColor.b;
|
||||
this->regs[SS_G_SPK_PRIM_A] = initParams->primColor.a;
|
||||
this->regs[SS_G_SPK_ENV_R] = initParams->envColor.r;
|
||||
this->regs[SS_G_SPK_ENV_G] = initParams->envColor.g;
|
||||
this->regs[SS_G_SPK_ENV_B] = initParams->envColor.b;
|
||||
this->regs[SS_G_SPK_ENV_A] = initParams->envColor.a;
|
||||
this->regs[SS_G_SPK_TEX_IDX] = 0;
|
||||
this->regs[SS_G_SPK_SCALE] = initParams->scale;
|
||||
this->regs[SS_G_SPK_SCALE_STEP] = initParams->scaleStep;
|
||||
this->unk_3C = initParams->actor;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void EffectSsGSpk_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
s32 pad;
|
||||
MtxF sp11C;
|
||||
MtxF spDC;
|
||||
MtxF sp9C;
|
||||
MtxF sp5C;
|
||||
Mtx* mtx;
|
||||
f32 scale;
|
||||
s32 pad1;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
Graph_OpenDisps(&dispRefs, gfxCtx, "../z_eff_ss_g_spk.c", 208);
|
||||
|
||||
scale = this->regs[SS_G_SPK_SCALE] * 0.0025f;
|
||||
|
||||
func_800A7A24(&sp11C, this->pos.x, this->pos.y, this->pos.z);
|
||||
func_800A76A4(&spDC, scale, scale, 1.0f);
|
||||
func_800A6FA0(&sp11C, &globalCtx->mf_11DA0, &sp5C);
|
||||
func_800A6FA0(&sp5C, &spDC, &sp9C);
|
||||
|
||||
mtx = func_800A7E70(gfxCtx, &sp9C);
|
||||
|
||||
if (mtx != NULL) {
|
||||
gSPMatrix(gfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_809A7498[this->regs[SS_G_SPK_TEX_IDX]]));
|
||||
|
||||
func_80094BC4(gfxCtx);
|
||||
gDPSetPrimColor(gfxCtx->polyXlu.p++, 0, 0, this->regs[SS_G_SPK_PRIM_R], this->regs[SS_G_SPK_PRIM_G],
|
||||
this->regs[SS_G_SPK_PRIM_B], 255);
|
||||
|
||||
gDPSetEnvColor(gfxCtx->polyXlu.p++, this->regs[SS_G_SPK_ENV_R], this->regs[SS_G_SPK_ENV_G],
|
||||
this->regs[SS_G_SPK_ENV_B], this->regs[SS_G_SPK_ENV_A]);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, this->displayList);
|
||||
}
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
Graph_CloseDisps(&dispRefs, gfxCtx, "../z_eff_ss_g_spk.c", 255);
|
||||
}
|
||||
|
||||
void EffectSsGSpk_Update(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
|
||||
this->accel.x = (Math_Rand_ZeroOne() - 0.5f) * 3.0f;
|
||||
this->accel.z = (Math_Rand_ZeroOne() - 0.5f) * 3.0f;
|
||||
|
||||
if (SPARK_SOURCE != NULL) {
|
||||
if ((SPARK_SOURCE->type == ACTORTYPE_EXPLOSIVES) && (SPARK_SOURCE->update != NULL)) {
|
||||
this->pos.x = SPARK_SOURCE->posRot.pos.x + this->unk_2C.x;
|
||||
this->pos.y = SPARK_SOURCE->posRot.pos.y + this->unk_2C.y;
|
||||
this->pos.z = SPARK_SOURCE->posRot.pos.z + this->unk_2C.z;
|
||||
}
|
||||
}
|
||||
|
||||
this->unk_2C.x += this->accel.x;
|
||||
this->unk_2C.z += this->accel.z;
|
||||
|
||||
this->regs[SS_G_SPK_TEX_IDX]++;
|
||||
this->regs[SS_G_SPK_TEX_IDX] &= 3;
|
||||
this->regs[SS_G_SPK_SCALE] += this->regs[SS_G_SPK_SCALE_STEP];
|
||||
}
|
||||
|
||||
// this update mode is unused in the original game
|
||||
// with this update mode, the sparks dont move randomly in the xz plane, appearing to be on top of each other
|
||||
void EffectSsGSpk_UpdateNoAccel(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
if (SPARK_SOURCE != NULL) {
|
||||
if ((SPARK_SOURCE->type == ACTORTYPE_EXPLOSIVES) && (SPARK_SOURCE->update != NULL)) {
|
||||
this->pos.x += (Math_Sins(SPARK_SOURCE->posRot.rot.y) * SPARK_SOURCE->speedXZ);
|
||||
this->pos.z += (Math_Coss(SPARK_SOURCE->posRot.rot.y) * SPARK_SOURCE->speedXZ);
|
||||
}
|
||||
}
|
||||
|
||||
this->regs[SS_G_SPK_TEX_IDX]++;
|
||||
this->regs[SS_G_SPK_TEX_IDX] &= 3;
|
||||
this->regs[SS_G_SPK_SCALE] += this->regs[SS_G_SPK_SCALE_STEP];
|
||||
}
|
||||
|
|
|
@ -5,9 +5,15 @@
|
|||
#include <global.h>
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ Vec3f velocity;
|
||||
/* 0x18 */ Vec3f accel;
|
||||
} EffectSsGSpkInitParams; // size = 0x
|
||||
/* 0x00 */ Actor* actor;
|
||||
/* 0x04 */ Vec3f pos;
|
||||
/* 0x10 */ Vec3f velocity;
|
||||
/* 0x1C */ Vec3f accel;
|
||||
/* 0x28 */ Color_RGBA8 primColor;
|
||||
/* 0x2C */ Color_RGBA8 envColor;
|
||||
/* 0x30 */ s16 scale;
|
||||
/* 0x32 */ s16 scaleStep;
|
||||
/* 0x34 */ u8 updateMode;
|
||||
} EffectSsGSpkInitParams; // size = 0x38
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue