mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
Cosmetic Editor v3 (#1898)
* Cosmetic Editor v3 * Workaround for cvar_clear not working correctly * Nest RGBA values under Value key * Implement arrow cosmetics * Implement keese cosmetics * Tweaks to life meter * Implement file choose color * Remove old title fire colors * A few more silly things * Fix from upstream pulls * Fix hilts and sword during ganon cutscene * Add slingshot * Add metal trap and red ice * Add iron knuckles cosmetics * Add navi cosmetics * Attempt to fix linux error * adjust some comments and alignment * Implement trails cosmetics * Implement charged sword spins * Comment out options that haven't been implemented * Fix exploded rupee color in shooting gallery * Add two silly options * Add comments and minor changes from feedback * Adjust comment about boomerang gem * Gracefully handle chest textures missing
This commit is contained in:
parent
8c8c761726
commit
274c12f3cb
52 changed files with 2722 additions and 2942 deletions
|
@ -301,6 +301,15 @@ NaviColor sNaviColorList[] = {
|
|||
{ { 0, 255, 0, 255 }, { 0, 255, 0, 0 } },
|
||||
};
|
||||
|
||||
static Color_RGBA8 defaultIdlePrimaryColor = { 255, 255, 255, 255 };
|
||||
static Color_RGBA8 defaultIdleSecondaryColor = { 0, 0, 255, 0 };
|
||||
static Color_RGBA8 defaultNPCPrimaryColor = { 150, 150, 255, 255 };
|
||||
static Color_RGBA8 defaultNPCSecondaryColor = { 150, 150, 255, 0 };
|
||||
static Color_RGBA8 defaultEnemyPrimaryColor = { 255, 255, 0, 255 };
|
||||
static Color_RGBA8 defaultEnemySecondaryColor = { 200, 155, 0, 0 };
|
||||
static Color_RGBA8 defaultPropsPrimaryColor = { 0, 255, 0, 255 };
|
||||
static Color_RGBA8 defaultPropsSecondaryColor = { 0, 255, 0, 0 };
|
||||
|
||||
// unused
|
||||
Gfx D_80115FF0[] = {
|
||||
gsSPEndDisplayList(),
|
||||
|
@ -335,52 +344,55 @@ void func_8002BE98(TargetContext* targetCtx, s32 actorCategory, PlayState* play)
|
|||
}
|
||||
|
||||
void func_8002BF60(TargetContext* targetCtx, Actor* actor, s32 actorCategory, PlayState* play) {
|
||||
NaviColor* naviColor = &sNaviColorList[actorCategory];
|
||||
Color_RGB8 customInnerNaviColor;
|
||||
Color_RGB8 customOuterNaviColor;
|
||||
|
||||
if (!CVar_GetS32("gUseNaviCol",0)) {
|
||||
if (actorCategory == ACTORCAT_PLAYER) {
|
||||
naviColor->inner.r = 255; naviColor->inner.g = 255; naviColor->inner.b = 255;
|
||||
naviColor->outer.r = 0; naviColor->outer.g = 0; naviColor->outer.b = 255;
|
||||
}
|
||||
if (actorCategory == ACTORCAT_NPC) {
|
||||
naviColor->inner.r = 150; naviColor->inner.g = 150; naviColor->inner.b = 255;
|
||||
naviColor->outer.r = 150; naviColor->outer.g = 150; naviColor->outer.b = 255;
|
||||
}
|
||||
if (actorCategory == ACTORCAT_BOSS || actorCategory == ACTORCAT_ENEMY) {
|
||||
naviColor->inner.r = 255; naviColor->inner.g = 255; naviColor->inner.b = 0;
|
||||
naviColor->outer.r = 220; naviColor->outer.g = 155; naviColor->outer.b = 0;
|
||||
}
|
||||
if (actorCategory == ACTORCAT_PROP) {
|
||||
naviColor->inner.r = 0; naviColor->inner.g = 255; naviColor->inner.b = 0;
|
||||
naviColor->outer.r = 0; naviColor->outer.g = 255; naviColor->outer.b = 0;
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Navi_IdlePrimary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_PLAYER].inner = CVar_GetRGBA("gCosmetics.Navi_IdlePrimary.Value", defaultIdlePrimaryColor);
|
||||
} else {
|
||||
if (actorCategory == ACTORCAT_PLAYER) {
|
||||
customInnerNaviColor = CVar_GetRGB("gNavi_Idle_Inner", (Color_RGB8){ 0, 0, 0 });
|
||||
customOuterNaviColor = CVar_GetRGB("gNavi_Idle_Outer", (Color_RGB8){ 0, 0, 0 });
|
||||
}
|
||||
if (actorCategory == ACTORCAT_NPC) {
|
||||
customInnerNaviColor = CVar_GetRGB("gNavi_NPC_Inner", (Color_RGB8){ 0, 0, 0 });
|
||||
customOuterNaviColor = CVar_GetRGB("gNavi_NPC_Outer", (Color_RGB8){ 0, 0, 0 });
|
||||
}
|
||||
if (actorCategory == ACTORCAT_BOSS || actorCategory == ACTORCAT_ENEMY) {
|
||||
customInnerNaviColor = CVar_GetRGB("gNavi_Enemy_Inner", (Color_RGB8){ 0, 0, 0 });
|
||||
customOuterNaviColor = CVar_GetRGB("gNavi_Enemy_Outer", (Color_RGB8){ 0, 0, 0 });
|
||||
}
|
||||
if (actorCategory == ACTORCAT_PROP) {
|
||||
customInnerNaviColor = CVar_GetRGB("gNavi_Prop_Inner", (Color_RGB8){ 0, 0, 0 });
|
||||
customOuterNaviColor = CVar_GetRGB("gNavi_Prop_Outer", (Color_RGB8){ 0, 0, 0 });
|
||||
}
|
||||
naviColor->inner.r = customInnerNaviColor.r;
|
||||
naviColor->inner.g = customInnerNaviColor.g;
|
||||
naviColor->inner.b = customInnerNaviColor.b;
|
||||
naviColor->outer.r = customOuterNaviColor.r;
|
||||
naviColor->outer.g = customOuterNaviColor.g;
|
||||
naviColor->outer.b = customOuterNaviColor.b;
|
||||
sNaviColorList[ACTORCAT_PLAYER].inner = defaultIdlePrimaryColor;
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Navi_IdleSecondary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_PLAYER].outer = CVar_GetRGBA("gCosmetics.Navi_IdleSecondary.Value", defaultIdleSecondaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_PLAYER].outer = defaultIdleSecondaryColor;
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gCosmetics.Navi_NPCPrimary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_NPC].inner = CVar_GetRGBA("gCosmetics.Navi_NPCPrimary.Value", defaultNPCPrimaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_NPC].inner = defaultNPCPrimaryColor;
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Navi_NPCSecondary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_NPC].outer = CVar_GetRGBA("gCosmetics.Navi_NPCSecondary.Value", defaultNPCSecondaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_NPC].outer = defaultNPCSecondaryColor;
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gCosmetics.Navi_EnemyPrimary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_ENEMY].inner = CVar_GetRGBA("gCosmetics.Navi_EnemyPrimary.Value", defaultEnemyPrimaryColor);
|
||||
sNaviColorList[ACTORCAT_BOSS].inner = CVar_GetRGBA("gCosmetics.Navi_EnemyPrimary.Value", defaultEnemyPrimaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_ENEMY].inner = defaultEnemyPrimaryColor;
|
||||
sNaviColorList[ACTORCAT_BOSS].inner = defaultEnemyPrimaryColor;
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Navi_EnemySecondary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_ENEMY].outer = CVar_GetRGBA("gCosmetics.Navi_EnemySecondary.Value", defaultEnemySecondaryColor);
|
||||
sNaviColorList[ACTORCAT_BOSS].outer = CVar_GetRGBA("gCosmetics.Navi_EnemySecondary.Value", defaultEnemySecondaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_ENEMY].outer = defaultEnemySecondaryColor;
|
||||
sNaviColorList[ACTORCAT_BOSS].outer = defaultEnemySecondaryColor;
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gCosmetics.Navi_PropsPrimary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_PROP].inner = CVar_GetRGBA("gCosmetics.Navi_PropsPrimary.Value", defaultPropsPrimaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_PROP].inner = defaultPropsPrimaryColor;
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Navi_PropsSecondary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_PROP].outer = CVar_GetRGBA("gCosmetics.Navi_PropsSecondary.Value", defaultPropsSecondaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_PROP].outer = defaultPropsSecondaryColor;
|
||||
}
|
||||
|
||||
NaviColor* naviColor = &sNaviColorList[actorCategory];
|
||||
targetCtx->naviRefPos.x = actor->focus.pos.x;
|
||||
targetCtx->naviRefPos.y = actor->focus.pos.y + (actor->targetArrowOffset * actor->scale.y);
|
||||
targetCtx->naviRefPos.z = actor->focus.pos.z;
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
|
||||
#include "soh/frame_interpolation.h"
|
||||
|
||||
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;
|
||||
s32 numElements;
|
||||
|
@ -205,203 +201,89 @@ void EffectBlure_Destroy(void* thisx) {
|
|||
s32 EffectBlure_Update(void* thisx) {
|
||||
EffectBlure* this = (EffectBlure*)thisx;
|
||||
s32 i;
|
||||
Color_RGBA8 color;
|
||||
u8 changed = 0;
|
||||
|
||||
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);
|
||||
switch (this->trailType) { //there HAS to be a better way to do this.
|
||||
case 2:
|
||||
if (CVar_GetS32("gCosmetics.Trails_Boomerang.Changed", 0)) {
|
||||
color = CVar_GetRGBA("gCosmetics.Trails_Boomerang.Value", (Color_RGBA8){ 255, 255, 100, 255 });
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (CVar_GetS32("gCosmetics.Trails_Bombchu.Changed", 0)) {
|
||||
color = CVar_GetRGBA("gCosmetics.Trails_Bombchu.Value", (Color_RGBA8){ 250, 0, 0, 255 });
|
||||
this->p1StartColor.r = color.r;
|
||||
this->p2StartColor.r = color.r * 0.8f;
|
||||
this->p1EndColor.r = color.r * 0.6f;
|
||||
this->p2EndColor.r = color.r * 0.4f;
|
||||
this->p1StartColor.g = color.g;
|
||||
this->p2StartColor.g = color.g * 0.8f;
|
||||
this->p1EndColor.g = color.g * 0.6f;
|
||||
this->p2EndColor.g = color.g * 0.4f;
|
||||
this->p1StartColor.b = color.b;
|
||||
this->p2StartColor.b = color.b * 0.8f;
|
||||
this->p1EndColor.b = color.b * 0.6f;
|
||||
this->p2EndColor.b = color.b * 0.4f;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (CVar_GetS32("gCosmetics.Trails_KokiriSword.Changed", 0)) {
|
||||
color = CVar_GetRGBA("gCosmetics.Trails_KokiriSword.Value", (Color_RGBA8){ 255, 255, 255, 255 });
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (CVar_GetS32("gCosmetics.Trails_MasterSword.Changed", 0)) {
|
||||
color = CVar_GetRGBA("gCosmetics.Trails_MasterSword.Value", (Color_RGBA8){ 255, 255, 255, 255 });
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (CVar_GetS32("gCosmetics.Trails_BiggoronSword.Changed", 0)) {
|
||||
color = CVar_GetRGBA("gCosmetics.Trails_BiggoronSword.Value", (Color_RGBA8){ 255, 255, 255, 255 });
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (CVar_GetS32("gCosmetics.Trails_Stick.Changed", 0)) {
|
||||
color = CVar_GetRGBA("gCosmetics.Trails_Stick.Value", (Color_RGBA8){ 255, 255, 255, 255 });
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (CVar_GetS32("gCosmetics.Trails_Hammer.Changed", 0)) {
|
||||
color = CVar_GetRGBA("gCosmetics.Trails_Hammer.Value", (Color_RGBA8){ 255, 255, 255, 255 });
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
default: // don't do anything
|
||||
break;
|
||||
}
|
||||
|
||||
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;
|
||||
// We cant just straight up assign the colors because we need to preserve the alpha channel
|
||||
if (changed) {
|
||||
this->p1StartColor.r = color.r;
|
||||
this->p2StartColor.r = color.r;
|
||||
this->p1EndColor.r = color.r;
|
||||
this->p2EndColor.r = color.r;
|
||||
this->p1StartColor.g = color.g;
|
||||
this->p2StartColor.g = color.g;
|
||||
this->p1EndColor.g = color.g;
|
||||
this->p2EndColor.g = color.g;
|
||||
this->p1StartColor.b = color.b;
|
||||
this->p2StartColor.b = color.b;
|
||||
this->p1EndColor.b = color.b;
|
||||
this->p2EndColor.b = color.b;
|
||||
}
|
||||
|
||||
// Don't override boomerang and bombchu trail durations
|
||||
if (this->trailType != 2 && this->trailType != 3) {
|
||||
if (CVar_GetS32("gCosmetics.Trails_Duration.Changed", 0)) {
|
||||
this->elemDuration = CVar_GetS32("gCosmetics.Trails_Duration.Value", 4);
|
||||
}
|
||||
}
|
||||
|
||||
if (this == NULL) {
|
||||
return 0;
|
||||
|
|
|
@ -1345,21 +1345,19 @@ void EnItem00_CustomItemsParticles(Actor* Parent, PlayState* play, GetItemEntry
|
|||
Color_RGBA8 envColor = { colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 0 };
|
||||
Vec3f pos;
|
||||
|
||||
// velocity.x = Rand_CenteredFloat(3.0f);
|
||||
// velocity.z = Rand_CenteredFloat(3.0f);
|
||||
velocity.y = -0.05f;
|
||||
accel.y = -0.025f;
|
||||
pos.x = Rand_CenteredFloat(32.0f) + Parent->world.pos.x;
|
||||
velocity.y = -0.00f;
|
||||
accel.y = -0.0f;
|
||||
pos.x = Rand_CenteredFloat(15.0f) + Parent->world.pos.x;
|
||||
// Shop items are rendered at a different height than the rest, so a different y offset is required
|
||||
if (Parent->id == ACTOR_EN_GIRLA) {
|
||||
pos.y = (Rand_ZeroOne() * 6.0f) + Parent->world.pos.y + 5;
|
||||
pos.y = (Rand_ZeroOne() * 10.0f) + Parent->world.pos.y + 3;
|
||||
} else {
|
||||
pos.y = (Rand_ZeroOne() * 6.0f) + Parent->world.pos.y + 25;
|
||||
pos.y = (Rand_ZeroOne() * 10.0f) + Parent->world.pos.y + 25;
|
||||
}
|
||||
pos.z = Rand_CenteredFloat(32.0f) + Parent->world.pos.z;
|
||||
pos.z = Rand_CenteredFloat(15.0f) + Parent->world.pos.z;
|
||||
|
||||
|
||||
EffectSsKiraKira_SpawnDispersed(play, &pos, &velocity, &accel, &primColor, &envColor, 1000, 50);
|
||||
EffectSsKiraKira_SpawnFocused(play, &pos, &velocity, &accel, &primColor, &envColor, 1000, 30);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1383,9 +1381,41 @@ void EnItem00_DrawRupee(EnItem00* this, PlayState* play) {
|
|||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTex[texIndex]));
|
||||
Color_RGB8 rupeeColor;
|
||||
u8 shouldColor = 0;
|
||||
switch (texIndex) {
|
||||
case 0:
|
||||
rupeeColor = CVar_GetRGB("gCosmetics.Consumable_GreenRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVar_GetS32("gCosmetics.Consumable_GreenRupee.Changed", 0);
|
||||
break;
|
||||
case 1:
|
||||
rupeeColor = CVar_GetRGB("gCosmetics.Consumable_BlueRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVar_GetS32("gCosmetics.Consumable_BlueRupee.Changed", 0);
|
||||
break;
|
||||
case 2:
|
||||
rupeeColor = CVar_GetRGB("gCosmetics.Consumable_RedRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVar_GetS32("gCosmetics.Consumable_RedRupee.Changed", 0);
|
||||
break;
|
||||
case 3:
|
||||
rupeeColor = CVar_GetRGB("gCosmetics.Consumable_PurpleRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVar_GetS32("gCosmetics.Consumable_PurpleRupee.Changed", 0);
|
||||
break;
|
||||
case 4:
|
||||
rupeeColor = CVar_GetRGB("gCosmetics.Consumable_GoldRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVar_GetS32("gCosmetics.Consumable_GoldRupee.Changed", 0);
|
||||
break;
|
||||
}
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
|
||||
if (shouldColor) {
|
||||
gDPSetGrayscaleColor(POLY_OPA_DISP++, rupeeColor.r, rupeeColor.g, rupeeColor.b, 255);
|
||||
gSPGrayscale(POLY_OPA_DISP++, true);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTex[texIndex]));
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
|
||||
gSPGrayscale(POLY_OPA_DISP++, false);
|
||||
} else {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTex[texIndex]));
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
|
|
@ -1379,6 +1379,7 @@ void Environment_DrawSunAndMoon(PlayState* play) {
|
|||
color = CLAMP_MIN(color, 0.0f);
|
||||
|
||||
scale = -15.0f * color + 25.0f;
|
||||
scale *= CVar_GetFloat("gCosmetics.Moon_Size", 1.0f);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
|
||||
temp = -y / 80.0f;
|
||||
|
@ -1390,8 +1391,14 @@ void Environment_DrawSunAndMoon(PlayState* play) {
|
|||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD);
|
||||
Gfx_SetupDL_51Opa(play->state.gfxCtx);
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 240, 255, 180, alpha);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 80, 70, 20, alpha);
|
||||
if (CVar_GetS32("gCosmetics.World_Moon.Changed", 0)) {
|
||||
Color_RGB8 moonColor = CVar_GetRGB("gCosmetics.World_Moon.Value", (Color_RGB8){ 0, 0, 240 });
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, moonColor.r, moonColor.g, moonColor.b, alpha);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, moonColor.r / 2, moonColor.g / 2, moonColor.b / 2, alpha);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 240, 255, 180, alpha);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 80, 70, 20, alpha);
|
||||
}
|
||||
gSPDisplayList(POLY_OPA_DISP++, gMoonDL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,12 +112,6 @@ static s16 sHeartsDDEnvFactors[3][3] = {
|
|||
};
|
||||
|
||||
// Current colors for the double defense hearts
|
||||
Color_RGB8 HeartInner_ori = {HEARTS_PRIM_R,HEARTS_PRIM_G,HEARTS_PRIM_B};
|
||||
Color_RGB8 HeartDDOutline_ori = {HEARTS_DD_PRIM_R,HEARTS_DD_PRIM_G,HEARTS_DD_PRIM_B};
|
||||
Color_RGB8 HeartDDInner_ori = {HEARTS_DD_ENV_R,HEARTS_DD_ENV_G,HEARTS_DD_ENV_B};
|
||||
Color_RGB8 HeartInner;
|
||||
Color_RGB8 HeartDDOutline;
|
||||
Color_RGB8 HeartDDInner;
|
||||
s16 sBeatingHeartsDDPrim[3];
|
||||
s16 sBeatingHeartsDDEnv[3];
|
||||
s16 sHeartsDDPrim[2][3];
|
||||
|
@ -125,14 +119,21 @@ s16 sHeartsDDEnv[2][3];
|
|||
|
||||
void HealthMeter_Init(PlayState* play) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
HeartInner = CVar_GetRGB("gCCHeartsPrim", HeartInner_ori);
|
||||
HeartDDInner = CVar_GetRGB("gCCDDHeartsPrim", HeartDDInner_ori);
|
||||
HeartDDOutline = CVar_GetRGB("gDDCCHeartsPrim", HeartDDOutline_ori);
|
||||
} else {
|
||||
HeartInner = HeartInner_ori;
|
||||
HeartDDInner = HeartDDInner_ori;
|
||||
HeartDDOutline = HeartDDOutline_ori;
|
||||
Color_RGB8 mainColor = {HEARTS_PRIM_R, HEARTS_PRIM_G, HEARTS_PRIM_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_Hearts.Changed", 0)) {
|
||||
mainColor = CVar_GetRGB("gCosmetics.Consumable_Hearts.Value", mainColor);
|
||||
}
|
||||
Color_RGB8 mainBorder = {HEARTS_ENV_R, HEARTS_ENV_G, HEARTS_ENV_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_HeartBorder.Changed", 0)) {
|
||||
mainBorder = CVar_GetRGB("gCosmetics.Consumable_HeartBorder.Value", mainBorder);
|
||||
}
|
||||
Color_RGB8 ddColor = {HEARTS_DD_ENV_R, HEARTS_DD_ENV_G, HEARTS_DD_ENV_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_DDHearts.Changed", 0)) {
|
||||
ddColor = CVar_GetRGB("gCosmetics.Consumable_DDHearts.Value", ddColor);
|
||||
}
|
||||
Color_RGB8 ddBorder = {HEARTS_DD_PRIM_R, HEARTS_DD_PRIM_G, HEARTS_DD_PRIM_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_DDHeartBorder.Changed", 0)) {
|
||||
ddBorder = CVar_GetRGB("gCosmetics.Consumable_DDHeartBorder.Value", ddBorder);
|
||||
}
|
||||
|
||||
interfaceCtx->unk_228 = 0x140;
|
||||
|
@ -140,33 +141,29 @@ void HealthMeter_Init(PlayState* play) {
|
|||
interfaceCtx->unk_22A = interfaceCtx->unk_1FE = 0;
|
||||
interfaceCtx->unk_22C = interfaceCtx->unk_200 = 0;
|
||||
|
||||
interfaceCtx->heartsPrimR[0] = HeartInner.r;
|
||||
interfaceCtx->heartsPrimG[0] = HeartInner.g;
|
||||
interfaceCtx->heartsPrimB[0] = HeartInner.b;
|
||||
interfaceCtx->heartsPrimR[0] = mainColor.r;
|
||||
interfaceCtx->heartsPrimG[0] = mainColor.g;
|
||||
interfaceCtx->heartsPrimB[0] = mainColor.b;
|
||||
|
||||
interfaceCtx->heartsEnvR[0] = HEARTS_ENV_R;
|
||||
interfaceCtx->heartsEnvG[0] = HEARTS_ENV_G;
|
||||
interfaceCtx->heartsEnvB[0] = HEARTS_ENV_B;
|
||||
interfaceCtx->heartsEnvR[0] = mainBorder.r;
|
||||
interfaceCtx->heartsEnvG[0] = mainBorder.g;
|
||||
interfaceCtx->heartsEnvB[0] = mainBorder.b;
|
||||
|
||||
interfaceCtx->heartsPrimR[1] = HeartInner.r;
|
||||
interfaceCtx->heartsPrimG[1] = HeartInner.g;
|
||||
interfaceCtx->heartsPrimB[1] = HeartInner.b;
|
||||
interfaceCtx->heartsPrimR[1] = mainColor.r;
|
||||
interfaceCtx->heartsPrimG[1] = mainColor.g;
|
||||
interfaceCtx->heartsPrimB[1] = mainColor.b;
|
||||
|
||||
interfaceCtx->heartsEnvR[1] = HEARTS_ENV_R;
|
||||
interfaceCtx->heartsEnvG[1] = HEARTS_ENV_G;
|
||||
interfaceCtx->heartsEnvB[1] = HEARTS_ENV_B;
|
||||
interfaceCtx->heartsEnvR[1] = mainBorder.r;
|
||||
interfaceCtx->heartsEnvG[1] = mainBorder.g;
|
||||
interfaceCtx->heartsEnvB[1] = mainBorder.b;
|
||||
|
||||
sHeartsDDPrim[0][0] = sHeartsDDPrim[1][0] = HeartDDOutline.r;
|
||||
sHeartsDDPrim[0][1] = sHeartsDDPrim[1][1] = HeartDDOutline.b;
|
||||
sHeartsDDPrim[0][2] = sHeartsDDPrim[1][2] = HeartDDOutline.b;
|
||||
sHeartsDDPrim[0][0] = sHeartsDDPrim[1][0] = ddBorder.r;
|
||||
sHeartsDDPrim[0][1] = sHeartsDDPrim[1][1] = ddBorder.g;
|
||||
sHeartsDDPrim[0][2] = sHeartsDDPrim[1][2] = ddBorder.b;
|
||||
|
||||
// sHeartsDDPrim[2][0] = HeartInner[0];
|
||||
// sHeartsDDPrim[2][1] = HeartInner[1];
|
||||
// sHeartsDDPrim[2][2] = HeartInner[2];
|
||||
|
||||
sHeartsDDEnv[0][0] = sHeartsDDEnv[1][0] = HeartDDInner.r;
|
||||
sHeartsDDEnv[0][1] = sHeartsDDEnv[1][1] = HeartDDInner.g;
|
||||
sHeartsDDEnv[0][2] = sHeartsDDEnv[1][2] = HeartDDInner.b;
|
||||
sHeartsDDEnv[0][0] = sHeartsDDEnv[1][0] = ddColor.r;
|
||||
sHeartsDDEnv[0][1] = sHeartsDDEnv[1][1] = ddColor.g;
|
||||
sHeartsDDEnv[0][2] = sHeartsDDEnv[1][2] = ddColor.b;
|
||||
}
|
||||
|
||||
void HealthMeter_Update(PlayState* play) {
|
||||
|
@ -184,14 +181,21 @@ void HealthMeter_Update(PlayState* play) {
|
|||
Right_LM_Margin = CVar_GetS32("gHUDMargin_R", 0);
|
||||
Bottom_LM_Margin = CVar_GetS32("gHUDMargin_B", 0);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
HeartInner = CVar_GetRGB("gCCHeartsPrim", HeartInner_ori);
|
||||
HeartDDInner = CVar_GetRGB("gCCDDHeartsPrim", HeartDDInner_ori);
|
||||
HeartDDOutline = CVar_GetRGB("gDDCCHeartsPrim", HeartDDOutline_ori);
|
||||
} else {
|
||||
HeartInner = HeartInner_ori;
|
||||
HeartDDInner = HeartDDInner_ori;
|
||||
HeartDDOutline = HeartDDOutline_ori;
|
||||
Color_RGB8 mainColor = {HEARTS_PRIM_R, HEARTS_PRIM_G, HEARTS_PRIM_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_Hearts.Changed", 0)) {
|
||||
mainColor = CVar_GetRGB("gCosmetics.Consumable_Hearts.Value", mainColor);
|
||||
}
|
||||
Color_RGB8 mainBorder = {HEARTS_ENV_R, HEARTS_ENV_G, HEARTS_ENV_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_HeartBorder.Changed", 0)) {
|
||||
mainBorder = CVar_GetRGB("gCosmetics.Consumable_HeartBorder.Value", mainBorder);
|
||||
}
|
||||
Color_RGB8 ddColor = {HEARTS_DD_ENV_R, HEARTS_DD_ENV_G, HEARTS_DD_ENV_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_DDHearts.Changed", 0)) {
|
||||
ddColor = CVar_GetRGB("gCosmetics.Consumable_DDHearts.Value", ddColor);
|
||||
}
|
||||
Color_RGB8 ddBorder = {HEARTS_DD_PRIM_R, HEARTS_DD_PRIM_G, HEARTS_DD_PRIM_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_DDHeartBorder.Changed", 0)) {
|
||||
ddBorder = CVar_GetRGB("gCosmetics.Consumable_DDHeartBorder.Value", ddBorder);
|
||||
}
|
||||
|
||||
if (interfaceCtx->unk_200 != 0) {
|
||||
|
@ -210,122 +214,72 @@ void HealthMeter_Update(PlayState* play) {
|
|||
|
||||
ddFactor = factor;
|
||||
|
||||
interfaceCtx->heartsPrimR[0] = HeartInner.r;
|
||||
interfaceCtx->heartsPrimG[0] = HeartInner.g;
|
||||
interfaceCtx->heartsPrimB[0] = HeartInner.b;
|
||||
interfaceCtx->heartsPrimR[0] = mainColor.r;
|
||||
interfaceCtx->heartsPrimG[0] = mainColor.g;
|
||||
interfaceCtx->heartsPrimB[0] = mainColor.b;
|
||||
|
||||
interfaceCtx->heartsEnvR[0] = HEARTS_ENV_R;
|
||||
interfaceCtx->heartsEnvG[0] = HEARTS_ENV_G;
|
||||
interfaceCtx->heartsEnvB[0] = HEARTS_ENV_B;
|
||||
interfaceCtx->heartsEnvR[0] = mainBorder.r;
|
||||
interfaceCtx->heartsEnvG[0] = mainBorder.g;
|
||||
interfaceCtx->heartsEnvB[0] = mainBorder.b;
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
interfaceCtx->heartsPrimR[1] = HeartInner.r;
|
||||
interfaceCtx->heartsPrimG[1] = HeartInner.g;
|
||||
interfaceCtx->heartsPrimB[1] = HeartInner.b;
|
||||
} else {
|
||||
interfaceCtx->heartsPrimR[1] = sHeartsPrimColors[type][0];
|
||||
interfaceCtx->heartsPrimG[1] = sHeartsPrimColors[type][1];
|
||||
interfaceCtx->heartsPrimB[1] = sHeartsPrimColors[type][2];
|
||||
}
|
||||
interfaceCtx->heartsPrimR[1] = mainColor.r;
|
||||
interfaceCtx->heartsPrimG[1] = mainColor.g;
|
||||
interfaceCtx->heartsPrimB[1] = mainColor.b;
|
||||
|
||||
interfaceCtx->heartsEnvR[1] = sHeartsEnvColors[type][0];
|
||||
interfaceCtx->heartsEnvG[1] = sHeartsEnvColors[type][1];
|
||||
interfaceCtx->heartsEnvB[1] = sHeartsEnvColors[type][2];
|
||||
interfaceCtx->heartsEnvR[1] = mainBorder.r;
|
||||
interfaceCtx->heartsEnvG[1] = mainBorder.g;
|
||||
interfaceCtx->heartsEnvB[1] = mainBorder.b;
|
||||
|
||||
rFactor = sHeartsPrimFactors[0][0] * factor;
|
||||
gFactor = sHeartsPrimFactors[0][1] * factor;
|
||||
bFactor = sHeartsPrimFactors[0][2] * factor;
|
||||
|
||||
interfaceCtx->beatingHeartPrim[0] = (u8)(rFactor + HeartInner.r) & 0xFF;
|
||||
interfaceCtx->beatingHeartPrim[1] = (u8)(gFactor + HeartInner.g) & 0xFF;
|
||||
interfaceCtx->beatingHeartPrim[2] = (u8)(bFactor + HeartInner.b) & 0xFF;
|
||||
interfaceCtx->beatingHeartPrim[0] = (u8)(rFactor + mainColor.r) & 0xFF;
|
||||
interfaceCtx->beatingHeartPrim[1] = (u8)(gFactor + mainColor.g) & 0xFF;
|
||||
interfaceCtx->beatingHeartPrim[2] = (u8)(bFactor + mainColor.b) & 0xFF;
|
||||
|
||||
rFactor = sHeartsEnvFactors[0][0] * factor;
|
||||
gFactor = sHeartsEnvFactors[0][1] * factor;
|
||||
bFactor = sHeartsEnvFactors[0][2] * factor;
|
||||
|
||||
interfaceCtx->beatingHeartEnv[0] = (u8)(rFactor + HEARTS_ENV_R) & 0xFF;
|
||||
interfaceCtx->beatingHeartEnv[1] = (u8)(gFactor + HEARTS_ENV_G) & 0xFF;
|
||||
interfaceCtx->beatingHeartEnv[2] = (u8)(bFactor + HEARTS_ENV_B) & 0xFF;
|
||||
|
||||
if (1) {}
|
||||
ddType = type;
|
||||
|
||||
sHeartsDDPrim[0][0] = HeartDDOutline.r;
|
||||
sHeartsDDPrim[0][1] = HeartDDOutline.g;
|
||||
sHeartsDDPrim[0][2] = HeartDDOutline.b;
|
||||
interfaceCtx->beatingHeartEnv[0] = (u8)(rFactor + mainBorder.r) & 0xFF;
|
||||
interfaceCtx->beatingHeartEnv[1] = (u8)(gFactor + mainBorder.g) & 0xFF;
|
||||
interfaceCtx->beatingHeartEnv[2] = (u8)(bFactor + mainBorder.b) & 0xFF;
|
||||
|
||||
sHeartsDDEnv[0][0] = HeartDDInner.r;
|
||||
sHeartsDDEnv[0][1] = HeartDDInner.g;
|
||||
sHeartsDDEnv[0][2] = HeartDDInner.b;
|
||||
sHeartsDDPrim[0][0] = ddBorder.r;
|
||||
sHeartsDDPrim[0][1] = ddBorder.g;
|
||||
sHeartsDDPrim[0][2] = ddBorder.b;
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
sHeartsDDPrim[2][0] = HeartDDInner.r;
|
||||
sHeartsDDPrim[2][1] = HeartDDInner.g;
|
||||
sHeartsDDPrim[2][2] = HeartDDInner.b;
|
||||
sHeartsDDEnv[0][0] = ddColor.r;
|
||||
sHeartsDDEnv[0][1] = ddColor.g;
|
||||
sHeartsDDEnv[0][2] = ddColor.b;
|
||||
|
||||
sHeartsDDPrim[1][0] = HeartDDOutline.r;
|
||||
sHeartsDDPrim[1][1] = HeartDDOutline.g;
|
||||
sHeartsDDPrim[1][2] = HeartDDOutline.b;
|
||||
sHeartsDDPrim[1][0] = ddBorder.r;
|
||||
sHeartsDDPrim[1][1] = ddBorder.g;
|
||||
sHeartsDDPrim[1][2] = ddBorder.b;
|
||||
|
||||
sHeartsDDEnv[1][0] = HeartDDInner.r;
|
||||
sHeartsDDEnv[1][1] = HeartDDInner.g;
|
||||
sHeartsDDEnv[1][2] = HeartDDInner.b;
|
||||
sHeartsDDEnv[1][0] = ddColor.r;
|
||||
sHeartsDDEnv[1][1] = ddColor.g;
|
||||
sHeartsDDEnv[1][2] = ddColor.b;
|
||||
|
||||
HeartDDInner = CVar_GetRGB("gCCDDHeartsPrim", HeartDDInner_ori);
|
||||
rFactor = sHeartsDDPrimFactors[ddType][0] * ddFactor;
|
||||
gFactor = sHeartsDDPrimFactors[ddType][1] * ddFactor;
|
||||
bFactor = sHeartsDDPrimFactors[ddType][2] * ddFactor;
|
||||
|
||||
sHeartsDDEnv[0][0] = HeartDDInner.r;
|
||||
sHeartsDDEnv[0][1] = HeartDDInner.g;
|
||||
sHeartsDDEnv[0][2] = HeartDDInner.b;
|
||||
sBeatingHeartsDDPrim[0] = (u8)(rFactor + ddBorder.r) & 0xFF;
|
||||
sBeatingHeartsDDPrim[1] = (u8)(gFactor + ddBorder.g) & 0xFF;
|
||||
sBeatingHeartsDDPrim[2] = (u8)(bFactor + ddBorder.b) & 0xFF;
|
||||
|
||||
rFactor = sHeartsDDPrimFactors[ddType][0] * ddFactor;
|
||||
gFactor = sHeartsDDPrimFactors[ddType][1] * ddFactor;
|
||||
bFactor = sHeartsDDPrimFactors[ddType][2] * ddFactor;
|
||||
|
||||
sBeatingHeartsDDPrim[0] = (u8)(rFactor + HeartDDOutline.r) & 0xFF;
|
||||
sBeatingHeartsDDPrim[1] = (u8)(gFactor + HeartDDOutline.g) & 0xFF;
|
||||
sBeatingHeartsDDPrim[2] = (u8)(bFactor + HeartDDOutline.b) & 0xFF;
|
||||
|
||||
rFactor = sHeartsDDEnvFactors[ddType][0] * ddFactor;
|
||||
gFactor = sHeartsDDEnvFactors[ddType][1] * ddFactor;
|
||||
bFactor = sHeartsDDEnvFactors[ddType][2] * ddFactor;
|
||||
|
||||
sBeatingHeartsDDEnv[0] = (u8)(rFactor + HeartDDInner.r) & 0xFF;
|
||||
sBeatingHeartsDDEnv[1] = (u8)(gFactor + HeartDDInner.g) & 0xFF;
|
||||
sBeatingHeartsDDEnv[2] = (u8)(bFactor + HeartDDInner.b) & 0xFF;
|
||||
} else {
|
||||
sHeartsDDPrim[0][0] = HEARTS_DD_PRIM_R;
|
||||
sHeartsDDPrim[0][1] = HEARTS_DD_PRIM_G;
|
||||
sHeartsDDPrim[0][2] = HEARTS_DD_PRIM_B;
|
||||
|
||||
sHeartsDDEnv[0][0] = HEARTS_DD_ENV_R;
|
||||
sHeartsDDEnv[0][1] = HEARTS_DD_ENV_G;
|
||||
sHeartsDDEnv[0][2] = HEARTS_DD_ENV_B;
|
||||
|
||||
sHeartsDDPrim[1][0] = sHeartsDDPrimColors[ddType][0];
|
||||
sHeartsDDPrim[1][1] = sHeartsDDPrimColors[ddType][1];
|
||||
sHeartsDDPrim[1][2] = sHeartsDDPrimColors[ddType][2];
|
||||
|
||||
sHeartsDDEnv[1][0] = sHeartsDDEnvColors[ddType][0];
|
||||
sHeartsDDEnv[1][1] = sHeartsDDEnvColors[ddType][1];
|
||||
sHeartsDDEnv[1][2] = sHeartsDDEnvColors[ddType][2];
|
||||
|
||||
rFactor = sHeartsDDPrimFactors[ddType][0] * ddFactor;
|
||||
gFactor = sHeartsDDPrimFactors[ddType][1] * ddFactor;
|
||||
bFactor = sHeartsDDPrimFactors[ddType][2] * ddFactor;
|
||||
|
||||
sBeatingHeartsDDPrim[0] = (u8)(rFactor + HEARTS_DD_PRIM_R) & 0xFF;
|
||||
sBeatingHeartsDDPrim[1] = (u8)(gFactor + HEARTS_DD_PRIM_G) & 0xFF;
|
||||
sBeatingHeartsDDPrim[2] = (u8)(bFactor + HEARTS_DD_PRIM_B) & 0xFF;
|
||||
|
||||
rFactor = sHeartsDDEnvFactors[ddType][0] * ddFactor;
|
||||
gFactor = sHeartsDDEnvFactors[ddType][1] * ddFactor;
|
||||
bFactor = sHeartsDDEnvFactors[ddType][2] * ddFactor;
|
||||
|
||||
sBeatingHeartsDDEnv[0] = (u8)(rFactor + HEARTS_DD_ENV_R) & 0xFF;
|
||||
sBeatingHeartsDDEnv[1] = (u8)(gFactor + HEARTS_DD_ENV_G) & 0xFF;
|
||||
sBeatingHeartsDDEnv[2] = (u8)(bFactor + HEARTS_DD_ENV_B) & 0xFF;
|
||||
}
|
||||
rFactor = sHeartsDDEnvFactors[ddType][0] * ddFactor;
|
||||
gFactor = sHeartsDDEnvFactors[ddType][1] * ddFactor;
|
||||
bFactor = sHeartsDDEnvFactors[ddType][2] * ddFactor;
|
||||
|
||||
sBeatingHeartsDDEnv[0] = (u8)(rFactor + ddColor.r) & 0xFF;
|
||||
sBeatingHeartsDDEnv[1] = (u8)(gFactor + ddColor.g) & 0xFF;
|
||||
sBeatingHeartsDDEnv[2] = (u8)(bFactor + ddColor.b) & 0xFF;
|
||||
}
|
||||
|
||||
s32 func_80078E18(PlayState* play) {
|
||||
|
@ -441,7 +395,7 @@ void HealthMeter_Draw(PlayState* play) {
|
|||
f32 sp144 = interfaceCtx->unk_22A * 0.1f;
|
||||
s32 curCombineModeSet = 0;
|
||||
u8* curBgImgLoaded = NULL;
|
||||
s32 ddHeartCountMinusOne = gSaveContext.inventory.defenseHearts - 1;
|
||||
s32 ddHeartCountMinusOne = gSaveContext.isDoubleDefenseAcquired ? totalHeartCount - 1 : -1;
|
||||
f32 HeartsScale = 0.7f;
|
||||
if (CVar_GetS32("gHeartsCountPosType", 0) != 0) {
|
||||
HeartsScale = CVar_GetFloat("gHeartsCountScale", 0.7f);
|
||||
|
|
|
@ -601,8 +601,14 @@ void Minimap_DrawCompassIcons(PlayState* play) {
|
|||
s32 pad;
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 tempX, tempZ;
|
||||
const Color_RGB8 LastEntrance_arrow = { 200, 0, 0 };
|
||||
const Color_RGB8 CurrentPosition_arrow = { 200, 255, 0 };
|
||||
Color_RGB8 lastEntranceColor = { 200, 0, 0 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_MinimapEntrance.Changed", 0)) {
|
||||
lastEntranceColor = CVar_GetRGB("gCosmetics.Hud_MinimapEntrance.Value", lastEntranceColor);
|
||||
}
|
||||
Color_RGB8 currentPositionColor = { 200, 255, 0 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_MinimapPosition.Changed", 0)) {
|
||||
currentPositionColor = CVar_GetRGB("gCosmetics.Hud_MinimapPosition.Value", currentPositionColor);
|
||||
}
|
||||
s16 X_Margins_Minimap;
|
||||
s16 Y_Margins_Minimap;
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {
|
||||
|
@ -659,11 +665,7 @@ void Minimap_DrawCompassIcons(PlayState* play) {
|
|||
gSPMatrix(OVERLAY_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0xFF, CVar_GetRGB("gCCMinimapCPPrim", CurrentPosition_arrow).r, CVar_GetRGB("gCCMinimapCPPrim", CurrentPosition_arrow).g, CVar_GetRGB("gCCMinimapCPPrim", CurrentPosition_arrow).b, 255);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0xFF, CurrentPosition_arrow.r, CurrentPosition_arrow.g, CurrentPosition_arrow.b, 255);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0xFF, currentPositionColor.r, currentPositionColor.g, currentPositionColor.b, 255);
|
||||
gSPDisplayList(OVERLAY_DISP++, gCompassArrowDL);
|
||||
|
||||
//Player map entry (red arrow)
|
||||
|
@ -700,11 +702,7 @@ void Minimap_DrawCompassIcons(PlayState* play) {
|
|||
gSPMatrix(OVERLAY_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0xFF, CVar_GetRGB("gCCMinimapLEPrim", LastEntrance_arrow).r,CVar_GetRGB("gCCMinimapLEPrim", LastEntrance_arrow).g,CVar_GetRGB("gCCMinimapLEPrim", LastEntrance_arrow).b, 255);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0xFF, LastEntrance_arrow.r, LastEntrance_arrow.g, LastEntrance_arrow.b, 255);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0xFF, lastEntranceColor.r, lastEntranceColor.g, lastEntranceColor.b, 255);
|
||||
gSPDisplayList(OVERLAY_DISP++, gCompassArrowDL);
|
||||
}
|
||||
|
||||
|
@ -715,8 +713,10 @@ void Minimap_Draw(PlayState* play) {
|
|||
s32 pad[2];
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
s32 mapIndex = gSaveContext.mapIndex;
|
||||
const Color_RGB8 Dungeon_minimap = {100, 255, 255};
|
||||
const Color_RGB8 Overworld_minimap = {R_MINIMAP_COLOR(0), R_MINIMAP_COLOR(1), R_MINIMAP_COLOR(2)};
|
||||
Color_RGB8 minimapColor = {0, 255, 255};
|
||||
if (CVar_GetS32("gCosmetics.Hud_Minimap.Changed", 0)) {
|
||||
minimapColor = CVar_GetRGB("gCosmetics.Hud_Minimap.Value", minimapColor);
|
||||
}
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
|
@ -754,11 +754,7 @@ void Minimap_Draw(PlayState* play) {
|
|||
TEXEL0, 0, PRIMITIVE, 0);
|
||||
|
||||
if (CHECK_DUNGEON_ITEM(DUNGEON_MAP, mapIndex)) {
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) { //Dungeon minimap
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCMinimapDGNPrim", Dungeon_minimap).r,CVar_GetRGB("gCCMinimapDGNPrim", Dungeon_minimap).g,CVar_GetRGB("gCCMinimapDGNPrim", Dungeon_minimap).b, interfaceCtx->minimapAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, Dungeon_minimap.r, Dungeon_minimap.g, Dungeon_minimap.b, interfaceCtx->minimapAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, minimapColor.r, minimapColor.g, minimapColor.b, interfaceCtx->minimapAlpha);
|
||||
|
||||
gSPInvalidateTexCache(OVERLAY_DISP++, interfaceCtx->mapSegment);
|
||||
gDPLoadTextureBlock_4b(OVERLAY_DISP++, interfaceCtx->mapSegment, G_IM_FMT_I, 96, 85, 0,
|
||||
|
@ -829,11 +825,7 @@ void Minimap_Draw(PlayState* play) {
|
|||
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
|
||||
|
||||
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {//Overworld minimap
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCMinimapPrim", Overworld_minimap).r,CVar_GetRGB("gCCMinimapPrim", Overworld_minimap).g,CVar_GetRGB("gCCMinimapPrim", Overworld_minimap).b, interfaceCtx->minimapAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, Overworld_minimap.r, Overworld_minimap.g, Overworld_minimap.b, interfaceCtx->minimapAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, minimapColor.r, minimapColor.g, minimapColor.b, interfaceCtx->minimapAlpha);
|
||||
|
||||
gDPLoadTextureBlock_4b(OVERLAY_DISP++, interfaceCtx->mapSegment, G_IM_FMT_IA,
|
||||
gMapData->owMinimapWidth[mapIndex], gMapData->owMinimapHeight[mapIndex], 0,
|
||||
|
@ -861,9 +853,7 @@ void Minimap_Draw(PlayState* play) {
|
|||
(oWMiniMapY + gMapData->owMinimapHeight[mapIndex]) << 2, G_TX_RENDERTILE, 0,
|
||||
0, 1 << 10, 1 << 10);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) != 2) {//This need to be added else it will color dungeon entrance icon too. (it re-init prim color to default color)
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, Overworld_minimap.r, Overworld_minimap.g, Overworld_minimap.b, interfaceCtx->minimapAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, minimapColor.r, minimapColor.g, minimapColor.b, interfaceCtx->minimapAlpha);
|
||||
|
||||
if (((play->sceneNum != SCENE_SPOT01) && (play->sceneNum != SCENE_SPOT04) &&
|
||||
(play->sceneNum != SCENE_SPOT08)) ||
|
||||
|
|
|
@ -73,82 +73,13 @@ s32 sCharTexScale;
|
|||
|
||||
Color_RGB8 sOcarinaNoteABtnEnv;
|
||||
Color_RGB8 sOcarinaNoteCBtnEnv;
|
||||
Color_RGB8 sOcarinaNoteABtnPrim;
|
||||
Color_RGB8 sOcarinaNoteCBtnPrim;
|
||||
|
||||
Color_RGB8 sOcarinaNoteD5Prim;
|
||||
Color_RGB8 sOcarinaNoteB4Prim;
|
||||
Color_RGB8 sOcarinaNoteA4Prim;
|
||||
Color_RGB8 sOcarinaNoteF4Prim;
|
||||
Color_RGB8 sOcarinaNoteD4Prim;
|
||||
|
||||
// If the "separate" bool is set, use the "gCCC<cDirection>BtnPrim CVars
|
||||
// to set the button color. Otherwise, use sOcarinaNoteCBtnPrim.
|
||||
void Message_SetCustomOrGeneralCColor(Color_RGB8* color, bool separate, char cDirection) {
|
||||
if (!separate) {
|
||||
*color = sOcarinaNoteCBtnPrim;
|
||||
return;
|
||||
}
|
||||
|
||||
// C direction is '*' @ idx 4
|
||||
char cVar[] = "gCCC*BtnPrim";
|
||||
cVar[4] = cDirection;
|
||||
*color = CVar_GetRGB(cVar, (Color_RGB8){ .r = 255, .g = 255, .b = 50});
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
bool separateC;
|
||||
bool dpad;
|
||||
bool rightStick;
|
||||
} CustomNoteOptions;
|
||||
|
||||
// Set the non-null button color corresponding to the button map
|
||||
//
|
||||
// If the assigned button is A, a C button, Start, or the D-pad, then it'll be
|
||||
// colored to the corresponding CVar. Otherwise, its color will be equal to
|
||||
// sOcarinaNoteCBtnPrim.
|
||||
void Message_SetCustomOcarinaNoteColor(Color_RGB8* color, s32 btnMap, CustomNoteOptions* flags) {
|
||||
switch (btnMap) {
|
||||
case BTN_A:
|
||||
*color = CVar_GetRGB("gCCABtnPrim", (Color_RGB8){ .r = 80, .g = 255, .b = 150 });
|
||||
break;
|
||||
case BTN_CUP:
|
||||
Message_SetCustomOrGeneralCColor(color, flags->separateC, 'U');
|
||||
break;
|
||||
case BTN_CDOWN:
|
||||
Message_SetCustomOrGeneralCColor(color, flags->separateC, 'D');
|
||||
break;
|
||||
case BTN_CLEFT:
|
||||
Message_SetCustomOrGeneralCColor(color, flags->separateC, 'L');
|
||||
break;
|
||||
case BTN_CRIGHT:
|
||||
Message_SetCustomOrGeneralCColor(color, flags->separateC, 'R');
|
||||
break;
|
||||
case BTN_START:
|
||||
*color = CVar_GetRGB("gCCStartBtnPrim", (Color_RGB8){ .r = 200, .g = 0, .b = 0 });
|
||||
break;
|
||||
case BTN_DUP:
|
||||
case BTN_DDOWN:
|
||||
case BTN_DLEFT:
|
||||
case BTN_DRIGHT:
|
||||
*color = CVar_GetRGB("gCCDpadPrim", (Color_RGB8){ .r = 255, .g = 255, .b = 255 });
|
||||
color->r *= 103 / 255;
|
||||
color->g *= 103 / 255;
|
||||
color->b *= 103 / 255;
|
||||
break;
|
||||
case 0:
|
||||
if (flags->dpad && !flags->rightStick) {
|
||||
// D pad is dark gray even when set to white, so emulate that.
|
||||
*color = CVar_GetRGB("gCCDpadPrim", (Color_RGB8){ .r = 255, .g = 255, .b = 255 });
|
||||
color->r *= 103 / 255;
|
||||
color->g *= 103 / 255;
|
||||
color->b *= 103 / 255;
|
||||
break;
|
||||
} // else fall through
|
||||
default:
|
||||
*color = sOcarinaNoteCBtnPrim;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Color_RGB8 sOcarinaNoteCUpBtnPrim;
|
||||
Color_RGB8 sOcarinaNoteCLeftBtnPrim;
|
||||
Color_RGB8 sOcarinaNoteCRightBtnPrim;
|
||||
Color_RGB8 sOcarinaNoteCDownBtnPrim;
|
||||
|
||||
void Message_ResetOcarinaNoteState(void) {
|
||||
R_OCARINA_NOTES_YPOS(0) = 189;
|
||||
|
@ -160,43 +91,34 @@ void Message_ResetOcarinaNoteState(void) {
|
|||
sOcarinaNotesAlphaValues[0] = sOcarinaNotesAlphaValues[1] = sOcarinaNotesAlphaValues[2] =
|
||||
sOcarinaNotesAlphaValues[3] = sOcarinaNotesAlphaValues[4] = sOcarinaNotesAlphaValues[5] =
|
||||
sOcarinaNotesAlphaValues[6] = sOcarinaNotesAlphaValues[7] = sOcarinaNotesAlphaValues[8] = 0;
|
||||
sOcarinaNoteABtnEnv = (Color_RGB8){ .r = 10, .g = 10, .b = 10 };
|
||||
sOcarinaNoteCBtnEnv = (Color_RGB8){ .r = 10, .g = 10, .b = 10 };
|
||||
sOcarinaNoteABtnPrim = (Color_RGB8){ 80, 150, 255 };
|
||||
sOcarinaNoteABtnEnv = (Color_RGB8){ 10, 10, 10 };
|
||||
sOcarinaNoteCBtnPrim = (Color_RGB8){ 255, 255, 50 };
|
||||
sOcarinaNoteCBtnEnv = (Color_RGB8){ 10, 10, 10 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
sOcarinaNoteABtnPrim = CVar_GetRGB("gCosmetics.Hud_AButton.Value", sOcarinaNoteABtnPrim);
|
||||
} else if (CVar_GetS32("gCosmetics.DefaultColorScheme", 0)) {
|
||||
sOcarinaNoteABtnPrim = (Color_RGB8){ 80, 255, 150 };
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Hud_CButtons.Changed", 0)) {
|
||||
sOcarinaNoteCBtnPrim = CVar_GetRGB("gCosmetics.Hud_CButtons.Value", sOcarinaNoteCBtnPrim);
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) != 2) { // N64/GameCube
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
sOcarinaNoteD4Prim = (Color_RGB8){ .r = 80, .g = 150, .b = 255 };
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
sOcarinaNoteD4Prim = (Color_RGB8){ .r = 80, .g = 255, .b = 150 };
|
||||
}
|
||||
|
||||
sOcarinaNoteCBtnPrim = (Color_RGB8){ .r = 255, .g = 255, .b = 50 };
|
||||
sOcarinaNoteD5Prim = sOcarinaNoteCBtnPrim;
|
||||
sOcarinaNoteB4Prim = sOcarinaNoteCBtnPrim;
|
||||
sOcarinaNoteA4Prim = sOcarinaNoteCBtnPrim;
|
||||
sOcarinaNoteF4Prim = sOcarinaNoteCBtnPrim;
|
||||
} else { // Custom
|
||||
sOcarinaNoteCBtnPrim = CVar_GetRGB("gCCCBtnPrim", (Color_RGB8){ .r = 255, .g = 255, .b = 50 });
|
||||
|
||||
CustomNoteOptions options = (CustomNoteOptions){
|
||||
.separateC = CVar_GetS32("gCCparated", 0),
|
||||
.dpad = CVar_GetS32("gDpadOcarina", 0),
|
||||
.rightStick = CVar_GetS32("gDpadRStick", 0),
|
||||
};
|
||||
|
||||
if (CVar_GetS32("gCustomOcarinaControls", 0)) {
|
||||
Message_SetCustomOcarinaNoteColor(&sOcarinaNoteD5Prim, CVar_GetS32("gOcarinaD5BtnMap", BTN_CUP), &options);
|
||||
Message_SetCustomOcarinaNoteColor(&sOcarinaNoteB4Prim, CVar_GetS32("gOcarinaB4BtnMap", BTN_CLEFT), &options);
|
||||
Message_SetCustomOcarinaNoteColor(&sOcarinaNoteA4Prim, CVar_GetS32("gOcarinaA4BtnMap", BTN_CRIGHT), &options);
|
||||
Message_SetCustomOcarinaNoteColor(&sOcarinaNoteF4Prim, CVar_GetS32("gOcarinaF4BtnMap", BTN_CDOWN), &options);
|
||||
Message_SetCustomOcarinaNoteColor(&sOcarinaNoteD4Prim, CVar_GetS32("gOcarinaD4BtnMap", BTN_A), &options);
|
||||
} else {
|
||||
Message_SetCustomOrGeneralCColor(&sOcarinaNoteD5Prim, options.separateC, 'U');
|
||||
Message_SetCustomOrGeneralCColor(&sOcarinaNoteB4Prim, options.separateC, 'L');
|
||||
Message_SetCustomOrGeneralCColor(&sOcarinaNoteA4Prim, options.separateC, 'R');
|
||||
Message_SetCustomOrGeneralCColor(&sOcarinaNoteF4Prim, options.separateC, 'D');
|
||||
sOcarinaNoteD4Prim = CVar_GetRGB("gCCABtnPrim", (Color_RGB8){ .r = 80, .g = 255, .b = 150 });
|
||||
}
|
||||
sOcarinaNoteCUpBtnPrim = sOcarinaNoteCBtnPrim;
|
||||
sOcarinaNoteCDownBtnPrim = sOcarinaNoteCBtnPrim;
|
||||
sOcarinaNoteCLeftBtnPrim = sOcarinaNoteCBtnPrim;
|
||||
sOcarinaNoteCRightBtnPrim = sOcarinaNoteCBtnPrim;
|
||||
if (CVar_GetS32("gCosmetics.Hud_CUpButton.Changed", 0)) {
|
||||
sOcarinaNoteCUpBtnPrim = CVar_GetRGB("gCosmetics.Hud_CUpButton.Value", sOcarinaNoteCUpBtnPrim);
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Hud_CDownButton.Changed", 0)) {
|
||||
sOcarinaNoteCDownBtnPrim = CVar_GetRGB("gCosmetics.Hud_CDownButton.Value", sOcarinaNoteCDownBtnPrim);
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Hud_CLeftButton.Changed", 0)) {
|
||||
sOcarinaNoteCLeftBtnPrim = CVar_GetRGB("gCosmetics.Hud_CLeftButton.Value", sOcarinaNoteCLeftBtnPrim);
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Hud_CRightButton.Changed", 0)) {
|
||||
sOcarinaNoteCRightBtnPrim = CVar_GetRGB("gCosmetics.Hud_CRightButton.Value", sOcarinaNoteCRightBtnPrim);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -528,72 +450,35 @@ void Message_SetTextColor(MessageContext* msgCtx, u16 colorParameter) {
|
|||
}
|
||||
|
||||
void Message_DrawTextboxIcon(PlayState* play, Gfx** p, s16 x, s16 y) {
|
||||
static s16 sIconPrimColors[][3] = {
|
||||
{ 0, 200, 80 },
|
||||
{ 50, 255, 130 },
|
||||
static Color_RGB8 sIconPrimColors[2] = {
|
||||
{ 0, 80, 200 },
|
||||
{ 50, 130, 255 },
|
||||
};
|
||||
static s16 sIconEnvColors[][3] = {
|
||||
static Color_RGB8 sIconEnvColors[2] = {
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 255, 130 },
|
||||
{ 0, 130, 255 },
|
||||
};
|
||||
static s16 sIconPrimR = 0;
|
||||
static s16 sIconPrimG = 200;
|
||||
static s16 sIconPrimB = 80;
|
||||
if (CVar_GetS32("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Hud_AButton.Value", (Color_RGB8){ 50, 130, 255 });
|
||||
sIconPrimColors[0].r = (color.r / 255) * 95;
|
||||
sIconPrimColors[0].g = (color.g / 255) * 95;
|
||||
sIconPrimColors[0].b = (color.b / 255) * 95;
|
||||
sIconPrimColors[1] = color;
|
||||
sIconEnvColors[1] = color;
|
||||
} else if (CVar_GetS32("gCosmetics.DefaultColorScheme", 0)) {
|
||||
sIconPrimColors[0] = (Color_RGB8){ 0, 200, 80 };
|
||||
sIconPrimColors[1] = (Color_RGB8){ 50, 255, 130 };
|
||||
sIconEnvColors[1] = (Color_RGB8){ 50, 255, 130 };
|
||||
}
|
||||
static Color_RGB8 sIconPrim = { 0, 80, 200 };
|
||||
static s16 sIconFlashTimer = 12;
|
||||
static s16 sIconFlashColorIdx = 0;
|
||||
static s16 sIconEnvR = 0;
|
||||
static s16 sIconEnvG = 0;
|
||||
static s16 sIconEnvB = 0;
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
sIconPrimColors[0][0] = 4;
|
||||
sIconPrimColors[0][1] = 84;
|
||||
sIconPrimColors[0][2] = 204;
|
||||
sIconPrimColors[1][0] = 45;
|
||||
sIconPrimColors[1][1] = 125;
|
||||
sIconPrimColors[1][2] = 255;
|
||||
sIconEnvColors[0][0] = 0;
|
||||
sIconEnvColors[0][1] = 0;
|
||||
sIconEnvColors[0][2] = 0;
|
||||
sIconEnvColors[1][0] = 0;
|
||||
sIconEnvColors[1][1] = 70;
|
||||
sIconEnvColors[1][2] = 255;
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
sIconPrimColors[0][0] = 4;
|
||||
sIconPrimColors[0][1] = 200;
|
||||
sIconPrimColors[0][2] = 80;
|
||||
sIconPrimColors[1][0] = 50;
|
||||
sIconPrimColors[1][1] = 255;
|
||||
sIconPrimColors[1][2] = 130;
|
||||
sIconEnvColors[0][0] = 0;
|
||||
sIconEnvColors[0][1] = 0;
|
||||
sIconEnvColors[0][2] = 0;
|
||||
sIconEnvColors[1][0] = 0;
|
||||
sIconEnvColors[1][1] = 255;
|
||||
sIconEnvColors[1][2] = 130;
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
Color_RGB8 aBtnColor = CVar_GetRGB("gCCABtnPrim", (Color_RGB8){ .r = 0, .g = 200, .b = 80 });
|
||||
sIconPrimColors[0][0] = (aBtnColor.r/255)*95;
|
||||
sIconPrimColors[0][1] = (aBtnColor.g/255)*95;
|
||||
sIconPrimColors[0][2] = (aBtnColor.b/255)*95;
|
||||
sIconPrimColors[1][0] = aBtnColor.r;
|
||||
sIconPrimColors[1][1] = aBtnColor.g;
|
||||
sIconPrimColors[1][2] = aBtnColor.b;
|
||||
sIconEnvColors[0][0] = 0;
|
||||
sIconEnvColors[0][1] = 0;
|
||||
sIconEnvColors[0][2] = 0;
|
||||
sIconEnvColors[1][0] = 10;
|
||||
sIconEnvColors[1][1] = 10;
|
||||
sIconEnvColors[1][2] = 10;
|
||||
}
|
||||
static Color_RGB8 sIconEnv = { 0, 0, 0 };
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
Font* font = &msgCtx->font;
|
||||
Gfx* gfx = *p;
|
||||
s16 primR;
|
||||
s16 primG;
|
||||
s16 primB;
|
||||
s16 envR;
|
||||
s16 envG;
|
||||
s16 envB;
|
||||
Color_RGB8 prim;
|
||||
Color_RGB8 env;
|
||||
u8* iconTexture = font->iconBuf;
|
||||
gSPInvalidateTexCache(gfx++, iconTexture);
|
||||
|
||||
|
@ -601,59 +486,55 @@ void Message_DrawTextboxIcon(PlayState* play, Gfx** p, s16 x, s16 y) {
|
|||
return;
|
||||
}
|
||||
|
||||
primR = (ABS(sIconPrimR - sIconPrimColors[sIconFlashColorIdx][0])) / sIconFlashTimer;
|
||||
primG = (ABS(sIconPrimG - sIconPrimColors[sIconFlashColorIdx][1])) / sIconFlashTimer;
|
||||
primB = (ABS(sIconPrimB - sIconPrimColors[sIconFlashColorIdx][2])) / sIconFlashTimer;
|
||||
prim.r = (ABS(sIconPrim.r - sIconPrimColors[sIconFlashColorIdx].r)) / sIconFlashTimer;
|
||||
prim.g = (ABS(sIconPrim.g - sIconPrimColors[sIconFlashColorIdx].g)) / sIconFlashTimer;
|
||||
prim.b = (ABS(sIconPrim.b - sIconPrimColors[sIconFlashColorIdx].b)) / sIconFlashTimer;
|
||||
|
||||
if (sIconPrimR >= sIconPrimColors[sIconFlashColorIdx][0]) {
|
||||
sIconPrimR -= primR;
|
||||
if (sIconPrim.r >= sIconPrimColors[sIconFlashColorIdx].r) {
|
||||
sIconPrim.r -= prim.r;
|
||||
} else {
|
||||
sIconPrimR += primR;
|
||||
sIconPrim.r += prim.r;
|
||||
}
|
||||
|
||||
if (sIconPrimG >= sIconPrimColors[sIconFlashColorIdx][1]) {
|
||||
sIconPrimG -= primG;
|
||||
if (sIconPrim.g >= sIconPrimColors[sIconFlashColorIdx].g) {
|
||||
sIconPrim.g -= prim.g;
|
||||
} else {
|
||||
sIconPrimG += primG;
|
||||
sIconPrim.g += prim.g;
|
||||
}
|
||||
|
||||
if (sIconPrimB >= sIconPrimColors[sIconFlashColorIdx][2]) {
|
||||
sIconPrimB -= primB;
|
||||
if (sIconPrim.b >= sIconPrimColors[sIconFlashColorIdx].b) {
|
||||
sIconPrim.b -= prim.b;
|
||||
} else {
|
||||
sIconPrimB += primB;
|
||||
sIconPrim.b += prim.b;
|
||||
}
|
||||
|
||||
envR = (ABS(sIconEnvR - sIconEnvColors[sIconFlashColorIdx][0])) / sIconFlashTimer;
|
||||
envG = (ABS(sIconEnvG - sIconEnvColors[sIconFlashColorIdx][1])) / sIconFlashTimer;
|
||||
envB = (ABS(sIconEnvB - sIconEnvColors[sIconFlashColorIdx][2])) / sIconFlashTimer;
|
||||
env.r = (ABS(sIconEnv.r - sIconEnvColors[sIconFlashColorIdx].r)) / sIconFlashTimer;
|
||||
env.g = (ABS(sIconEnv.g - sIconEnvColors[sIconFlashColorIdx].g)) / sIconFlashTimer;
|
||||
env.b = (ABS(sIconEnv.b - sIconEnvColors[sIconFlashColorIdx].b)) / sIconFlashTimer;
|
||||
|
||||
if (sIconEnvR >= sIconEnvColors[sIconFlashColorIdx][0]) {
|
||||
sIconEnvR -= envR;
|
||||
if (sIconEnv.r >= sIconEnvColors[sIconFlashColorIdx].r) {
|
||||
sIconEnv.r -= env.r;
|
||||
} else {
|
||||
sIconEnvR += envR;
|
||||
sIconEnv.r += env.r;
|
||||
}
|
||||
|
||||
if (sIconEnvG >= sIconEnvColors[sIconFlashColorIdx][1]) {
|
||||
sIconEnvG -= envG;
|
||||
if (sIconEnv.g >= sIconEnvColors[sIconFlashColorIdx].g) {
|
||||
sIconEnv.g -= env.g;
|
||||
} else {
|
||||
sIconEnvG += envG;
|
||||
sIconEnv.g += env.g;
|
||||
}
|
||||
|
||||
if (sIconEnvB >= sIconEnvColors[sIconFlashColorIdx][2]) {
|
||||
sIconEnvB -= envB;
|
||||
if (sIconEnv.b >= sIconEnvColors[sIconFlashColorIdx].b) {
|
||||
sIconEnv.b -= env.b;
|
||||
} else {
|
||||
sIconEnvB += envB;
|
||||
sIconEnv.b += env.b;
|
||||
}
|
||||
|
||||
sIconFlashTimer--;
|
||||
|
||||
if (sIconFlashTimer == 0) {
|
||||
sIconPrimR = sIconPrimColors[sIconFlashColorIdx][0];
|
||||
sIconPrimG = sIconPrimColors[sIconFlashColorIdx][1];
|
||||
sIconPrimB = sIconPrimColors[sIconFlashColorIdx][2];
|
||||
sIconEnvR = sIconEnvColors[sIconFlashColorIdx][0];
|
||||
sIconEnvG = sIconEnvColors[sIconFlashColorIdx][1];
|
||||
sIconEnvB = sIconEnvColors[sIconFlashColorIdx][2];
|
||||
sIconPrim = sIconPrimColors[sIconFlashColorIdx];
|
||||
sIconEnv = sIconEnvColors[sIconFlashColorIdx];
|
||||
sIconFlashTimer = 12;
|
||||
sIconFlashColorIdx ^= 1;
|
||||
}
|
||||
|
@ -663,8 +544,8 @@ void Message_DrawTextboxIcon(PlayState* play, Gfx** p, s16 x, s16 y) {
|
|||
gDPSetCombineLERP(gfx++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE,
|
||||
ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
|
||||
|
||||
gDPSetPrimColor(gfx++, 0, 0, sIconPrimR, sIconPrimG, sIconPrimB, 255);
|
||||
gDPSetEnvColor(gfx++, sIconEnvR, sIconEnvG, sIconEnvB, 255);
|
||||
gDPSetPrimColor(gfx++, 0, 0, sIconPrim.r, sIconPrim.g, sIconPrim.b, 255);
|
||||
gDPSetEnvColor(gfx++, sIconEnv.r, sIconEnv.g, sIconEnv.b, 255);
|
||||
|
||||
gDPLoadTextureBlock_4b(gfx++, iconTexture, G_IM_FMT_I, FONT_CHAR_TEX_WIDTH, FONT_CHAR_TEX_HEIGHT, 0,
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
||||
|
@ -2075,6 +1956,29 @@ void Message_SetView(View* view) {
|
|||
func_800AB2C4(view);
|
||||
}
|
||||
|
||||
#define FLASH_NOTE_COLORS(target, source) \
|
||||
r = ABS(target.r - source[sOcarinaNoteFlashColorIdx].r) / \
|
||||
sOcarinaNoteFlashTimer; \
|
||||
g = ABS(target.g - source[sOcarinaNoteFlashColorIdx].g) / \
|
||||
sOcarinaNoteFlashTimer; \
|
||||
b = ABS(target.b - source[sOcarinaNoteFlashColorIdx].b) / \
|
||||
sOcarinaNoteFlashTimer; \
|
||||
if (target.r >= source[sOcarinaNoteFlashColorIdx].r) { \
|
||||
target.r -= r; \
|
||||
} else { \
|
||||
target.r += r; \
|
||||
} \
|
||||
if (target.g >= source[sOcarinaNoteFlashColorIdx].g) { \
|
||||
target.g -= g; \
|
||||
} else { \
|
||||
target.g += g; \
|
||||
} \
|
||||
if (target.b >= source[sOcarinaNoteFlashColorIdx].b) { \
|
||||
target.b -= b; \
|
||||
} else { \
|
||||
target.b += b; \
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws the textbox in full and updates ocarina state
|
||||
*/
|
||||
|
@ -2087,88 +1991,112 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
static void* sOcarinaNoteTextures[] = {
|
||||
gOcarinaATex, gOcarinaCDownTex, gOcarinaCRightTex, gOcarinaCLeftTex, gOcarinaCUpTex,
|
||||
};
|
||||
s16 sOcarinaNoteAPrimColors[2][3];
|
||||
s16 sOcarinaNoteAPrimColors_GCN[][3] = {
|
||||
{ 80, 255, 150 },
|
||||
{ 100, 255, 200 },
|
||||
static Color_RGB8 sOcarinaNoteAPrimColors[2] = {
|
||||
{ 80, 150, 255 },
|
||||
{ 100, 200, 255 },
|
||||
};
|
||||
s16 sOcarinaNoteAPrimColors_N64[][3] = {
|
||||
{ 80, 255, 150 },
|
||||
{ 100, 255, 200 },
|
||||
};
|
||||
Color_RGB8 ABtnColor = CVar_GetRGB("gCCABtnPrim", (Color_RGB8){ .r = 80, .g = 255, .b = 150});
|
||||
s16 ABtnR = ABtnColor.r;
|
||||
s16 ABtnG = ABtnColor.g;
|
||||
s16 ABtnB = ABtnColor.b;
|
||||
s16 ABtnR_2 = ABtnColor.r+20;
|
||||
s16 ABtnG_2 = ABtnColor.g+20;
|
||||
s16 ABtnB_2 = ABtnColor.b+20;
|
||||
if(ABtnR_2 > 255){ABtnR_2=255;};
|
||||
if(ABtnG_2 > 255){ABtnG_2=255;};
|
||||
if(ABtnB_2 > 255){ABtnB_2=255;};
|
||||
s16 sOcarinaNoteAPrimColors_CUSTOM[][3] = {
|
||||
{ ABtnG, ABtnG, ABtnB },
|
||||
{ ABtnR_2, ABtnG_2, ABtnB_2 },
|
||||
};
|
||||
static s16 sOcarinaNoteAEnvColors[][3] = {
|
||||
static Color_RGB8 sOcarinaNoteAEnvColors[2] = {
|
||||
{ 10, 10, 10 },
|
||||
{ 50, 255, 50 },
|
||||
{ 50, 50, 255 },
|
||||
};
|
||||
s16 sOcarinaNoteCPrimColors[2][3];
|
||||
s16 sOcarinaNoteCPrimColors_GCN[][3] = {
|
||||
if (CVar_GetS32("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Hud_AButton.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
sOcarinaNoteAPrimColors[0].r = (color.r / 255) * 95;
|
||||
sOcarinaNoteAPrimColors[0].g = (color.g / 255) * 95;
|
||||
sOcarinaNoteAPrimColors[0].b = (color.b / 255) * 95;
|
||||
sOcarinaNoteAPrimColors[1] = color;
|
||||
sOcarinaNoteAEnvColors[1] = color;
|
||||
} else if (CVar_GetS32("gCosmetics.DefaultColorScheme", 0)) {
|
||||
sOcarinaNoteAPrimColors[0] = (Color_RGB8){ 80, 255, 150 };
|
||||
sOcarinaNoteAPrimColors[1] = (Color_RGB8){ 100, 255, 200 };
|
||||
sOcarinaNoteAEnvColors[1] = (Color_RGB8){ 50, 255, 50 };
|
||||
}
|
||||
|
||||
static Color_RGB8 sOcarinaNoteCPrimColors[2] = {
|
||||
{ 255, 255, 50 },
|
||||
{ 255, 255, 180 },
|
||||
};
|
||||
|
||||
Color_RGB8 CBtnDefaultColor = {255, 255, 50};
|
||||
Color_RGB8 CBtnColor = CVar_GetRGB("gCCCBtnPrim", CBtnDefaultColor);
|
||||
s16 CBtnR = CBtnColor.r;
|
||||
s16 CBtnG = CBtnColor.g;
|
||||
s16 CBtnB = CBtnColor.b;
|
||||
s16 CBtnR_2 = CBtnColor.r+20;
|
||||
s16 CBtnG_2 = CBtnColor.g+20;
|
||||
s16 CBtnB_2 = CBtnColor.b+20;
|
||||
Color_RGB8 CUpColor = CVar_GetRGB("gCCCUBtnPrim", CBtnDefaultColor);
|
||||
s16 CBtnRU = CUpColor.r;
|
||||
s16 CBtnGU = CUpColor.g;
|
||||
s16 CBtnBU = CUpColor.b;
|
||||
Color_RGB8 CLeftColor = CVar_GetRGB("gCCCLBtnPrim", CBtnDefaultColor);
|
||||
s16 CBtnRL = CLeftColor.r;
|
||||
s16 CBtnGL = CLeftColor.g;
|
||||
s16 CBtnBL = CLeftColor.b;
|
||||
Color_RGB8 CDownColor = CVar_GetRGB("gCCCDBtnPrim", CBtnDefaultColor);
|
||||
s16 CBtnRD = CDownColor.r;
|
||||
s16 CBtnGD = CDownColor.g;
|
||||
s16 CBtnBD = CDownColor.b;
|
||||
Color_RGB8 CRightColor = CVar_GetRGB("gCCCRBtnPrim", CBtnDefaultColor);
|
||||
s16 CBtnRR = CRightColor.r;
|
||||
s16 CBtnGR = CRightColor.g;
|
||||
s16 CBtnBR = CRightColor.b;
|
||||
if(CBtnR_2 > 255){CBtnR_2=255;};
|
||||
if(CBtnG_2 > 255){CBtnG_2=255;};
|
||||
if(CBtnB_2 > 255){CBtnB_2=255;};
|
||||
s16 sOcarinaNoteCPrimColors_CUSTOM[][3] = {
|
||||
{ CBtnR, CBtnG, CBtnB }, //Unified
|
||||
{ CBtnR_2, CBtnG_2, CBtnB_2 },
|
||||
{ CBtnRL, CBtnGL, CBtnBL }, //Left
|
||||
{ CBtnRD, CBtnGD, CBtnBD }, //Down
|
||||
{ CBtnRR, CBtnGR, CBtnBR }, //Right
|
||||
{ CBtnRU, CBtnGU, CBtnBU }, //Up
|
||||
};
|
||||
static s16 sOcarinaNoteCEnvColors[][3] = {
|
||||
static Color_RGB8 sOcarinaNoteCEnvColors[2] = {
|
||||
{ 10, 10, 10 },
|
||||
{ 110, 110, 50 },
|
||||
};
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) { //N64
|
||||
sOcarinaNoteAPrimColors < sOcarinaNoteAPrimColors_N64;
|
||||
sOcarinaNoteCPrimColors < sOcarinaNoteCPrimColors_GCN; //GCN and N64 share same C buttons color.
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) { //GCN
|
||||
sOcarinaNoteAPrimColors < sOcarinaNoteAPrimColors_GCN;
|
||||
sOcarinaNoteCPrimColors < sOcarinaNoteCPrimColors_GCN;
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) { //Custom
|
||||
sOcarinaNoteAPrimColors < sOcarinaNoteAPrimColors_CUSTOM;
|
||||
sOcarinaNoteCPrimColors < sOcarinaNoteCPrimColors_CUSTOM;
|
||||
if (CVar_GetS32("gCosmetics.Hud_CButtons.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Hud_CButtons.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
sOcarinaNoteCPrimColors[0] = color;
|
||||
sOcarinaNoteCPrimColors[1] = color;
|
||||
sOcarinaNoteCEnvColors[1].r = (color.r / 255) * 95;
|
||||
sOcarinaNoteCEnvColors[1].g = (color.g / 255) * 95;
|
||||
sOcarinaNoteCEnvColors[1].b = (color.b / 255) * 95;
|
||||
}
|
||||
|
||||
static Color_RGB8 sOcarinaNoteCUpPrimColors[2] = {
|
||||
{ 255, 255, 50 },
|
||||
{ 255, 255, 180 },
|
||||
};
|
||||
static Color_RGB8 sOcarinaNoteCUpEnvColors[2] = {
|
||||
{ 10, 10, 10 },
|
||||
{ 110, 110, 50 },
|
||||
};
|
||||
if (CVar_GetS32("gCosmetics.Hud_CUpButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Hud_CUpButton.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
sOcarinaNoteCUpPrimColors[0] = color;
|
||||
sOcarinaNoteCUpPrimColors[1] = color;
|
||||
sOcarinaNoteCUpEnvColors[1].r = (color.r / 255) * 95;
|
||||
sOcarinaNoteCUpEnvColors[1].g = (color.g / 255) * 95;
|
||||
sOcarinaNoteCUpEnvColors[1].b = (color.b / 255) * 95;
|
||||
}
|
||||
|
||||
static Color_RGB8 sOcarinaNoteCDownPrimColors[2] = {
|
||||
{ 255, 255, 50 },
|
||||
{ 255, 255, 180 },
|
||||
};
|
||||
static Color_RGB8 sOcarinaNoteCDownEnvColors[2] = {
|
||||
{ 10, 10, 10 },
|
||||
{ 110, 110, 50 },
|
||||
};
|
||||
if (CVar_GetS32("gCosmetics.Hud_CDownButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Hud_CDownButton.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
sOcarinaNoteCDownPrimColors[0] = color;
|
||||
sOcarinaNoteCDownPrimColors[1] = color;
|
||||
sOcarinaNoteCDownEnvColors[1].r = (color.r / 255) * 95;
|
||||
sOcarinaNoteCDownEnvColors[1].g = (color.g / 255) * 95;
|
||||
sOcarinaNoteCDownEnvColors[1].b = (color.b / 255) * 95;
|
||||
}
|
||||
|
||||
static Color_RGB8 sOcarinaNoteCLeftPrimColors[2] = {
|
||||
{ 255, 255, 50 },
|
||||
{ 255, 255, 180 },
|
||||
};
|
||||
static Color_RGB8 sOcarinaNoteCLeftEnvColors[2] = {
|
||||
{ 10, 10, 10 },
|
||||
{ 110, 110, 50 },
|
||||
};
|
||||
if (CVar_GetS32("gCosmetics.Hud_CLeftButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Hud_CLeftButton.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
sOcarinaNoteCLeftPrimColors[0] = color;
|
||||
sOcarinaNoteCLeftPrimColors[1] = color;
|
||||
sOcarinaNoteCLeftEnvColors[1].r = (color.r / 255) * 95;
|
||||
sOcarinaNoteCLeftEnvColors[1].g = (color.g / 255) * 95;
|
||||
sOcarinaNoteCLeftEnvColors[1].b = (color.b / 255) * 95;
|
||||
}
|
||||
|
||||
static Color_RGB8 sOcarinaNoteCRightPrimColors[2] = {
|
||||
{ 255, 255, 50 },
|
||||
{ 255, 255, 180 },
|
||||
};
|
||||
static Color_RGB8 sOcarinaNoteCRightEnvColors[2] = {
|
||||
{ 10, 10, 10 },
|
||||
{ 110, 110, 50 },
|
||||
};
|
||||
if (CVar_GetS32("gCosmetics.Hud_CRightButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Hud_CRightButton.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
sOcarinaNoteCRightPrimColors[0] = color;
|
||||
sOcarinaNoteCRightPrimColors[1] = color;
|
||||
sOcarinaNoteCRightEnvColors[1].r = (color.r / 255) * 95;
|
||||
sOcarinaNoteCRightEnvColors[1].g = (color.g / 255) * 95;
|
||||
sOcarinaNoteCRightEnvColors[1].b = (color.b / 255) * 95;
|
||||
}
|
||||
|
||||
static s16 sOcarinaNoteFlashTimer = 12;
|
||||
static s16 sOcarinaNoteFlashColorIdx = 1;
|
||||
static s16 sOcarinaSongFanfares[] = {
|
||||
|
@ -2185,18 +2113,6 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
s16 r;
|
||||
s16 g;
|
||||
s16 b;
|
||||
s16 ru;//Red Up
|
||||
s16 gu;//Green Up
|
||||
s16 bu;//Blue Up
|
||||
s16 rl;//Red Left
|
||||
s16 gl;//green Left
|
||||
s16 bl;//Blue Left
|
||||
s16 rd;//And so on
|
||||
s16 gd;
|
||||
s16 bd;
|
||||
s16 rr;
|
||||
s16 gr;
|
||||
s16 br;
|
||||
u16 i;
|
||||
u16 notePosX;
|
||||
u16 pad1;
|
||||
|
@ -2385,213 +2301,29 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
case MSGMODE_OCARINA_CORRECT_PLAYBACK:
|
||||
case MSGMODE_SONG_PLAYBACK_SUCCESS:
|
||||
case MSGMODE_SCARECROW_RECORDING_DONE:
|
||||
r = ABS(sOcarinaNoteD4Prim.r - sOcarinaNoteAPrimColors[sOcarinaNoteFlashColorIdx][0]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
g = ABS(sOcarinaNoteD4Prim.g - sOcarinaNoteAPrimColors[sOcarinaNoteFlashColorIdx][1]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
b = ABS(sOcarinaNoteD4Prim.b - sOcarinaNoteAPrimColors[sOcarinaNoteFlashColorIdx][2]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
|
||||
if (sOcarinaNoteD4Prim.r >= sOcarinaNoteAPrimColors[sOcarinaNoteFlashColorIdx][0]) {
|
||||
sOcarinaNoteD4Prim.r -= r;
|
||||
} else {
|
||||
sOcarinaNoteD4Prim.r += r;
|
||||
}
|
||||
if (sOcarinaNoteD4Prim.g >= sOcarinaNoteAPrimColors[sOcarinaNoteFlashColorIdx][1]) {
|
||||
sOcarinaNoteD4Prim.g -= g;
|
||||
} else {
|
||||
sOcarinaNoteD4Prim.g += g;
|
||||
}
|
||||
if (sOcarinaNoteD4Prim.b >= sOcarinaNoteAPrimColors[sOcarinaNoteFlashColorIdx][2]) {
|
||||
sOcarinaNoteD4Prim.b -= b;
|
||||
} else {
|
||||
sOcarinaNoteD4Prim.b += b;
|
||||
}
|
||||
|
||||
r = ABS(sOcarinaNoteABtnEnv.r - sOcarinaNoteAEnvColors[sOcarinaNoteFlashColorIdx][0]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
g = ABS(sOcarinaNoteABtnEnv.g - sOcarinaNoteAEnvColors[sOcarinaNoteFlashColorIdx][1]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
b = ABS(sOcarinaNoteABtnEnv.b - sOcarinaNoteAEnvColors[sOcarinaNoteFlashColorIdx][2]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
|
||||
if (sOcarinaNoteCBtnEnv.r >= sOcarinaNoteAEnvColors[sOcarinaNoteFlashColorIdx][0]) {
|
||||
sOcarinaNoteABtnEnv.r -= r;
|
||||
} else {
|
||||
sOcarinaNoteABtnEnv.r += r;
|
||||
}
|
||||
if (sOcarinaNoteCBtnEnv.g >= sOcarinaNoteAEnvColors[sOcarinaNoteFlashColorIdx][1]) {
|
||||
sOcarinaNoteABtnEnv.g -= g;
|
||||
} else {
|
||||
sOcarinaNoteABtnEnv.g += g;
|
||||
}
|
||||
if (sOcarinaNoteCBtnEnv.b >= sOcarinaNoteAEnvColors[sOcarinaNoteFlashColorIdx][2]) {
|
||||
sOcarinaNoteABtnEnv.b -= b;
|
||||
} else {
|
||||
sOcarinaNoteABtnEnv.b += b;
|
||||
}
|
||||
|
||||
r = ABS(sOcarinaNoteCBtnPrim.r - sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx][0]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
g = ABS(sOcarinaNoteCBtnPrim.g - sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx][1]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
b = ABS(sOcarinaNoteCBtnPrim.b - sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx][2]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
|
||||
ru = ABS(sOcarinaNoteD5Prim.r - sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+5][0]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
gu = ABS(sOcarinaNoteD5Prim.g - sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+5][1]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
bu = ABS(sOcarinaNoteD5Prim.b - sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+5][2]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
rl = ABS(sOcarinaNoteB4Prim.r - sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+2][0]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
gl = ABS(sOcarinaNoteB4Prim.g - sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+2][1]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
bl = ABS(sOcarinaNoteB4Prim.b - sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+2][2]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
rd = ABS(sOcarinaNoteF4Prim.r - sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+3][0]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
gd = ABS(sOcarinaNoteF4Prim.g - sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+3][1]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
bd = ABS(sOcarinaNoteF4Prim.b - sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+3][2]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
rr = ABS(sOcarinaNoteA4Prim.r - sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+4][0]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
gr = ABS(sOcarinaNoteA4Prim.g - sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+4][1]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
br = ABS(sOcarinaNoteA4Prim.b - sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+4][2]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
|
||||
if (sOcarinaNoteCBtnPrim.r >= sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx][0]) {
|
||||
sOcarinaNoteCBtnPrim.r -= r;
|
||||
} else {
|
||||
sOcarinaNoteCBtnPrim.r += r;
|
||||
}
|
||||
if (sOcarinaNoteCBtnPrim.g >= sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx][1]) {
|
||||
sOcarinaNoteCBtnPrim.g -= g;
|
||||
} else {
|
||||
sOcarinaNoteCBtnPrim.g += g;
|
||||
}
|
||||
if (sOcarinaNoteCBtnPrim.b >= sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx][2]) {
|
||||
sOcarinaNoteCBtnPrim.b -= b;
|
||||
} else {
|
||||
sOcarinaNoteCBtnPrim.b += b;
|
||||
}
|
||||
|
||||
if (sOcarinaNoteD5Prim.r >= sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+5][0]) {
|
||||
sOcarinaNoteD5Prim.r -= ru;
|
||||
} else {
|
||||
sOcarinaNoteD5Prim.r += ru;
|
||||
}
|
||||
if (sOcarinaNoteD5Prim.g >= sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+5][1]) {
|
||||
sOcarinaNoteD5Prim.g -= gu;
|
||||
} else {
|
||||
sOcarinaNoteD5Prim.g += gu;
|
||||
}
|
||||
if (sOcarinaNoteD5Prim.b >= sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+5][2]) {
|
||||
sOcarinaNoteD5Prim.b -= bu;
|
||||
} else {
|
||||
sOcarinaNoteD5Prim.b += bu;
|
||||
}
|
||||
|
||||
if (sOcarinaNoteB4Prim.r >= sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+2][0]) {
|
||||
sOcarinaNoteB4Prim.r -= rl;
|
||||
} else {
|
||||
sOcarinaNoteB4Prim.r += rl;
|
||||
}
|
||||
if (sOcarinaNoteB4Prim.g >= sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+2][1]) {
|
||||
sOcarinaNoteB4Prim.g -= gl;
|
||||
} else {
|
||||
sOcarinaNoteB4Prim.g += gl;
|
||||
}
|
||||
if (sOcarinaNoteB4Prim.b >= sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+2][2]) {
|
||||
sOcarinaNoteB4Prim.b -= bl;
|
||||
} else {
|
||||
sOcarinaNoteB4Prim.b += bl;
|
||||
}
|
||||
|
||||
if (sOcarinaNoteF4Prim.r >= sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+3][0]) {
|
||||
sOcarinaNoteF4Prim.r -= rd;
|
||||
} else {
|
||||
sOcarinaNoteF4Prim.r += rd;
|
||||
}
|
||||
if (sOcarinaNoteF4Prim.g >= sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+3][1]) {
|
||||
sOcarinaNoteF4Prim.g -= gd;
|
||||
} else {
|
||||
sOcarinaNoteF4Prim.g += gd;
|
||||
}
|
||||
if (sOcarinaNoteF4Prim.b >= sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+3][2]) {
|
||||
sOcarinaNoteF4Prim.b -= bd;
|
||||
} else {
|
||||
sOcarinaNoteF4Prim.b += bd;
|
||||
}
|
||||
|
||||
if (sOcarinaNoteA4Prim.r >= sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+4][0]) {
|
||||
sOcarinaNoteA4Prim.r -= rr;
|
||||
} else {
|
||||
sOcarinaNoteA4Prim.r += rr;
|
||||
}
|
||||
if (sOcarinaNoteA4Prim.g >= sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+4][1]) {
|
||||
sOcarinaNoteA4Prim.g -= gr;
|
||||
} else {
|
||||
sOcarinaNoteA4Prim.g += gr;
|
||||
}
|
||||
if (sOcarinaNoteA4Prim.b >= sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+4][2]) {
|
||||
sOcarinaNoteA4Prim.b -= br;
|
||||
} else {
|
||||
sOcarinaNoteA4Prim.b += br;
|
||||
}
|
||||
|
||||
r = ABS(sOcarinaNoteCBtnEnv.r - sOcarinaNoteCEnvColors[sOcarinaNoteFlashColorIdx][0]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
g = ABS(sOcarinaNoteCBtnEnv.g - sOcarinaNoteCEnvColors[sOcarinaNoteFlashColorIdx][1]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
b = ABS(sOcarinaNoteCBtnEnv.b - sOcarinaNoteCEnvColors[sOcarinaNoteFlashColorIdx][2]) /
|
||||
sOcarinaNoteFlashTimer;
|
||||
|
||||
if (sOcarinaNoteCBtnEnv.r >= sOcarinaNoteCEnvColors[sOcarinaNoteFlashColorIdx][0]) {
|
||||
sOcarinaNoteCBtnEnv.r -= r;
|
||||
} else {
|
||||
sOcarinaNoteCBtnEnv.r += r;
|
||||
}
|
||||
if (sOcarinaNoteCBtnEnv.g >= sOcarinaNoteCEnvColors[sOcarinaNoteFlashColorIdx][1]) {
|
||||
sOcarinaNoteCBtnEnv.g -= g;
|
||||
} else {
|
||||
sOcarinaNoteCBtnEnv.g += g;
|
||||
}
|
||||
if (sOcarinaNoteCBtnEnv.b >= sOcarinaNoteCEnvColors[sOcarinaNoteFlashColorIdx][2]) {
|
||||
sOcarinaNoteCBtnEnv.b -= b;
|
||||
} else {
|
||||
sOcarinaNoteCBtnEnv.b += b;
|
||||
}
|
||||
FLASH_NOTE_COLORS(sOcarinaNoteABtnPrim, sOcarinaNoteAPrimColors)
|
||||
FLASH_NOTE_COLORS(sOcarinaNoteABtnEnv, sOcarinaNoteAEnvColors)
|
||||
FLASH_NOTE_COLORS(sOcarinaNoteCBtnPrim, sOcarinaNoteCPrimColors)
|
||||
FLASH_NOTE_COLORS(sOcarinaNoteCBtnEnv, sOcarinaNoteCEnvColors)
|
||||
FLASH_NOTE_COLORS(sOcarinaNoteCUpBtnPrim, sOcarinaNoteCUpPrimColors)
|
||||
FLASH_NOTE_COLORS(sOcarinaNoteCBtnEnv, sOcarinaNoteCUpEnvColors)
|
||||
FLASH_NOTE_COLORS(sOcarinaNoteCDownBtnPrim, sOcarinaNoteCDownPrimColors)
|
||||
FLASH_NOTE_COLORS(sOcarinaNoteCBtnEnv, sOcarinaNoteCDownEnvColors)
|
||||
FLASH_NOTE_COLORS(sOcarinaNoteCLeftBtnPrim, sOcarinaNoteCLeftPrimColors)
|
||||
FLASH_NOTE_COLORS(sOcarinaNoteCBtnEnv, sOcarinaNoteCLeftEnvColors)
|
||||
FLASH_NOTE_COLORS(sOcarinaNoteCRightBtnPrim, sOcarinaNoteCRightPrimColors)
|
||||
FLASH_NOTE_COLORS(sOcarinaNoteCBtnEnv, sOcarinaNoteCRightEnvColors)
|
||||
|
||||
sOcarinaNoteFlashTimer--;
|
||||
if (sOcarinaNoteFlashTimer == 0) {
|
||||
sOcarinaNoteD4Prim.r = sOcarinaNoteAPrimColors[sOcarinaNoteFlashColorIdx][0];
|
||||
sOcarinaNoteD4Prim.g = sOcarinaNoteAPrimColors[sOcarinaNoteFlashColorIdx][1];
|
||||
sOcarinaNoteD4Prim.b = sOcarinaNoteAPrimColors[sOcarinaNoteFlashColorIdx][2];
|
||||
sOcarinaNoteABtnEnv.r = sOcarinaNoteAEnvColors[sOcarinaNoteFlashColorIdx][0];
|
||||
sOcarinaNoteABtnEnv.g = sOcarinaNoteAEnvColors[sOcarinaNoteFlashColorIdx][1];
|
||||
sOcarinaNoteABtnEnv.b = sOcarinaNoteAEnvColors[sOcarinaNoteFlashColorIdx][2];
|
||||
sOcarinaNoteCBtnPrim.r = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx][0];
|
||||
sOcarinaNoteCBtnPrim.g = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx][1];
|
||||
sOcarinaNoteCBtnPrim.b = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx][2];
|
||||
sOcarinaNoteD5Prim.r = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+5][0];
|
||||
sOcarinaNoteD5Prim.g = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+5][1];
|
||||
sOcarinaNoteD5Prim.b = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+5][2];
|
||||
sOcarinaNoteB4Prim.r = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+2][0];
|
||||
sOcarinaNoteB4Prim.g = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+2][1];
|
||||
sOcarinaNoteB4Prim.b = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+2][2];
|
||||
sOcarinaNoteF4Prim.r = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+3][0];
|
||||
sOcarinaNoteF4Prim.g = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+3][1];
|
||||
sOcarinaNoteF4Prim.b = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+3][2];
|
||||
sOcarinaNoteA4Prim.r = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+4][0];
|
||||
sOcarinaNoteA4Prim.g = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+4][1];
|
||||
sOcarinaNoteA4Prim.b = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx+4][2];
|
||||
sOcarinaNoteCBtnEnv.r = sOcarinaNoteCEnvColors[sOcarinaNoteFlashColorIdx][0];
|
||||
sOcarinaNoteCBtnEnv.g = sOcarinaNoteCEnvColors[sOcarinaNoteFlashColorIdx][1];
|
||||
sOcarinaNoteCBtnEnv.b = sOcarinaNoteCEnvColors[sOcarinaNoteFlashColorIdx][2];
|
||||
sOcarinaNoteABtnPrim = sOcarinaNoteAPrimColors[sOcarinaNoteFlashColorIdx];
|
||||
sOcarinaNoteABtnEnv = sOcarinaNoteAEnvColors[sOcarinaNoteFlashColorIdx];
|
||||
sOcarinaNoteCBtnPrim = sOcarinaNoteCPrimColors[sOcarinaNoteFlashColorIdx];
|
||||
sOcarinaNoteCBtnEnv = sOcarinaNoteCEnvColors[sOcarinaNoteFlashColorIdx];
|
||||
sOcarinaNoteCUpBtnPrim = sOcarinaNoteCUpPrimColors[sOcarinaNoteFlashColorIdx];
|
||||
sOcarinaNoteCDownBtnPrim = sOcarinaNoteCDownPrimColors[sOcarinaNoteFlashColorIdx];
|
||||
sOcarinaNoteCLeftBtnPrim = sOcarinaNoteCLeftPrimColors[sOcarinaNoteFlashColorIdx];
|
||||
sOcarinaNoteCRightBtnPrim = sOcarinaNoteCRightPrimColors[sOcarinaNoteFlashColorIdx];
|
||||
sOcarinaNoteFlashTimer = 3;
|
||||
sOcarinaNoteFlashColorIdx ^= 1;
|
||||
}
|
||||
|
@ -3220,17 +2952,17 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
// consistent with the note played, rather than having AEnv be used for whatever note A happens to
|
||||
// play at the moment and CEnv for everything else, even with custom controls enabled.
|
||||
if (sOcarinaNoteBuf[i] == OCARINA_NOTE_D4) {
|
||||
gDPSetPrimColor(gfx++, 0, 0, sOcarinaNoteD4Prim.r, sOcarinaNoteD4Prim.g, sOcarinaNoteD4Prim.b, sOcarinaNotesAlphaValues[i]);
|
||||
gDPSetPrimColor(gfx++, 0, 0, sOcarinaNoteABtnPrim.r, sOcarinaNoteABtnPrim.g, sOcarinaNoteABtnPrim.b, sOcarinaNotesAlphaValues[i]);
|
||||
gDPSetEnvColor(gfx++, sOcarinaNoteABtnEnv.r, sOcarinaNoteABtnEnv.g, sOcarinaNoteABtnEnv.b, 0);
|
||||
} else {
|
||||
if (sOcarinaNoteBuf[i] == OCARINA_NOTE_D5) {
|
||||
gDPSetPrimColor(gfx++, 0, 0, sOcarinaNoteD5Prim.r, sOcarinaNoteD5Prim.g, sOcarinaNoteD5Prim.b, sOcarinaNotesAlphaValues[i]);
|
||||
gDPSetPrimColor(gfx++, 0, 0, sOcarinaNoteCUpBtnPrim.r, sOcarinaNoteCUpBtnPrim.g, sOcarinaNoteCUpBtnPrim.b, sOcarinaNotesAlphaValues[i]);
|
||||
} else if (sOcarinaNoteBuf[i] == OCARINA_NOTE_B4) {
|
||||
gDPSetPrimColor(gfx++, 0, 0, sOcarinaNoteB4Prim.r, sOcarinaNoteB4Prim.g, sOcarinaNoteB4Prim.b, sOcarinaNotesAlphaValues[i]);
|
||||
gDPSetPrimColor(gfx++, 0, 0, sOcarinaNoteCLeftBtnPrim.r, sOcarinaNoteCLeftBtnPrim.g, sOcarinaNoteCLeftBtnPrim.b, sOcarinaNotesAlphaValues[i]);
|
||||
} else if (sOcarinaNoteBuf[i] == OCARINA_NOTE_A4) {
|
||||
gDPSetPrimColor(gfx++, 0, 0, sOcarinaNoteA4Prim.r, sOcarinaNoteA4Prim.g, sOcarinaNoteA4Prim.b, sOcarinaNotesAlphaValues[i]);
|
||||
gDPSetPrimColor(gfx++, 0, 0, sOcarinaNoteCRightBtnPrim.r, sOcarinaNoteCRightBtnPrim.g, sOcarinaNoteCRightBtnPrim.b, sOcarinaNotesAlphaValues[i]);
|
||||
} else if (sOcarinaNoteBuf[i] == OCARINA_NOTE_F4) {
|
||||
gDPSetPrimColor(gfx++, 0, 0, sOcarinaNoteF4Prim.r, sOcarinaNoteF4Prim.g, sOcarinaNoteF4Prim.b, sOcarinaNotesAlphaValues[i]);
|
||||
gDPSetPrimColor(gfx++, 0, 0, sOcarinaNoteCDownBtnPrim.r, sOcarinaNoteCDownBtnPrim.g, sOcarinaNoteCDownBtnPrim.b, sOcarinaNotesAlphaValues[i]);
|
||||
}
|
||||
gDPSetEnvColor(gfx++, sOcarinaNoteCBtnEnv.r, sOcarinaNoteCBtnEnv.g, sOcarinaNoteCBtnEnv.b, 0);
|
||||
}
|
||||
|
|
|
@ -3338,22 +3338,22 @@ void Interface_UpdateMagicBar(PlayState* play) {
|
|||
Color_RGB8 MagicBorder_2 = { 255, 255, 150 };
|
||||
Color_RGB8 MagicBorder_3 = { 255, 255, 50 };
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) { //This will make custom color based on users selected colors.
|
||||
sMagicBorderColors[0][0] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_0).r;
|
||||
sMagicBorderColors[0][1] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_0).g;
|
||||
sMagicBorderColors[0][2] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_0).b;
|
||||
if (CVar_GetS32("gCosmetics.Consumable_MagicBorderActive.Changed", 0)) { //This will make custom color based on users selected colors.
|
||||
sMagicBorderColors[0][0] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_0).r;
|
||||
sMagicBorderColors[0][1] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_0).g;
|
||||
sMagicBorderColors[0][2] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_0).b;
|
||||
|
||||
sMagicBorderColors[1][0] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_1).r/2;
|
||||
sMagicBorderColors[1][1] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_1).g/2;
|
||||
sMagicBorderColors[1][2] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_1).b/2;
|
||||
sMagicBorderColors[1][0] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_1).r/2;
|
||||
sMagicBorderColors[1][1] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_1).g/2;
|
||||
sMagicBorderColors[1][2] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_1).b/2;
|
||||
|
||||
sMagicBorderColors[2][0] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_2).r/2.5;
|
||||
sMagicBorderColors[2][1] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_2).g/2.5;
|
||||
sMagicBorderColors[2][2] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_2).b/2.5;
|
||||
sMagicBorderColors[2][0] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_2).r/2.5;
|
||||
sMagicBorderColors[2][1] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_2).g/2.5;
|
||||
sMagicBorderColors[2][2] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_2).b/2.5;
|
||||
|
||||
sMagicBorderColors[3][0] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_3).r/3;
|
||||
sMagicBorderColors[3][1] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_3).g/3;
|
||||
sMagicBorderColors[3][2] = CVar_GetRGB("gCCMagicBorderPrim", MagicBorder_3).b/3;
|
||||
sMagicBorderColors[3][0] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_3).r/3;
|
||||
sMagicBorderColors[3][1] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_3).g/3;
|
||||
sMagicBorderColors[3][2] = CVar_GetRGB("gCosmetics.Consumable_MagicBorderActive.Value", MagicBorder_3).b/3;
|
||||
}
|
||||
|
||||
static s16 sMagicBorderIndexes[] = { 0, 1, 1, 0 };
|
||||
|
@ -3413,15 +3413,15 @@ void Interface_UpdateMagicBar(PlayState* play) {
|
|||
if (gSaveContext.magic <= 0) {
|
||||
gSaveContext.magic = 0;
|
||||
gSaveContext.magicState = 3;
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
sMagicBorder = CVar_GetRGB("gCCMagicBorderNormPrim", sMagicBorder_ori);
|
||||
if (CVar_GetS32("gCosmetics.Consumable_MagicBorder.Changed", 0)) {
|
||||
sMagicBorder = CVar_GetRGB("gCosmetics.Consumable_MagicBorder.Value", sMagicBorder_ori);
|
||||
} else {
|
||||
sMagicBorder = sMagicBorder_ori;
|
||||
}
|
||||
} else if (gSaveContext.magic == gSaveContext.magicTarget) {
|
||||
gSaveContext.magicState = 3;
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
sMagicBorder = CVar_GetRGB("gCCMagicBorderNormPrim", sMagicBorder_ori);
|
||||
if (CVar_GetS32("gCosmetics.Consumable_MagicBorder.Changed", 0)) {
|
||||
sMagicBorder = CVar_GetRGB("gCosmetics.Consumable_MagicBorder.Value", sMagicBorder_ori);
|
||||
} else {
|
||||
sMagicBorder = sMagicBorder_ori;
|
||||
}
|
||||
|
@ -3466,8 +3466,8 @@ void Interface_UpdateMagicBar(PlayState* play) {
|
|||
break;
|
||||
|
||||
case 5:
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
sMagicBorder = CVar_GetRGB("gCCMagicBorderNormPrim", sMagicBorder_ori);
|
||||
if (CVar_GetS32("gCosmetics.Consumable_MagicBorder.Changed", 0)) {
|
||||
sMagicBorder = CVar_GetRGB("gCosmetics.Consumable_MagicBorder.Value", sMagicBorder_ori);
|
||||
} else {
|
||||
sMagicBorder = sMagicBorder_ori;
|
||||
}
|
||||
|
@ -3492,8 +3492,8 @@ void Interface_UpdateMagicBar(PlayState* play) {
|
|||
Audio_PlaySoundGeneral(NA_SE_SY_GLASSMODE_OFF, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
gSaveContext.magicState = 0;
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
sMagicBorder = CVar_GetRGB("gCCMagicBorderNormPrim", sMagicBorder_ori);
|
||||
if (CVar_GetS32("gCosmetics.Consumable_MagicBorder.Changed", 0)) {
|
||||
sMagicBorder = CVar_GetRGB("gCosmetics.Consumable_MagicBorder.Value", sMagicBorder_ori);
|
||||
} else {
|
||||
sMagicBorder = sMagicBorder_ori;
|
||||
}
|
||||
|
@ -3588,6 +3588,13 @@ void Interface_DrawMagicBar(PlayState* play) {
|
|||
Color_RGB8 magicbar_yellow = {250,250,0}; //Magic bar being used
|
||||
Color_RGB8 magicbar_green = {R_MAGIC_FILL_COLOR(0),R_MAGIC_FILL_COLOR(1),R_MAGIC_FILL_COLOR(2)}; //Magic bar fill
|
||||
|
||||
if (CVar_GetS32("gCosmetics.Consumable_MagicActive.Changed", 0)) {
|
||||
magicbar_yellow = CVar_GetRGB("gCosmetics.Consumable_MagicActive.Value", magicbar_yellow);
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Consumable_Magic.Changed", 0)) {
|
||||
magicbar_green = CVar_GetRGB("gCosmetics.Consumable_Magic.Value", magicbar_green);
|
||||
}
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (gSaveContext.magicLevel != 0) {
|
||||
|
@ -3661,12 +3668,8 @@ void Interface_DrawMagicBar(PlayState* play) {
|
|||
|
||||
Gfx_SetupDL_39Overlay(play->state.gfxCtx);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {//Original game add color there so to prevent miss match we make it all white :)
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 255, 255, 255, 255);
|
||||
} else {
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 100, 50, 50, 255);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, sMagicBorder.r, sMagicBorder.g, sMagicBorder.b, interfaceCtx->magicAlpha);
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 100, 50, 50, 255);
|
||||
|
||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gMagicMeterEndTex, 8, 16, PosX_Start, magicBarY, 8, 16, 1 << 10, 1 << 10);
|
||||
|
||||
|
@ -3686,11 +3689,7 @@ void Interface_DrawMagicBar(PlayState* play) {
|
|||
|
||||
if (gSaveContext.magicState == 4) {
|
||||
// Yellow part of the bar indicating the amount of magic to be subtracted
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCMagicUsePrim", magicbar_yellow).r, CVar_GetRGB("gCCMagicUsePrim", magicbar_yellow).g, CVar_GetRGB("gCCMagicUsePrim", magicbar_yellow).b, interfaceCtx->magicAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, magicbar_yellow.r, magicbar_yellow.g, magicbar_yellow.b, interfaceCtx->magicAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, magicbar_yellow.r, magicbar_yellow.g, magicbar_yellow.b, interfaceCtx->magicAlpha);
|
||||
|
||||
gDPLoadMultiBlock_4b(OVERLAY_DISP++, gMagicMeterFillTex, 0, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
|
@ -3702,22 +3701,14 @@ void Interface_DrawMagicBar(PlayState* play) {
|
|||
|
||||
// Fill the rest of the bar with the normal magic color
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCMagicPrim", magicbar_green).r, CVar_GetRGB("gCCMagicPrim", magicbar_green).g, CVar_GetRGB("gCCMagicPrim", magicbar_green).b, interfaceCtx->magicAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, magicbar_green.r, magicbar_green.g, magicbar_green.b, interfaceCtx->magicAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, magicbar_green.r, magicbar_green.g, magicbar_green.b, interfaceCtx->magicAlpha);
|
||||
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, rMagicFillX << 2, (magicBarY + 3) << 2,
|
||||
(rMagicFillX + gSaveContext.magicTarget) << 2, (magicBarY + 10) << 2, G_TX_RENDERTILE,
|
||||
0, 0, 1 << 10, 1 << 10);
|
||||
} else {
|
||||
// Fill the whole bar with the normal magic color
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCMagicPrim", magicbar_green).r, CVar_GetRGB("gCCMagicPrim", magicbar_green).g, CVar_GetRGB("gCCMagicPrim", magicbar_green).b, interfaceCtx->magicAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, magicbar_green.r, magicbar_green.g, magicbar_green.b, interfaceCtx->magicAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, magicbar_green.r, magicbar_green.g, magicbar_green.b, interfaceCtx->magicAlpha);
|
||||
|
||||
gDPLoadMultiBlock_4b(OVERLAY_DISP++, gMagicMeterFillTex, 0, G_TX_RENDERTILE, G_IM_FMT_I, 16, 16, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
|
@ -3790,18 +3781,41 @@ void Interface_DrawItemButtons(PlayState* play) {
|
|||
s16 dxdy;
|
||||
s16 width;
|
||||
s16 height;
|
||||
Color_RGB8 A_button_ori = {R_A_BTN_COLOR(0), R_A_BTN_COLOR(1), R_A_BTN_COLOR(2)};
|
||||
Color_RGB8 A_button = CVar_GetRGB("gCCABtnPrim", A_button_ori);
|
||||
Color_RGB8 B_button_ori = {R_B_BTN_COLOR(0), R_B_BTN_COLOR(1), R_B_BTN_COLOR(2)};
|
||||
Color_RGB8 B_button = CVar_GetRGB("gCCBBtnPrim", B_button_ori);
|
||||
Color_RGB8 Start_button_ori = {120, 120, 120};
|
||||
Color_RGB8 Start_button = CVar_GetRGB("gCCStartBtnPrim", Start_button_ori);
|
||||
Color_RGB8 C_button_ori = {R_C_BTN_COLOR(0), R_C_BTN_COLOR(1), R_C_BTN_COLOR(2)};
|
||||
Color_RGB8 C_button_uni = CVar_GetRGB("gCCCBtnPrim", C_button_ori);
|
||||
Color_RGB8 C_button_U = CVar_GetRGB("gCCCUBtnPrim", C_button_ori);
|
||||
Color_RGB8 C_button_D = CVar_GetRGB("gCCCDBtnPrim", C_button_ori);
|
||||
Color_RGB8 C_button_L = CVar_GetRGB("gCCCLBtnPrim", C_button_ori);
|
||||
Color_RGB8 C_button_R = CVar_GetRGB("gCCCRBtnPrim", C_button_ori);
|
||||
|
||||
Color_RGB8 bButtonColor = { 0, 150, 0 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_BButton.Changed", 0)) {
|
||||
bButtonColor = CVar_GetRGB("gCosmetics.Hud_BButton.Value", bButtonColor);
|
||||
} else if (CVar_GetS32("gCosmetics.DefaultColorScheme", 0)) {
|
||||
bButtonColor = (Color_RGB8){ 255, 30, 30 };
|
||||
}
|
||||
|
||||
Color_RGB8 cButtonsColor = { 255, 160, 0 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_CButtons.Changed", 0)) {
|
||||
cButtonsColor = CVar_GetRGB("gCosmetics.Hud_CButtons.Value", cButtonsColor);
|
||||
}
|
||||
Color_RGB8 cUpButtonColor = cButtonsColor;
|
||||
if (CVar_GetS32("gCosmetics.Hud_CUpButton.Changed", 0)) {
|
||||
cUpButtonColor = CVar_GetRGB("gCosmetics.Hud_CUpButton.Value", cUpButtonColor);
|
||||
}
|
||||
Color_RGB8 cDownButtonColor = cButtonsColor;
|
||||
if (CVar_GetS32("gCosmetics.Hud_CDownButton.Changed", 0)) {
|
||||
cDownButtonColor = CVar_GetRGB("gCosmetics.Hud_CDownButton.Value", cDownButtonColor);
|
||||
}
|
||||
Color_RGB8 cLeftButtonColor = cButtonsColor;
|
||||
if (CVar_GetS32("gCosmetics.Hud_CLeftButton.Changed", 0)) {
|
||||
cLeftButtonColor = CVar_GetRGB("gCosmetics.Hud_CLeftButton.Value", cLeftButtonColor);
|
||||
}
|
||||
Color_RGB8 cRightButtonColor = cButtonsColor;
|
||||
if (CVar_GetS32("gCosmetics.Hud_CRightButton.Changed", 0)) {
|
||||
cRightButtonColor = CVar_GetRGB("gCosmetics.Hud_CRightButton.Value", cRightButtonColor);
|
||||
}
|
||||
|
||||
Color_RGB8 startButtonColor = { 200, 0, 0 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_StartButton.Changed", 0)) {
|
||||
startButtonColor = CVar_GetRGB("gCosmetics.Hud_StartButton.Value", startButtonColor);
|
||||
} else if (CVar_GetS32("gCosmetics.DefaultColorScheme", 0)) {
|
||||
startButtonColor = (Color_RGB8){ 120, 120, 120 };
|
||||
}
|
||||
|
||||
//B Button
|
||||
s16 X_Margins_BtnB;
|
||||
|
@ -4044,58 +4058,28 @@ void Interface_DrawItemButtons(PlayState* play) {
|
|||
// Also loads the Item Button Texture reused by other buttons afterwards
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 150, 0, interfaceCtx->bAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, B_button_ori.r,B_button_ori.g,B_button_ori.b, interfaceCtx->bAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, B_button.r,B_button.g,B_button.b, interfaceCtx->bAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, bButtonColor.r,bButtonColor.g,bButtonColor.b, interfaceCtx->bAlpha);
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255);
|
||||
|
||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gButtonBackgroundTex, BBtn_Size, BBtn_Size, PosX_BtnB, PosY_BtnB, BBtnScaled, BBtnScaled, BBtn_factor, BBtn_factor);
|
||||
|
||||
// C-Left Button Color & Texture
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cLeftAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cLeftAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && !CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_uni.r, C_button_uni.g, C_button_uni.b, interfaceCtx->cLeftAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_L.r, C_button_L.g, C_button_L.b, interfaceCtx->cLeftAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, cLeftButtonColor.r, cLeftButtonColor.g, cLeftButtonColor.b, interfaceCtx->cLeftAlpha);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, C_Left_BTN_Pos[0] << 2, C_Left_BTN_Pos[1] << 2,
|
||||
(C_Left_BTN_Pos[0] + R_ITEM_BTN_WIDTH(1)) << 2,
|
||||
(C_Left_BTN_Pos[1] + R_ITEM_BTN_WIDTH(1)) << 2,
|
||||
G_TX_RENDERTILE, 0, 0, R_ITEM_BTN_DD(1) << 1, R_ITEM_BTN_DD(1) << 1);
|
||||
|
||||
// C-Down Button Color & Texture
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cDownAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cDownAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && !CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_uni.r, C_button_uni.g, C_button_uni.b, interfaceCtx->cDownAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_D.r, C_button_D.g, C_button_D.b, interfaceCtx->cDownAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, cDownButtonColor.r, cDownButtonColor.g, cDownButtonColor.b, interfaceCtx->cDownAlpha);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, C_Down_BTN_Pos[0] << 2, C_Down_BTN_Pos[1] << 2,
|
||||
(C_Down_BTN_Pos[0] + R_ITEM_BTN_WIDTH(2)) << 2,
|
||||
(C_Down_BTN_Pos[1] + R_ITEM_BTN_WIDTH(2)) << 2,
|
||||
G_TX_RENDERTILE, 0, 0, R_ITEM_BTN_DD(2) << 1, R_ITEM_BTN_DD(2) << 1);
|
||||
|
||||
// C-Right Button Color & Texture
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cRightAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cRightAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && !CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_uni.r, C_button_uni.g, C_button_uni.b, interfaceCtx->cRightAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_R.r, C_button_R.g, C_button_R.b, interfaceCtx->cRightAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, cRightButtonColor.r, cRightButtonColor.g, cRightButtonColor.b, interfaceCtx->cRightAlpha);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, C_Right_BTN_Pos[0] << 2, C_Right_BTN_Pos[1] << 2,
|
||||
(C_Right_BTN_Pos[0] + R_ITEM_BTN_WIDTH(3)) << 2,
|
||||
(C_Right_BTN_Pos[1] + R_ITEM_BTN_WIDTH(3)) << 2,
|
||||
|
@ -4106,13 +4090,7 @@ void Interface_DrawItemButtons(PlayState* play) {
|
|||
// Start Button Texture, Color & Label
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 200, 0, 0, interfaceCtx->startAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, Start_button_ori.r, Start_button_ori.g, Start_button_ori.b, interfaceCtx->startAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, Start_button.r, Start_button.g, Start_button.b, interfaceCtx->startAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, startButtonColor.r, startButtonColor.g, startButtonColor.b, interfaceCtx->startAlpha);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, PosX_StartBtn << 2, PosY_StartBtn << 2,
|
||||
(PosX_StartBtn + StartBTN_W_Scaled) << 2, (PosY_StartBtn + StartBTN_H_Scaled) << 2,
|
||||
G_TX_RENDERTILE, 0, 0, StartBTN_W_factor, StartBTN_H_factor);
|
||||
|
@ -4177,15 +4155,7 @@ void Interface_DrawItemButtons(PlayState* play) {
|
|||
temp = interfaceCtx->healthAlpha;
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, temp);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, temp);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && !CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_uni.r, C_button_uni.g, C_button_uni.b, temp);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated",0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_U.r, C_button_U.g, C_button_U.b, temp);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, cUpButtonColor.r, cUpButtonColor.g, cUpButtonColor.b, temp);
|
||||
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, C_Up_BTN_Pos[0] << 2, C_Up_BTN_Pos[1] << 2, (C_Up_BTN_Pos[0] + 16) << 2,
|
||||
(C_Up_BTN_Pos[1] + 16) << 2, G_TX_RENDERTILE, 0, 0, 2 << 10, 2 << 10);
|
||||
|
@ -4310,23 +4280,13 @@ void Interface_DrawItemButtons(PlayState* play) {
|
|||
}
|
||||
|
||||
if (temp == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cLeftAlpha);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, cLeftButtonColor.r, cLeftButtonColor.g, cLeftButtonColor.b, interfaceCtx->cLeftAlpha);
|
||||
} else if (temp == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cDownAlpha);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, cDownButtonColor.r, cDownButtonColor.g, cDownButtonColor.b, interfaceCtx->cDownAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, interfaceCtx->cRightAlpha);
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, cRightButtonColor.r, cRightButtonColor.g, cRightButtonColor.b, interfaceCtx->cRightAlpha);
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2 && !CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_uni.r, C_button_uni.g, C_button_uni.b, interfaceCtx->cRightAlpha);
|
||||
} else if (temp == 1 && CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_L.r, C_button_L.g, C_button_L.b, interfaceCtx->cLeftAlpha);
|
||||
} else if (temp == 2 && CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_D.r, C_button_D.g, C_button_D.b, interfaceCtx->cDownAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, C_button_R.r, C_button_R.g, C_button_R.b, interfaceCtx->cRightAlpha);
|
||||
}
|
||||
|
||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, ((u8*)gButtonBackgroundTex), 32, 32,
|
||||
ItemIconPos[temp-1][0], ItemIconPos[temp-1][1], ItemIconWidthFactor[temp-1][0],
|
||||
ItemIconWidthFactor[temp-1][0], ItemIconWidthFactor[temp-1][1], ItemIconWidthFactor[temp-1][1]);
|
||||
|
@ -4948,18 +4908,31 @@ void Interface_Draw(PlayState* play) {
|
|||
static s16 rupeeDigitsCount[] = { 2, 3, 3, 3 };
|
||||
|
||||
// courtesy of https://github.com/TestRunnerSRL/OoT-Randomizer/blob/Dev/ASM/c/hud_colors.c
|
||||
static s16 rupeeWalletColors[4][3] = {
|
||||
static Color_RGB8 rupeeWalletColors[4] = {
|
||||
{ 0xC8, 0xFF, 0x64 }, // Base Wallet (Green)
|
||||
{ 0x82, 0x82, 0xFF }, // Adult's Wallet (Blue)
|
||||
{ 0xFF, 0x64, 0x64 }, // Giant's Wallet (Red)
|
||||
{ 0xFF, 0x5A, 0xFF }, // Tycoon's Wallet (Purple). Only used in rando shopsanity.
|
||||
};
|
||||
Color_RGB8 rColor_ori = { 200, 255, 100 };
|
||||
Color_RGB8 rColor;
|
||||
Color_RGB8 keyColor_ori = { 200, 230, 255 };
|
||||
Color_RGB8 keyColor;
|
||||
Color_RGB8 DPad_colors_ori = {255, 255, 255};
|
||||
Color_RGB8 DPad_colors = CVar_GetRGB("gCCDpadPrim", DPad_colors_ori);
|
||||
|
||||
Color_RGB8 keyCountColor = { 200, 230, 255 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_KeyCount.Changed", 0)) {
|
||||
keyCountColor = CVar_GetRGB("gCosmetics.Hud_KeyCount.Value", keyCountColor);
|
||||
}
|
||||
|
||||
Color_RGB8 dPadColor = { 255, 255, 255 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_Dpad.Changed", 0)) {
|
||||
dPadColor = CVar_GetRGB("gCosmetics.Hud_Dpad.Value", dPadColor);
|
||||
}
|
||||
|
||||
Color_RGB8 aButtonColor = { 90, 90, 255 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
aButtonColor = CVar_GetRGB("gCosmetics.Hud_AButton.Value", aButtonColor);
|
||||
} else if (CVar_GetS32("gCosmetics.DefaultColorScheme", 0)) {
|
||||
aButtonColor = (Color_RGB8){ 0, 200, 50 };
|
||||
}
|
||||
|
||||
static s16 spoilingItemEntrances[] = { 0x01AD, 0x0153, 0x0153 };
|
||||
static f32 D_80125B54[] = { -40.0f, -35.0f }; // unused
|
||||
static s16 D_80125B5C[] = { 91, 91 }; // unused
|
||||
|
@ -5006,33 +4979,45 @@ void Interface_Draw(PlayState* play) {
|
|||
|
||||
if (fullUi) {
|
||||
// Rupee Icon
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
//Custom Color is on but check if Dynamic Wallet is on.
|
||||
if (CVar_GetS32("gDynamicWalletIcon", 0) != 0) {
|
||||
//if on let's use Dynamic Colors
|
||||
rColor.r = rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)][0];
|
||||
rColor.g = rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)][1];
|
||||
rColor.b = rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)][2];
|
||||
} else {
|
||||
//else use our custom color
|
||||
rColor = CVar_GetRGB("gCCRupeePrim", rColor_ori);
|
||||
if (CVar_GetS32("gDynamicWalletIcon", 0)) {
|
||||
switch (CUR_UPG_VALUE(UPG_WALLET)) {
|
||||
case 0:
|
||||
if (CVar_GetS32("gCosmetics.Consumable_GreenRupee.Changed", 0)) {
|
||||
rColor = CVar_GetRGB("gCosmetics.Consumable_GreenRupee.Value", rupeeWalletColors[0]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[0];
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (CVar_GetS32("gCosmetics.Consumable_BlueRupee.Changed", 0)) {
|
||||
rColor = CVar_GetRGB("gCosmetics.Consumable_BlueRupee.Value", rupeeWalletColors[1]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[1];
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (CVar_GetS32("gCosmetics.Consumable_RedRupee.Changed", 0)) {
|
||||
rColor = CVar_GetRGB("gCosmetics.Consumable_RedRupee.Value", rupeeWalletColors[2]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[2];
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (CVar_GetS32("gCosmetics.Consumable_PurpleRupee.Changed", 0)) {
|
||||
rColor = CVar_GetRGB("gCosmetics.Consumable_PurpleRupee.Value", rupeeWalletColors[3]);
|
||||
} else {
|
||||
rColor = rupeeWalletColors[3];
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
//Custom colors is off so check if Dynamic Wallet is on.
|
||||
if (CVar_GetS32("gDynamicWalletIcon", 0) != 0) {
|
||||
rColor.r = rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)][0];
|
||||
rColor.g = rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)][1];
|
||||
rColor.b = rupeeWalletColors[CUR_UPG_VALUE(UPG_WALLET)][2];
|
||||
if (CVar_GetS32("gCosmetics.Consumable_GreenRupee.Changed", rupeeWalletColors)) {
|
||||
rColor = CVar_GetRGB("gCosmetics.Consumable_GreenRupee.Value", rupeeWalletColors[0]);
|
||||
} else {
|
||||
rColor.r = rupeeWalletColors[0][0];
|
||||
rColor.g = rupeeWalletColors[0][1];
|
||||
rColor.b = rupeeWalletColors[0][2];
|
||||
rColor = rupeeWalletColors[0];
|
||||
}
|
||||
}
|
||||
if (CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gDynamicWalletIcon", 0) != 1) {
|
||||
//We reset this here so it match user color only if both HUD is on and Dynamic is off.
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255);
|
||||
}
|
||||
|
||||
//Rupee icon & counter
|
||||
s16 X_Margins_RC;
|
||||
s16 Y_Margins_RC;
|
||||
|
@ -5116,13 +5101,8 @@ void Interface_Draw(PlayState* play) {
|
|||
// Small Key Icon
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCKeysPrim", keyColor_ori).r,CVar_GetRGB("gCCKeysPrim", keyColor_ori).g,CVar_GetRGB("gCCKeysPrim", keyColor_ori).b, interfaceCtx->magicAlpha);
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255); //We reset this here so it match user color :)
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, keyColor_ori.r, keyColor_ori.g, keyColor_ori.b, interfaceCtx->magicAlpha);
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 20, 255);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, keyCountColor.r,keyCountColor.g,keyCountColor.b, interfaceCtx->magicAlpha);
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 20, 255); //We reset this here so it match user color :)
|
||||
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gSmallKeyCounterIconTex, 16, 16, PosX_SKC, PosY_SKC, 16, 16,
|
||||
1 << 10, 1 << 10);
|
||||
|
||||
|
@ -5378,11 +5358,7 @@ void Interface_Draw(PlayState* play) {
|
|||
|
||||
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, DPad_colors.r,DPad_colors.g,DPad_colors.b, dpadAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, DPad_colors_ori.r,DPad_colors_ori.g,DPad_colors_ori.b, dpadAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, dPadColor.r, dPadColor.g, dPadColor.b, dpadAlpha);
|
||||
if (fullUi) {
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, ResourceMgr_LoadFileRaw("assets/textures/parameter_static/gDPad"),
|
||||
G_IM_FMT_IA, G_IM_SIZ_16b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
|
@ -5439,7 +5415,6 @@ void Interface_Draw(PlayState* play) {
|
|||
|
||||
// A Button
|
||||
Gfx_SetupDL_42Overlay(play->state.gfxCtx);
|
||||
const Color_RGB8 A_Button_Colors = {R_A_BTN_COLOR(0), R_A_BTN_COLOR(1), R_A_BTN_COLOR(2)};
|
||||
s16 X_Margins_BtnA;
|
||||
s16 Y_Margins_BtnA;
|
||||
if (CVar_GetS32("gABtnUseMargins", 0) != 0) {
|
||||
|
@ -5483,13 +5458,7 @@ void Interface_Draw(PlayState* play) {
|
|||
}
|
||||
gSPClearGeometryMode(OVERLAY_DISP++, G_CULL_BOTH);
|
||||
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 90, 90, 255, interfaceCtx->aAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, A_Button_Colors.r, A_Button_Colors.g, A_Button_Colors.b, interfaceCtx->aAlpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCABtnPrim", A_Button_Colors).r,CVar_GetRGB("gCCABtnPrim", A_Button_Colors).g,CVar_GetRGB("gCCABtnPrim", A_Button_Colors).b, interfaceCtx->aAlpha);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, aButtonColor.r, aButtonColor.g, aButtonColor.b, interfaceCtx->aAlpha);
|
||||
if (fullUi) {
|
||||
Interface_DrawActionButton(play, PosX_BtnA, PosY_BtnA);
|
||||
}
|
||||
|
|
|
@ -1647,6 +1647,10 @@ void Play_Main(GameState* thisx) {
|
|||
if (CVar_GetS32("gPauseBufferBlockInputFrame", 0)) {
|
||||
CVar_SetS32("gPauseBufferBlockInputFrame", CVar_GetS32("gPauseBufferBlockInputFrame", 0) - 1);
|
||||
}
|
||||
if (play->envCtx.unk_EE[2] == 0 && CVar_GetS32("gLetItSnow", 0)) {
|
||||
play->envCtx.unk_EE[3] = 64;
|
||||
Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_OBJECT_KANKYO, 0, 0, 0, 0, 0, 0, 3, 0);
|
||||
}
|
||||
|
||||
D_8012D1F8 = &play->state.input[0];
|
||||
|
||||
|
|
|
@ -747,28 +747,16 @@ void func_8008F470(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dLis
|
|||
#endif
|
||||
|
||||
Color_RGB8 sTemp;
|
||||
Color_RGB8 sOriginalTunicColors[] = {
|
||||
{ 30, 105, 27 },
|
||||
{ 100, 20, 0 },
|
||||
{ 0, 60, 100 },
|
||||
};
|
||||
color = &sTemp;
|
||||
if (tunic == PLAYER_TUNIC_KOKIRI && CVar_GetS32("gUseTunicsCol",0)) {
|
||||
*color = CVar_GetRGB("gTunic_Kokiri", sTunicColors[PLAYER_TUNIC_KOKIRI]);
|
||||
} else if (tunic == PLAYER_TUNIC_GORON && CVar_GetS32("gUseTunicsCol",0)) {
|
||||
*color = CVar_GetRGB("gTunic_Goron", sTunicColors[PLAYER_TUNIC_GORON]);
|
||||
} else if (tunic == PLAYER_TUNIC_ZORA && CVar_GetS32("gUseTunicsCol",0)) {
|
||||
*color = CVar_GetRGB("gTunic_Zora", sTunicColors[PLAYER_TUNIC_ZORA]);
|
||||
} else if (!CVar_GetS32("gUseTunicsCol",0)){
|
||||
if (tunic >= 3) {
|
||||
color->r = sOriginalTunicColors[0].r;
|
||||
color->g = sOriginalTunicColors[0].g;
|
||||
color->b = sOriginalTunicColors[0].b;
|
||||
} else {
|
||||
color->r = sOriginalTunicColors[tunic].r;
|
||||
color->g = sOriginalTunicColors[tunic].g;
|
||||
color->b = sOriginalTunicColors[tunic].b;
|
||||
}
|
||||
color = &sTunicColors[tunic];
|
||||
if (tunic == PLAYER_TUNIC_KOKIRI && CVar_GetS32("gCosmetics.Link_KokiriTunic.Changed", 0)) {
|
||||
sTemp = CVar_GetRGB("gCosmetics.Link_KokiriTunic.Value", sTunicColors[PLAYER_TUNIC_KOKIRI]);
|
||||
color = &sTemp;
|
||||
} else if (tunic == PLAYER_TUNIC_GORON && CVar_GetS32("gCosmetics.Link_GoronTunic.Changed", 0)) {
|
||||
sTemp = CVar_GetRGB("gCosmetics.Link_GoronTunic.Value", sTunicColors[PLAYER_TUNIC_GORON]);
|
||||
color = &sTemp;
|
||||
} else if (tunic == PLAYER_TUNIC_ZORA && CVar_GetS32("gCosmetics.Link_ZoraTunic.Changed", 0)) {
|
||||
sTemp = CVar_GetRGB("gCosmetics.Link_ZoraTunic.Value", sTunicColors[PLAYER_TUNIC_ZORA]);
|
||||
color = &sTemp;
|
||||
}
|
||||
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 0);
|
||||
|
@ -784,14 +772,14 @@ void func_8008F470(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dLis
|
|||
if (strengthUpgrade >= 2) { // silver or gold gauntlets
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
if (!CVar_GetS32("gUseGauntletsCol", 0)) {
|
||||
color = &sGauntletColors[strengthUpgrade - 2];
|
||||
} else if (strengthUpgrade == PLAYER_STR_SILVER_G) {
|
||||
*color = CVar_GetRGB("gGauntlets_Silver", sGauntletColors[PLAYER_STR_SILVER_G - 2]);
|
||||
} else if (strengthUpgrade == PLAYER_STR_GOLD_G) {
|
||||
*color = CVar_GetRGB("gGauntlets_Golden", sGauntletColors[PLAYER_STR_GOLD_G - 2]);
|
||||
color = &sGauntletColors[strengthUpgrade - 2];
|
||||
if (strengthUpgrade == PLAYER_STR_SILVER_G && CVar_GetS32("gCosmetics.Gloves_SilverGauntlets.Changed", 0)) {
|
||||
sTemp = CVar_GetRGB("gCosmetics.Gloves_SilverGauntlets.Value", sGauntletColors[PLAYER_STR_SILVER_G - 2]);
|
||||
color = &sTemp;
|
||||
} else if (strengthUpgrade == PLAYER_STR_GOLD_G && CVar_GetS32("gCosmetics.Gloves_GoldenGauntlets.Changed", 0)) {
|
||||
sTemp = CVar_GetRGB("gCosmetics.Gloves_GoldenGauntlets.Value", sGauntletColors[PLAYER_STR_GOLD_G - 2]);
|
||||
color = &sTemp;
|
||||
}
|
||||
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 0);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, gLinkAdultLeftGauntletPlate1DL);
|
||||
|
@ -959,9 +947,24 @@ s32 func_8008FCC8(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s
|
|||
}
|
||||
|
||||
if (limbIndex == PLAYER_LIMB_HEAD) {
|
||||
if (CVar_GetS32("gCosmetics.Link_HeadScale.Changed", 0)) {
|
||||
f32 scale = CVar_GetFloat("gCosmetics.Link_HeadScale.Value", 1.0f);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
if (scale > 1.2f) {
|
||||
Matrix_Translate(-((LINK_IS_ADULT ? 320.0f : 200.0f) * scale), 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
} else if (scale < 1.0f) {
|
||||
Matrix_Translate((LINK_IS_ADULT ? 3600.0f : 2900.0f) * ABS(scale - 1.0f), 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
}
|
||||
rot->x += this->unk_6BA;
|
||||
rot->y -= this->unk_6B8;
|
||||
rot->z += this->unk_6B6;
|
||||
} else if (limbIndex == PLAYER_LIMB_L_HAND) {
|
||||
if (CVar_GetS32("gCosmetics.Link_SwordScale.Changed", 0)) {
|
||||
f32 scale = CVar_GetFloat("gCosmetics.Link_SwordScale.Value", 1.0f);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
Matrix_Translate(-((LINK_IS_ADULT ? 320.0f : 200.0f) * scale), 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
} else if (limbIndex == PLAYER_LIMB_UPPER) {
|
||||
if (this->unk_6B0 != 0) {
|
||||
Matrix_RotateZ(0x44C * (M_PI / 0x8000), MTXMODE_APPLY);
|
||||
|
@ -1184,14 +1187,12 @@ void Player_DrawGetItemImpl(PlayState* play, Player* this, Vec3f* refPos, s32 dr
|
|||
Matrix_RotateZYX(0, play->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
|
||||
|
||||
if (!(this->getItemEntry.modIndex == MOD_RANDOMIZER && this->getItemEntry.getItemId == RG_ICE_TRAP)) {
|
||||
// RANDOTODO: Make this more flexible for easier toggling of individual item recolors in the future.
|
||||
if (this->getItemEntry.drawFunc != NULL &&
|
||||
(CVar_GetS32("gRandoMatchKeyColors", 0) || this->getItemEntry.getItemId == RG_DOUBLE_DEFENSE)) {
|
||||
this->getItemEntry.drawFunc(play, &this->getItemEntry);
|
||||
} else {
|
||||
GetItem_Draw(play, drawIdPlusOne - 1);
|
||||
}
|
||||
// RANDOTODO: Make this more flexible for easier toggling of individual item recolors in the future.
|
||||
if (this->getItemEntry.drawFunc != NULL &&
|
||||
(CVar_GetS32("gRandoMatchKeyColors", 0) || this->getItemEntry.getItemId == RG_DOUBLE_DEFENSE || this->getItemEntry.getItemId == RG_ICE_TRAP)) {
|
||||
this->getItemEntry.drawFunc(play, &this->getItemEntry);
|
||||
} else {
|
||||
GetItem_Draw(play, drawIdPlusOne - 1);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
@ -1330,7 +1331,7 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void
|
|||
D_80126080.x = this->unk_85C * 5000.0f;
|
||||
func_80090A28(this, sp124);
|
||||
if (this->swordState != 0) {
|
||||
EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), 7); // default sword type
|
||||
EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), 7); // stick sword type
|
||||
func_800906D4(play, this, sp124);
|
||||
} else {
|
||||
Math_Vec3f_Copy(&this->meleeWeaponInfo[0].tip, &sp124[0]);
|
||||
|
@ -1353,10 +1354,7 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void
|
|||
D_80126080.x = 1500.0f;
|
||||
} else {
|
||||
D_80126080.x = sSwordLengths[Player_GetSwordHeld(this)];
|
||||
if (CVar_GetS32("gSeperateSwords", 0) != 0)
|
||||
EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), sSwordTypes[Player_GetSwordHeld(this)]);
|
||||
else
|
||||
EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex),1); //default sword type
|
||||
EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), sSwordTypes[Player_GetSwordHeld(this)]);
|
||||
}
|
||||
|
||||
func_80090A28(this, spE4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue