mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 05:43:42 -07:00
[Bugfix + Enhancement] Sword Trail fixes and enhancements (#1473)
* Fix Trails, add more Trail Customization * 3d Bombs; Bombchu now glow custom trail colors * 3D Seed/Nut Model, Separate Sword Slash Colors * Removed 3D Seeds/Nuts; Don't work properly * restored previous removal of sword blur code * Remove things not related to Trails * Remove fix to random color code
This commit is contained in:
parent
e1b83b6eb4
commit
d83c6f1753
11 changed files with 422 additions and 71 deletions
|
@ -3,7 +3,9 @@
|
|||
|
||||
#include "soh/frame_interpolation.h"
|
||||
|
||||
const Color_RGB8 Trails_Color_ori = {255,255,255};
|
||||
const Color_RGB8 TrailsColorOriginal = { 255, 255, 255 };
|
||||
const Color_RGB8 BoomColorOriginal = { 255, 255, 100 };
|
||||
const Color_RGB8 BombColorOriginal = { 200, 0, 0 };
|
||||
|
||||
void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) {
|
||||
EffectBlureElement* elem;
|
||||
|
@ -73,6 +75,11 @@ void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) {
|
|||
}
|
||||
}
|
||||
|
||||
//dumb doo doo command to change the type of an object's blur on the fly. Link's Swords with unique trail colors.
|
||||
void EffectBlure_ChangeType(EffectBlure* this, int type) {
|
||||
this->trailType = type;
|
||||
}
|
||||
|
||||
void EffectBlure_AddSpace(EffectBlure* this) {
|
||||
EffectBlureElement* elem;
|
||||
s32 numElements;
|
||||
|
@ -139,6 +146,7 @@ void EffectBlure_Init1(void* thisx, void* initParamsx) {
|
|||
this->elemDuration = initParams->elemDuration;
|
||||
this->unkFlag = initParams->unkFlag;
|
||||
this->calcMode = initParams->calcMode;
|
||||
this->trailType = initParams->trailType;
|
||||
this->flags = 0;
|
||||
this->addAngleChange = 0;
|
||||
this->addAngle = 0;
|
||||
|
@ -187,6 +195,7 @@ void EffectBlure_Init2(void* thisx, void* initParamsx) {
|
|||
this->mode4Param = initParams->mode4Param;
|
||||
this->altPrimColor = initParams->altPrimColor;
|
||||
this->altEnvColor = initParams->altEnvColor;
|
||||
this->trailType = initParams->trailType;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -196,11 +205,203 @@ void EffectBlure_Destroy(void* thisx) {
|
|||
s32 EffectBlure_Update(void* thisx) {
|
||||
EffectBlure* this = (EffectBlure*)thisx;
|
||||
s32 i;
|
||||
s16 RedColor;
|
||||
s16 GreenColor;
|
||||
s16 BlueColor;
|
||||
s16 TrailDuration;
|
||||
Color_RGB8 Trails_col = CVar_GetRGB("gTrailCol", Trails_Color_ori);
|
||||
|
||||
Color_RGB8 SwordTopCol = CVar_GetRGB("gSwordTrailTopCol", TrailsColorOriginal);
|
||||
Color_RGB8 SwordBottomCol = CVar_GetRGB("gSwordTrailBottomCol", TrailsColorOriginal);
|
||||
Color_RGB8 BoomStartCol = CVar_GetRGB("gBoomTrailStartCol", BoomColorOriginal);
|
||||
Color_RGB8 BoomEndCol = CVar_GetRGB("gBoomTrailEndCol", BoomColorOriginal);
|
||||
Color_RGB8 BombchuCol = CVar_GetRGB("gBombTrailCol", BombColorOriginal);
|
||||
Color_RGB8 KSwordTopCol = CVar_GetRGB("gKSwordTrailTopCol", TrailsColorOriginal);
|
||||
Color_RGB8 KSwordBottomCol = CVar_GetRGB("gKSwordTrailBottomCol", TrailsColorOriginal);
|
||||
Color_RGB8 MSwordTopCol = CVar_GetRGB("gMSwordTrailTopCol", TrailsColorOriginal);
|
||||
Color_RGB8 MSwordBottomCol = CVar_GetRGB("gMSwordTrailBottomCol", TrailsColorOriginal);
|
||||
Color_RGB8 BSwordTopCol = CVar_GetRGB("gBSwordTrailTopCol", TrailsColorOriginal);
|
||||
Color_RGB8 BSwordBottomCol = CVar_GetRGB("gBSwordTrailBottomCol", TrailsColorOriginal);
|
||||
Color_RGB8 StickTopCol = CVar_GetRGB("gStickTrailTopCol", TrailsColorOriginal);
|
||||
Color_RGB8 StickBottomCol = CVar_GetRGB("gStickTrailBottomCol", TrailsColorOriginal);
|
||||
Color_RGB8 HammerTopCol = CVar_GetRGB("gHammerTrailTopCol", TrailsColorOriginal);
|
||||
Color_RGB8 HammerBottomCol = CVar_GetRGB("gHammerTrailBottomCol", TrailsColorOriginal);
|
||||
|
||||
if ((CVar_GetS32("gUseTrailsCol", 0) != 0) && (this->trailType != 0)) {
|
||||
switch (this->trailType) { //there HAS to be a better way to do this.
|
||||
case 1: //sword
|
||||
this->p1StartColor.r = SwordTopCol.r;
|
||||
this->p2StartColor.r = SwordBottomCol.r;
|
||||
this->p1EndColor.r = SwordTopCol.r;
|
||||
this->p2EndColor.r = SwordBottomCol.r;
|
||||
this->p1StartColor.g = SwordTopCol.g;
|
||||
this->p2StartColor.g = SwordBottomCol.g;
|
||||
this->p1EndColor.g = SwordTopCol.g;
|
||||
this->p2EndColor.g = SwordBottomCol.g;
|
||||
this->p1StartColor.b = SwordTopCol.b;
|
||||
this->p2StartColor.b = SwordBottomCol.b;
|
||||
this->p1EndColor.b = SwordTopCol.b;
|
||||
this->p2EndColor.b = SwordBottomCol.b;
|
||||
this->elemDuration = CVar_GetS32("gTrailDuration", 1);
|
||||
break;
|
||||
case 2: //boomerang
|
||||
this->p1StartColor.r = BoomStartCol.r;
|
||||
this->p2StartColor.r = BoomStartCol.r;
|
||||
this->p1EndColor.r = BoomEndCol.r;
|
||||
this->p2EndColor.r = BoomEndCol.r;
|
||||
this->p1StartColor.g = BoomStartCol.g;
|
||||
this->p2StartColor.g = BoomStartCol.g;
|
||||
this->p1EndColor.g = BoomEndCol.g;
|
||||
this->p2EndColor.g = BoomEndCol.g;
|
||||
this->p1StartColor.b = BoomStartCol.b;
|
||||
this->p2StartColor.b = BoomStartCol.b;
|
||||
this->p1EndColor.b = BoomEndCol.b;
|
||||
this->p2EndColor.b = BoomEndCol.b;
|
||||
break;
|
||||
case 3: // bombchu
|
||||
this->p1StartColor.r = BombchuCol.r;
|
||||
this->p2StartColor.r = BombchuCol.r * 0.8f;
|
||||
this->p1EndColor.r = BombchuCol.r * 0.6f;
|
||||
this->p2EndColor.r = BombchuCol.r * 0.4f;
|
||||
this->p1StartColor.g = BombchuCol.g;
|
||||
this->p2StartColor.g = BombchuCol.g * 0.8f;
|
||||
this->p1EndColor.g = BombchuCol.g * 0.6f;
|
||||
this->p2EndColor.g = BombchuCol.g * 0.4f;
|
||||
this->p1StartColor.b = BombchuCol.b;
|
||||
this->p2StartColor.b = BombchuCol.b * 0.8f;
|
||||
this->p1EndColor.b = BombchuCol.b * 0.6f;
|
||||
this->p2EndColor.b = BombchuCol.b * 0.4f;
|
||||
break;
|
||||
case 4: // kokiri sword
|
||||
this->p1StartColor.r = KSwordTopCol.r;
|
||||
this->p2StartColor.r = KSwordBottomCol.r;
|
||||
this->p1EndColor.r = KSwordTopCol.r;
|
||||
this->p2EndColor.r = KSwordBottomCol.r;
|
||||
this->p1StartColor.g = KSwordTopCol.g;
|
||||
this->p2StartColor.g = KSwordBottomCol.g;
|
||||
this->p1EndColor.g = KSwordTopCol.g;
|
||||
this->p2EndColor.g = KSwordBottomCol.g;
|
||||
this->p1StartColor.b = KSwordTopCol.b;
|
||||
this->p2StartColor.b = KSwordBottomCol.b;
|
||||
this->p1EndColor.b = KSwordTopCol.b;
|
||||
this->p2EndColor.b = KSwordBottomCol.b;
|
||||
this->elemDuration = CVar_GetS32("gTrailDuration", 1);
|
||||
break;
|
||||
case 5: // master sword
|
||||
this->p1StartColor.r = MSwordTopCol.r;
|
||||
this->p2StartColor.r = MSwordBottomCol.r;
|
||||
this->p1EndColor.r = MSwordTopCol.r;
|
||||
this->p2EndColor.r = MSwordBottomCol.r;
|
||||
this->p1StartColor.g = MSwordTopCol.g;
|
||||
this->p2StartColor.g = MSwordBottomCol.g;
|
||||
this->p1EndColor.g = MSwordTopCol.g;
|
||||
this->p2EndColor.g = MSwordBottomCol.g;
|
||||
this->p1StartColor.b = MSwordTopCol.b;
|
||||
this->p2StartColor.b = MSwordBottomCol.b;
|
||||
this->p1EndColor.b = MSwordTopCol.b;
|
||||
this->p2EndColor.b = MSwordBottomCol.b;
|
||||
this->elemDuration = CVar_GetS32("gTrailDuration", 1);
|
||||
break;
|
||||
case 6: // biggoron sword
|
||||
this->p1StartColor.r = BSwordTopCol.r;
|
||||
this->p2StartColor.r = BSwordBottomCol.r;
|
||||
this->p1EndColor.r = BSwordTopCol.r;
|
||||
this->p2EndColor.r = BSwordBottomCol.r;
|
||||
this->p1StartColor.g = BSwordTopCol.g;
|
||||
this->p2StartColor.g = BSwordBottomCol.g;
|
||||
this->p1EndColor.g = BSwordTopCol.g;
|
||||
this->p2EndColor.g = BSwordBottomCol.g;
|
||||
this->p1StartColor.b = BSwordTopCol.b;
|
||||
this->p2StartColor.b = BSwordBottomCol.b;
|
||||
this->p1EndColor.b = BSwordTopCol.b;
|
||||
this->p2EndColor.b = BSwordBottomCol.b;
|
||||
this->elemDuration = CVar_GetS32("gTrailDuration", 1);
|
||||
break;
|
||||
case 7: // stick
|
||||
this->p1StartColor.r = StickTopCol.r;
|
||||
this->p2StartColor.r = StickBottomCol.r;
|
||||
this->p1EndColor.r = StickTopCol.r;
|
||||
this->p2EndColor.r = StickBottomCol.r;
|
||||
this->p1StartColor.g = StickTopCol.g;
|
||||
this->p2StartColor.g = StickBottomCol.g;
|
||||
this->p1EndColor.g = StickTopCol.g;
|
||||
this->p2EndColor.g = StickBottomCol.g;
|
||||
this->p1StartColor.b = StickTopCol.b;
|
||||
this->p2StartColor.b = StickBottomCol.b;
|
||||
this->p1EndColor.b = StickTopCol.b;
|
||||
this->p2EndColor.b = StickBottomCol.b;
|
||||
this->elemDuration = CVar_GetS32("gTrailDuration", 1);
|
||||
break;
|
||||
case 8: // hammer
|
||||
this->p1StartColor.r = HammerTopCol.r;
|
||||
this->p2StartColor.r = HammerBottomCol.r;
|
||||
this->p1EndColor.r = HammerTopCol.r;
|
||||
this->p2EndColor.r = HammerBottomCol.r;
|
||||
this->p1StartColor.g = HammerTopCol.g;
|
||||
this->p2StartColor.g = HammerBottomCol.g;
|
||||
this->p1EndColor.g = HammerTopCol.g;
|
||||
this->p2EndColor.g = HammerBottomCol.g;
|
||||
this->p1StartColor.b = HammerTopCol.b;
|
||||
this->p2StartColor.b = HammerBottomCol.b;
|
||||
this->p1EndColor.b = HammerTopCol.b;
|
||||
this->p2EndColor.b = HammerBottomCol.b;
|
||||
this->elemDuration = CVar_GetS32("gTrailDuration", 1);
|
||||
break;
|
||||
case 0:
|
||||
default: // don't do anything
|
||||
break;
|
||||
}
|
||||
} else
|
||||
switch (this->trailType) {
|
||||
case 1: //swords
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
this->p1StartColor.r = 255;
|
||||
this->p2StartColor.r = 255;
|
||||
this->p1EndColor.r = 255;
|
||||
this->p2EndColor.r = 255;
|
||||
this->p1StartColor.g = 255;
|
||||
this->p2StartColor.g = 255;
|
||||
this->p1EndColor.g = 255;
|
||||
this->p2EndColor.g = 255;
|
||||
this->p1StartColor.b = 255;
|
||||
this->p2StartColor.b = 255;
|
||||
this->p1EndColor.b = 255;
|
||||
this->p2EndColor.b = 255;
|
||||
this->elemDuration = 4;
|
||||
break;
|
||||
case 2: //boomerang
|
||||
this->p1StartColor.r = 255;
|
||||
this->p2StartColor.r = 255;
|
||||
this->p1EndColor.r = 255;
|
||||
this->p2EndColor.r = 255;
|
||||
this->p1StartColor.g = 255;
|
||||
this->p2StartColor.g = 255;
|
||||
this->p1EndColor.g = 255;
|
||||
this->p2EndColor.g = 255;
|
||||
this->p1StartColor.b = 100;
|
||||
this->p2StartColor.b = 100;
|
||||
this->p1EndColor.b = 100;
|
||||
this->p2EndColor.b = 100;
|
||||
this->elemDuration = 8;
|
||||
break;
|
||||
case 3: //bombchu
|
||||
this->p1StartColor.r = 250;
|
||||
this->p2StartColor.r = 200;
|
||||
this->p1EndColor.r = 150;
|
||||
this->p2EndColor.r = 100;
|
||||
this->p1StartColor.g = 0;
|
||||
this->p2StartColor.g = 0;
|
||||
this->p1EndColor.g = 0;
|
||||
this->p2EndColor.g = 0;
|
||||
this->p1StartColor.b = 0;
|
||||
this->p2StartColor.b = 0;
|
||||
this->p1EndColor.b = 0;
|
||||
this->p2EndColor.b = 0;
|
||||
this->elemDuration = 16;
|
||||
break;
|
||||
case 0:
|
||||
default: //don't do anything
|
||||
break;
|
||||
}
|
||||
|
||||
if (this == NULL) {
|
||||
return 0;
|
||||
|
@ -210,32 +411,6 @@ s32 EffectBlure_Update(void* thisx) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gUseTrailsCol", 0) !=0) {
|
||||
RedColor = Trails_col.r;
|
||||
GreenColor = Trails_col.g;
|
||||
BlueColor = Trails_col.b;
|
||||
TrailDuration = 4.0f * CVar_GetS32("gTrailDurantion",1);
|
||||
} else {
|
||||
RedColor = Trails_Color_ori.r;
|
||||
GreenColor = Trails_Color_ori.g;
|
||||
BlueColor = Trails_Color_ori.b;
|
||||
TrailDuration=4.0f;
|
||||
}
|
||||
|
||||
this->p1StartColor.r = RedColor;
|
||||
this->p2StartColor.r = RedColor;
|
||||
this->p1EndColor.r = RedColor;
|
||||
this->p2EndColor.r = RedColor;
|
||||
this->p1StartColor.g = GreenColor;
|
||||
this->p2StartColor.g = GreenColor;
|
||||
this->p1EndColor.g = GreenColor;
|
||||
this->p2EndColor.g = GreenColor;
|
||||
this->p1StartColor.b = BlueColor;
|
||||
this->p2StartColor.b = BlueColor;
|
||||
this->p1EndColor.b = BlueColor;
|
||||
this->p2EndColor.b = BlueColor;
|
||||
this->elemDuration = TrailDuration;
|
||||
|
||||
while (true) {
|
||||
if (this->elements[0].state == 0) {
|
||||
for (i = 0; i < 15; i++) {
|
||||
|
@ -394,7 +569,7 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3
|
|||
break;
|
||||
}
|
||||
|
||||
//sp30 = sp30; // Optimized out but seems necessary to match stack usage
|
||||
sp30 = sp30; // Optimized out but seems necessary to match stack usage
|
||||
|
||||
if (this->flags & 0x10) {
|
||||
color1->r = color1->g = color1->b = color1->a = 255;
|
||||
|
@ -693,6 +868,8 @@ void EffectBlure_DrawSmooth(EffectBlure* this2, GraphicsContext* gfxCtx) {
|
|||
MtxF sp9C;
|
||||
MtxF sp5C;
|
||||
Mtx* mtx;
|
||||
static s32 epoch = 0;
|
||||
epoch++;
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
|
@ -710,6 +887,7 @@ void EffectBlure_DrawSmooth(EffectBlure* this2, GraphicsContext* gfxCtx) {
|
|||
this->elements[this->numElements - 1].flags &= ~3;
|
||||
this->elements[this->numElements - 1].flags |= 2;
|
||||
|
||||
FrameInterpolation_RecordOpenChild(this, epoch);
|
||||
EffectBlure_SetupSmooth(this, gfxCtx);
|
||||
SkinMatrix_SetTranslate(&spDC, this->elements[0].p2.x, this->elements[0].p2.y, this->elements[0].p2.z);
|
||||
SkinMatrix_SetScale(&sp9C, 0.1f, 0.1f, 0.1f);
|
||||
|
@ -734,8 +912,11 @@ void EffectBlure_DrawSmooth(EffectBlure* this2, GraphicsContext* gfxCtx) {
|
|||
} else {
|
||||
EffectBlure_DrawElemHermiteInterpolation(this, elem, i, gfxCtx);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
|
@ -971,6 +1152,8 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) {
|
|||
s32 i;
|
||||
s32 j;
|
||||
s32 phi_t2;
|
||||
static s32 epoch = 0;
|
||||
epoch++;
|
||||
|
||||
FrameInterpolation_RecordOpenChild(this, 0);
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
|
|
@ -1242,6 +1242,10 @@ f32 sSwordLengths[] = {
|
|||
0.0f, 4000.0f, 3000.0f, 5500.0f, 0.0f, 2500.0f,
|
||||
};
|
||||
|
||||
f32 sSwordTypes[] = {
|
||||
0, 5, 4, 6, 0, 8,
|
||||
};
|
||||
|
||||
Gfx* sBottleDLists[] = { gLinkAdultBottleDL, gLinkChildBottleDL };
|
||||
|
||||
Color_RGB8 sBottleColors[] = {
|
||||
|
@ -1304,6 +1308,7 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
|
|||
D_80126080.x = this->unk_85C * 5000.0f;
|
||||
func_80090A28(this, sp124);
|
||||
if (this->swordState != 0) {
|
||||
EffectBlure_ChangeType(Effect_GetByIndex(this->swordEffectIndex), 7); // default sword type
|
||||
func_800906D4(globalCtx, this, sp124);
|
||||
} else {
|
||||
Math_Vec3f_Copy(&this->swordInfo[0].tip, &sp124[0]);
|
||||
|
@ -1326,6 +1331,10 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
|
|||
D_80126080.x = 1500.0f;
|
||||
} else {
|
||||
D_80126080.x = sSwordLengths[Player_GetSwordHeld(this)];
|
||||
if (CVar_GetS32("gSeperateSwords", 0) != 0)
|
||||
EffectBlure_ChangeType(Effect_GetByIndex(this->swordEffectIndex), sSwordTypes[Player_GetSwordHeld(this)]);
|
||||
else
|
||||
EffectBlure_ChangeType(Effect_GetByIndex(this->swordEffectIndex),1); //default sword type
|
||||
}
|
||||
|
||||
func_80090A28(this, spE4);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "z_en_arrow.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_gi_nuts/object_gi_nuts.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5)
|
||||
|
||||
|
@ -63,19 +64,19 @@ void EnArrow_SetupAction(EnArrow* this, EnArrowActionFunc actionFunc) {
|
|||
void EnArrow_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
static EffectBlureInit2 blureNormal = {
|
||||
0, 4, 0, { 0, 255, 200, 255 }, { 0, 255, 255, 255 }, { 0, 255, 200, 0 }, { 0, 255, 255, 0 }, 16,
|
||||
0, 1, 0, { 255, 255, 170, 255 }, { 0, 150, 0, 0 },
|
||||
0, 1, 0, { 255, 255, 170, 255 }, { 0, 150, 0, 0 }, 0,
|
||||
};
|
||||
static EffectBlureInit2 blureFire = {
|
||||
0, 4, 0, { 0, 255, 200, 255 }, { 0, 255, 255, 255 }, { 0, 255, 200, 0 }, { 0, 255, 255, 0 }, 16,
|
||||
0, 1, 0, { 255, 200, 0, 255 }, { 255, 0, 0, 0 },
|
||||
0, 1, 0, { 255, 200, 0, 255 }, { 255, 0, 0, 0 }, 0,
|
||||
};
|
||||
static EffectBlureInit2 blureIce = {
|
||||
0, 4, 0, { 0, 255, 200, 255 }, { 0, 255, 255, 255 }, { 0, 255, 200, 0 }, { 0, 255, 255, 0 }, 16,
|
||||
0, 1, 0, { 170, 255, 255, 255 }, { 0, 100, 255, 0 },
|
||||
0, 1, 0, { 170, 255, 255, 255 }, { 0, 100, 255, 0 }, 0,
|
||||
};
|
||||
static EffectBlureInit2 blureLight = {
|
||||
0, 4, 0, { 0, 255, 200, 255 }, { 0, 255, 255, 255 }, { 0, 255, 200, 0 }, { 0, 255, 255, 0 }, 16,
|
||||
0, 1, 0, { 255, 255, 170, 255 }, { 255, 255, 0, 0 },
|
||||
0, 1, 0, { 255, 255, 170, 255 }, { 255, 255, 0, 0 }, 0,
|
||||
};
|
||||
static u32 dmgFlags[] = {
|
||||
0x00000800, 0x00000020, 0x00000020, 0x00000800, 0x00001000,
|
||||
|
@ -83,6 +84,36 @@ void EnArrow_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
};
|
||||
EnArrow* this = (EnArrow*)thisx;
|
||||
|
||||
Color_RGBA8 Arrow_env_ori = { 0, 150, 0, 0 };
|
||||
Color_RGBA8 Arrow_col_ori = { 255, 255, 170, 255 };
|
||||
Color_RGBA8 Light_env_ori = { 255, 255, 0, 255 };
|
||||
Color_RGBA8 Light_col_ori = { 255, 255, 170, 0 };
|
||||
Color_RGBA8 Fire_env_ori = { 255, 0, 0, 255 };
|
||||
Color_RGBA8 Fire_col_ori = { 255, 200, 0, 0 };
|
||||
Color_RGBA8 Ice_env_ori = { 0, 0, 255, 255 };
|
||||
Color_RGBA8 Ice_col_ori = { 170, 255, 255, 0 };
|
||||
|
||||
if (CVar_GetS32("gUseArrowsCol", 0) != 0) {
|
||||
blureNormal.altPrimColor = CVar_GetRGBA("gNormalArrowCol", Arrow_col_ori);
|
||||
blureNormal.altEnvColor = CVar_GetRGBA("gNormalArrowColEnv", Arrow_env_ori);
|
||||
blureFire.altPrimColor = CVar_GetRGBA("gFireArrowCol", Fire_col_ori);
|
||||
blureFire.altEnvColor = CVar_GetRGBA("gFireArrowColEnv", Fire_env_ori);
|
||||
blureIce.altPrimColor = CVar_GetRGBA("gIceArrowCol", Ice_col_ori);
|
||||
blureIce.altEnvColor = CVar_GetRGBA("gIceArrowColEnv", Ice_env_ori);
|
||||
blureLight.altPrimColor = CVar_GetRGBA("gLightArrowCol", Light_col_ori);
|
||||
blureLight.altEnvColor = CVar_GetRGBA("gLightArrowColEnv", Light_env_ori);
|
||||
|
||||
//make sure the alpha values are correct.
|
||||
blureNormal.altPrimColor.a = 255;
|
||||
blureNormal.altEnvColor.a = 0;
|
||||
blureFire.altPrimColor.a = 255;
|
||||
blureFire.altEnvColor.a = 0;
|
||||
blureIce.altPrimColor.a = 255;
|
||||
blureIce.altEnvColor.a = 0;
|
||||
blureLight.altPrimColor.a = 255;
|
||||
blureLight.altEnvColor.a = 0;
|
||||
}
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
|
||||
if (this->actor.params == ARROW_CS_NUT) {
|
||||
|
@ -478,16 +509,15 @@ void EnArrow_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Matrix_Push();
|
||||
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
|
||||
// redundant check because this is contained in an if block for non-zero speed
|
||||
Matrix_RotateZ((this->actor.speedXZ == 0.0f) ? 0.0f
|
||||
: ((globalCtx->gameplayFrames & 0xFF) * 4000) * (M_PI / 0x8000),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_RotateZ(
|
||||
(this->actor.speedXZ == 0.0f) ? 0.0f : ((globalCtx->gameplayFrames & 0xFF) * 4000) * (M_PI / 0x8000),
|
||||
MTXMODE_APPLY);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffSparklesDL);
|
||||
Matrix_Pop();
|
||||
Matrix_RotateY(this->actor.world.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
|
|
|
@ -367,12 +367,10 @@ void EnBom_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
func_8002EBCC(thisx, globalCtx, 0);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gBombCapDL);
|
||||
Matrix_RotateZYX(0x4000, 0, 0, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, (s16)this->flashIntensity, 0, 40, 255);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, (s16)this->flashIntensity, 0, 40, 255);
|
||||
|
|
|
@ -85,6 +85,7 @@ void EnBomChu_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
blureInit.elemDuration = 16;
|
||||
blureInit.unkFlag = 0;
|
||||
blureInit.calcMode = 0;
|
||||
blureInit.trailType = 3;
|
||||
|
||||
Effect_Add(globalCtx, &this->blure1Index, EFFECT_BLURE1, 0, 0, &blureInit);
|
||||
Effect_Add(globalCtx, &this->blure2Index, EFFECT_BLURE1, 0, 0, &blureInit);
|
||||
|
@ -481,12 +482,16 @@ void EnBomChu_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
const Color_RGB8 BombchuColorOriginal = { 209, 34, -35 };
|
||||
|
||||
void EnBomChu_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
EnBomChu* this = (EnBomChu*)thisx;
|
||||
f32 colorIntensity;
|
||||
s32 blinkHalfPeriod;
|
||||
s32 blinkTime;
|
||||
Color_RGB8 BombchuCol = CVar_GetRGB("gBombTrailCol", BombchuColorOriginal);
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
|
@ -510,8 +515,11 @@ void EnBomChu_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
colorIntensity = blinkTime / (f32)blinkHalfPeriod;
|
||||
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 9.0f + (colorIntensity * 209.0f), 9.0f + (colorIntensity * 34.0f),
|
||||
35.0f + (colorIntensity * -35.0f), 255);
|
||||
if (CVar_GetS32("gUseTrailsCol", 0) != 0)
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, (colorIntensity * BombchuCol.r), (colorIntensity * BombchuCol.g),
|
||||
(colorIntensity * BombchuCol.b), 255);
|
||||
else gDPSetEnvColor(POLY_OPA_DISP++, 9.0f + (colorIntensity * 209.0f), 9.0f + (colorIntensity * 34.0f),
|
||||
35.0f + (colorIntensity * -35.0f), 255);
|
||||
Matrix_Translate(this->visualJitter * (1.0f / BOMBCHU_SCALE), 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(globalCtx->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
|
|
@ -89,6 +89,7 @@ void EnBoom_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
blure.elemDuration = 8;
|
||||
blure.unkFlag = 0;
|
||||
blure.calcMode = 0;
|
||||
blure.trailType = 2;
|
||||
|
||||
Effect_Add(globalCtx, &this->effectIndex, EFFECT_BLURE1, 0, 0, &blure);
|
||||
|
||||
|
|
|
@ -9414,9 +9414,9 @@ static InitChainEntry sInitChain[] = {
|
|||
ICHAIN_F32(targetArrowOffset, 500, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
static EffectBlureInit2 D_8085470C = {
|
||||
static EffectBlureInit2 blureSword = {
|
||||
0, 8, 0, { 255, 255, 255, 255 }, { 255, 255, 255, 64 }, { 255, 255, 255, 0 }, { 255, 255, 255, 0 }, 4,
|
||||
0, 2, 0, { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
|
||||
0, 2, 0, { 255, 255, 255, 255 }, { 255, 255, 255, 64 }, 1,
|
||||
};
|
||||
|
||||
static Vec3s D_80854730 = { -57, 3377, 0 };
|
||||
|
@ -9436,7 +9436,7 @@ void Player_InitCommon(Player* this, GlobalContext* globalCtx, FlexSkeletonHeade
|
|||
this->morphTable2, PLAYER_LIMB_MAX);
|
||||
this->skelAnime2.baseTransl = D_80854730;
|
||||
|
||||
Effect_Add(globalCtx, &this->swordEffectIndex, EFFECT_BLURE2, 0, 0, &D_8085470C);
|
||||
Effect_Add(globalCtx, &this->swordEffectIndex, EFFECT_BLURE2, 0, 0, &blureSword);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFeet, this->ageProperties->unk_04);
|
||||
this->unk_46C = SUBCAM_NONE;
|
||||
Collider_InitCylinder(globalCtx, &this->cylinder);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue