1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-07 14:50:15 +00:00

All Effect Overlays and z_effect_soft_sprite_old_init.c OK (#396)

* 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

* EffectSsStick OK

* progress

* fix conflicting name

* progress

* splash OK

* uname fields

* progress

* lightning OK

* remove unwanted files

* kirakira ok

* kirakira done

* magma OK

* remove files

* ss_g_fire OK

* name funcs

* progress

* progress

* magma2 and kakera OK

* eff_ss_dead_dd OK

* fcircle OK

* stone1 OK

* sibuki2 OK

* dt_bubble OK

* deaddb OK

* sibuki OK

* dead_ds OK

* ice_smoke OK

* hitmark OK

* hahen OK

* k_fire OK

* en_fire OK

* starting colors

* color changes 1

* color switch done

* init file data migrated

* data cleanup

* ice_piece OK

* en_ice OK

* progress

* progress

* docs progress

* fix blast color names

* documentation pass 1

* progress

* cleanup pass 2

* touchups

* added to functions.h

* small changes

* fix functions.h

* renaming progress

* name progress

* color enum

* more cleanups

* enice changes

* final cleanups

* remove unwanted file

* lightning -> shock

* pr suggestions

* fix comment

* remove unwanted comments
This commit is contained in:
fig02 2020-09-29 20:18:46 -04:00 committed by GitHub
parent a506801cd7
commit 82968a7381
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
541 changed files with 5667 additions and 15639 deletions

View file

@ -47,11 +47,28 @@ static ColliderCylinderInit sColCylinderInit1 = {
s16 sHasParent = false;
Color_RGBA8_n D_8087259C = { 100, 100, 100, 0 };
Color_RGBA8_n D_808725A0 = { 40, 40, 40, 0 };
extern Gfx D_60013500[];
extern UNK_TYPE D_06001DDC;
static Vec3f sVelocity = { 0.0f, -1.5f, 0.0f };
static Vec3f sAcceleration = { 0.0f, -0.2f, 0.0f };
void BgDodoago_SetupAction(BgDodoago* this, BgDodoagoActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
void BgDodoago_SpawnSparkles(Vec3f* vec, GlobalContext* globalCtx) {
Vec3f pos;
Color_RGBA8 primColor = { 100, 100, 100, 0 };
Color_RGBA8 envColor = { 40, 40, 40, 0 };
static Vec3f velocity = { 0.0f, -1.5f, 0.0f };
static Vec3f acceleration = { 0.0f, -0.2f, 0.0f };
s32 i;
for (i = 4; i > 0; i--) {
pos.x = Math_Rand_CenteredFloat(20.0f) + vec->x;
pos.y = Math_Rand_CenteredFloat(10.0f) + vec->y;
pos.z = Math_Rand_CenteredFloat(20.0f) + vec->z;
EffectSsKiraKira_SpawnSmall(globalCtx, &pos, &velocity, &acceleration, &primColor, &envColor);
}
}
static InitChainEntry D_808725BC[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
@ -60,30 +77,10 @@ static InitChainEntry D_808725BC[] = {
ICHAIN_F32(uncullZoneDownward, 800, ICHAIN_STOP),
};
extern Gfx D_60013500[];
extern UNK_TYPE D_06001DDC;
u8 D_808727C0[100];
s32 D_80872824;
void BgDodoago_SetupAction(BgDodoago* this, BgDodoagoActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
void func_80871A08(Vec3f* vec, GlobalContext* globalCtx) {
Vec3f pos;
Color_RGBA8_n primColor = D_8087259C;
Color_RGBA8_n envColor = D_808725A0;
s32 i;
for (i = 4; i > 0; i--) {
pos.x = Math_Rand_CenteredFloat(20.0f) + vec->x;
pos.y = Math_Rand_CenteredFloat(10.0f) + vec->y;
pos.z = Math_Rand_CenteredFloat(20.0f) + vec->z;
func_80028B74(globalCtx, &pos, &sVelocity, &sAcceleration, &primColor, &envColor);
}
}
void BgDodoago_Init(Actor* thisx, GlobalContext* globalCtx) {
BgDodoago* this = THIS;
s32 pad;
@ -206,13 +203,13 @@ void func_80871FB8(BgDodoago* this, GlobalContext* globalCtx) {
currentPos.y = this->dyna.actor.posRot.pos.y - 20.0f;
currentPos.z = this->dyna.actor.posRot.pos.z + 100.0f;
func_80871A08(&currentPos, globalCtx);
BgDodoago_SpawnSparkles(&currentPos, globalCtx);
currentPos.x = this->dyna.actor.posRot.pos.x - 200.0f;
currentPos.y = this->dyna.actor.posRot.pos.y - 20.0f;
currentPos.z = this->dyna.actor.posRot.pos.z + 100.0f;
func_80871A08(&currentPos, globalCtx);
BgDodoago_SpawnSparkles(&currentPos, globalCtx);
Math_ApproxS(&this->unk_164, 0x64, 3);
func_800AA000(500.0f, 0x78, 0x14, 0xA);

View file

@ -223,7 +223,7 @@ void func_808801B8(BgHakaTrap* this, GlobalContext* globalCtx) {
}
void func_808802D8(BgHakaTrap* this, GlobalContext* globalCtx) {
static Vec3f D_8088101C = { 0.0f, 0.0f, 0.0f };
static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
Vec3f vector;
f32 xScale;
s32 i;
@ -243,8 +243,8 @@ void func_808802D8(BgHakaTrap* this, GlobalContext* globalCtx) {
vector.y = Math_Rand_ZeroOne() * 10.0f + this->dyna.actor.posRot.pos.y + 30.0f;
vector.z = Math_Rand_CenteredFloat(320.0f) + this->dyna.actor.posRot.pos.z;
func_8002A6B8(globalCtx, &vector, &D_8088101C, &D_8088101C, 0x82, 0x14, 0xFF, 0xFF, 0x96, 0xAA, 0xFF, 0, 0, 1,
9, 0);
EffectSsDeadDb_Spawn(globalCtx, &vector, &zeroVec, &zeroVec, 130, 20, 255, 255, 150, 170, 255, 0, 0, 1, 9,
false);
}
if (this->timer == 0) {

View file

@ -105,7 +105,7 @@ void BgHakaTubo_Idle(BgHakaTubo* this, GlobalContext* globalCtx) {
pos.y = this->dyna.actor.posRot.pos.y + 80.0f;
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);
EffectSsHahen_SpawnBurst(globalCtx, &pos, 20.0f, 0, 350, 100, 50, OBJECT_HAKA_OBJECTS, 40, &D_0400CD80);
this->dropTimer = 5;
this->dyna.actor.draw = NULL;
Actor_SetScale(&this->dyna.actor, 0.0f);

View file

@ -210,8 +210,8 @@ void BgHeavyBlock_MovePiece(BgHeavyBlock* this, GlobalContext* globalCtx) {
void BgHeavyBlock_SpawnDust(GlobalContext* globalCtx, f32 posX, f32 posY, f32 posZ, f32 velX, f32 velY, f32 velZ,
u8 dustParams) {
Color_RGBA8_n primColor;
Color_RGBA8_n envColor;
Color_RGBA8 primColor;
Color_RGBA8 envColor;
Vec3f eye;
Vec3f at;
s16 sp6E;

View file

@ -1,3 +1,9 @@
/*
* File: z_bg_hidan_dalm.c
* Overlay: ovl_Bg_Hidan_Dalm
* Description: Hammerable Totem Pieces (Fire Temple)
*/
#include "z_bg_hidan_dalm.h"
#define FLAGS 0x00000000
@ -9,7 +15,7 @@ void BgHidanDalm_Destroy(Actor* thisx, GlobalContext* globalCtx);
void BgHidanDalm_Update(Actor* thisx, GlobalContext* globalCtx);
void BgHidanDalm_Draw(Actor* thisx, GlobalContext* globalCtx);
void BgHidanDalm_WaitInteraction(BgHidanDalm* this, GlobalContext* globalCtx);
void BgHidanDalm_Wait(BgHidanDalm* this, GlobalContext* globalCtx);
void BgHidanDalm_Shrink(BgHidanDalm* this, GlobalContext* globalCtx);
const ActorInit Bg_Hidan_Dalm_InitVars = {
@ -76,7 +82,7 @@ void BgHidanDalm_Init(Actor* thisx, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
Actor_Kill(thisx);
} else {
this->actionFunc = BgHidanDalm_WaitInteraction;
this->actionFunc = BgHidanDalm_Wait;
}
}
@ -87,7 +93,7 @@ void BgHidanDalm_Destroy(Actor* thisx, GlobalContext* globalCtx) {
Collider_DestroyTris(globalCtx, &this->collider);
}
void BgHidanDalm_WaitInteraction(BgHidanDalm* this, GlobalContext* globalCtx) {
void BgHidanDalm_Wait(BgHidanDalm* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
if ((this->collider.base.acFlags & 2) && !Player_InCsMode(globalCtx) &&
@ -136,7 +142,7 @@ void BgHidanDalm_Shrink(BgHidanDalm* this, GlobalContext* globalCtx) {
velocity.x = 5.0f * Math_Sins(this->dyna.actor.posRot.rot.y + 0x8000) + (Math_Rand_ZeroOne() - 0.5f) * 5.0f;
velocity.z = 5.0f * Math_Coss(this->dyna.actor.posRot.rot.y + 0x8000) + (Math_Rand_ZeroOne() - 0.5f) * 5.0f;
velocity.y = (Math_Rand_ZeroOne() - 0.5f) * 1.5f;
func_80028B18(globalCtx, &pos, &velocity, &accel);
EffectSsKiraKira_SpawnSmallYellow(globalCtx, &pos, &velocity, &accel);
}
}
@ -180,7 +186,7 @@ void BgHidanDalm_Draw(Actor* thisx, GlobalContext* globalCtx) {
Gfx_DrawDListOpa(globalCtx, D_0600BDF0);
}
if (this->actionFunc == BgHidanDalm_WaitInteraction) {
if (this->actionFunc == BgHidanDalm_Wait) {
BgHidanDalm_UpdateCollider(this);
}
}

View file

@ -1,4 +1,5 @@
#include "z_bg_jya_bombiwa.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include <vt.h>
#define FLAGS 0x00000000
@ -97,47 +98,47 @@ void BgJyaBombiwa_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void BgJyaBombiwa_Break(BgJyaBombiwa* this, GlobalContext* globalCtx) {
Vec3f temp;
Vec3f temp2;
s16 tempS;
s8 rotationSpeed;
s8 burstVelocity;
Vec3f pos;
Vec3f velocity;
s16 arg5;
s8 arg6;
s8 arg7;
s32 i;
s16 tScale;
s16 scale;
for (i = 0; i < 16; i++) {
temp.x = ((Math_Rand_ZeroOne() * 80.0f) + this->dyna.actor.posRot.pos.x) - 40.0f;
temp.y = (Math_Rand_ZeroOne() * 140.0f) + this->dyna.actor.posRot.pos.y;
temp.z = ((Math_Rand_ZeroOne() * 80.0f) + this->dyna.actor.posRot.pos.z) - 40.0f;
temp2.x = (Math_Rand_ZeroOne() - 0.5f) * 10.0f;
temp2.y = Math_Rand_ZeroOne() * 12.0f;
temp2.z = (Math_Rand_ZeroOne() - 0.5f) * 10.0f;
tScale = (s32)(i * 1.8f) + 3;
if (tScale > 15) {
tempS = 5;
pos.x = ((Math_Rand_ZeroOne() * 80.0f) + this->dyna.actor.posRot.pos.x) - 40.0f;
pos.y = (Math_Rand_ZeroOne() * 140.0f) + this->dyna.actor.posRot.pos.y;
pos.z = ((Math_Rand_ZeroOne() * 80.0f) + this->dyna.actor.posRot.pos.z) - 40.0f;
velocity.x = (Math_Rand_ZeroOne() - 0.5f) * 10.0f;
velocity.y = Math_Rand_ZeroOne() * 12.0f;
velocity.z = (Math_Rand_ZeroOne() - 0.5f) * 10.0f;
scale = (s32)(i * 1.8f) + 3;
if (scale > 15) {
arg5 = 5;
} else {
tempS = 1;
arg5 = 1;
}
if (Math_Rand_ZeroOne() < 0.4f) {
tempS |= 0x40;
rotationSpeed = 0xC;
burstVelocity = 8;
arg5 |= 0x40;
arg6 = 0xC;
arg7 = 8;
} else {
tempS |= 0x20;
rotationSpeed = 0xC;
burstVelocity = 8;
if (tScale < 10) {
rotationSpeed = 0x50;
burstVelocity = 80;
arg5 |= 0x20;
arg6 = 0xC;
arg7 = 8;
if (scale < 10) {
arg6 = 0x50;
arg7 = 80;
}
}
func_80029E8C(globalCtx, &temp, &temp2, &temp, -400, tempS, rotationSpeed, burstVelocity, 0, tScale, 1, 20, 80,
-1, OBJECT_JYA_OBJ, D_0600EDC0);
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, &pos, -400, arg5, arg6, arg7, 0, scale, 1, 20, 80,
KAKERA_COLOR_NONE, OBJECT_JYA_OBJ, D_0600EDC0);
}
temp.x = this->dyna.actor.posRot.pos.x;
temp.y = this->dyna.actor.posRot.pos.y + 70.0f;
temp.z = this->dyna.actor.posRot.pos.z;
func_80033480(globalCtx, &temp, 100.0f, 0xA, 0x64, 0xA0, 1);
pos.x = this->dyna.actor.posRot.pos.x;
pos.y = this->dyna.actor.posRot.pos.y + 70.0f;
pos.z = this->dyna.actor.posRot.pos.z;
func_80033480(globalCtx, &pos, 100.0f, 0xA, 0x64, 0xA0, 1);
}
void BgJyaBombiwa_Update(Actor* thisx, GlobalContext* globalCtx) {

View file

@ -1,4 +1,5 @@
#include "z_bg_jya_megami.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#define FLAGS 0x00000000
@ -126,17 +127,17 @@ void BgJyaMegami_InitCollider(BgJyaMegami* this, GlobalContext* globalCtx) {
Collider_SetJntSph(globalCtx, &this->collider, &this->dyna.actor, &sJntSphInit, &this->colliderItem);
}
void func_8089A1DC(GlobalContext* globalCtx, Vec3f* burstOrigin, Vec3f* burstDepthX, s32 num, s32 arg4) {
void func_8089A1DC(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, s32 num, s32 arg4) {
Vec3f spB4;
s32 i;
for (i = 0; i < num; i++) {
s32 idx = ((s16)(Math_Rand_ZeroOne() * 8.0f)) & D_8089B17C[arg4];
s16 u0 = ((idx < 5) && (Math_Rand_ZeroOne() < 0.7f)) ? 0x40 : 0x20;
func_80029E8C(globalCtx, burstOrigin, burstDepthX, burstOrigin, -90, u0, D_8089B16C[idx], 4, 0, D_8089B14C[idx],
0, 5, D_8089B15C[idx], -1, OBJECT_JYA_OBJ, D_0600B9F8);
s16 arg5 = ((idx < 5) && (Math_Rand_ZeroOne() < 0.7f)) ? 0x40 : 0x20;
EffectSsKakera_Spawn(globalCtx, pos, velocity, pos, -90, arg5, D_8089B16C[idx], 4, 0, D_8089B14C[idx], 0, 5,
D_8089B15C[idx], KAKERA_COLOR_NONE, OBJECT_JYA_OBJ, D_0600B9F8);
if (Math_Rand_ZeroOne() < 0.45f) {
Math_Vec3f_Copy(&spB4, burstOrigin);
Math_Vec3f_Copy(&spB4, pos);
spB4.z += 25.0f;
func_80033480(globalCtx, &spB4, 60.0f, 0, D_8089B14C[idx] * 4 + 50, D_8089B14C[idx] * 4 + 70, 1);
}

View file

@ -196,8 +196,8 @@ void BgMoriBigst_SetupStalfosPairFight(BgMoriBigst* this, GlobalContext* globalC
BgMoriBigst_SetupAction(this, BgMoriBigst_StalfosPairFight);
Flags_UnsetClear(globalCtx, this->dyna.actor.room);
stalfos1 =
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_EN_TEST, 70.0f, 827.0f, -3383.0f, 0, 0, 0, 5);
stalfos1 = Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_EN_TEST, 70.0f, 827.0f,
-3383.0f, 0, 0, 0, 5);
if (stalfos1 != NULL) {
this->dyna.actor.child = NULL;
this->dyna.actor.initPosRot.rot.z++;
@ -205,8 +205,8 @@ void BgMoriBigst_SetupStalfosPairFight(BgMoriBigst* this, GlobalContext* globalC
// Warning: 3-1 Stalfos failure
osSyncPrintf("Warning : 第3-1スタルフォス発生失敗\n");
}
stalfos2 =
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_EN_TEST, 170.0f, 827.0f, -3260.0f, 0, 0, 0, 5);
stalfos2 = Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_EN_TEST, 170.0f, 827.0f,
-3260.0f, 0, 0, 0, 5);
if (stalfos2 != NULL) {
this->dyna.actor.child = NULL;
this->dyna.actor.initPosRot.rot.z++;

View file

@ -3,7 +3,7 @@
* Overlay: ovl_Bg_Mori_Hashira4
* Description: Forest Temple gates and rotating pillars
*/
#include "z_bg_mori_hashira4.h"
#define FLAGS 0x00000010

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_spot08_bakudankabe.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#define FLAGS 0x00400000
@ -119,8 +120,8 @@ void func_808B0324(BgSpot08Bakudankabe* this, GlobalContext* globalCtx) {
rotationSpeed = 33;
}
func_80029E8C(globalCtx, &burstDepthY, &burstDepthX, &burstDepthY, gravityInfluence, rotationSpeed, 0x1E, 4, 0,
scale, 1, 3, 80, -1, OBJECT_GAMEPLAY_FIELD_KEEP, D_0500A880);
EffectSsKakera_Spawn(globalCtx, &burstDepthY, &burstDepthX, &burstDepthY, gravityInfluence, rotationSpeed, 0x1E,
4, 0, scale, 1, 3, 80, KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_FIELD_KEEP, D_0500A880);
}
for (i = 0; i < ARRAY_COUNT(D_808B08AC); i++) {

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_spot11_bakudankabe.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#define FLAGS 0x00000030
@ -85,8 +86,8 @@ void func_808B2218(BgSpot11Bakudankabe* this, GlobalContext* globalCtx) {
} else {
rotationSpeed = 33;
}
func_80029E8C(globalCtx, &burstDepthY, &burstDepthX, &burstDepthY, gravityInfluence, rotationSpeed, 0x1E, 4, 0,
scale, 1, 3, 80, -1, OBJECT_GAMEPLAY_FIELD_KEEP, D_0500A880);
EffectSsKakera_Spawn(globalCtx, &burstDepthY, &burstDepthX, &burstDepthY, gravityInfluence, rotationSpeed, 0x1E,
4, 0, scale, 1, 3, 80, KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_FIELD_KEEP, D_0500A880);
}
Math_Vec3f_Sum(&thisx->posRot.pos, &D_808B272C, &burstDepthY);
func_80033480(globalCtx, &burstDepthY, 70, 4, 110, 160, 1);

View file

@ -1,5 +1,6 @@
#include "z_bg_spot16_bombstone.h"
#include "overlays/actors/ovl_En_Bombf/z_en_bombf.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#define FLAGS 0x00000010
@ -248,7 +249,7 @@ void BgSpot16Bombstone_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
}
void func_808B51A8(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
void BgSpot16Bombstone_SpawnDust(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
f32 scaleX1 = this->actor.scale.x * 150;
s16 scaleX2 = this->actor.scale.x * 250;
Vec3f posRot;
@ -290,10 +291,10 @@ void func_808B5240(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
}
}
void func_808B53A8(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
void BgSpot16Bombstone_SpawnFragments(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
f32 velocityYMultiplier = 1.3f;
Vec3f randomPosition;
Vec3f randomVelocity;
Vec3f pos;
Vec3f velocity;
s32 index;
s16 scale;
@ -307,18 +308,18 @@ void func_808B53A8(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
if (index < ARRAY_COUNT(D_808B6074)) {
do {
randomPosition.x = ((Math_Rand_ZeroOne() - 0.5f) * 8.0f) + this->actor.posRot.pos.x;
randomPosition.y = ((Math_Rand_ZeroOne() * 5.0f) + this->actor.posRot.pos.y) + 8.0f;
randomPosition.z = ((Math_Rand_ZeroOne() - 0.5f) * 8.0f) + this->actor.posRot.pos.z;
pos.x = ((Math_Rand_ZeroOne() - 0.5f) * 8.0f) + this->actor.posRot.pos.x;
pos.y = ((Math_Rand_ZeroOne() * 5.0f) + this->actor.posRot.pos.y) + 8.0f;
pos.z = ((Math_Rand_ZeroOne() - 0.5f) * 8.0f) + this->actor.posRot.pos.z;
randomVelocity.x = (Math_Rand_ZeroOne() - 0.5f) * 16.0f;
randomVelocity.y = (Math_Rand_ZeroOne() * 14.0) + (fabsf(this->actor.velocity.y) * velocityYMultiplier);
randomVelocity.z = (Math_Rand_ZeroOne() - 0.5f) * 16.0f;
velocity.x = (Math_Rand_ZeroOne() - 0.5f) * 16.0f;
velocity.y = (Math_Rand_ZeroOne() * 14.0) + (fabsf(this->actor.velocity.y) * velocityYMultiplier);
velocity.z = (Math_Rand_ZeroOne() - 0.5f) * 16.0f;
scale = D_808B6074[index] * this->actor.scale.x * 3;
func_80029E8C(globalCtx, &randomPosition, &randomVelocity, &this->actor.posRot.pos, -0x1A4, 0x31, 0xF, 0xF,
0, scale, 2, 0x40, 0xA0, -1, OBJECT_BOMBIWA, D_060009E0);
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, &this->actor.posRot.pos, -420, 0x31, 0xF, 0xF, 0, scale, 2,
0x40, 160, KAKERA_COLOR_NONE, OBJECT_BOMBIWA, D_060009E0);
index += 1;
} while (index != ARRAY_COUNT(D_808B6074));
}
@ -484,8 +485,8 @@ void func_808B5B6C(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
}
if (actor->bgCheckFlags & 8 || (actor->bgCheckFlags & 1 && actor->velocity.y < 0.0f)) {
func_808B53A8(this, globalCtx);
func_808B51A8(this, globalCtx);
BgSpot16Bombstone_SpawnFragments(this, globalCtx);
BgSpot16Bombstone_SpawnDust(this, globalCtx);
Audio_PlaySoundAtPosition(globalCtx, &actor->posRot, 20, NA_SE_EV_ROCK_BROKEN);
Actor_Kill(actor);
return;

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_spot17_bakudankabe.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#define FLAGS 0x00000000
@ -83,8 +84,8 @@ void func_808B6BC0(BgSpot17Bakudankabe* this, GlobalContext* globalCtx) {
} else {
rotationSpeed = 33;
}
func_80029E8C(globalCtx, &burstDepthY, &burstDepthX, &burstDepthY, gravityInfluence, rotationSpeed, 0x1E, 4, 0,
scale, 1, 3, 80, -1, OBJECT_GAMEPLAY_FIELD_KEEP, D_0500A880);
EffectSsKakera_Spawn(globalCtx, &burstDepthY, &burstDepthX, &burstDepthY, gravityInfluence, rotationSpeed, 0x1E,
4, 0, scale, 1, 3, 80, KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_FIELD_KEEP, D_0500A880);
}
Math_Vec3f_Copy(&burstDepthY, &this->dyna.actor.posRot.pos);
func_80033480(globalCtx, &burstDepthY, 60.0f, 4, 110, 160, 1);

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_treemouth.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#define FLAGS 0x00000030
@ -119,7 +120,7 @@ void func_808BC6F8(BgTreemouth* this, GlobalContext* globalCtx) {
sp34.x = (Math_Rand_ZeroOne() * 1158.0f) + 3407.0f;
sp34.y = 970.0f;
sp34.z = (Math_Rand_ZeroOne() * 2026.0f) + -2163.0f;
func_800297A4(globalCtx, &sp34, 0.8f, 0, 50, 30, 1, -1, 10, 0);
EffectSsHahen_SpawnBurst(globalCtx, &sp34, 0.8f, 0, 50, 30, 1, HAHEN_OBJECT_DEFAULT, 10, NULL);
}
}

View file

@ -8,7 +8,9 @@ struct BossGanondrof;
typedef struct BossGanondrof {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0x42C];
/* 0x014C */ char unk_14C[0xCC];
/* 0x0218 */ Vec3f bodyPartsPos[24];
/* 0x03C8 */ char unk_3C8[0x1B0];
} BossGanondrof; // size = 0x0578
extern const ActorInit Boss_Ganondrof_InitVars;

View file

@ -174,7 +174,8 @@ s32 func_809B55EC(EnAttackNiw* this, GlobalContext* globalCtx) {
Actor_SetHeight(&this->actor, this->unk_2E4);
func_8002F374(globalCtx, &this->actor, &sp1E, &sp1C);
if ((this->actor.projectedPos.z < -20.0f) || (sp1E < 0) || (sp1E > SCREEN_WIDTH) || (sp1C < 0) || (sp1C > SCREEN_HEIGHT)) {
if ((this->actor.projectedPos.z < -20.0f) || (sp1E < 0) || (sp1E > SCREEN_WIDTH) || (sp1C < 0) ||
(sp1C > SCREEN_HEIGHT)) {
return 0;
} else {
return 1;
@ -345,7 +346,7 @@ void EnAttackNiw_Update(Actor* thisx, GlobalContext* globalCtx) {
if ((this->actor.bgCheckFlags & 0x20) && (this->actionFunc != func_809B5C18)) {
Math_Vec3f_Copy(&sp30, &this->actor.posRot.pos);
sp30.y += this->actor.waterY;
func_8002949C(globalCtx, &sp30, 0, 0, 0, 0x190);
EffectSsGSplash_Spawn(globalCtx, &sp30, 0, 0, 0, 0x190);
this->unk_2DC = 0.0f;
this->actor.gravity = 0.0f;
this->unk_2E0 = 0.0f;

View file

@ -5,6 +5,7 @@
*/
#include "z_en_bom.h"
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
#define FLAGS 0x00000030
@ -199,7 +200,7 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx) {
Vec3f effAccel = { 0.0f, 0.0f, 0.0f };
Vec3f effPos;
Vec3f dustAccel = { 0.0f, 0.6f, 0.0f };
Color_RGBA8_n dustColor = { 255, 255, 255, 255 };
Color_RGBA8 dustColor = { 255, 255, 255, 255 };
s32 pad[2];
EnBom* this = THIS;
@ -230,13 +231,13 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx) {
effPos = thisx->posRot.pos;
effPos.y += 17.0f;
if ((globalCtx->gameplayFrames % 2) == 0) {
func_80029184(globalCtx, thisx, &effPos, &effVelocity, &effAccel);
EffectSsGSpk_SpawnFuse(globalCtx, thisx, &effPos, &effVelocity, &effAccel);
}
Audio_PlayActorSound2(thisx, NA_SE_IT_BOMB_IGNIT - SFX_FLAG);
effPos.y += 3.0f;
func_8002829C(globalCtx, &effPos, &effVelocity, &dustAccel, &dustColor, &dustColor, 0x32, 5);
func_8002829C(globalCtx, &effPos, &effVelocity, &dustAccel, &dustColor, &dustColor, 50, 5);
}
if ((this->bombCollider.base.acFlags & 2) ||
@ -284,7 +285,7 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx) {
effPos.y = thisx->groundY;
if (thisx->groundY > -32000.0f) {
func_80029024(globalCtx, &effPos, &effVelocity, &effAccel);
EffectSsBlast_SpawnWhiteShockwave(globalCtx, &effPos, &effVelocity, &effAccel);
}
Audio_PlayActorSound2(thisx, NA_SE_IT_BOMB_EXPLOSION);
@ -314,7 +315,8 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx) {
if ((thisx->scale.x >= 0.01f) && (thisx->params != BOMB_EXPLOSION)) {
if (thisx->waterY >= 20.0f) {
EffectSsDeadSound_SpawnStationary(globalCtx, &thisx->projectedPos, NA_SE_IT_BOMB_UNEXPLOSION, 1, 1, 10);
EffectSsDeadSound_SpawnStationary(globalCtx, &thisx->projectedPos, NA_SE_IT_BOMB_UNEXPLOSION, true,
DEADSOUND_REPEAT_MODE_OFF, 10);
Actor_Kill(thisx);
return;
}

View file

@ -5,6 +5,7 @@
*/
#include "z_en_bombf.h"
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
#define FLAGS 0x00000011
@ -294,7 +295,7 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) {
Vec3f effAccel = { 0.0f, 0.0f, 0.0f };
Vec3f effPos;
Vec3f dustAccel = { 0.0f, 0.6f, 0.0f };
Color_RGBA8_n dustColor = { 255, 255, 255, 255 };
Color_RGBA8 dustColor = { 255, 255, 255, 255 };
s32 pad[2];
EnBombf* this = THIS;
@ -359,7 +360,7 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->timer < 127) {
// spawn spark effect on even frames
if ((globalCtx->gameplayFrames % 2) == 0) {
func_80029184(globalCtx, thisx, &effPos, &effVelocity, &effAccel);
EffectSsGSpk_SpawnFuse(globalCtx, thisx, &effPos, &effVelocity, &effAccel);
}
Audio_PlayActorSound2(thisx, NA_SE_IT_BOMB_IGNIT - SFX_FLAG);
@ -395,7 +396,7 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) {
effPos.y = thisx->groundY;
if (thisx->groundY > -32000.0f) {
func_80029024(globalCtx, &effPos, &effVelocity, &effAccel);
EffectSsBlast_SpawnWhiteShockwave(globalCtx, &effPos, &effVelocity, &effAccel);
}
Audio_PlayActorSound2(thisx, NA_SE_IT_BOMB_EXPLOSION);
@ -426,7 +427,8 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) {
if ((thisx->scale.x >= 0.01f) && (thisx->params != BOMBFLOWER_EXPLOSION)) {
if (thisx->waterY >= 20.0f) {
EffectSsDeadSound_SpawnStationary(globalCtx, &thisx->projectedPos, NA_SE_IT_BOMB_UNEXPLOSION, 1, 1, 10);
EffectSsDeadSound_SpawnStationary(globalCtx, &thisx->projectedPos, NA_SE_IT_BOMB_UNEXPLOSION, true,
DEADSOUND_REPEAT_MODE_OFF, 10);
Actor_Kill(thisx);
return;
}

View file

@ -41,31 +41,13 @@ static ColliderQuadInit sQuadInit = {
{ { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } } },
};
Vec3f D_809D250C = { 0.015f, 0.015f, 0.015f };
Vec3f D_809D2518 = { 0.0f, 0.0f, 0.0f };
static InitChainEntry sInitChain[] = {
ICHAIN_F32(unk_4C, 5300, ICHAIN_STOP),
};
Vec3f D_809D2528 = { 8000.0f, 15000.0f, 2500.0f };
Vec3f D_809D2534 = { 8000.0f, 10000.0f, 2500.0f };
Vec3f D_809D2540 = { -8000.0f, 15000.0f, 2500.0f };
Vec3f D_809D254C = { -8000.0f, 10000.0f, 2500.0f };
Color_RGBA8 D_809D2558 = { 255, 255, 255, 255 };
Color_RGBA8 D_809D255C = { 200, 255, 255, 255 };
UNK_PTR D_809D2560[] = { 0x060024F0, 0x060027F0, 0x060029F0 };
void EnBx_Init(Actor* thisx, GlobalContext* globalCtx) {
EnBx* this = THIS;
Vec3f sp48 = D_809D250C;
Vec3f sp3C = D_809D2518;
Vec3f sp48 = { 0.015f, 0.015f, 0.015f };
Vec3f sp3C = { 0.0f, 0.0f, 0.0f };
static InitChainEntry sInitChain[] = {
ICHAIN_F32(unk_4C, 5300, ICHAIN_STOP),
};
s32 i;
s32 pad;
@ -104,8 +86,10 @@ void EnBx_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void func_809D1D0C(Actor* thisx, GlobalContext* globalCtx) {
Vec3f sp5C = D_809D2528;
Vec3f sp50 = D_809D2534;
Vec3f sp5C = { 8000.0f, 15000.0f, 2500.0f };
Vec3f sp50 = { 8000.0f, 10000.0f, 2500.0f };
static Vec3f D_809D2540 = { -8000.0f, 15000.0f, 2500.0f };
static Vec3f D_809D254C = { -8000.0f, 10000.0f, 2500.0f };
Vec3f sp44;
Vec3f sp38;
EnBx* this = THIS;
@ -123,9 +107,6 @@ void EnBx_Update(Actor* thisx, GlobalContext* globalCtx) {
s32 i;
s16 tmp32;
s32 tmp33;
Vec3f sp58;
s16 tmp16;
u32 test;
if ((thisx->xzDistFromLink <= 70.0f) || (this->collider.base.atFlags & 2) || (this->collider.base.acFlags & 2) ||
(this->colliderQuad.base.atFlags & 2)) {
@ -162,12 +143,17 @@ void EnBx_Update(Actor* thisx, GlobalContext* globalCtx) {
this->unk_14C--;
for (i = 0; i < 4; i++) {
if (!((this->unk_14C + (i << 1)) % 4)) {
tmp16 = (s32)Math_Rand_CenteredFloat(12288.0f);
tmp16 = (tmp16 + (i * 16384)) + 0x2000;
sp58.x = Math_Rand_CenteredFloat(5.0f) + thisx->posRot.pos.x;
sp58.y = Math_Rand_CenteredFloat(30.0f) + thisx->posRot.pos.y + 170.0f;
sp58.z = Math_Rand_CenteredFloat(5.0f) + thisx->posRot.pos.z;
func_800295A0(globalCtx, &sp58, &D_809D2558, &D_809D255C, 0xE6, tmp16, 6, 0);
static Color_RGBA8 primColor = { 255, 255, 255, 255 };
static Color_RGBA8 envColor = { 200, 255, 255, 255 };
Vec3f pos;
s16 yaw;
yaw = (s32)Math_Rand_CenteredFloat(12288.0f);
yaw = (yaw + (i * 0x4000)) + 0x2000;
pos.x = Math_Rand_CenteredFloat(5.0f) + thisx->posRot.pos.x;
pos.y = Math_Rand_CenteredFloat(30.0f) + thisx->posRot.pos.y + 170.0f;
pos.z = Math_Rand_CenteredFloat(5.0f) + thisx->posRot.pos.z;
EffectSsLightning_Spawn(globalCtx, &pos, &primColor, &envColor, 230, yaw, 6, 0);
}
}
@ -183,6 +169,7 @@ void EnBx_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void EnBx_Draw(Actor* thisx, GlobalContext* globalCtx) {
static UNK_PTR D_809D2560[] = { 0x060024F0, 0x060027F0, 0x060029F0 };
EnBx* this = THIS;
s32 pad;
Mtx* mtx = Graph_Alloc(globalCtx->state.gfxCtx, 4 * sizeof(Mtx));

View file

@ -112,7 +112,7 @@ void EnCow_Init(Actor* thisx, GlobalContext* globalCtx) {
func_809DEE9C(this);
this->actionFunc = func_809DF96C;
if (globalCtx->sceneNum == SCENE_LINK_HOME) {
if (gSaveContext.linkAge != 0) {
if (LINK_IS_CHILD) {
Actor_Kill(&this->actor);
return;
}

View file

@ -90,8 +90,8 @@ void EnDyExtra_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void EnDyExtra_Draw(Actor* thisx, GlobalContext* globalCtx) {
static Color_RGBA8_n primColors[] = { { 255, 255, 170, 255 }, { 255, 255, 170, 255 } };
static Color_RGBA8_n envColors[] = { { 255, 100, 255, 255 }, { 100, 255, 255, 255 } };
static Color_RGBA8 primColors[] = { { 255, 255, 170, 255 }, { 255, 255, 170, 255 } };
static Color_RGBA8 envColors[] = { { 255, 100, 255, 255 }, { 100, 255, 255, 255 } };
static u8 D_809FFC50[] = { 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02,
0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x01, 0x02 };
EnDyExtra* this = THIS;

View file

@ -40,9 +40,6 @@ const ActorInit En_Ex_Ruppy_InitVars = {
(ActorFunc)EnExRuppy_Draw,
};
static Vec3f D_80A0B358[] = { { 0.0f, 0.1f, 0.0f }, { 0.0f, 0.0f, 0.0f } };
static Vec3f D_80A0B370[] = { { 0.0f, 0.01f, 0.0f }, { 0.0f, 0.0f, 0.0f } };
void EnExRuppy_Init(Actor* thisx, GlobalContext* globalCtx) {
EnExRuppy* this = THIS;
EnDivingGame* divingGame;
@ -164,41 +161,44 @@ void EnExRuppy_Init(Actor* thisx, GlobalContext* globalCtx) {
void EnExRuppy_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void EnExRuppy_SpawnSparkles(EnExRuppy* this, GlobalContext* globalCtx, s16 arg2, s32 arg3) {
Vec3f sparklePos;
Vec3f sparkleVelocity;
Vec3f sparkleAccel;
Color_RGBA8_n primColor;
Color_RGBA8_n envColor;
void EnExRuppy_SpawnSparkles(EnExRuppy* this, GlobalContext* globalCtx, s16 numSparkles, s32 movementType) {
static Vec3f velocities[] = { { 0.0f, 0.1f, 0.0f }, { 0.0f, 0.0f, 0.0f } };
static Vec3f accelerations[] = { { 0.0f, 0.01f, 0.0f }, { 0.0f, 0.0f, 0.0f } };
Vec3f pos;
Vec3f velocity;
Vec3f accel;
Color_RGBA8 primColor;
Color_RGBA8 envColor;
s32 i;
s16 sparkleScale;
s16 sparkleLife;
s16 scale;
s16 life;
if (arg2 <= 0) {
arg2 = 1;
if (numSparkles < 1) {
numSparkles = 1;
}
primColor.r = 255;
primColor.g = 255;
primColor.b = 0;
envColor.r = 255;
envColor.g = 255;
envColor.b = 255;
sparkleVelocity = D_80A0B358[arg3];
sparkleAccel = D_80A0B370[arg3];
sparkleScale = 3000;
sparkleLife = 16;
for (i = 0; i < arg2; i++) {
if (arg3 == 1) {
sparkleAccel.x = Math_Rand_CenteredFloat(20.0f);
sparkleAccel.z = Math_Rand_CenteredFloat(20.0f);
sparkleScale = 5000;
sparkleLife = 20;
velocity = velocities[movementType];
accel = accelerations[movementType];
scale = 3000;
life = 16;
for (i = 0; i < numSparkles; i++) {
if (movementType == 1) {
accel.x = Math_Rand_CenteredFloat(20.0f);
accel.z = Math_Rand_CenteredFloat(20.0f);
scale = 5000;
life = 20;
}
sparklePos.x = (Math_Rand_ZeroOne() - 0.5f) * 10.0f + this->actor.posRot.pos.x;
sparklePos.y = (Math_Rand_ZeroOne() - 0.5f) * 10.0f + (this->actor.posRot.pos.y + this->unk_160 * 600.0f);
sparklePos.z = (Math_Rand_ZeroOne() - 0.5f) * 10.0f + this->actor.posRot.pos.z;
func_80028BB0(globalCtx, &sparklePos, &sparkleVelocity, &sparkleAccel, &primColor, &envColor, sparkleScale,
sparkleLife);
pos.x = (Math_Rand_ZeroOne() - 0.5f) * 10.0f + this->actor.posRot.pos.x;
pos.y = (Math_Rand_ZeroOne() - 0.5f) * 10.0f + (this->actor.posRot.pos.y + this->unk_160 * 600.0f);
pos.z = (Math_Rand_ZeroOne() - 0.5f) * 10.0f + this->actor.posRot.pos.z;
EffectSsKiraKira_SpawnDispersed(globalCtx, &pos, &velocity, &accel, &primColor, &envColor, scale, life);
}
}
@ -252,7 +252,7 @@ void EnExRuppy_Sink(EnExRuppy* this, GlobalContext* globalCtx) {
pos.y += this->actor.waterY;
this->actor.velocity.y = -1.0f;
this->actor.gravity = -0.2f;
func_8002949C(globalCtx, &pos, 0, 0, 0, 800);
EffectSsGSplash_Spawn(globalCtx, &pos, 0, 0, 0, 800);
func_80078914(&this->actor.projectedPos, NA_SE_EV_BOMB_DROP_WATER);
this->actionFunc = func_80A0AD88;
}
@ -271,7 +271,7 @@ void func_80A0AD88(EnExRuppy* this, GlobalContext* globalCtx) {
if (this->timer == 0) {
this->timer = 10;
func_800293E4(globalCtx, &this->actor.posRot.pos, 0.0f, 5.0f, 5.0f, Math_Rand_ZeroFloat(0.03f) + 0.07f);
EffectSsBubble_Spawn(globalCtx, &this->actor.posRot.pos, 0.0f, 5.0f, 5.0f, Math_Rand_ZeroFloat(0.03f) + 0.07f);
}
if (this->actor.parent != NULL) {
divingGame = (EnDivingGame*)this->actor.parent;
@ -303,8 +303,8 @@ void func_80A0AEE0(EnExRuppy* this, GlobalContext* globalCtx) {
void EnExRuppy_WaitToBlowUp(EnExRuppy* this, GlobalContext* globalCtx) {
f32 distToBlowUp;
Vec3f point1Vec = { 0.0f, 0.1f, 0.0f };
Vec3f zeroVector = { 0.0f, 0.0f, 0.0f };
Vec3f accel = { 0.0f, 0.1f, 0.0f };
Vec3f velocity = { 0.0f, 0.0f, 0.0f };
s16 explosionScale;
s16 explosionScaleStep;
distToBlowUp = 50.0f;
@ -328,7 +328,7 @@ void EnExRuppy_WaitToBlowUp(EnExRuppy* this, GlobalContext* globalCtx) {
explosionScale = 20;
explosionScaleStep = 6;
}
EffectSsBomb2_SpawnLayered(globalCtx, &this->actor.posRot.pos, &zeroVector, &point1Vec, explosionScale,
EffectSsBomb2_SpawnLayered(globalCtx, &this->actor.posRot.pos, &velocity, &accel, explosionScale,
explosionScaleStep);
func_8002F71C(globalCtx, &this->actor, 2.0f, this->actor.yawTowardsLink, 0.0f);
Audio_PlayActorSound2(&this->actor, NA_SE_IT_BOMB_EXPLOSION);

View file

@ -5,7 +5,8 @@
*/
#include "z_en_fhg_fire.h"
#include "../ovl_En_fHG/z_en_fhg.h"
#include "overlays/actors/ovl_En_fHG/z_en_fhg.h"
#include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h"
#define FLAGS 0x00000030
@ -143,8 +144,8 @@ void EnFhgFire_Init(Actor* thisx, GlobalContext* globalCtx) {
this->collider.dim.height = 50;
this->collider.dim.yShift = -25;
this->lightNode = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, &this->lightInfo);
Lights_PointNoGlowSetInfo(&this->lightInfo, thisx->posRot.pos.x, thisx->posRot.pos.y, thisx->posRot.pos.z, 0xFF,
0xFF, 0xFF, 0xFF);
Lights_PointNoGlowSetInfo(&this->lightInfo, thisx->posRot.pos.x, thisx->posRot.pos.y, thisx->posRot.pos.z, 255,
255, 255, 0xFF);
}
}
@ -163,8 +164,8 @@ void EnFhgFire_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void func_80A0F6F8(EnFhgFire* this, GlobalContext* globalCtx) {
Camera* camera;
s32 pad;
Vec3f randVec;
Vec3f tmpVec;
Vec3f ballVelocity;
Vec3f ballAccel;
s16 i;
s16 randY;
s16* tmp;
@ -192,15 +193,16 @@ void func_80A0F6F8(EnFhgFire* this, GlobalContext* globalCtx) {
this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, 500, 0,
0, 0x24);
tmpVec = D_80A117BC;
ballAccel = D_80A117BC;
for (i = 0; i < 35; i++) {
randVec.x = Math_Rand_CenteredFloat(30.f);
randVec.y = Math_Rand_ZeroFloat(5.0f) + 3.0f;
randVec.z = Math_Rand_CenteredFloat(30.f);
tmpVec.y = -0.2f;
EffectSsFhgFlash_Spawn(globalCtx, &this->actor.posRot.pos, &randVec, &tmpVec,
(s16)(Math_Rand_ZeroOne() * 100.0f) + 240, 0);
ballVelocity.x = Math_Rand_CenteredFloat(30.f);
ballVelocity.y = Math_Rand_ZeroFloat(5.0f) + 3.0f;
ballVelocity.z = Math_Rand_CenteredFloat(30.f);
ballAccel.y = -0.2f;
EffectSsFhgFlash_SpawnLightBall(globalCtx, &this->actor.posRot.pos, &ballVelocity, &ballAccel,
(s16)(Math_Rand_ZeroOne() * 100.0f) + 240,
FHGFLASH_LIGHTBALL_GREEN);
}
func_80033E88(&this->actor, globalCtx, 4, 10);
@ -283,7 +285,7 @@ void func_80A0FC48(EnFhgFire* this, GlobalContext* globalCtx) {
if (Math_Rand_ZeroOne() < 0.5f) {
pos = this->actor.posRot.pos;
pos.y -= 20.0f;
EffectSsFhgFlash_Spawn2(globalCtx, &this->actor, &pos, 0xC8, 0);
EffectSsFhgFlash_SpawnShock(globalCtx, &this->actor, &pos, 200, FHGFLASH_SHOCK_NO_ACTOR);
}
Actor_MoveForward(&this->actor);
@ -369,9 +371,6 @@ void func_80A0FD8C(EnFhgFire* this, GlobalContext* globalCtx) {
void func_80A10008(EnFhgFire* this, GlobalContext* globalCtx) {
EnfHG* horse;
s16 i;
Vec3f sp6C;
Vec3f tmp;
Vec3f sp54;
osSyncPrintf("yari hikari 1\n");
horse = (EnfHG*)this->actor.parent;
@ -386,17 +385,20 @@ void func_80A10008(EnFhgFire* this, GlobalContext* globalCtx) {
osSyncPrintf("yari hikari 2\n");
if (this->fireMode == 0) {
tmp = D_80A117C8;
sp54 = D_80A117D4;
Vec3f ballPos;
Vec3f ballVelocity = D_80A117C8;
Vec3f ballAccel = D_80A117D4;
osSyncPrintf("FLASH !!\n");
for (i = 0; i < 2; i++) {
sp6C.x = Math_Rand_CenteredFloat(20.0f) + this->actor.posRot.pos.x;
sp6C.y = Math_Rand_CenteredFloat(20.0f) + this->actor.posRot.pos.y;
sp6C.z = Math_Rand_CenteredFloat(20.0f) + this->actor.posRot.pos.z;
sp54.y = -0.08f;
ballPos.x = Math_Rand_CenteredFloat(20.0f) + this->actor.posRot.pos.x;
ballPos.y = Math_Rand_CenteredFloat(20.0f) + this->actor.posRot.pos.y;
ballPos.z = Math_Rand_CenteredFloat(20.0f) + this->actor.posRot.pos.z;
ballAccel.y = -0.08f;
EffectSsFhgFlash_Spawn(globalCtx, &sp6C, &tmp, &sp54, (s16)(Math_Rand_ZeroOne() * 80.0f) + 150, 0);
EffectSsFhgFlash_SpawnLightBall(globalCtx, &ballPos, &ballVelocity, &ballAccel,
(s16)(Math_Rand_ZeroOne() * 80.0f) + 150, FHGFLASH_LIGHTBALL_GREEN);
}
}

View file

@ -285,8 +285,8 @@ void EnFloormas_SetupSmDecideAction(EnFloormas* this) {
}
void EnFloormas_SetupSmShrink(EnFloormas* this, GlobalContext* globalCtx) {
static Vec3f D_80A1A4D0 = { 0.0f, 0.0f, 0.0f };
static Vec3f D_80A1A4DC = { 0.0f, 0.0f, 0.0f };
static Vec3f velocity = { 0.0f, 0.0f, 0.0f };
static Vec3f accel = { 0.0f, 0.0f, 0.0f };
Vec3f pos;
this->actor.speedXZ = 0.0f;
@ -294,7 +294,7 @@ void EnFloormas_SetupSmShrink(EnFloormas* this, GlobalContext* globalCtx) {
pos.x = this->actor.posRot.pos.x;
pos.y = this->actor.posRot.pos.y + 15.0f;
pos.z = this->actor.posRot.pos.z;
func_8002A6B8(globalCtx, &pos, &D_80A1A4D0, &D_80A1A4DC, 0x96, -0xA, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0, 0xFF, 1, 9, 1);
EffectSsDeadDb_Spawn(globalCtx, &pos, &velocity, &accel, 150, -10, 255, 255, 255, 255, 0, 0, 255, 1, 9, true);
this->actionFunc = EnFloormas_SmShrink;
}
@ -977,8 +977,8 @@ void EnFloormas_ColliderCheck(EnFloormas* this, GlobalContext* globalCtx) {
}
} else {
if (this->actor.colChkInfo.damageEffect == 2) {
func_8002A65C(globalCtx, &this->actor, &this->actor.posRot.pos, this->actor.scale.x * 4000.f,
this->actor.scale.x * 4000.f);
EffectSsFCircle_Spawn(globalCtx, &this->actor, &this->actor.posRot.pos,
this->actor.scale.x * 4000.f, this->actor.scale.x * 4000.f);
}
EnFloormas_SetupTakeDamage(this);
}
@ -1071,7 +1071,7 @@ void EnFloormas_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
}
}
static Color_RGBA8 sMergeColor = { 0x00, 0xFF, 0x00, 0x00 };
static Color_RGBA8 sMergeColor = { 0, 255, 0, 0 };
void EnFloormas_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnFloormas* this = THIS;

View file

@ -5,6 +5,7 @@
*/
#include "z_en_goroiwa.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include <vt.h>
@ -236,41 +237,39 @@ s32 func_80A4C27C(EnGoroiwa* this, GlobalContext* globalCtx) {
return 0;
}
void func_80A4C3A4(GlobalContext* globalCtx, Vec3f* arg1) {
static Vec3f effectVelocity = { 0.0f, 0.0f, 0.0f };
static Vec3f effectAccel = { 0.0f, 0.3f, 0.0f };
Vec3f effectPos;
void EnGoroiwa_SpawnDust(GlobalContext* globalCtx, Vec3f* pos) {
static Vec3f velocity = { 0.0f, 0.0f, 0.0f };
static Vec3f accel = { 0.0f, 0.3f, 0.0f };
Vec3f randPos;
s32 i;
s16 angle = 0;
for (i = 0; i < 8; i++) {
angle += 0x4E20;
effectPos.x = arg1->x + ((47.0f * ((Math_Rand_ZeroOne() * 0.5f) + 0.5f)) * Math_Sins(angle));
effectPos.y = arg1->y + ((Math_Rand_ZeroOne() - 0.5f) * 40.0f);
effectPos.z = arg1->z + ((47.0f * ((Math_Rand_ZeroOne() * 0.5f) + 0.5f))) * Math_Coss(angle);
func_800286CC(globalCtx, &effectPos, &effectVelocity, &effectAccel, (s16)(Math_Rand_ZeroOne() * 30.0f) + 100,
80);
func_800286CC(globalCtx, &effectPos, &effectVelocity, &effectAccel, (s16)(Math_Rand_ZeroOne() * 20.0f) + 80,
80);
randPos.x = pos->x + ((47.0f * ((Math_Rand_ZeroOne() * 0.5f) + 0.5f)) * Math_Sins(angle));
randPos.y = pos->y + ((Math_Rand_ZeroOne() - 0.5f) * 40.0f);
randPos.z = pos->z + ((47.0f * ((Math_Rand_ZeroOne() * 0.5f) + 0.5f))) * Math_Coss(angle);
func_800286CC(globalCtx, &randPos, &velocity, &accel, (s16)(Math_Rand_ZeroOne() * 30.0f) + 100, 80);
func_800286CC(globalCtx, &randPos, &velocity, &accel, (s16)(Math_Rand_ZeroOne() * 20.0f) + 80, 80);
}
}
void func_80A4C594(GlobalContext* globalCtx, Vec3f* arg1) {
Vec3f sp4C;
void EnGoroiwa_SpawnWaterEffects(GlobalContext* globalCtx, Vec3f* contactPos) {
Vec3f splashPos;
s32 i;
s16 angle = 0;
for (i = 0; i < 11; i++) {
angle += 0x1746;
sp4C.x = arg1->x + (Math_Sins(angle) * 55.0f);
sp4C.y = arg1->y;
sp4C.z = arg1->z + (Math_Coss(angle) * 55.0f);
func_8002949C(globalCtx, &sp4C, 0, 0, 0, 350);
splashPos.x = contactPos->x + (Math_Sins(angle) * 55.0f);
splashPos.y = contactPos->y;
splashPos.z = contactPos->z + (Math_Coss(angle) * 55.0f);
EffectSsGSplash_Spawn(globalCtx, &splashPos, 0, 0, 0, 350);
}
func_80029444(globalCtx, arg1, 300, 700, 0);
func_80029444(globalCtx, arg1, 500, 900, 4);
func_80029444(globalCtx, arg1, 500, 1300, 8);
EffectSsGRipple_Spawn(globalCtx, contactPos, 300, 700, 0);
EffectSsGRipple_Spawn(globalCtx, contactPos, 500, 900, 4);
EffectSsGRipple_Spawn(globalCtx, contactPos, 500, 1300, 8);
}
s32 func_80A4C6C8(EnGoroiwa* this, GlobalContext* globalCtx) {
@ -375,7 +374,7 @@ s32 func_80A4CB78(EnGoroiwa* this, GlobalContext* globalCtx) {
sp44.x = this->actor.posRot.pos.x;
sp44.y = temp_f0_2 + 10.0f;
sp44.z = this->actor.posRot.pos.z;
func_80A4C3A4(globalCtx, &sp44);
EnGoroiwa_SpawnDust(globalCtx, &sp44);
}
}
}
@ -395,7 +394,7 @@ s32 func_80A4CB78(EnGoroiwa* this, GlobalContext* globalCtx) {
sp30.x = this->actor.posRot.pos.x;
sp30.y = ySurface;
sp30.z = this->actor.posRot.pos.z;
func_80A4C594(globalCtx, &sp30);
EnGoroiwa_SpawnWaterEffects(globalCtx, &sp30);
this->actor.velocity.y *= 0.2f;
}
if (this->actor.velocity.y < -8.0f) {
@ -466,7 +465,7 @@ void func_80A4D0FC(EnGoroiwa* this, GlobalContext* globalCtx) {
s32 pad;
Vec3f* thisPos = &this->actor.posRot.pos;
Vec3f effectPos;
Vec3f effectVelocity;
Vec3f fragmentVelocity;
f32 temp_f24;
f32 temp_f22;
f32 temp_f20;
@ -482,12 +481,12 @@ void func_80A4D0FC(EnGoroiwa* this, GlobalContext* globalCtx) {
temp_f20_2 = Math_Sins(angle2);
effectPos.y = (((Math_Rand_ZeroOne() - 0.5f) * 100.0f) * temp_f20_2) + colliderHeightOffset[temp_v0];
effectPos.z = ((Math_Rand_ZeroOne() * 50.0f) * temp_f24) * Math_Sins(angle2);
effectVelocity.x = effectPos.x * 0.2f;
effectVelocity.y = (Math_Rand_ZeroOne() * 15.0f) + 2.0f;
effectVelocity.z = effectPos.z * 0.2f;
fragmentVelocity.x = effectPos.x * 0.2f;
fragmentVelocity.y = (Math_Rand_ZeroOne() * 15.0f) + 2.0f;
fragmentVelocity.z = effectPos.z * 0.2f;
Math_Vec3f_Sum(&effectPos, thisPos, &effectPos);
func_80029E8C(globalCtx, &effectPos, &effectVelocity, &effectPos, -340, 33, 28, 2, 0,
(Math_Rand_ZeroOne() * 7.0f) + 1.0f, 1, 0, 70, -1, 1, D_0400D340);
EffectSsKakera_Spawn(globalCtx, &effectPos, &fragmentVelocity, &effectPos, -340, 33, 28, 2, 0,
(Math_Rand_ZeroOne() * 7.0f) + 1.0f, 1, 0, 70, KAKERA_COLOR_NONE, 1, D_0400D340);
}
effectPos.x = thisPos->x;

View file

@ -67,8 +67,6 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 600, ICHAIN_STOP),
};
Vec3f D_80A7DF28[2] = { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } };
void func_80A7BE20(EnInsect* this) {
this->unk_314 = D_80A7DF10[this->actor.params & 3];
}
@ -397,8 +395,10 @@ void func_80A7CBC8(EnInsect* this) {
}
void func_80A7CC3C(EnInsect* this, GlobalContext* globalCtx) {
static Vec3f accel = { 0.0f, 0.0f, 0.0f };
static Vec3f unused = { 0.0f, 0.0f, 0.0f };
s32 pad[2];
Vec3f sp34;
Vec3f velocity;
Math_SmoothScaleMaxMinF(&this->actor.speedXZ, 0.0f, 0.1f, 0.5f, 0.0f);
Math_ApproxS(&this->actor.shape.rot.x, 10922, 352);
@ -411,11 +411,11 @@ void func_80A7CC3C(EnInsect* this, GlobalContext* globalCtx) {
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
if (this->unk_31A >= 21 && Math_Rand_ZeroOne() < 0.1f) {
sp34.x = Math_Sins(this->actor.shape.rot.y) * -0.6f;
sp34.y = Math_Sins(this->actor.shape.rot.x) * 0.6f;
sp34.z = Math_Coss(this->actor.shape.rot.y) * -0.6f;
func_800286CC(globalCtx, &this->actor.posRot.pos, &sp34, D_80A7DF28, Math_Rand_ZeroOne() * 5.0f + 8.0f,
if (this->unk_31A > 20 && Math_Rand_ZeroOne() < 0.1f) {
velocity.x = Math_Sins(this->actor.shape.rot.y) * -0.6f;
velocity.y = Math_Sins(this->actor.shape.rot.x) * 0.6f;
velocity.z = Math_Coss(this->actor.shape.rot.y) * -0.6f;
func_800286CC(globalCtx, &this->actor.posRot.pos, &velocity, &accel, Math_Rand_ZeroOne() * 5.0f + 8.0f,
Math_Rand_ZeroOne() * 5.0f + 8.0f);
}
@ -497,8 +497,8 @@ void func_80A7CEC0(EnInsect* this, GlobalContext* globalCtx) {
sp40.x = this->actor.posRot.pos.x;
sp40.y = this->actor.posRot.pos.y + this->actor.waterY;
sp40.z = this->actor.posRot.pos.z;
func_80029444(globalCtx, &sp40, 20, 100, 4);
func_80029444(globalCtx, &sp40, 40, 200, 8);
EffectSsGRipple_Spawn(globalCtx, &sp40, 20, 100, 4);
EffectSsGRipple_Spawn(globalCtx, &sp40, 40, 200, 8);
}
if (this->unk_31A <= 0 || ((this->unk_314 & 4) && this->unk_31C <= 0) ||
@ -532,7 +532,8 @@ void func_80A7D26C(EnInsect* this, GlobalContext* globalCtx) {
Actor_SetScale(&this->actor, CLAMP_MIN(this->actor.scale.x - 0.00005f, 0.001f));
if (this->actor.waterY > 5.0f && this->actor.waterY < 30.0f && Math_Rand_ZeroOne() < 0.3f) {
func_800293E4(globalCtx, &this->actor.posRot.pos, -5.0f, 5.0f, 5.0f, (Math_Rand_ZeroOne() * 0.04f) + 0.02f);
EffectSsBubble_Spawn(globalCtx, &this->actor.posRot.pos, -5.0f, 5.0f, 5.0f,
(Math_Rand_ZeroOne() * 0.04f) + 0.02f);
}
if (this->unk_31A <= 0) {

View file

@ -29,7 +29,7 @@ const ActorInit En_Light_InitVars = {
};
typedef struct {
/* 0x00 */ Color_RGBA8_n primColor;
/* 0x00 */ Color_RGBA8 primColor;
/* 0x04 */ Color_RGB8 envColor;
/* 0x07 */ u8 scale;
} FlameParams;

View file

@ -5,6 +5,7 @@
*/
#include "z_en_nutsball.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#define FLAGS 0x00000010
@ -109,7 +110,7 @@ void func_80ABBBA8(EnNutsball* this, GlobalContext* globalCtx) {
sp40.y = this->actor.posRot.pos.y + 4;
sp40.z = this->actor.posRot.pos.z;
func_800297A4(globalCtx, &sp40, 6.0f, 0, 7, 3, 15, -1, 10, 0);
EffectSsHahen_SpawnBurst(globalCtx, &sp40, 6.0f, 0, 7, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 20, NA_SE_EN_OCTAROCK_ROCK);
Actor_Kill(&this->actor);
} else {

View file

@ -62,12 +62,12 @@ static InitChainEntry sInitChain[] = {
static Vec3f D_80AE4918 = { 0.0f, 0.0f, 0.0f };
// I'm guessing these are primitive and environment colors that go unused
static Color_RGBA8_n D_80AE4924 = { 200, 200, 255, 255 };
static Color_RGBA8_n D_80AE4928 = { 0, 0, 255, 0 };
static Color_RGBA8 D_80AE4924 = { 200, 200, 255, 255 };
static Color_RGBA8 D_80AE4928 = { 0, 0, 255, 0 };
static Vec3f D_80AE492C = { 0.0f, 0.0f, 0.0f };
static Color_RGBA8_n D_80AE4938 = { 200, 200, 255, 255 };
static Color_RGBA8_n D_80AE493C = { 0, 0, 255, 0 };
static Color_RGBA8 D_80AE4938 = { 200, 200, 255, 255 };
static Color_RGBA8 D_80AE493C = { 0, 0, 255, 0 };
static Vec3f D_80AE4940 = { 300.0f, 0.0f, 0.0f };
static Vec3f D_80AE494C = { 300.0f, 0.0f, 0.0f };
@ -277,8 +277,8 @@ void func_80AE2B90(EnRd* this, GlobalContext* globalCtx) {
void func_80AE2C1C(EnRd* this, GlobalContext* globalCtx) {
Vec3f sp44 = D_80AE4918;
Color_RGBA8_n sp40 = D_80AE4924;
Color_RGBA8_n sp3C = D_80AE4928;
Color_RGBA8 sp40 = D_80AE4924;
Color_RGBA8 sp3C = D_80AE4928;
Player* player = PLAYER;
s32 pad;
s16 sp32 = this->actor.yawTowardsLink - this->actor.shape.rot.y - this->unk_30E - this->unk_310;
@ -518,8 +518,8 @@ void func_80AE37BC(EnRd* this) {
void func_80AE3834(EnRd* this, GlobalContext* globalCtx) {
Vec3f sp34 = D_80AE492C;
Color_RGBA8_n sp30 = D_80AE4938;
Color_RGBA8_n sp2C = D_80AE493C;
Color_RGBA8 sp30 = D_80AE4938;
Color_RGBA8 sp2C = D_80AE493C;
Player* player = PLAYER;
s16 temp_v0 = this->actor.yawTowardsLink - this->actor.shape.rot.y - this->unk_30E - this->unk_310;
@ -866,9 +866,9 @@ void EnRd_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
if (idx >= 0) {
Matrix_MultVec3f(&sp2C, &destPos);
this->unkFire[idx].x = destPos.x;
this->unkFire[idx].y = destPos.y;
this->unkFire[idx].z = destPos.z;
this->firePos[idx].x = destPos.x;
this->firePos[idx].y = destPos.y;
this->firePos[idx].z = destPos.z;
}
}
}
@ -892,8 +892,8 @@ void EnRd_Draw(Actor* thisx, GlobalContext* globalCtx) {
this->actor.dmgEffectTimer++;
THIS->unk_31A--;
if (this->unk_31A % 4 == 0) {
func_8002A54C(globalCtx, &this->actor, &this->unkFire[this->unk_31A >> 2], 0x4B, 0, 0,
(this->unk_31A >> 2));
EffectSsEnFire_SpawnVec3s(globalCtx, &this->actor, &this->firePos[this->unk_31A >> 2], 0x4B, 0, 0,
(this->unk_31A >> 2));
}
}
} else {

View file

@ -10,7 +10,7 @@ typedef void (*EnRdActionFunc)(struct EnRd*, GlobalContext*);
typedef struct EnRd {
/* 0x0000 */ Actor actor;
/* 0x014C */ Vec3s unkFire[10];
/* 0x014C */ Vec3s firePos[10];
/* 0x0188 */ SkelAnime skelAnime;
/* 0x01CC */ Vec3s limbDrawTable[26];
/* 0x0268 */ Vec3s transitionDrawTable[26];

View file

@ -439,31 +439,28 @@ s32 func_80AEB480(GlobalContext* globalCtx, u16 action) {
return func_80AEAFE0(globalCtx, action, 3);
}
void func_80AEB4A8(EnRu1* this, GlobalContext* globalCtx, s16 arg2, s16 arg3) {
Vec3f sp24;
void EnRu1_SpawnRipple(EnRu1* this, GlobalContext* globalCtx, s16 radiusMax, s16 life) {
Vec3f pos;
Actor* thisx = &this->actor;
sp24.x = thisx->posRot.pos.x;
sp24.y = thisx->posRot.pos.y + thisx->waterY;
sp24.z = thisx->posRot.pos.z;
func_80029444(globalCtx, &sp24, 100, arg2, arg3);
pos.x = thisx->posRot.pos.x;
pos.y = thisx->posRot.pos.y + thisx->waterY;
pos.z = thisx->posRot.pos.z;
EffectSsGRipple_Spawn(globalCtx, &pos, 100, radiusMax, life);
}
void func_80AEB50C(EnRu1* this, GlobalContext* globalCtx) {
this->unk_270 += 1.0f;
if (this->unk_270 >= kREG(3) + 10.0f) {
func_80AEB4A8(this, globalCtx, kREG(1) + 500, 0);
EnRu1_SpawnRipple(this, globalCtx, kREG(1) + 500, 0);
this->unk_270 = 0.0f;
}
}
void func_80AEB59C(EnRu1* this, GlobalContext* globalCtx) {
f32 temp_f0;
func_80AEB4A8(this, globalCtx, kREG(2) + 500, 0);
func_80AEB4A8(this, globalCtx, kREG(2) + 500, kREG(3) + 10.0f);
temp_f0 = kREG(3) + 10.0f;
func_80AEB4A8(this, globalCtx, kREG(2) + 500, temp_f0 + temp_f0);
EnRu1_SpawnRipple(this, globalCtx, kREG(2) + 500, 0);
EnRu1_SpawnRipple(this, globalCtx, kREG(2) + 500, kREG(3) + 10.0f);
EnRu1_SpawnRipple(this, globalCtx, kREG(2) + 500, (kREG(3) + 10.0f) * 2.0f);
}
void func_80AEB680(EnRu1* this, GlobalContext* globalCtx) {
@ -474,7 +471,7 @@ void func_80AEB680(EnRu1* this, GlobalContext* globalCtx) {
pos.y = thisx->posRot.pos.y + thisx->waterY;
pos.z = thisx->posRot.pos.z;
func_8002949C(globalCtx, &pos, 0, 0, 1, 0);
EffectSsGSplash_Spawn(globalCtx, &pos, 0, 0, 1, 0);
}
void func_80AEB6E0(EnRu1* this, GlobalContext* globalCtx) {

View file

@ -109,7 +109,7 @@ void EnSb_SpawnBubbles(GlobalContext* globalCtx, EnSb* this) {
if (this->actor.waterY > 0) {
for (i = 0; i < 10; i++) {
func_800293E4(globalCtx, &this->actor.posRot.pos, 10.0f, 10.0f, 30.0f, 0.25f);
EffectSsBubble_Spawn(globalCtx, &this->actor.posRot.pos, 10.0f, 10.0f, 30.0f, 0.25f);
}
}
}
@ -470,7 +470,7 @@ void EnSb_Draw(Actor* thisx, GlobalContext* globalCtx) {
flamePos.x = Math_Rand_CenteredFloat(5.0f) + (this->actor.posRot.pos.x + offset->x);
flamePos.y = Math_Rand_CenteredFloat(5.0f) + (this->actor.posRot.pos.y + offset->y);
flamePos.z = Math_Rand_CenteredFloat(5.0f) + (this->actor.posRot.pos.z + offset->z);
func_8002A4D4(globalCtx, this, &flamePos, 0x64, 0, 0, -1);
EffectSsEnFire_SpawnVec3f(globalCtx, this, &flamePos, 100, 0, 0, -1);
}
}
}

View file

@ -95,11 +95,11 @@ void EnSt_SetupAction(EnSt* this, EnStActionFunc actionFunc) {
/**
* Spawns `dustCnt` dust particles in a random pattern around the skulltulla
*/
void EnSt_SpawnDustEffects(EnSt* this, GlobalContext* globalCtx, s32 dustCnt) {
Color_RGBA8_n primColor = { 170, 130, 90, 255 };
Color_RGBA8_n envColor = { 100, 60, 20, 0 };
void EnSt_SpawnDust(EnSt* this, GlobalContext* globalCtx, s32 dustCnt) {
Color_RGBA8 primColor = { 170, 130, 90, 255 };
Color_RGBA8 envColor = { 100, 60, 20, 0 };
Vec3f dustVel = { 0.0f, 0.0f, 0.0f };
Vec3f initialYAccel = { 0.0f, 0.3f, 0.0f };
Vec3f dustAccel = { 0.0f, 0.3f, 0.0f };
Vec3f dustPos;
s16 yAngle;
s32 i;
@ -107,11 +107,11 @@ void EnSt_SpawnDustEffects(EnSt* this, GlobalContext* globalCtx, s32 dustCnt) {
yAngle = (Math_Rand_ZeroOne() - 0.5f) * 65536.0f;
dustPos.y = this->actor.groundY;
for (i = dustCnt; i >= 0; i--, yAngle += (s16)(0x10000 / dustCnt)) {
initialYAccel.x = (Math_Rand_ZeroOne() - 0.5f) * 4.0f;
initialYAccel.z = (Math_Rand_ZeroOne() - 0.5f) * 4.0f;
dustAccel.x = (Math_Rand_ZeroOne() - 0.5f) * 4.0f;
dustAccel.z = (Math_Rand_ZeroOne() - 0.5f) * 4.0f;
dustPos.x = this->actor.posRot.pos.x + (Math_Sins(yAngle) * 22.0f);
dustPos.z = this->actor.posRot.pos.z + (Math_Coss(yAngle) * 22.0f);
func_8002836C(globalCtx, &dustPos, &dustVel, &initialYAccel, &primColor, &envColor, 120, 40, 10);
func_8002836C(globalCtx, &dustPos, &dustVel, &dustAccel, &primColor, &envColor, 120, 40, 10);
}
}
@ -123,17 +123,17 @@ void EnSt_SpawnBlastEffect(EnSt* this, GlobalContext* globalCtx) {
blastPos.y = this->actor.groundY;
blastPos.z = this->actor.posRot.pos.z;
func_80028F84(globalCtx, &blastPos, &zeroVec, &zeroVec, 100, 220, 8);
EffectSsBlast_SpawnWhiteCustomScale(globalCtx, &blastPos, &zeroVec, &zeroVec, 100, 220, 8);
}
void EnSt_SpawnDeadEffect(EnSt* this, GlobalContext* globalCtx) {
Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
Vec3f deadPos;
Vec3f firePos;
deadPos.x = this->actor.posRot.pos.x + ((Math_Rand_ZeroOne() - 0.5f) * 60.0f);
deadPos.y = (this->actor.posRot.pos.y + 10.0f) + ((Math_Rand_ZeroOne() - 0.5f) * 45.0f);
deadPos.z = this->actor.posRot.pos.z + ((Math_Rand_ZeroOne() - 0.5f) * 60.0f);
func_8002A6B8(globalCtx, &deadPos, &zeroVec, &zeroVec, 100, 0, 255, 255, 255, 255, 255, 0, 0, 1, 9, 1);
firePos.x = this->actor.posRot.pos.x + ((Math_Rand_ZeroOne() - 0.5f) * 60.0f);
firePos.y = (this->actor.posRot.pos.y + 10.0f) + ((Math_Rand_ZeroOne() - 0.5f) * 45.0f);
firePos.z = this->actor.posRot.pos.z + ((Math_Rand_ZeroOne() - 0.5f) * 60.0f);
EffectSsDeadDb_Spawn(globalCtx, &firePos, &zeroVec, &zeroVec, 100, 0, 255, 255, 255, 255, 255, 0, 0, 1, 9, true);
}
s32 EnSt_CreateBlureEffect(GlobalContext* globalCtx) {
@ -622,7 +622,7 @@ s32 EnSt_IsDoneBouncing(EnSt* this, GlobalContext* globalCtx) {
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
EnSt_SpawnDustEffects(this, globalCtx, 10);
EnSt_SpawnDust(this, globalCtx, 10);
// creates an elastic bouncing effect, boucing up less for each hit on the ground.
this->actor.velocity.y = 6.0f / (4 - this->groundBounces);
this->groundBounces--;
@ -967,7 +967,7 @@ void EnSt_StartOnCeilingOrGround(EnSt* this, GlobalContext* globalCtx) {
void EnSt_Update(Actor* thisx, GlobalContext* globalCtx) {
EnSt* this = THIS;
s32 pad;
Color_RGBA8_n color = { 0, 0, 0, 0 };
Color_RGBA8 color = { 0, 0, 0, 0 };
if (this->actor.flags & 0x8000) {
SkelAnime_FrameUpdateMatrix(&this->skelAnime);

View file

@ -212,8 +212,8 @@ void func_80B11DEC(EnSyatekiNiw* this, GlobalContext* globalCtx) {
void func_80B11E78(EnSyatekiNiw* this, GlobalContext* globalCtx) {
Vec3f dustVelocity = { 0.0f, 0.0f, 0.0f };
Vec3f dustAccel = { 0.0f, 0.2f, 0.0f };
Color_RGBA8_n dustPrimColor = { 0, 0, 0, 255 };
Color_RGBA8_n dustEnvColor = { 0, 0, 0, 255 };
Color_RGBA8 dustPrimColor = { 0, 0, 0, 255 };
Color_RGBA8 dustEnvColor = { 0, 0, 0, 255 };
Vec3f dustPos;
f32 tmpf2;
f32 sp4C;
@ -335,7 +335,7 @@ void func_80B11E78(EnSyatekiNiw* this, GlobalContext* globalCtx) {
dustVelocity.y = Math_Rand_CenteredFloat(5.0f);
dustAccel.y = 0.2f;
dustPos = this->actor.posRot.pos;
func_8002836C(globalCtx, &dustPos, &dustVelocity, &dustAccel, &dustPrimColor, &dustEnvColor, 0x258, 0x28, 0x1E);
func_8002836C(globalCtx, &dustPos, &dustVelocity, &dustAccel, &dustPrimColor, &dustEnvColor, 600, 40, 30);
}
}
@ -514,8 +514,8 @@ void func_80B129EC(EnSyatekiNiw* this, GlobalContext* globalCtx) {
Actor_SetHeight(&this->actor, this->unk_2D4);
func_8002F374(globalCtx, &this->actor, &sp2E, &sp2C);
if ((this->unk_25E == 0) || (this->actor.projectedPos.z < -70.0f) || (sp2E < 0) || (sp2E > SCREEN_WIDTH) || (sp2C < 0) ||
(sp2C > SCREEN_HEIGHT)) {
if ((this->unk_25E == 0) || (this->actor.projectedPos.z < -70.0f) || (sp2E < 0) || (sp2E > SCREEN_WIDTH) ||
(sp2C < 0) || (sp2C > SCREEN_HEIGHT)) {
Actor_Kill(&this->actor);
return;
}

View file

@ -5,6 +5,7 @@
*/
#include "z_en_tubo_trap.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include <vt.h>
@ -69,88 +70,90 @@ void EnTuboTrap_DropCollectible(EnTuboTrap* this, GlobalContext* globalCtx) {
}
}
void EnTuboTrap_SpawnFragments(EnTuboTrap* this, GlobalContext* globalCtx) {
void EnTuboTrap_SpawnEffectsOnLand(EnTuboTrap* this, GlobalContext* globalCtx) {
f32 rand;
f32 cos;
f32 sin;
Vec3f spC8;
Vec3f spBC;
Vec3f pos;
Vec3f velocity;
s16 var;
s32 temp;
s32 arg5;
s32 i;
Vec3f* actorPos = &this->actor.posRot.pos;
for (i = 0, var = 0; i < 15; i++, var += 20000) {
sin = Math_Sins(var);
cos = Math_Coss(var);
spC8.x = sin * 8.0f;
spC8.y = (Math_Rand_ZeroOne() * 5.0f) + 2.0f;
spC8.z = cos * 8.0f;
pos.x = sin * 8.0f;
pos.y = (Math_Rand_ZeroOne() * 5.0f) + 2.0f;
pos.z = cos * 8.0f;
spBC.x = spC8.x * 0.23f;
spBC.y = (Math_Rand_ZeroOne() * 5.0f) + 2.0f;
spBC.z = spC8.z * 0.23f;
velocity.x = pos.x * 0.23f;
velocity.y = (Math_Rand_ZeroOne() * 5.0f) + 2.0f;
velocity.z = pos.z * 0.23f;
spC8.x += actorPos->x;
spC8.y += actorPos->y;
spC8.z += actorPos->z;
pos.x += actorPos->x;
pos.y += actorPos->y;
pos.z += actorPos->z;
rand = Math_Rand_ZeroOne();
if (rand < 0.2f) {
temp = 96;
arg5 = 96;
} else if (rand < 0.6f) {
temp = 64;
arg5 = 64;
} else {
temp = 32;
arg5 = 32;
}
func_80029E8C(globalCtx, &spC8, &spBC, actorPos, -240, temp, 10, 10, 0, (Math_Rand_ZeroOne() * 65.0f) + 15.0f,
0, 32, 60, -1, 3, &D_05017A60);
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, actorPos, -240, arg5, 10, 10, 0,
(Math_Rand_ZeroOne() * 65.0f) + 15.0f, 0, 32, 60, KAKERA_COLOR_NONE,
OBJECT_GAMEPLAY_DANGEON_KEEP, &D_05017A60);
}
func_80033480(globalCtx, actorPos, 30.0f, 4, 20, 50, 0);
}
void EnTuboTrap_SpawnWaterFragments(EnTuboTrap* this, GlobalContext* globalCtx) {
void EnTuboTrap_SpawnEffectsInWater(EnTuboTrap* this, GlobalContext* globalCtx) {
f32 rand;
f32 cos;
f32 sin;
Vec3f spC8;
Vec3f spBC;
Vec3f pos;
Vec3f velocity;
s16 var;
s32 temp;
s32 arg5;
s32 i;
Vec3f* actorPos = &this->actor.posRot.pos;
spC8 = *actorPos;
spC8.y += this->actor.waterY;
pos = *actorPos;
pos.y += this->actor.waterY;
func_8002949C(globalCtx, &spC8, 0, 0, 0, 400);
EffectSsGSplash_Spawn(globalCtx, &pos, 0, 0, 0, 400);
for (i = 0, var = 0; i < 15; i++, var += 20000) {
sin = Math_Sins(var);
cos = Math_Coss(var);
spC8.x = sin * 8.0f;
spC8.y = (Math_Rand_ZeroOne() * 5.0f) + 2.0f;
spC8.z = cos * 8.0f;
pos.x = sin * 8.0f;
pos.y = (Math_Rand_ZeroOne() * 5.0f) + 2.0f;
pos.z = cos * 8.0f;
spBC.x = spC8.x * 0.20f;
spBC.y = (Math_Rand_ZeroOne() * 4.0f) + 2.0f;
spBC.z = spC8.z * 0.20f;
velocity.x = pos.x * 0.20f;
velocity.y = (Math_Rand_ZeroOne() * 4.0f) + 2.0f;
velocity.z = pos.z * 0.20f;
spC8.x += actorPos->x;
spC8.y += actorPos->y;
spC8.z += actorPos->z;
pos.x += actorPos->x;
pos.y += actorPos->y;
pos.z += actorPos->z;
rand = Math_Rand_ZeroOne();
if (rand < 0.2f) {
temp = 64;
arg5 = 64;
} else {
temp = 32;
arg5 = 32;
}
func_80029E8C(globalCtx, &spC8, &spBC, actorPos, -180, temp, 30, 30, 0, (Math_Rand_ZeroOne() * 65.0f) + 15.0f,
0, 32, 70, -1, 3, &D_05017A60);
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, actorPos, -180, arg5, 30, 30, 0,
(Math_Rand_ZeroOne() * 65.0f) + 15.0f, 0, 32, 70, KAKERA_COLOR_NONE,
OBJECT_GAMEPLAY_DANGEON_KEEP, &D_05017A60);
}
}
@ -160,7 +163,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
if ((this->actor.bgCheckFlags & 0x20) && (this->actor.waterY > 15.0f)) {
EnTuboTrap_SpawnWaterFragments(this, globalCtx);
EnTuboTrap_SpawnEffectsInWater(this, globalCtx);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 40, NA_SE_EV_BOMB_DROP_WATER);
EnTuboTrap_DropCollectible(this, globalCtx);
Actor_Kill(&this->actor);
@ -169,7 +172,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, GlobalContext* globalCtx) {
if (this->collider.base.atFlags & 4) {
this->collider.base.atFlags &= ~4;
EnTuboTrap_SpawnFragments(this, globalCtx);
EnTuboTrap_SpawnEffectsOnLand(this, globalCtx);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 40, NA_SE_IT_SHIELD_REFLECT_SW);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 40, NA_SE_EV_POT_BROKEN);
EnTuboTrap_DropCollectible(this, globalCtx);
@ -179,7 +182,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & 2) {
this->collider.base.acFlags &= ~2;
EnTuboTrap_SpawnFragments(this, globalCtx);
EnTuboTrap_SpawnEffectsOnLand(this, globalCtx);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 40, NA_SE_EV_EXPLOSION);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 40, NA_SE_EV_POT_BROKEN);
EnTuboTrap_DropCollectible(this, globalCtx);
@ -190,7 +193,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, GlobalContext* globalCtx) {
if (this->collider.base.atFlags & 2) {
this->collider.base.atFlags &= ~2;
if (this->collider.base.at == &player->actor) {
EnTuboTrap_SpawnFragments(this, globalCtx);
EnTuboTrap_SpawnEffectsOnLand(this, globalCtx);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 40, NA_SE_EV_POT_BROKEN);
Audio_PlaySoundAtPosition(globalCtx, &player->actor.posRot.pos, 40, NA_SE_PL_BODY_HIT);
EnTuboTrap_DropCollectible(this, globalCtx);
@ -200,7 +203,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, GlobalContext* globalCtx) {
}
if ((this->actor.bgCheckFlags & 8) || (this->actor.bgCheckFlags & 1)) {
EnTuboTrap_SpawnFragments(this, globalCtx);
EnTuboTrap_SpawnEffectsOnLand(this, globalCtx);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 40, NA_SE_EV_POT_BROKEN);
EnTuboTrap_DropCollectible(this, globalCtx);
Actor_Kill(&this->actor);

View file

@ -215,12 +215,12 @@ void EnWallmas_SetupCooldown(EnWallmas* this) {
}
void EnWallmas_SetupDie(EnWallmas* this, GlobalContext* globalCtx) {
static Vec3f D_80B30D70 = { 0.0f, 0.0f, 0.0f };
static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
this->actor.speedXZ = 0.0f;
this->actor.velocity.y = 0.0f;
func_8002A6B8(globalCtx, &this->actor.posRot.pos, &D_80B30D70, &D_80B30D70, 0xFA, -0xA, 0xFF, 0xFF, 0xFF, 0xFF, 0,
0, 0xFF, 1, 9, 1);
EffectSsDeadDb_Spawn(globalCtx, &this->actor.posRot.pos, &zeroVec, &zeroVec, 250, -10, 255, 255, 255, 255, 0, 0,
255, 1, 9, true);
Item_DropCollectibleRandom(globalCtx, &this->actor, &this->actor.posRot.pos, 0xC0);
this->actionFunc = EnWallmas_Die;
@ -497,7 +497,7 @@ void EnWallmas_ColUpdate(EnWallmas* this, GlobalContext* globalCtx) {
}
} else {
if (this->actor.colChkInfo.damageEffect == DAMAGE_EFFECT_BURN) {
func_8002A65C(globalCtx, &this->actor, &this->actor.posRot.pos, 0x28, 0x28);
EffectSsFCircle_Spawn(globalCtx, &this->actor, &this->actor.posRot.pos, 40, 40);
}
EnWallmas_SetupTakeDamage(this);

View file

@ -96,8 +96,9 @@ void func_80B43B6C(EnYukabyun* this, GlobalContext* globalCtx) {
func_8002F974(&this->actor, NA_SE_EN_YUKABYUN_FLY - SFX_FLAG);
}
void func_80B43BCC(EnYukabyun* this, GlobalContext* globalCtx) {
func_800297A4(globalCtx, &this->actor.posRot.pos, 8.0f, 0, 0x514, 0x12C, 0xF, 0x5F, 0xA, &D_06000A60);
void EnYukabyun_Break(EnYukabyun* this, GlobalContext* globalCtx) {
EffectSsHahen_SpawnBurst(globalCtx, &this->actor.posRot.pos, 8.0f, 0, 1300, 300, 15, OBJECT_YUKABYUN, 10,
&D_06000A60);
Actor_Kill(&this->actor);
}
@ -113,13 +114,13 @@ void EnYukabyun_Update(Actor* thisx, GlobalContext* globalCtx) {
this->collider.base.maskA &= ~0x2;
this->actor.flags &= ~0x5;
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 30, NA_SE_EN_OCTAROCK_ROCK);
this->actionfunc = func_80B43BCC;
this->actionfunc = EnYukabyun_Break;
}
this->actionfunc(this, globalCtx);
Actor_MoveForward(&this->actor);
if (!(this->actionfunc == func_80B43A94 || this->actionfunc == func_80B43BCC)) {
if (!(this->actionfunc == func_80B43A94 || this->actionfunc == EnYukabyun_Break)) {
func_8002E4B4(globalCtx, &this->actor, 5.0f, 20.0f, 8.0f, 5);
Collider_CylinderUpdate(&this->actor, &this->collider);

View file

@ -19,7 +19,7 @@ void ItemEtcetera_Draw(Actor* thisx, GlobalContext* globalCtx);
void func_80B857D0(ItemEtcetera* this, GlobalContext* globalCtx);
void func_80B85824(ItemEtcetera* this, GlobalContext* globalCtx);
void func_80B858B4(ItemEtcetera* this, GlobalContext* globalCtx);
void func_80B8598C(ItemEtcetera* this, GlobalContext* globalCtx);
void ItemEtcetera_SpawnSparkles(ItemEtcetera* this, GlobalContext* globalCtx);
void ItemEtcetera_MoveFireArrowDown(ItemEtcetera* this, GlobalContext* globalCtx);
void func_80B85B28(ItemEtcetera* this, GlobalContext* globalCtx);
void ItemEtcetera_UpdateFireArrow(ItemEtcetera* this, GlobalContext* globalCtx);
@ -139,36 +139,33 @@ void func_80B858B4(ItemEtcetera* this, GlobalContext* globalCtx) {
if (0) {} // Necessary to match
func_8002F434(&this->actor, globalCtx, this->getItemId, 30.0f, 50.0f);
if ((globalCtx->gameplayFrames & 0xD) == 0) {
func_800293E4(globalCtx, &this->actor.posRot.pos, 0.0f, 0.0f, 10.0f, 0.13f);
EffectSsBubble_Spawn(globalCtx, &this->actor.posRot.pos, 0.0f, 0.0f, 10.0f, 0.13f);
}
}
}
void func_80B8598C(ItemEtcetera* this, GlobalContext* globalCtx) {
void ItemEtcetera_SpawnSparkles(ItemEtcetera* this, GlobalContext* globalCtx) {
static Vec3f velocity = { 0.0f, 0.2f, 0.0f };
static Vec3f accel = { 0.0f, 0.05f, 0.0f };
static Color_RGB8 primColor = { 255, 255, 255 };
static Color_RGB8 envColor = { 255, 50, 50 };
Vec3f pos;
static Vec3f D_80B85D74 = { 0.0f, 0.2f, 0.0f };
static Vec3f D_80B85D80 = { 0.0f, 0.05f, 0.0f };
static Color_RGB8 D_80B85D8C = { 255, 255, 255 };
static Color_RGB8 D_80B85D90 = { 255, 50, 50 };
Vec3f vec;
D_80B85D74.x = Math_Rand_CenteredFloat(3.0f);
D_80B85D74.z = Math_Rand_CenteredFloat(3.0f);
D_80B85D74.y = -0.05f;
D_80B85D80.y = -0.025f;
vec.x = Math_Rand_CenteredFloat(12.0f) + this->actor.posRot.pos.x;
vec.y = (Math_Rand_ZeroOne() * 6.0f) + this->actor.posRot.pos.y;
vec.z = Math_Rand_CenteredFloat(12.0f) + this->actor.posRot.pos.z;
func_80028BB0(globalCtx, &vec, &D_80B85D74, &D_80B85D80, &D_80B85D8C, &D_80B85D90, 0x1388, 0x10);
velocity.x = Math_Rand_CenteredFloat(3.0f);
velocity.z = Math_Rand_CenteredFloat(3.0f);
velocity.y = -0.05f;
accel.y = -0.025f;
pos.x = Math_Rand_CenteredFloat(12.0f) + this->actor.posRot.pos.x;
pos.y = (Math_Rand_ZeroOne() * 6.0f) + this->actor.posRot.pos.y;
pos.z = Math_Rand_CenteredFloat(12.0f) + this->actor.posRot.pos.z;
EffectSsKiraKira_SpawnDispersed(globalCtx, &pos, &velocity, &accel, &primColor, &envColor, 5000, 16);
}
void ItemEtcetera_MoveFireArrowDown(ItemEtcetera* this, GlobalContext* globalCtx) {
func_8002E4B4(globalCtx, &this->actor, 10.0f, 10.0f, 0.0f, 5);
Actor_MoveForward(&this->actor);
if (!(this->actor.bgCheckFlags & 1)) {
func_80B8598C(this, globalCtx);
ItemEtcetera_SpawnSparkles(this, globalCtx);
}
this->actor.shape.rot.y += 0x400;
func_80B85824(this, globalCtx);

View file

@ -103,8 +103,8 @@ void ItemOcarina_Fly(ItemOcarina* this, GlobalContext* globalCtx) {
}
if (globalCtx->csCtx.frames == 897) {
func_80029444(globalCtx, &this->actor.posRot.pos, 100, 500, 0);
func_8002949C(globalCtx, &this->actor.posRot.pos, 0, 0, 1, 0);
EffectSsGRipple_Spawn(globalCtx, &this->actor.posRot.pos, 100, 500, 0);
EffectSsGSplash_Spawn(globalCtx, &this->actor.posRot.pos, 0, 0, 1, 0);
this->actor.velocity.x = 0.0f;
this->actor.velocity.y = 0.0f;
this->actor.velocity.z = 0.0f;
@ -119,7 +119,7 @@ void ItemOcarina_Fly(ItemOcarina* this, GlobalContext* globalCtx) {
ripplePos.x = 274.0f;
ripplePos.y = -60.0f;
ripplePos.z = 907.0f;
func_80029444(globalCtx, &ripplePos, 100, 500, 0);
EffectSsGRipple_Spawn(globalCtx, &ripplePos, 100, 500, 0);
}
}
@ -186,7 +186,7 @@ void ItemOcarina_WaitInWater(ItemOcarina* this, GlobalContext* globalCtx) {
func_8002F434(&this->actor, globalCtx, GI_OCARINA_OOT, 30.0f, 50.0f);
if ((globalCtx->gameplayFrames & 13) == 0) {
func_800293E4(globalCtx, &this->actor.posRot.pos, 0.0f, 0.0f, 10.0f, 0.13f);
EffectSsBubble_Spawn(globalCtx, &this->actor.posRot.pos, 0.0f, 0.0f, 10.0f, 0.13f);
}
}
}

View file

@ -5,6 +5,7 @@
*/
#include "z_obj_bombiwa.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#define FLAGS 0x00000000
@ -86,25 +87,25 @@ void ObjBombiwa_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void ObjBombiwa_Break(ObjBombiwa* this, GlobalContext* globalCtx) {
Vec3f temp_s2;
Vec3f temp_s3;
Vec3f pos;
Vec3f velocity;
Gfx** dlist;
s16 u0;
s16 arg5;
s16 scale;
s32 i;
dlist = D_060009E0;
for (i = 0; i < ARRAY_COUNT(sEffectScales); i++) {
temp_s2.x = ((Math_Rand_ZeroOne() - 0.5f) * 10.0f) + this->actor.initPosRot.pos.x;
temp_s2.y = ((Math_Rand_ZeroOne() * 5.0f) + this->actor.initPosRot.pos.y) + 8.0f;
temp_s2.z = ((Math_Rand_ZeroOne() - 0.5f) * 10.0f) + this->actor.initPosRot.pos.z;
temp_s3.x = (Math_Rand_ZeroOne() - 0.5f) * 15.0f;
temp_s3.y = (Math_Rand_ZeroOne() * 16.0f) + 5.0f;
temp_s3.z = (Math_Rand_ZeroOne() - 0.5f) * 15.0f;
pos.x = ((Math_Rand_ZeroOne() - 0.5f) * 10.0f) + this->actor.initPosRot.pos.x;
pos.y = ((Math_Rand_ZeroOne() * 5.0f) + this->actor.initPosRot.pos.y) + 8.0f;
pos.z = ((Math_Rand_ZeroOne() - 0.5f) * 10.0f) + this->actor.initPosRot.pos.z;
velocity.x = (Math_Rand_ZeroOne() - 0.5f) * 15.0f;
velocity.y = (Math_Rand_ZeroOne() * 16.0f) + 5.0f;
velocity.z = (Math_Rand_ZeroOne() - 0.5f) * 15.0f;
scale = sEffectScales[i];
u0 = (scale >= 11) ? 37 : 33;
func_80029E8C(globalCtx, &temp_s2, &temp_s3, &temp_s2, -400, u0, 10, 2, 0, scale, 1, 0, 80, -1, OBJECT_BOMBIWA,
dlist);
arg5 = (scale >= 11) ? 37 : 33;
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, &pos, -400, arg5, 10, 2, 0, scale, 1, 0, 80, KAKERA_COLOR_NONE,
OBJECT_BOMBIWA, dlist);
}
func_80033480(globalCtx, &this->actor.posRot.pos, 60.0f, 8, 100, 160, 1);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_obj_comb.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#define FLAGS 0x00000000
@ -57,14 +58,14 @@ extern Gfx D_05009940[];
void ObjComb_Break(ObjComb* this, GlobalContext* globalCtx) {
Vec3f pos1;
Vec3f posSum;
Vec3f pos2;
Vec3f pos;
Vec3f velocity;
Gfx** dlist = D_05009940;
s16 scale;
s16 angle = 0;
s16 gravityInfluence;
u8 u0;
u8 rotSpeed;
s16 gravity;
u8 arg5;
u8 arg6;
f32 rand1;
f32 rand2;
s32 i;
@ -77,40 +78,43 @@ void ObjComb_Break(ObjComb* this, GlobalContext* globalCtx) {
pos1.y = (i - 15) * 0.7f;
pos1.z = Math_Coss(angle) * rand1;
Math_Vec3f_Sum(&pos1, &this->actor.posRot.pos, &posSum);
Math_Vec3f_Sum(&pos1, &this->actor.posRot.pos, &pos);
pos2.x = (Math_Rand_ZeroOne() - 0.5f) + pos1.x * 0.5f;
pos2.y = (Math_Rand_ZeroOne() - 0.5f) + pos1.y * 0.6f;
pos2.z = (Math_Rand_ZeroOne() - 0.5f) + pos1.z * 0.5f;
velocity.x = (Math_Rand_ZeroOne() - 0.5f) + pos1.x * 0.5f;
velocity.y = (Math_Rand_ZeroOne() - 0.5f) + pos1.y * 0.6f;
velocity.z = (Math_Rand_ZeroOne() - 0.5f) + pos1.z * 0.5f;
scale = Math_Rand_ZeroOne() * 72.0f + 25.0f;
if (scale < 40) {
gravityInfluence = -200;
rotSpeed = 40;
gravity = -200;
arg6 = 40;
} else if (scale < 70) {
gravityInfluence = -280;
rotSpeed = 30;
gravity = -280;
arg6 = 30;
} else {
gravityInfluence = -340;
rotSpeed = 20;
gravity = -340;
arg6 = 20;
}
rand2 = Math_Rand_ZeroOne();
if (rand2 < 0.1f) {
u0 = 96;
arg5 = 96;
} else if (rand2 < 0.8f) {
u0 = 64;
arg5 = 64;
} else {
u0 = 32;
arg5 = 32;
}
func_80029E8C(globalCtx, &posSum, &pos2, &posSum, gravityInfluence, u0, rotSpeed, 4, 0, scale, 0, 0, 80, -1, 2,
dlist);
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, &pos, gravity, arg5, arg6, 4, 0, scale, 0, 0, 80,
KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_FIELD_KEEP, dlist);
}
posSum.x = this->actor.posRot.pos.x;
posSum.y = this->actor.posRot.pos.y - 10.0f;
posSum.z = this->actor.posRot.pos.z;
func_80033480(globalCtx, &posSum, 40.0f, 6, 70, 60, 1);
pos.x = this->actor.posRot.pos.x;
pos.y = this->actor.posRot.pos.y - 10.0f;
pos.z = this->actor.posRot.pos.z;
func_80033480(globalCtx, &pos, 40.0f, 6, 70, 60, 1);
}
void ObjComb_ChooseItemDrop(ObjComb* this, GlobalContext* globalCtx) {

View file

@ -12,8 +12,8 @@
#define THIS ((ObjLightswitch*)thisx)
typedef enum {
/* 0x00 */ FACE_EYES_CLOSED,
/* 0x01 */ FACE_EYES_OPEN,
/* 0x00 */ FACE_EYES_CLOSED,
/* 0x01 */ FACE_EYES_OPEN,
/* 0x02 */ FACE_EYES_OPEN_SMILING
} FaceTextureIndex;
@ -145,7 +145,8 @@ void ObjLightswitch_SpawnDisappearEffects(ObjLightswitch* this, GlobalContext* g
pos.x = this->actor.posRot.pos.x + ((z * s) + (x * c));
pos.y = this->actor.posRot.pos.y + y + 10.0f;
pos.z = this->actor.posRot.pos.z + ((z * c) - (x * s));
func_8002A6B8(globalCtx, &pos, &D_80B97F74, &D_80B97F74, 0x64, 0, 0xFF, 0xFF, 0xA0, 0xA0, 0xFF, 0, 0, 1, 9, 1);
EffectSsDeadDb_Spawn(globalCtx, &pos, &D_80B97F74, &D_80B97F74, 100, 0, 255, 255, 160, 160, 255, 0, 0, 1, 9,
true);
}
}

View file

@ -13,6 +13,7 @@
#include "overlays/actors/ovl_En_Box/z_en_box.h"
#include "overlays/actors/ovl_En_Door/z_en_door.h"
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
#include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h"
#define THIS ((Player*)thisx)
@ -5448,22 +5449,22 @@ void func_8083CF5C(Player* this, GlobalContext* globalCtx) {
}
}
s32 func_8083CFA8(GlobalContext* globalCtx, Player* this, f32 arg2, s32 arg3) {
s32 func_8083CFA8(GlobalContext* globalCtx, Player* this, f32 arg2, s32 splashScale) {
f32 sp3C = fabsf(arg2);
UNK_TYPE sp38;
f32 sp34;
Vec3f sp28;
s32 temp;
Vec3f splashPos;
s32 splashType;
if (sp3C > 2.0f) {
sp28.x = this->bodyPartsPos[0].x;
sp28.z = this->bodyPartsPos[0].z;
splashPos.x = this->bodyPartsPos[0].x;
splashPos.z = this->bodyPartsPos[0].z;
sp34 = this->actor.posRot.pos.y;
if (func_8004213C(globalCtx, &globalCtx->colCtx, sp28.x, sp28.z, &sp34, &sp38)) {
if (func_8004213C(globalCtx, &globalCtx->colCtx, splashPos.x, splashPos.z, &sp34, &sp38)) {
if ((sp34 - this->actor.posRot.pos.y) < 100.0f) {
temp = (sp3C <= 10.0f) ? 0 : 1;
sp28.y = sp34;
func_8002949C(globalCtx, &sp28, 0, 0, temp, arg3);
splashType = (sp3C <= 10.0f) ? 0 : 1;
splashPos.y = sp34;
EffectSsGSplash_Spawn(globalCtx, &splashPos, NULL, NULL, splashType, splashScale);
return 1;
}
}
@ -5609,7 +5610,7 @@ void func_8083D53C(GlobalContext* globalCtx, Player* this) {
}
void func_8083D6EC(GlobalContext* globalCtx, Player* this) {
Vec3f sp5C;
Vec3f ripplePos;
f32 temp1;
f32 temp2;
f32 temp3;
@ -5670,10 +5671,10 @@ void func_8083D6EC(GlobalContext* globalCtx, Player* this) {
if (this->unk_854 > 15.0f) {
this->unk_854 = 0.0f;
sp5C.x = (Math_Rand_ZeroOne() * 10.0f) + this->actor.posRot.pos.x;
sp5C.y = this->actor.posRot.pos.y + this->actor.waterY;
sp5C.z = (Math_Rand_ZeroOne() * 10.0f) + this->actor.posRot.pos.z;
func_80029444(globalCtx, &sp5C, 100, 500, 0);
ripplePos.x = (Math_Rand_ZeroOne() * 10.0f) + this->actor.posRot.pos.x;
ripplePos.y = this->actor.posRot.pos.y + this->actor.waterY;
ripplePos.z = (Math_Rand_ZeroOne() * 10.0f) + this->actor.posRot.pos.z;
EffectSsGRipple_Spawn(globalCtx, &ripplePos, 100, 500, 0);
if ((this->linearVelocity > 4.0f) && !func_808332B8(this) &&
((this->actor.posRot.pos.y + this->actor.waterY) < this->bodyPartsPos[0].y)) {
@ -5684,19 +5685,19 @@ void func_8083D6EC(GlobalContext* globalCtx, Player* this) {
}
if (this->actor.waterY > 40.0f) {
s32 sp48 = 0;
s32 numBubbles = 0;
s32 i;
if ((this->actor.velocity.y > -1.0f) || (this->actor.bgCheckFlags & 1)) {
if (Math_Rand_ZeroOne() < 0.2f) {
sp48 = 1;
numBubbles = 1;
}
} else {
sp48 = this->actor.velocity.y * -2.0f;
numBubbles = this->actor.velocity.y * -2.0f;
}
for (i = 0; i < sp48; i++) {
func_800293E4(globalCtx, &this->actor.posRot.pos, 20.0f, 10.0f, 20.0f, 0.13f);
for (i = 0; i < numBubbles; i++) {
EffectSsBubble_Spawn(globalCtx, &this->actor.posRot.pos, 20.0f, 10.0f, 20.0f, 0.13f);
}
}
}
@ -7489,7 +7490,7 @@ void func_80842A88(GlobalContext* globalCtx, Player* this) {
s32 func_80842AC4(GlobalContext* globalCtx, Player* this) {
if ((this->heldItemActionParam == PLAYER_AP_STICK) && (this->unk_85C > 0.5f)) {
if (AMMO(ITEM_STICK) != 0) {
func_800298EC(globalCtx, &this->bodyPartsPos[15], this->actor.shape.rot.y + 0x8000);
EffectSsStick_Spawn(globalCtx, &this->bodyPartsPos[15], this->actor.shape.rot.y + 0x8000);
this->unk_85C = 0.5f;
func_80842A88(globalCtx, this);
func_8002F7DC(&this->actor, NA_SE_IT_WOODSTICK_BROKEN);
@ -7505,7 +7506,7 @@ s32 func_80842B7C(GlobalContext* globalCtx, Player* this) {
if (this->heldItemActionParam == PLAYER_AP_SWORD_BGS) {
if ((gSaveContext.bgsFlag == 0) && (gSaveContext.swordHealth > 0.0f)) {
if ((gSaveContext.swordHealth -= 1.0f) <= 0.0f) {
func_800298EC(globalCtx, &this->bodyPartsPos[15], this->actor.shape.rot.y + 0x8000);
EffectSsStick_Spawn(globalCtx, &this->bodyPartsPos[15], this->actor.shape.rot.y + 0x8000);
func_800849EC(globalCtx);
func_8002F7DC(&this->actor, NA_SE_IT_MAJIN_SWORD_BROKEN);
}
@ -9735,8 +9736,8 @@ void func_808486A8(GlobalContext* globalCtx, Player* this) {
Vec3f D_808547A4 = { 0.0f, 0.5f, 0.0f };
Vec3f D_808547B0 = { 0.0f, 0.5f, 0.0f };
Color_RGBA8_n D_808547BC = { 255, 255, 100, 255 };
Color_RGBA8_n D_808547C0 = { 255, 50, 0, 0 };
Color_RGBA8 D_808547BC = { 255, 255, 100, 255 };
Color_RGBA8 D_808547C0 = { 255, 50, 0, 0 };
void func_80848A04(GlobalContext* globalCtx, Player* this) {
f32 temp;
@ -9764,28 +9765,27 @@ void func_80848A04(GlobalContext* globalCtx, Player* this) {
}
void func_80848B44(GlobalContext* globalCtx, Player* this) {
Vec3f sp3C;
Vec3f* sp38;
s32 sp34;
Vec3f shockPos;
Vec3f* randBodyPart;
s32 shockScale;
this->shockTimer--;
this->unk_892 += this->shockTimer;
if (this->unk_892 > 20) {
sp34 = this->shockTimer * 2;
shockScale = this->shockTimer * 2;
this->unk_892 -= 20;
if (sp34 > 40) {
sp34 = 40;
if (shockScale > 40) {
shockScale = 40;
}
sp38 = this->bodyPartsPos + (s32)Math_Rand_ZeroFloat(17.9f);
sp3C.x = (Math_Rand_CenteredFloat(5.0f) + sp38->x) - this->actor.posRot.pos.x;
sp3C.y = (Math_Rand_CenteredFloat(5.0f) + sp38->y) - this->actor.posRot.pos.y;
sp3C.z = (Math_Rand_CenteredFloat(5.0f) + sp38->z) - this->actor.posRot.pos.z;
randBodyPart = this->bodyPartsPos + (s32)Math_Rand_ZeroFloat(17.9f);
shockPos.x = (Math_Rand_CenteredFloat(5.0f) + randBodyPart->x) - this->actor.posRot.pos.x;
shockPos.y = (Math_Rand_CenteredFloat(5.0f) + randBodyPart->y) - this->actor.posRot.pos.y;
shockPos.z = (Math_Rand_CenteredFloat(5.0f) + randBodyPart->z) - this->actor.posRot.pos.z;
EffectSsFhgFlash_Spawn2(globalCtx, &this->actor, &sp3C, sp34, 1);
EffectSsFhgFlash_SpawnShock(globalCtx, &this->actor, &shockPos, shockScale, FHGFLASH_SHOCK_PLAYER);
func_8002F8F0(&this->actor, NA_SE_PL_SPARK - SFX_FLAG);
}
}
@ -9836,7 +9836,7 @@ void func_80848C74(GlobalContext* globalCtx, Player* this) {
flameIntensity = (*timerPtr - 25.0f) * 0.02f;
flameIntensity = CLAMP(flameIntensity, 0.0f, 1.0f);
func_8002A484(globalCtx, flameScale, i, flameIntensity);
EffectSsFireTail_SpawnFlameOnPlayer(globalCtx, flameScale, i, flameIntensity);
}
if (1) {}
@ -10115,7 +10115,8 @@ void Player_UpdateCommon(Player* this, GlobalContext* globalCtx, Input* input) {
func_80837B9C(this, globalCtx);
} else if ((this->actor.bgCheckFlags & 1) || (this->stateFlags1 & 0x8000000)) {
func_80836448(globalCtx, this,
func_808332B8(this) ? &D_04003310 : (this->shockTimer != 0) ? &D_04002F08 : &D_04002878);
func_808332B8(this) ? &D_04003310
: (this->shockTimer != 0) ? &D_04002F08 : &D_04002878);
}
} else {
if ((this->actor.parent == NULL) &&
@ -12495,7 +12496,7 @@ void func_8084FB10(Player* this, GlobalContext* globalCtx) {
if (func_80832594(this, 1, 100)) {
this->unk_84F = -1;
func_80029FAC(globalCtx, &this->actor.posRot.pos, this->actor.scale.x);
EffectSsIcePiece_SpawnBurst(globalCtx, &this->actor.posRot.pos, this->actor.scale.x);
func_8002F7DC(&this->actor, NA_SE_PL_ICE_BROKEN);
} else {
this->stateFlags2 |= 0x4000;
@ -12675,7 +12676,6 @@ s32 func_80850224(Player* this, GlobalContext* globalCtx) {
}
Vec3f D_80854A40 = { 0.0f, 40.0f, 45.0f };
Vec3f D_80854A4C = { 0.0f, 0.0f, 0.0f };
void func_808502D0(Player* this, GlobalContext* globalCtx) {
struct_80854190* sp44 = &D_80854190[this->swordAnimation];
@ -12723,11 +12723,12 @@ void func_808502D0(Player* this, GlobalContext* globalCtx) {
}
} else if (this->heldItemActionParam == PLAYER_AP_HAMMER) {
if ((this->swordAnimation == 0x16) || (this->swordAnimation == 0x13)) {
Vec3f sp30;
static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
Vec3f shockwavePos;
f32 sp2C;
sp30.y = func_8083973C(globalCtx, this, &D_80854A40, &sp30);
sp2C = this->actor.posRot.pos.y - sp30.y;
shockwavePos.y = func_8083973C(globalCtx, this, &D_80854A40, &shockwavePos);
sp2C = this->actor.posRot.pos.y - shockwavePos.y;
Math_ApproxUpdateScaledS(&this->actor.posRot2.rot.x, atan2s(45.0f, sp2C), 800);
func_80836AB8(this, 1);
@ -12736,7 +12737,7 @@ void func_808502D0(Player* this, GlobalContext* globalCtx) {
((this->swordAnimation == 0x13) && func_800A4530(&this->skelAnime, 2.0f))) &&
(sp2C > -40.0f) && (sp2C < 40.0f)) {
func_80842A28(globalCtx, this);
func_80029024(globalCtx, &sp30, &D_80854A4C, &D_80854A4C);
EffectSsBlast_SpawnWhiteShockwave(globalCtx, &shockwavePos, &zeroVec, &zeroVec);
}
}
}
@ -13707,14 +13708,12 @@ Vec3s D_80855210[2][2] = {
{ { -200, 500, 0 }, { 600, 400, 600 } },
};
Vec3f D_80855228 = { 0.0f, 0.0f, 0.0f };
Color_RGB8 D_80855234 = { 255, 255, 255 };
Color_RGB8 D_80855238 = { 0, 128, 128 };
void func_808526EC(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg2) {
static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
static Color_RGB8 primColor = { 255, 255, 255 };
static Color_RGB8 envColor = { 0, 128, 128 };
s32 age = gSaveContext.linkAge;
Vec3f sp40;
Vec3f sparklePos;
Vec3f sp34;
Vec3s* ptr;
@ -13731,9 +13730,9 @@ void func_808526EC(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg
sp34.y = ptr[0].y + Math_Rand_CenteredFloat(ptr[1].y);
sp34.z = ptr[0].z + Math_Rand_CenteredFloat(ptr[1].z);
SkinMatrix_Vec3fMtxFMultXYZ(&this->shieldMf, &sp34, &sp40);
SkinMatrix_Vec3fMtxFMultXYZ(&this->shieldMf, &sp34, &sparklePos);
func_80028BB0(globalCtx, &sp40, &D_80855228, &D_80855228, &D_80855234, &D_80855238, 600, -10);
EffectSsKiraKira_SpawnDispersed(globalCtx, &sparklePos, &zeroVec, &zeroVec, &primColor, &envColor, 600, -10);
}
void func_8085283C(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg2) {