mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-10 19:20:13 +00:00
Match some overlay effects files (#1705)
This commit is contained in:
parent
178e95ae50
commit
0cbcebfded
8 changed files with 29 additions and 24 deletions
|
@ -58,10 +58,7 @@ void EffectSsBubble_Draw(PlayState* play, u32 index, EffectSs* this) {
|
|||
|
||||
void EffectSsBubble_Update(PlayState* play, u32 index, EffectSs* this) {
|
||||
WaterBox* waterBox;
|
||||
f32 waterSurfaceY;
|
||||
Vec3f ripplePos;
|
||||
|
||||
waterSurfaceY = this->pos.y;
|
||||
f32 waterSurfaceY = this->pos.y;
|
||||
|
||||
// kill bubble if it's out of range of a water box
|
||||
if (!WaterBox_GetSurface1(play, &play->colCtx, this->pos.x, this->pos.z, &waterSurfaceY, &waterBox)) {
|
||||
|
@ -70,6 +67,8 @@ void EffectSsBubble_Update(PlayState* play, u32 index, EffectSs* this) {
|
|||
}
|
||||
|
||||
if (waterSurfaceY < this->pos.y) {
|
||||
Vec3f ripplePos;
|
||||
|
||||
ripplePos.x = this->pos.x;
|
||||
ripplePos.y = waterSurfaceY;
|
||||
ripplePos.z = this->pos.z;
|
||||
|
|
|
@ -29,7 +29,6 @@ EffectSsInit Effect_Ss_Dead_Dd_InitVars = {
|
|||
};
|
||||
|
||||
u32 EffectSsDeadDd_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx) {
|
||||
s32 i;
|
||||
EffectSsDeadDdInitParams* initParams = (EffectSsDeadDdInitParams*)initParamsx;
|
||||
|
||||
if (initParams->type == 0) {
|
||||
|
@ -58,6 +57,8 @@ u32 EffectSsDeadDd_Init(PlayState* play, u32 index, EffectSs* this, void* initPa
|
|||
this->rEnvColorB = initParams->envColor.b;
|
||||
|
||||
} else if (initParams->type == 1) {
|
||||
s32 i;
|
||||
|
||||
this->life = initParams->life;
|
||||
this->rScaleStep = initParams->scaleStep;
|
||||
this->rAlphaMode = 0;
|
||||
|
|
|
@ -37,7 +37,6 @@ static EffectSsUpdateFunc sUpdateFuncs[] = {
|
|||
};
|
||||
|
||||
u32 EffectSsDust_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx) {
|
||||
s32 randColorOffset;
|
||||
EffectSsDustInitParams* initParams = (EffectSsDustInitParams*)initParamsx;
|
||||
|
||||
Math_Vec3f_Copy(&this->pos, &initParams->pos);
|
||||
|
@ -49,7 +48,8 @@ u32 EffectSsDust_Init(PlayState* play, u32 index, EffectSs* this, void* initPara
|
|||
this->draw = EffectSsDust_Draw;
|
||||
|
||||
if (initParams->drawFlags & 4) {
|
||||
randColorOffset = Rand_ZeroOne() * 20.0f - 10.0f;
|
||||
s32 randColorOffset = Rand_ZeroOne() * 20.0f - 10.0f;
|
||||
|
||||
this->rPrimColorR = initParams->primColor.r + randColorOffset;
|
||||
this->rPrimColorG = initParams->primColor.g + randColorOffset;
|
||||
this->rPrimColorB = initParams->primColor.b + randColorOffset;
|
||||
|
|
|
@ -26,13 +26,11 @@ EffectSsInit Effect_Ss_Extra_InitVars = {
|
|||
u32 EffectSsExtra_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx) {
|
||||
EffectSsExtraInitParams* initParams = (EffectSsExtraInitParams*)initParamsx;
|
||||
s32 pad;
|
||||
s32 objectSlot;
|
||||
uintptr_t oldSeg6;
|
||||
|
||||
objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_YABUSAME_POINT);
|
||||
s32 objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_YABUSAME_POINT);
|
||||
|
||||
if ((objectSlot >= 0) && Object_IsLoaded(&play->objectCtx, objectSlot)) {
|
||||
oldSeg6 = gSegments[6];
|
||||
uintptr_t oldSeg6 = gSegments[6];
|
||||
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
this->pos = initParams->pos;
|
||||
this->velocity = initParams->velocity;
|
||||
|
|
|
@ -172,21 +172,20 @@ void EffectSsFhgFlash_UpdateLightBall(PlayState* play, u32 index, EffectSs* this
|
|||
|
||||
void EffectSsFhgFlash_UpdateShock(PlayState* play, u32 index, EffectSs* this) {
|
||||
s16 randBodyPart;
|
||||
Player* player;
|
||||
BossGanondrof* phantomGanon;
|
||||
s16 rotStep;
|
||||
s16 rotStep = Rand_ZeroOne() * 20000.0f;
|
||||
|
||||
rotStep = Rand_ZeroOne() * 20000.0f;
|
||||
this->rXZRot += rotStep + 0x4000;
|
||||
|
||||
if (this->rParam == FHGFLASH_SHOCK_PLAYER) {
|
||||
player = GET_PLAYER(play);
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
randBodyPart = Rand_ZeroFloat(PLAYER_BODYPART_MAX - 0.1f);
|
||||
this->pos.x = player->bodyPartsPos[randBodyPart].x + Rand_CenteredFloat(10.0f);
|
||||
this->pos.y = player->bodyPartsPos[randBodyPart].y + Rand_CenteredFloat(15.0f);
|
||||
this->pos.z = player->bodyPartsPos[randBodyPart].z + Rand_CenteredFloat(10.0f);
|
||||
} else if (this->rParam == FHGFLASH_SHOCK_PG) {
|
||||
phantomGanon = (BossGanondrof*)this->actor;
|
||||
BossGanondrof* phantomGanon = (BossGanondrof*)this->actor;
|
||||
|
||||
randBodyPart = Rand_ZeroFloat(23.9f);
|
||||
this->pos.x = phantomGanon->bodyPartsPos[randBodyPart].x + Rand_CenteredFloat(15.0f);
|
||||
this->pos.y = phantomGanon->bodyPartsPos[randBodyPart].y + Rand_CenteredFloat(20.0f);
|
||||
|
@ -194,6 +193,8 @@ void EffectSsFhgFlash_UpdateShock(PlayState* play, u32 index, EffectSs* this) {
|
|||
}
|
||||
|
||||
if (this->life < 100) {
|
||||
s32 pad;
|
||||
|
||||
this->rAlpha -= 50;
|
||||
|
||||
if (this->rAlpha < 0) {
|
||||
|
|
|
@ -24,12 +24,12 @@ u32 EffectSsIceSmoke_Init(PlayState* play, u32 index, EffectSs* this, void* init
|
|||
EffectSsIceSmokeInitParams* initParams = (EffectSsIceSmokeInitParams*)initParamsx;
|
||||
s32 pad;
|
||||
s32 objectSlot;
|
||||
uintptr_t prevSeg6;
|
||||
|
||||
objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_FZ);
|
||||
|
||||
if ((objectSlot >= 0) && Object_IsLoaded(&play->objectCtx, objectSlot)) {
|
||||
prevSeg6 = gSegments[6];
|
||||
uintptr_t prevSeg6 = gSegments[6];
|
||||
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
|
||||
Math_Vec3f_Copy(&this->pos, &initParams->pos);
|
||||
Math_Vec3f_Copy(&this->velocity, &initParams->velocity);
|
||||
|
@ -61,6 +61,10 @@ void EffectSsIceSmoke_Draw(PlayState* play, u32 index, EffectSs* this) {
|
|||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_eff_ss_ice_smoke.c", 155);
|
||||
|
||||
#if !OOT_DEBUG
|
||||
if (1) {}
|
||||
#endif
|
||||
|
||||
objectSlot = Object_GetSlot(&play->objectCtx, OBJECT_FZ);
|
||||
|
||||
if ((objectSlot >= 0) && Object_IsLoaded(&play->objectCtx, objectSlot)) {
|
||||
|
|
|
@ -78,9 +78,11 @@ u32 EffectSsKakera_Init(PlayState* play, u32 index, EffectSs* this, void* initPa
|
|||
f32 func_809A9818(f32 arg0, f32 arg1) {
|
||||
f32 temp_f2;
|
||||
|
||||
#if OOT_DEBUG
|
||||
if (arg1 < 0.0f) {
|
||||
PRINTF("範囲がマイナス!!(randomD_sectionUniformity)\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
temp_f2 = Rand_ZeroOne() * arg1;
|
||||
return ((temp_f2 * 2.0f) - arg1) + arg0;
|
||||
|
|
|
@ -79,10 +79,9 @@ void EffectSsSibuki_Draw(PlayState* play, u32 index, EffectSs* this) {
|
|||
}
|
||||
|
||||
void EffectSsSibuki_Update(PlayState* play, u32 index, EffectSs* this) {
|
||||
s32 pad[3];
|
||||
f32 xzVelScale;
|
||||
s16 yaw;
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 pad[2];
|
||||
f32 xzVelScale;
|
||||
|
||||
if (this->pos.y <= player->actor.floorHeight) {
|
||||
this->life = 0;
|
||||
|
@ -92,7 +91,8 @@ void EffectSsSibuki_Update(PlayState* play, u32 index, EffectSs* this) {
|
|||
this->rMoveDelay--;
|
||||
|
||||
if (this->rMoveDelay == 0) {
|
||||
yaw = Camera_GetInputDirYaw(Play_GetCamera(play, CAM_ID_MAIN));
|
||||
s16 yaw = Camera_GetInputDirYaw(Play_GetCamera(play, CAM_ID_MAIN));
|
||||
|
||||
xzVelScale = ((200.0f + KREG(20)) * 0.01f) + ((0.1f * Rand_ZeroOne()) * (KREG(23) + 20.0f));
|
||||
|
||||
if (this->rDirection != 0) {
|
||||
|
|
Loading…
Reference in a new issue