diff options
Diffstat (limited to 'soh/src/code/z_actor.c')
| -rw-r--r-- | soh/src/code/z_actor.c | 98 |
1 files changed, 55 insertions, 43 deletions
diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index f94f3d7ac..74dd031b2 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -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; |
