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:
Garrett Cox
2022-12-08 22:24:39 -06:00
committed by GitHub
parent 8c8c761726
commit 274c12f3cb
52 changed files with 2722 additions and 2942 deletions
+55 -43
View File
@@ -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;