mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 23:10:22 +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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue