mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-07 02:40:30 -05: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
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
@ -24,9 +24,7 @@ void BootCommands_Init()
|
||||
{
|
||||
CVar_RegisterS32("gDebugEnabled", 0);
|
||||
CVar_RegisterS32("gLanguages", LANGUAGE_ENG);
|
||||
CVar_RegisterS32("gHudColors", 0); //0 = N64 / 1 = NGC / 2 = Custom
|
||||
CVar_RegisterS32("gInvertYAxis", 1);
|
||||
CVar_RegisterS32("gTrailDuration", 4); // 4 = Default trail duration
|
||||
CVar_SetS32("gRandoGenerating", 0); // Clear when a crash happened during rando seed generation
|
||||
#if defined(__SWITCH__) || defined(__WIIU__)
|
||||
CVar_RegisterS32("gControlNav", 1); // always enable controller nav on switch/wii u
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,12 +1,5 @@
|
||||
#pragma once
|
||||
#include <ImGuiImpl.h>
|
||||
#define SECTION_SIZE(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
|
||||
#define RANDOMIZE_32(Max) GetRandomValue(Max);
|
||||
#define CATEGORY_NPC 0
|
||||
#define CATEGORY_ITEMS 1
|
||||
#define CATEGORY_MENU 2
|
||||
#define CATEGORY_HUD 3
|
||||
#define CATEGORY_MISC 4
|
||||
|
||||
#define PATCH_GFX(path, name, cvar, index, instruction) \
|
||||
if (CVar_GetS32(cvar, 0)) { \
|
||||
@ -26,509 +19,9 @@ typedef struct {
|
||||
bool sameLine;
|
||||
} CosmeticsColorIndividual;
|
||||
|
||||
typedef struct {
|
||||
CosmeticsColorIndividual* Element;
|
||||
bool Nextcol;
|
||||
bool NextLine;
|
||||
} CosmeticsColorSection;
|
||||
|
||||
static float TablesCellsWidth = 300.0f;
|
||||
static ImGuiTableColumnFlags FlagsTable = ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV;
|
||||
static ImGuiTableColumnFlags FlagsCell = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_NoSort;
|
||||
static ImVec4 hearts_colors; static ImVec4 hearts_dd_colors; static ImVec4 hearts_ddi_colors;
|
||||
static ImVec4 a_btn_colors; static ImVec4 b_btn_colors; static ImVec4 c_btn_colors; static ImVec4 start_btn_colors;
|
||||
static ImVec4 c_btn_u_colors; static ImVec4 c_btn_l_colors; static ImVec4 c_btn_d_colors; static ImVec4 c_btn_r_colors;
|
||||
static ImVec4 magic_border_colors; static ImVec4 magic_remaining_colors; static ImVec4 magic_use_colors;
|
||||
static ImVec4 minimap_colors; static ImVec4 dgn_minimap_colors;
|
||||
static ImVec4 cp_minimap_colors; static ImVec4 le_minimap_colors;
|
||||
static ImVec4 rupee_colors; static ImVec4 smolekey_colors; static ImVec4 magic_bordern_colors;
|
||||
static ImVec4 fileselect_colors; static ImVec4 fileselect_text_colors;
|
||||
static ImVec4 kokiri_col; static ImVec4 goron_col; static ImVec4 zora_col;
|
||||
static ImVec4 silvergaunts_col; static ImVec4 goldengaunts_col;
|
||||
static ImVec4 mirrorshield_border_col;static ImVec4 mirrorshield_mirror_col; static ImVec4 mirrorshield_emblem_col;
|
||||
static ImVec4 navi_idle_i_col; static ImVec4 navi_idle_o_col;
|
||||
static ImVec4 navi_npc_i_col; static ImVec4 navi_npc_o_col;
|
||||
static ImVec4 navi_enemy_i_col; static ImVec4 navi_enemy_o_col;
|
||||
static ImVec4 navi_prop_i_col; static ImVec4 navi_prop_o_col;
|
||||
static ImVec4 swordtrailtop_col; static ImVec4 swordtrailbottom_col;
|
||||
static ImVec4 boomtrailstart_col; static ImVec4 boomtrailend_col;
|
||||
static ImVec4 bombtrail_col;
|
||||
static ImVec4 crtfilter;
|
||||
static ImVec4 normalarrow_col; static ImVec4 firearrow_col; static ImVec4 icearrow_col; static ImVec4 lightarrow_col;
|
||||
static ImVec4 normalarrow_colenv; static ImVec4 firearrow_colenv; static ImVec4 icearrow_colenv; static ImVec4 lightarrow_colenv;
|
||||
static ImVec4 charged1_col; static ImVec4 charged2_col;
|
||||
static ImVec4 charged1_colenv; static ImVec4 charged2_colenv;
|
||||
static ImVec4 Keese1_primcol; static ImVec4 Keese2_primcol;
|
||||
static ImVec4 Keese1_envcol; static ImVec4 Keese2_envcol;
|
||||
static ImVec4 doggo1col; static ImVec4 doggo2col;
|
||||
static ImVec4 df_col; static ImVec4 df_colenv;
|
||||
static ImVec4 nl_diam_col; static ImVec4 nl_diam_colenv;
|
||||
static ImVec4 nl_orb_col; static ImVec4 nl_orb_colenv;
|
||||
static ImVec4 tc_ou_colors; static ImVec4 tc_bu_colors;
|
||||
static ImVec4 dpad_colors;
|
||||
static ImVec4 visualagony_colors;
|
||||
static ImVec4 tc_fire_colors; static ImVec4 tc_fire_colors_env;
|
||||
/*ImVec4 menu_equips_colors;
|
||||
ImVec4 menu_items_colors;
|
||||
ImVec4 menu_map_colors;
|
||||
ImVec4 menu_quest_colors;
|
||||
ImVec4 menu_save_colors;
|
||||
ImVec4 menu_gameover_colors;*/
|
||||
|
||||
//Navi
|
||||
static CosmeticsColorIndividual Navi_Idle_Inner = { "Navi Idle (Primary)", "Inner color for Navi (idle flying around)", "gNavi_Idle_Inner", navi_idle_i_col, ImVec4(255, 255, 255, 255), false, false, false };
|
||||
static CosmeticsColorIndividual Navi_Idle_Outer = { "Navi Idle (Secondary)", "Outer color for Navi (idle flying around)", "gNavi_Idle_Outer", navi_idle_o_col, ImVec4(0, 0, 255, 255), false, false, false };
|
||||
static CosmeticsColorIndividual Navi_Npc_Inner = { "Navi NPC (Primary)", "Inner color for Navi (when Navi fly around NPCs)", "gNavi_NPC_Inner", navi_npc_i_col, ImVec4(150, 150, 255, 255), false, false, false };
|
||||
static CosmeticsColorIndividual Navi_Npc_Outer = { "Navi NPC (Secondary)", "Outer color for Navi (when Navi fly around NPCs)", "gNavi_NPC_Outer", navi_npc_o_col, ImVec4(150, 150, 255, 255), false, false, false };
|
||||
static CosmeticsColorIndividual Navi_Enemy_Inner = { "Navi Enemy (Primary)", "Inner color for Navi (when Navi fly around Enemies or Bosses)", "gNavi_Enemy_Inner", navi_enemy_i_col, ImVec4(255, 255, 0, 255), false, false, false };
|
||||
static CosmeticsColorIndividual Navi_Enemy_Outer = { "Navi Enemy (Secondary)", "Outer color for Navi (when Navi fly around Enemies or Bosses)", "gNavi_Enemy_Outer", navi_enemy_o_col, ImVec4(220, 155, 0, 255), false, false, false };
|
||||
static CosmeticsColorIndividual Navi_Prop_Inner = { "Navi Props (Primary)", "Inner color for Navi (when Navi fly around props (signs etc))", "gNavi_Prop_Inner", navi_prop_i_col, ImVec4(0, 255, 0, 255), false, false, false };
|
||||
static CosmeticsColorIndividual Navi_Prop_Outer = { "Navi Props (Secondary)", "Outer color for Navi (when Navi fly around props (signs etc))", "gNavi_Prop_Outer", navi_prop_o_col, ImVec4(0, 255, 0, 255), false, false, false };
|
||||
|
||||
//Keese
|
||||
static CosmeticsColorIndividual Keese1_prim = { "Fire Primary color", "Affects the primary color of the Fire itself of the Keese", "gKeese1_Ef_Prim", Keese1_primcol, ImVec4(255, 255, 100, 255), true, false, false };
|
||||
static CosmeticsColorIndividual Keese2_prim = { "Ice Primary color", "Affects the primary color of the Ice itself of the Keese", "gKeese2_Ef_Prim", Keese2_primcol, ImVec4(100, 200, 255, 255), true, false, false };
|
||||
static CosmeticsColorIndividual Keese1_env = { "Fire Secondary color", "Affects the secondary color of the Fire itself of the Keese", "gKeese1_Ef_Env", Keese1_envcol, ImVec4(255, 50, 0, 255), true, false, false };
|
||||
static CosmeticsColorIndividual Keese2_env = { "Ice Secondary color", "Affects the secondary color of the Ice itself of the Keese", "gKeese2_Ef_Env", Keese2_envcol, ImVec4(0, 0, 255, 255), true, false, false };
|
||||
|
||||
//Good old Dogs, we all love them
|
||||
static CosmeticsColorIndividual DogN1 = { "Dog white", "Affects the colors of the white dog", "gDog1Col", doggo1col, ImVec4(255,255,200,255), true, false, true };
|
||||
static CosmeticsColorIndividual DogN2 = { "Dog brown", "Affects the colors of the brown dog", "gDog2Col", doggo2col, ImVec4(150,100,50,255), true, false, true };
|
||||
|
||||
//Tunic colors
|
||||
static CosmeticsColorIndividual KokiriTunic = { "Kokiri Tunic", "Affects Kokiri Tunic color", "gTunic_Kokiri", kokiri_col, ImVec4(30, 105, 27, 255), true, false, true };
|
||||
static CosmeticsColorIndividual GoronTunic = { "Goron Tunic", "Affects Goron Tunic color", "gTunic_Goron", goron_col, ImVec4(100, 20, 0, 255), true, false, true };
|
||||
static CosmeticsColorIndividual ZoraTunic = { "Zora Tunic", "Affects Zora Tunic color", "gTunic_Zora", zora_col, ImVec4(0, 60, 100, 255), true, false, true };
|
||||
|
||||
//Gauntlet colors
|
||||
static CosmeticsColorIndividual SilverGauntlets = { "Silver Gauntlets", "Affects Silver Gauntlets color", "gGauntlets_Silver", silvergaunts_col, ImVec4(255, 255, 255, 255), true, false, true };
|
||||
static CosmeticsColorIndividual GoldenGauntlets = { "Golden Gauntlets", "Affects Golden Gauntlets color", "gGauntlets_Golden", goldengaunts_col, ImVec4(254, 207, 15, 255), true, false, true };
|
||||
|
||||
//Mirror Shield colors
|
||||
static CosmeticsColorIndividual MirrorShieldBorder = { "Mirror Shield Border", "Affects Mirror Shield Border color", "gMirrorShield_Border", mirrorshield_border_col, ImVec4(215, 0, 0, 255), false, false, true };
|
||||
static CosmeticsColorIndividual MirrorShieldMirror = { "Mirror Shield Mirror", "Affects Mirror Shield Mirror color", "gMirrorShield_Mirror", mirrorshield_mirror_col, ImVec4(255, 255, 255, 255), false, false, true };
|
||||
static CosmeticsColorIndividual MirrorShieldEmblem = { "Mirror Shield Emblem", "Affects Mirror Shield Emblem color", "gMirrorShield_Emblem", mirrorshield_emblem_col, ImVec4(205, 225, 255, 255), false, false, true };
|
||||
|
||||
//Arrows (Fire -> Ice -> Light)
|
||||
static CosmeticsColorIndividual Normal_Arrow_Prim = { "Normal Arrows (primary)", "Affects Primary color", "gNormalArrowCol", normalarrow_col, ImVec4(255, 255, 170, 255), true, false, false };
|
||||
static CosmeticsColorIndividual Normal_Arrow_Env = { "Normal Arrows (Secondary)", "Affects Secondary color", "gNormalArrowColEnv", normalarrow_colenv, ImVec4(0, 150, 0, 0), true, false, false };
|
||||
static CosmeticsColorIndividual Fire_Arrow_Prim = { "Fire Arrows (primary)", "Affects Primary color", "gFireArrowCol", firearrow_col, ImVec4(255,200,0,255), true, false, false };
|
||||
static CosmeticsColorIndividual Fire_Arrow_Env = { "Fire Arrows (Secondary)", "Affects Secondary color", "gFireArrowColEnv", firearrow_colenv, ImVec4(255,0,0,255), true, false, false };
|
||||
static CosmeticsColorIndividual Ice_Arrow_Prim = { "Ice Arrows (Primary)", "Affects Primary color", "gIceArrowCol", icearrow_col, ImVec4(170,255,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual Ice_Arrow_Env = { "Ice Arrows (Secondary)", "Affects Secondary color", "gIceArrowColEnv", icearrow_colenv, ImVec4(0,0,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual Light_Arrow_Prim = { "Light Arrows (Primary)", "Affects Primary color", "gLightArrowCol", lightarrow_col, ImVec4(255,255,170,255), true, false, false };
|
||||
static CosmeticsColorIndividual Light_Arrow_Env = { "Light Arrows (Secondary)", "Affects Secondary color", "gLightArrowColEnv", lightarrow_colenv, ImVec4(255,255,0,255), true, false, false };
|
||||
|
||||
//Spells
|
||||
static CosmeticsColorIndividual Din_Fire_Prim = { "Din's Fire (primary)", "Affects Primary color", "gDF_Col", df_col, ImVec4(255,200,0,255), true, false, false };
|
||||
static CosmeticsColorIndividual Din_Fire_Env = { "Din's Fire (Secondary)", "Affects Secondary color", "gDF_Env", df_colenv, ImVec4(255,0,0,255), true, false, false };
|
||||
static CosmeticsColorIndividual Nayru_Diamond_Prim = { "Nayru's Love Diamond (primary)", "Affects Primary color", "gNL_Diamond_Col", nl_diam_col, ImVec4(170,255,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual Nayru_Diamond_Env = { "Nayru's Love Diamond (Secondary)", "Affects Secondary color", "gNL_Diamond_Env", nl_diam_colenv, ImVec4(100,255,128,255), true, false, false };
|
||||
static CosmeticsColorIndividual Nayru_Orb_Prim = { "Nayru's Love Orb (primary)", "Affects Primary color", "gNL_Orb_Col", nl_orb_col, ImVec4(170,255,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual Nayru_Orb_Env = { "Nayru's Love Orb (Secondary)", "Affects Secondary color", "gNL_Orb_Env", nl_orb_colenv, ImVec4(150,255,255,255), true, false, false };
|
||||
|
||||
//Spin attacks colors
|
||||
static CosmeticsColorIndividual Spin_Lv1_Prim = { "Level 1 (primary)", "Affects Primary color", "gCharged1Col", charged1_col, ImVec4(170,255,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual Spin_Lv1_Env = { "Level 1 (Secondary)", "Affects Secondary color", "gCharged1ColEnv", charged1_colenv, ImVec4(0,100,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual Spin_Lv2_Prim = { "Level 2 (primary)", "Affects Primary color", "gCharged2Col", charged2_col, ImVec4(255,255,170,255), true, false, false };
|
||||
static CosmeticsColorIndividual Spin_Lv2_Env = { "Level 2 (Secondary)", "Affects Secondary color", "gCharged2ColEnv", charged2_colenv, ImVec4(255,100,0,255), true, false, false };
|
||||
|
||||
//Trails
|
||||
static CosmeticsColorIndividual Sword_Trails_Top_col = { "Sword Trail Top Color", "Affects top of sword slash", "gSwordTrailTopCol", swordtrailtop_col, ImVec4(255,255,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual Sword_Trails_Bottom_col = { "Sword Trail End Color", "Affects bottom of sword slash", "gSwordTrailBottomCol", swordtrailbottom_col, ImVec4(255,255,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual Boom_Trails_Start_col = { "Boomerang Trail Start Color", "Affects start of boomerang trail", "gBoomTrailStartCol", boomtrailstart_col, ImVec4(255,255,100,255), true, false, false };
|
||||
static CosmeticsColorIndividual Boom_Trails_End_col = { "Boomerang Trail End Color", "Affects end of boomerang trail", "gBoomTrailEndCol", boomtrailend_col, ImVec4(255,255,100,255), true, false, false };
|
||||
static CosmeticsColorIndividual Bomb_Trails_col = { "Bombchu Trail Color", "Affects Bomchus", "gBombTrailCol", bombtrail_col, ImVec4(250,0,0,255), true, false, false };
|
||||
|
||||
|
||||
static CosmeticsColorIndividual KSword_Trails_Top_col = { "Kokiri Sword Top Color", "Affects top of sword slash", "gKSwordTrailTopCol", swordtrailtop_col, ImVec4(255,255,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual KSword_Trails_Bottom_col = { "Kokiri Sword End Color", "Affects bottom of sword slash", "gKSwordTrailBottomCol", swordtrailbottom_col, ImVec4(255,255,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual MSword_Trails_Top_col = { "Master Sword Top Color", "Affects top of sword slash", "gMSwordTrailTopCol", swordtrailtop_col, ImVec4(255,255,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual MSword_Trails_Bottom_col = { "Master Sword End Color", "Affects bottom of sword slash", "gMSwordTrailBottomCol", swordtrailbottom_col, ImVec4(255,255,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual BSword_Trails_Top_col = { "BG Sword Top Color", "Affects top of sword slash", "gBSwordTrailTopCol", swordtrailtop_col, ImVec4(255,255,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual BSword_Trails_Bottom_col = { "BG Sword End Color", "Affects bottom of sword slash", "gBSwordTrailBottomCol", swordtrailbottom_col, ImVec4(255,255,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual Stick_Trails_Top_col = { "Stick Top Color", "Affects top of stick swing", "gStickTrailTopCol", swordtrailtop_col, ImVec4(255,255,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual Stick_Trails_Bottom_col = { "Stick End Color", "Affects bottom of stick swing", "gStickTrailBottomCol", swordtrailbottom_col, ImVec4(255,255,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual Hammer_Trails_Top_col = { "Hammer Top Color", "Affects top of hammer swing", "gHammerTrailTopCol", swordtrailtop_col, ImVec4(255,255,255,255), true, false, false };
|
||||
static CosmeticsColorIndividual Hammer_Trails_Bottom_col = { "Hammer End Color", "Affects bottom of hammer swing", "gHammerTrailBottomCol", swordtrailbottom_col, ImVec4(255,255,255,255), true, false, false };
|
||||
|
||||
//Menus - File Choose
|
||||
static CosmeticsColorIndividual FileChoose_Background = { "Main menu color", "Affects the File Select menu background.", "gCCFileChoosePrim", fileselect_colors, ImVec4(100, 150, 255, 255), true, false, false };
|
||||
static CosmeticsColorIndividual FileChoose_BottomText = { "Bottom texts color", "Affects the File Select texts.", "gCCFileChooseTextPrim", fileselect_text_colors, ImVec4(100, 255, 255, 255), true, false, false };
|
||||
|
||||
//Hud Stuff (Dpad, Buttons etc)
|
||||
static CosmeticsColorIndividual A_Btn = { "A Button", "Affects the A button colors (and various cursors that use the same theme)", "gCCABtnPrim", a_btn_colors, ImVec4(0, 200, 50, 255), true, false, false };
|
||||
static CosmeticsColorIndividual B_Btn = { "B Button", "Affects the B button color", "gCCBBtnPrim", b_btn_colors, ImVec4(255, 30, 30, 255), true, false, false };
|
||||
static CosmeticsColorIndividual C_Btn = { "C-Buttons", "Affects the C Buttons' color (if not using separate colors)\nAnd various cursor that use C-Buttons colors", "gCCCBtnPrim", c_btn_colors, ImVec4(255, 160, 0, 255), true, false, false };
|
||||
static CosmeticsColorIndividual C_Btn_U = { "C-Buttons Up", "Affects C-Buttons Up colors, but not C cursor colors\nTo edit C Cursor check C-Buttons color on top", "gCCCUBtnPrim", c_btn_u_colors, ImVec4(255,160,0,255), true, false, false };
|
||||
static CosmeticsColorIndividual C_Btn_D = { "C-Buttons Down", "Affects C-Buttons Down colors, but not C cursor colors\nTo edit C Cursor check C-Buttons color on top", "gCCCDBtnPrim", c_btn_d_colors, ImVec4(255,160,0,255), true, false, false };
|
||||
static CosmeticsColorIndividual C_Btn_L = { "C-Buttons Left", "Affects C-Buttons Left colors, but not C cursor colors\nTo edit C Cursor check C-Buttons color on top", "gCCCLBtnPrim", c_btn_l_colors, ImVec4(255,160,0,255), true, false, false };
|
||||
static CosmeticsColorIndividual C_Btn_R = { "C-Buttons Right", "Affects C-Buttons Right colors, but not C cursor colors\nTo edit C Cursor check C-Buttons color on top", "gCCCRBtnPrim", c_btn_r_colors, ImVec4(255,160,0,255), true, false, false };
|
||||
static CosmeticsColorIndividual Start_btn = { "Start Button", "Affects the Start button color", "gCCStartBtnPrim", start_btn_colors, ImVec4(200, 0, 0, 255), true, false, false };
|
||||
static CosmeticsColorIndividual DPad_Items = { "DPad background", "DPad background color, White is the default value", "gCCDpadPrim", dpad_colors, ImVec4(255, 255, 255, 255), true, false, false };
|
||||
|
||||
//Hearts colors
|
||||
static CosmeticsColorIndividual Hearts_NInner = { "Inner (Normal)", "Affects the inner color", "gCCHeartsPrim", hearts_colors, ImVec4(255,70,50,255), true, false, false };
|
||||
static CosmeticsColorIndividual Hearts_DDInner = { "Inner (Double defense)", "Affects the inner color", "gCCDDHeartsPrim", hearts_ddi_colors, ImVec4(200,00,00,255), true, false, false };
|
||||
static CosmeticsColorIndividual Hearts_DDOutline = { "Outline (Double defense)", "Affects the outline color of hearts when you have Double Defense\nWhite is the default value", "gDDCCHeartsPrim", hearts_dd_colors, ImVec4(255,255,255,255), true, false, false };
|
||||
|
||||
//Magic Meter colors
|
||||
static CosmeticsColorIndividual Magic_Borders = { "Borders", "Affects the border of the magic meter\nWhite is the default value, color change only when used one time", "gCCMagicBorderNormPrim", magic_bordern_colors, ImVec4(255,255,255,255), false, false, false };
|
||||
static CosmeticsColorIndividual Magic_InUse_Borders = { "Borders in use", "Affects the border of the magic meter when being used\nWhite is the default value", "gCCMagicBorderPrim", magic_border_colors, ImVec4(255,255,255,255), false, false, false };
|
||||
static CosmeticsColorIndividual Magic_Meter = { "Main color", "Affects the magic meter color\nGreen is the default value", "gCCMagicPrim", magic_remaining_colors, ImVec4(0,200,0,255), true, false, false };
|
||||
static CosmeticsColorIndividual Magic_InUse_Meter = { "Main color in use", "Affects the magic meter when being used\nYellow is the default value", "gCCMagicUsePrim", magic_use_colors, ImVec4(250,250,0,255), true, false, false };
|
||||
|
||||
//Minimap and it's arrow colors
|
||||
static CosmeticsColorIndividual Minimap_OW = { "Overworlds", "Affects the Overworld minimaps", "gCCMinimapPrim", minimap_colors, ImVec4(0, 255, 255, 255), true, false, false };
|
||||
static CosmeticsColorIndividual Minimap_DG = { "Dungeons", "Affects the Dungeon minimaps", "gCCMinimapDGNPrim", dgn_minimap_colors, ImVec4(100, 255, 255, 255), true, false, false };
|
||||
static CosmeticsColorIndividual Minimap_CP = { "Current position arrow", "Affects the current position arrow on the minimap\nYellow is the default value", "gCCMinimapCPPrim", cp_minimap_colors, ImVec4(200, 255, 0, 255), true, false, false };
|
||||
static CosmeticsColorIndividual Minimap_LE = { "Last entrance arrow", "Affects the last entrance position arrow on the minimap\nRed is the default value", "gCCMinimapLEPrim", le_minimap_colors, ImVec4(200, 0, 0, 255), true, false, false };
|
||||
|
||||
//Title Cards colors
|
||||
static CosmeticsColorIndividual TitleCards_OW = { "Main color (Overworld)", "Affects all the overworld title cards color, white is the default value", "gCCTC_OW_U_Prim", tc_ou_colors, ImVec4(255, 255, 255, 255), false, false, false };
|
||||
static CosmeticsColorIndividual TitleCards_DG = { "Main color (Dungeon)", "Affects all the bosses title cards color, white is the default value", "gCCTC_B_U_Prim", tc_bu_colors, ImVec4(255, 255, 255, 255), false, false, false };
|
||||
|
||||
//Misc. colors, the one I have no clue where to put nor that aren't that important
|
||||
#ifdef MASTER_QUEST
|
||||
static CosmeticsColorIndividual TitleScreen_fire_Prim = { "Opening logo fire (Primary)", "Affects the fire behind the title screen logo", "gCCTCFirePrim", tc_fire_colors, ImVec4(170, 255, 255, 255), false, false, false };
|
||||
static CosmeticsColorIndividual TitleScreen_fire_Env = { "Opening logo fire (Secondary)", "Affects the fire behind the title screen logo", "gCCTCFireEnv", tc_fire_colors_env, ImVec4(200, 255, 0, 255), false, false, false };
|
||||
#else
|
||||
static CosmeticsColorIndividual TitleScreen_fire_Prim = { "Opening logo fire (Primary)", "Affects the fire behind the title screen logo", "gCCTCFirePrim", tc_fire_colors, ImVec4(255, 255, 170, 255), false, false, false };
|
||||
static CosmeticsColorIndividual TitleScreen_fire_Env = { "Opening logo fire (Secondary)", "Affects the fire behind the title screen logo", "gCCTCFireEnv", tc_fire_colors_env, ImVec4(255, 100, 0, 255), false, false, false };
|
||||
#endif
|
||||
static CosmeticsColorIndividual Rupee_Icon = { "Rupee icon", "Affects the Rupee icon on interface\nGreen is the default value", "gCCRupeePrim", rupee_colors, ImVec4(200, 255, 100, 255), true, false, false };
|
||||
static CosmeticsColorIndividual SmallKeys_Icon = { "Small Keys icon", "Affects the Small keys icon on interface\nGray is the default value", "gCCKeysPrim", smolekey_colors, ImVec4(200, 230, 255, 255), true, false, false };
|
||||
static CosmeticsColorIndividual VSOA_Icon = { "Visual Stone of agony icon", "Affects the Stone of Agony icon on interface\nWhite is the default value\nRequire room reload or activation", "gCCVSOAPrim", visualagony_colors, ImVec4(255, 255, 255, 255), true, false, false };
|
||||
|
||||
//Sections creation, here I regroup them in some sort of a Theme, all navi stuff together etc. It will be used to create the menu.
|
||||
static CosmeticsColorSection Navi_Section[] = {
|
||||
{ &Navi_Idle_Inner, false, false },
|
||||
{ &Navi_Idle_Outer, true, false },
|
||||
{ &Navi_Npc_Inner, false, true },
|
||||
{ &Navi_Npc_Outer, true, false },
|
||||
{ &Navi_Enemy_Inner, false, true },
|
||||
{ &Navi_Enemy_Outer, true, false },
|
||||
{ &Navi_Prop_Inner, false, true },
|
||||
{ &Navi_Prop_Outer, true, false }
|
||||
};
|
||||
static CosmeticsColorSection Keese_Section[] = {
|
||||
{ &Keese1_prim, false, false },
|
||||
{ &Keese2_prim, true, false },
|
||||
{ &Keese1_env, false, true },
|
||||
{ &Keese2_env, true, false }
|
||||
};
|
||||
static CosmeticsColorSection Dogs_Section[] = {
|
||||
{ &DogN1, false, false },
|
||||
{ &DogN2, true, false }
|
||||
};
|
||||
static CosmeticsColorSection Tunics_Section[] = {
|
||||
{ &KokiriTunic, false, false },
|
||||
{ &GoronTunic, true, false },
|
||||
{ &ZoraTunic, true, false }
|
||||
};
|
||||
static CosmeticsColorSection Gauntlets_Section[] = {
|
||||
{ &SilverGauntlets, false, false },
|
||||
{ &GoldenGauntlets, true, false },
|
||||
};
|
||||
static CosmeticsColorSection MirrorShield_Section[] = {
|
||||
{ &MirrorShieldBorder, false, false },
|
||||
{ &MirrorShieldMirror, true, false },
|
||||
{ &MirrorShieldEmblem, true, false },
|
||||
};
|
||||
static CosmeticsColorSection Arrows_section[] = {
|
||||
{ &Normal_Arrow_Prim, false, false },
|
||||
{ &Normal_Arrow_Env, true, false },
|
||||
{ &Fire_Arrow_Prim, false, true },
|
||||
{ &Fire_Arrow_Env, true, false },
|
||||
{ &Ice_Arrow_Prim, false, true },
|
||||
{ &Ice_Arrow_Env, true, false },
|
||||
{ &Light_Arrow_Prim, false, true },
|
||||
{ &Light_Arrow_Env, true, false }
|
||||
};
|
||||
static CosmeticsColorSection Spells_section[] = {
|
||||
{ &Din_Fire_Prim, false, false },
|
||||
{ &Din_Fire_Env, true, false },
|
||||
{ &Nayru_Diamond_Prim, false, true },
|
||||
{ &Nayru_Diamond_Env, true, false },
|
||||
{ &Nayru_Orb_Prim, false, true },
|
||||
{ &Nayru_Orb_Env, true, false }
|
||||
};
|
||||
static CosmeticsColorSection SpinAtk_section[] = {
|
||||
{ &Spin_Lv1_Prim, false, false },
|
||||
{ &Spin_Lv1_Env, true, false },
|
||||
{ &Spin_Lv2_Prim, false, true },
|
||||
{ &Spin_Lv2_Env, true, false } };
|
||||
|
||||
static CosmeticsColorSection Trail_section[] = {
|
||||
{ &Sword_Trails_Top_col, false, false },
|
||||
{ &Sword_Trails_Bottom_col, false, false },
|
||||
{ &Boom_Trails_Start_col, true, false },
|
||||
{ &Boom_Trails_End_col, false, false },
|
||||
{ &Bomb_Trails_col, true, false }
|
||||
};
|
||||
static CosmeticsColorSection SwordTrail_section[] = {
|
||||
{ &KSword_Trails_Top_col, false, false },
|
||||
{ &KSword_Trails_Bottom_col, false, false },
|
||||
{ &MSword_Trails_Top_col, true, false },
|
||||
{ &MSword_Trails_Bottom_col, false, false },
|
||||
{ &BSword_Trails_Top_col, true, false },
|
||||
{ &BSword_Trails_Bottom_col, false, false },
|
||||
{ &Stick_Trails_Top_col, true, false },
|
||||
{ &Stick_Trails_Bottom_col, false, false },
|
||||
{ &Hammer_Trails_Top_col, true, false },
|
||||
{ &Hammer_Trails_Bottom_col, false, false },
|
||||
};
|
||||
static CosmeticsColorSection AllTrail_section[] = {
|
||||
{ &Sword_Trails_Top_col, false, false },
|
||||
{ &Sword_Trails_Bottom_col, false, false },
|
||||
{ &Boom_Trails_Start_col, true, false },
|
||||
{ &Boom_Trails_End_col, false, false },
|
||||
{ &Bomb_Trails_col, true, false },
|
||||
{ &KSword_Trails_Top_col, false, false },
|
||||
{ &KSword_Trails_Bottom_col, false, false },
|
||||
{ &MSword_Trails_Top_col, true, false },
|
||||
{ &MSword_Trails_Bottom_col, false, false },
|
||||
{ &BSword_Trails_Top_col, true, false },
|
||||
{ &BSword_Trails_Bottom_col, false, false },
|
||||
{ &Stick_Trails_Top_col, true, false },
|
||||
{ &Stick_Trails_Bottom_col, false, false },
|
||||
{ &Hammer_Trails_Top_col, true, false },
|
||||
{ &Hammer_Trails_Bottom_col, false, false },
|
||||
};
|
||||
static CosmeticsColorSection FileChoose_section[] = {
|
||||
{ &FileChoose_Background, false, false },
|
||||
{ &FileChoose_BottomText, true, false }
|
||||
};
|
||||
static CosmeticsColorSection A_Btn_section[] = {
|
||||
{ &A_Btn, false, false }
|
||||
};
|
||||
static CosmeticsColorSection B_Btn_section[] = {
|
||||
{ &B_Btn, false, false }
|
||||
};
|
||||
static CosmeticsColorSection C_Btn_Unified_section[] = {
|
||||
{ &C_Btn, false, false }
|
||||
};
|
||||
static CosmeticsColorSection C_Btn_Separated_section[] = {
|
||||
{ &C_Btn_U, false, false },
|
||||
{ &C_Btn_D, false, true },
|
||||
{ &C_Btn_L, false, true },
|
||||
{ &C_Btn_R, false, true }
|
||||
};
|
||||
static CosmeticsColorSection Start_Btn_section[] = {
|
||||
{ &Start_btn, false, false }
|
||||
};
|
||||
static CosmeticsColorSection DPad_section[] = {
|
||||
{ &DPad_Items, false, false }
|
||||
};
|
||||
static CosmeticsColorSection Hearts_section[] = {
|
||||
{ &Hearts_NInner, false, false },
|
||||
{ &Hearts_DDInner, true, false },
|
||||
{ &Hearts_DDOutline, true, false }
|
||||
};
|
||||
static CosmeticsColorSection Magic_Meter_section[] = {
|
||||
{ &Magic_Borders, false, false },
|
||||
{ &Magic_InUse_Borders, true, false },
|
||||
{ &Magic_Meter, false, true },
|
||||
{ &Magic_InUse_Meter, true, false }
|
||||
};
|
||||
static CosmeticsColorSection Minimap_section[] = {
|
||||
{ &Minimap_OW, false, false },
|
||||
{ &Minimap_DG, false, true },
|
||||
{ &Minimap_CP, false, true },
|
||||
{ &Minimap_LE, false, true }
|
||||
};
|
||||
static CosmeticsColorSection TitleCards_section[] = {
|
||||
{ &TitleCards_OW, false, false },
|
||||
{ &TitleCards_DG, true, false }
|
||||
};
|
||||
static CosmeticsColorSection Misc_section[] = {
|
||||
{ &Rupee_Icon, false, false },
|
||||
{ &SmallKeys_Icon, false, true },
|
||||
{ &VSOA_Icon, false, true },
|
||||
{ &TitleScreen_fire_Prim, false, true },
|
||||
{ &TitleScreen_fire_Env, false, true }
|
||||
};
|
||||
|
||||
//Randomizer specific stuff (by randomizer I mean within cosmetics, these section are there just for the purpose of randomizing their colors)
|
||||
static CosmeticsColorSection Everything_Section[] = {
|
||||
{ &TitleScreen_fire_Prim, false, true },
|
||||
{ &TitleScreen_fire_Env, false, true },
|
||||
{ &Navi_Idle_Inner, false, false },
|
||||
{ &Navi_Idle_Outer, true, false },
|
||||
{ &Navi_Npc_Inner, false, true },
|
||||
{ &Navi_Npc_Outer, true, false },
|
||||
{ &Navi_Enemy_Inner, false, true },
|
||||
{ &Navi_Enemy_Outer, true, false },
|
||||
{ &Navi_Prop_Inner, false, true },
|
||||
{ &Navi_Prop_Outer, true, false },
|
||||
{ &Keese1_prim, false, false },
|
||||
{ &Keese2_prim, true, false },
|
||||
{ &Keese1_env, false, true },
|
||||
{ &Keese2_env, true, false },
|
||||
{ &DogN1, false, false },
|
||||
{ &DogN2, true, false },
|
||||
{ &KokiriTunic, false, false },
|
||||
{ &GoronTunic, true, false },
|
||||
{ &ZoraTunic, true, false },
|
||||
{ &SilverGauntlets, true, false },
|
||||
{ &GoldenGauntlets, true, false },
|
||||
{ &MirrorShieldBorder, false, false },
|
||||
{ &MirrorShieldMirror, true, false },
|
||||
{ &MirrorShieldEmblem, true, false },
|
||||
{ &Normal_Arrow_Prim, false, false },
|
||||
{ &Normal_Arrow_Env, true, false },
|
||||
{ &Fire_Arrow_Prim, false, true },
|
||||
{ &Fire_Arrow_Env, true, false },
|
||||
{ &Ice_Arrow_Prim, false, true },
|
||||
{ &Ice_Arrow_Env, true, false },
|
||||
{ &Light_Arrow_Prim, false, true },
|
||||
{ &Light_Arrow_Env, true, false },
|
||||
{ &Din_Fire_Prim, false, false },
|
||||
{ &Din_Fire_Env, true, false },
|
||||
{ &Nayru_Diamond_Prim, false, true },
|
||||
{ &Nayru_Diamond_Env, true, false },
|
||||
{ &Nayru_Orb_Prim, false, true },
|
||||
{ &Nayru_Orb_Env, true, false },
|
||||
{ &Spin_Lv1_Prim, false, false },
|
||||
{ &Spin_Lv1_Env, true, false },
|
||||
{ &Spin_Lv2_Prim, false, true },
|
||||
{ &Spin_Lv2_Env, true, false },
|
||||
{ &Sword_Trails_Top_col, false, false },
|
||||
{ &Sword_Trails_Bottom_col, false, false },
|
||||
{ &Boom_Trails_Start_col, true, false },
|
||||
{ &Boom_Trails_End_col, false, false },
|
||||
{ &Bomb_Trails_col, true, false },
|
||||
{ &KSword_Trails_Top_col, false, false },
|
||||
{ &KSword_Trails_Bottom_col, false, false },
|
||||
{ &MSword_Trails_Top_col, true, false },
|
||||
{ &MSword_Trails_Bottom_col, false, false },
|
||||
{ &BSword_Trails_Top_col, true, false },
|
||||
{ &BSword_Trails_Bottom_col, false, false },
|
||||
{ &Stick_Trails_Top_col, true, false },
|
||||
{ &Stick_Trails_Bottom_col, false, false },
|
||||
{ &Hammer_Trails_Top_col, true, false },
|
||||
{ &Hammer_Trails_Bottom_col, false, false },
|
||||
{ &FileChoose_Background, false, false },
|
||||
{ &FileChoose_BottomText, true, false },
|
||||
{ &A_Btn, false, false },
|
||||
{ &B_Btn, false, false },
|
||||
{ &C_Btn, false, false },
|
||||
{ &C_Btn_U, false, false },
|
||||
{ &C_Btn_D, false, true },
|
||||
{ &C_Btn_L, false, true },
|
||||
{ &C_Btn_R, false, true },
|
||||
{ &Start_btn, false, false },
|
||||
{ &DPad_Items, false, false },
|
||||
{ &Hearts_NInner, false, false },
|
||||
{ &Hearts_DDInner, true, false },
|
||||
{ &Hearts_DDOutline, true, false },
|
||||
{ &Magic_Borders, false, false },
|
||||
{ &Magic_InUse_Borders, true, false },
|
||||
{ &Magic_Meter, false, true },
|
||||
{ &Magic_InUse_Meter, true, false },
|
||||
{ &Minimap_OW, false, false },
|
||||
{ &Minimap_DG, false, true },
|
||||
{ &Minimap_CP, false, true },
|
||||
{ &Minimap_LE, false, true },
|
||||
{ &TitleCards_OW, false, false },
|
||||
{ &TitleCards_DG, true, false },
|
||||
{ &Rupee_Icon, false, false },
|
||||
{ &SmallKeys_Icon, false, true },
|
||||
{ &VSOA_Icon, false, true }
|
||||
};
|
||||
static CosmeticsColorSection Buttons_section[]{
|
||||
{ &DPad_Items, false, false },
|
||||
{ &C_Btn_U, false, false },
|
||||
{ &C_Btn_D, false, true },
|
||||
{ &C_Btn_L, false, true },
|
||||
{ &C_Btn_R, false, true },
|
||||
{ &C_Btn, false, false },
|
||||
{ &B_Btn, false, false },
|
||||
{ &A_Btn, false, false },
|
||||
{ &Start_btn, false, false }
|
||||
};
|
||||
static CosmeticsColorSection Misc_Interface_section[]{
|
||||
{ &Hearts_NInner, false, false },
|
||||
{ &Hearts_DDInner, true, false },
|
||||
{ &Hearts_DDOutline, true, false },
|
||||
{ &Magic_Borders, false, false },
|
||||
{ &Magic_InUse_Borders, true, false },
|
||||
{ &Magic_Meter, false, true },
|
||||
{ &Magic_InUse_Meter, true, false },
|
||||
{ &Minimap_OW, false, false },
|
||||
{ &Minimap_DG, false, true },
|
||||
{ &Minimap_CP, false, true },
|
||||
{ &Minimap_LE, false, true },
|
||||
{ &TitleCards_OW, false, false },
|
||||
{ &TitleCards_DG, true, false },
|
||||
{ &Rupee_Icon, false, false },
|
||||
{ &SmallKeys_Icon, false, true },
|
||||
{ &VSOA_Icon, false, true },
|
||||
{ &TitleScreen_fire_Prim, false, true },
|
||||
{ &TitleScreen_fire_Env, false, true }
|
||||
};
|
||||
static CosmeticsColorSection NPCs_section[]{
|
||||
{ &Navi_Idle_Inner, false, false },
|
||||
{ &Navi_Idle_Outer, true, false },
|
||||
{ &Navi_Npc_Inner, false, true },
|
||||
{ &Navi_Npc_Outer, true, false },
|
||||
{ &Navi_Enemy_Inner, false, true },
|
||||
{ &Navi_Enemy_Outer, true, false },
|
||||
{ &Navi_Prop_Inner, false, true },
|
||||
{ &Navi_Prop_Outer, true, false },
|
||||
{ &Keese1_prim, false, false },
|
||||
{ &Keese2_prim, true, false },
|
||||
{ &Keese1_env, false, true },
|
||||
{ &Keese2_env, true, false },
|
||||
{ &DogN1, false, false },
|
||||
{ &DogN2, true, false }
|
||||
};
|
||||
static CosmeticsColorSection AllItemsSkills_section[]{
|
||||
{ &KokiriTunic, false, false },
|
||||
{ &GoronTunic, true, false },
|
||||
{ &ZoraTunic, true, false },
|
||||
{ &SilverGauntlets, true, false },
|
||||
{ &GoldenGauntlets, true, false },
|
||||
{ &MirrorShieldBorder, false, false },
|
||||
{ &MirrorShieldMirror, true, false },
|
||||
{ &MirrorShieldEmblem, true, false },
|
||||
{ &Normal_Arrow_Prim, false, false },
|
||||
{ &Normal_Arrow_Env, true, false },
|
||||
{ &Fire_Arrow_Prim, false, true },
|
||||
{ &Fire_Arrow_Env, true, false },
|
||||
{ &Ice_Arrow_Prim, false, true },
|
||||
{ &Ice_Arrow_Env, true, false },
|
||||
{ &Light_Arrow_Prim, false, true },
|
||||
{ &Light_Arrow_Env, true, false },
|
||||
{ &Din_Fire_Prim, false, false },
|
||||
{ &Din_Fire_Env, true, false },
|
||||
{ &Nayru_Diamond_Prim, false, true },
|
||||
{ &Nayru_Diamond_Env, true, false },
|
||||
{ &Nayru_Orb_Prim, false, true },
|
||||
{ &Nayru_Orb_Env, true, false },
|
||||
{ &Spin_Lv1_Prim, false, false },
|
||||
{ &Spin_Lv1_Env, true, false },
|
||||
{ &Spin_Lv2_Prim, false, true },
|
||||
{ &Spin_Lv2_Env, true, false },
|
||||
{ &Sword_Trails_Top_col, false, false},
|
||||
{ &Sword_Trails_Bottom_col, false, false},
|
||||
{ &Boom_Trails_Start_col, true, false },
|
||||
{ &Boom_Trails_Start_col, true, false },
|
||||
{ &Boom_Trails_End_col, false, false },
|
||||
{ &Bomb_Trails_col, true, false },
|
||||
{ &KSword_Trails_Top_col, false, false },
|
||||
{ &KSword_Trails_Bottom_col, false, false },
|
||||
{ &MSword_Trails_Top_col, true, false },
|
||||
{ &MSword_Trails_Bottom_col, false, false },
|
||||
{ &BSword_Trails_Top_col, true, false },
|
||||
{ &BSword_Trails_Bottom_col, false, false },
|
||||
{ &Stick_Trails_Top_col, true, false },
|
||||
{ &Stick_Trails_Bottom_col, false, false },
|
||||
{ &Hammer_Trails_Top_col, true, false },
|
||||
{ &Hammer_Trails_Bottom_col, false, false }
|
||||
};
|
||||
|
||||
void InitCosmeticsEditor();//Init the menu itself
|
||||
void LoadRainbowColor();
|
||||
void NewSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue = 0);
|
||||
ImVec4 GetRandomValue(int MaximumPossible);
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <Cvar.h>
|
||||
#include "draw.h"
|
||||
#include "z64.h"
|
||||
#include "macros.h"
|
||||
@ -7,6 +8,7 @@
|
||||
#include "objects/object_gi_key/object_gi_key.h"
|
||||
#include "objects/object_gi_bosskey/object_gi_bosskey.h"
|
||||
#include "objects/object_gi_hearts/object_gi_hearts.h"
|
||||
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
|
||||
|
||||
extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEntry) {
|
||||
s32 pad;
|
||||
@ -155,3 +157,25 @@ extern "C" void Randomizer_DrawDoubleDefense(PlayState* play, GetItemEntry getIt
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
|
||||
extern "C" void Randomizer_DrawIceTrap(PlayState* play, GetItemEntry getItemEntry) {
|
||||
s32 pad;
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (CVar_GetS32("gLetItSnow", 0)) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
|
||||
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
gDPSetGrayscaleColor(POLY_OPA_DISP++, 100, 100, 100, 255);
|
||||
gSPGrayscale(POLY_OPA_DISP++, true);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gSilverRockDL);
|
||||
|
||||
gSPGrayscale(POLY_OPA_DISP++, false);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
@ -10,5 +10,6 @@ extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEn
|
||||
extern "C" void Randomizer_DrawKeyRing(PlayState* play, GetItemEntry* getItemEntry);
|
||||
extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEntry);
|
||||
extern "C" void Randomizer_DrawDoubleDefense(PlayState* play, GetItemEntry getItemEntry);
|
||||
extern "C" void Randomizer_DrawIceTrap(PlayState* play, GetItemEntry getItemEntry);
|
||||
|
||||
#endif
|
||||
|
@ -4458,6 +4458,13 @@ void CreateIceTrapRandoMessages() {
|
||||
{ TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM, IceTrapMessages[i].english,
|
||||
IceTrapMessages[i].german, IceTrapMessages[i].french });
|
||||
}
|
||||
|
||||
// We only use this ice trap message for christmas, so we don't want it in the normal ice trap messages rotation
|
||||
customMessageManager->CreateMessage(Randomizer::IceTrapRandoMessageTableID, NUM_ICE_TRAP_MESSAGES + 1,
|
||||
{ TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM,
|
||||
"This year for Christmas, all&you get is %BCOAL",
|
||||
"This year for Christmas, all&you get is %BCOAL",
|
||||
"This year for Christmas, all&you get is %BCOAL" });
|
||||
}
|
||||
|
||||
void Randomizer::CreateCustomMessages() {
|
||||
@ -4815,6 +4822,8 @@ void InitRandoItemTable() {
|
||||
randoGetItemTable[i].drawFunc = (CustomDrawFunc)Randomizer_DrawBossKey;
|
||||
} else if (randoGetItemTable[i].itemId == RG_DOUBLE_DEFENSE) {
|
||||
randoGetItemTable[i].drawFunc = (CustomDrawFunc)Randomizer_DrawDoubleDefense;
|
||||
} else if (randoGetItemTable[i].itemId == RG_ICE_TRAP) {
|
||||
randoGetItemTable[i].drawFunc = (CustomDrawFunc)Randomizer_DrawIceTrap;
|
||||
}
|
||||
ItemTableManager::Instance->AddItemEntry(MOD_RANDOMIZER, randoGetItemTable[i].itemId, randoGetItemTable[i]);
|
||||
}
|
||||
|
@ -449,6 +449,13 @@ extern "C" void InitOTR() {
|
||||
OTRExtScanner();
|
||||
VanillaItemTable_Init();
|
||||
|
||||
time_t now = time(NULL);
|
||||
tm *tm_now = localtime(&now);
|
||||
if (tm_now->tm_mon == 11 && tm_now->tm_mday >= 24 && tm_now->tm_mday <= 25) {
|
||||
CVar_RegisterS32("gLetItSnow", 1);
|
||||
} else {
|
||||
CVar_Clear("gLetItSnow");
|
||||
}
|
||||
#ifdef ENABLE_CROWD_CONTROL
|
||||
CrowdControl::Instance = new CrowdControl();
|
||||
CrowdControl::Instance->Init();
|
||||
@ -1924,6 +1931,9 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
if (player->getItemEntry.getItemId == RG_ICE_TRAP) {
|
||||
u16 iceTrapTextId = Random(0, NUM_ICE_TRAP_MESSAGES);
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::IceTrapRandoMessageTableID, iceTrapTextId);
|
||||
if (CVar_GetS32("gLetItSnow", 0)) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::IceTrapRandoMessageTableID, NUM_ICE_TRAP_MESSAGES + 1);
|
||||
}
|
||||
} else if (player->getItemEntry.getItemId >= RG_DEKU_TREE_MAP && player->getItemEntry.getItemId <= RG_ICE_CAVERN_MAP) {
|
||||
messageEntry = OTRGlobals::Instance->gRandomizer->GetMapGetItemMessageWithHint(player->getItemEntry);
|
||||
} else {
|
||||
|
@ -292,7 +292,8 @@ namespace UIWidgets {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, alpha);
|
||||
}
|
||||
|
||||
void EnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue, bool PlusMinusButton, bool disabled, const char* disabledTooltipText) {
|
||||
bool EnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue, bool PlusMinusButton, bool disabled, const char* disabledTooltipText) {
|
||||
bool changed = false;
|
||||
int val = CVar_GetS32(cvarName, defaultValue);
|
||||
|
||||
float alpha;
|
||||
@ -316,6 +317,7 @@ namespace UIWidgets {
|
||||
val--;
|
||||
CVar_SetS32(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
||||
@ -337,6 +339,7 @@ namespace UIWidgets {
|
||||
{
|
||||
CVar_SetS32(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
if (PlusMinusButton) {
|
||||
ImGui::PopItemWidth();
|
||||
@ -354,6 +357,7 @@ namespace UIWidgets {
|
||||
val++;
|
||||
CVar_SetS32(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -370,6 +374,7 @@ namespace UIWidgets {
|
||||
val = min;
|
||||
CVar_SetS32(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (val > max)
|
||||
@ -377,10 +382,14 @@ namespace UIWidgets {
|
||||
val = max;
|
||||
CVar_SetS32(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
void EnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage, bool PlusMinusButton, bool disabled, const char* disabledTooltipText) {
|
||||
bool EnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage, bool PlusMinusButton, bool disabled, const char* disabledTooltipText) {
|
||||
bool changed = false;
|
||||
float val = CVar_GetFloat(cvarName, defaultValue);
|
||||
|
||||
if (disabled) {
|
||||
@ -405,6 +414,7 @@ namespace UIWidgets {
|
||||
}
|
||||
CVar_SetFloat(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
||||
@ -425,6 +435,7 @@ namespace UIWidgets {
|
||||
CVar_SetFloat(cvarName, val);
|
||||
}
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
if (PlusMinusButton) {
|
||||
ImGui::PopItemWidth();
|
||||
@ -442,6 +453,7 @@ namespace UIWidgets {
|
||||
}
|
||||
CVar_SetFloat(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -457,13 +469,17 @@ namespace UIWidgets {
|
||||
val = min;
|
||||
CVar_SetFloat(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (val > max) {
|
||||
val = max;
|
||||
CVar_SetFloat(cvarName, val);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
void PaddedEnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue, bool PlusMinusButton, bool padTop, bool padBottom, bool disabled, const char* disabledTooltipText) {
|
||||
|
@ -41,9 +41,9 @@ namespace UIWidgets {
|
||||
void EnhancementCombo(const std::string& name, const char* cvarName, const std::vector<std::string>& items, int defaultValue = 0);
|
||||
bool EnhancementCombobox(const char* name, const char* ComboArray[], size_t arraySize, uint8_t FirstTimeValue);
|
||||
void PaddedText(const char* text, bool padTop = true, bool padBottom = true);
|
||||
void EnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue = 0, bool PlusMinusButton = false, bool disabled = false, const char* disabledTooltipText = "");
|
||||
bool EnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue = 0, bool PlusMinusButton = false, bool disabled = false, const char* disabledTooltipText = "");
|
||||
void PaddedEnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue = 0, bool PlusMinusButton = false, bool padTop = true, bool padBottom = true, bool disabled = false, const char* disabledTooltipText = "");
|
||||
void EnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage, bool PlusMinusButton = false, bool disabled = false, const char* disabledTooltipText = "");
|
||||
bool EnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage, bool PlusMinusButton = false, bool disabled = false, const char* disabledTooltipText = "");
|
||||
void EnhancementRadioButton(const char* text, const char* cvarName, int id);
|
||||
|
||||
bool EnhancementColor(const char* text, const char* cvarName, ImVec4 ColorRGBA, ImVec4 default_colors, bool allow_rainbow = true, bool has_alpha=false, bool TitleSameLine=false);
|
||||
|
@ -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);
|
||||
|
@ -194,10 +194,15 @@ void ArrowFire_Draw(Actor* thisx, PlayState* play2) {
|
||||
u32 stateFrames;
|
||||
EnArrow* arrow;
|
||||
Actor* tranform;
|
||||
Color_RGB8 Arrow_env_ori = {255,0,0};
|
||||
Color_RGB8 Arrow_col_ori = {255,200,0};
|
||||
Color_RGB8 Arrow_env = CVar_GetRGB("gFireArrowColEnv", Arrow_env_ori);
|
||||
Color_RGB8 Arrow_col = CVar_GetRGB("gFireArrowCol", Arrow_col_ori);
|
||||
|
||||
Color_RGB8 primaryColor = {255, 200, 0};
|
||||
if (CVar_GetS32("gCosmetics.Arrows_FirePrimary.Changed", 0)) {
|
||||
primaryColor = CVar_GetRGB("gCosmetics.Arrows_FirePrimary.Value", primaryColor);
|
||||
}
|
||||
Color_RGB8 secondaryColor = {255, 0, 0};
|
||||
if (CVar_GetS32("gCosmetics.Arrows_FireSecondary.Changed", 0)) {
|
||||
secondaryColor = CVar_GetRGB("gCosmetics.Arrows_FireSecondary.Value", secondaryColor);
|
||||
}
|
||||
|
||||
stateFrames = play->state.frames;
|
||||
arrow = (EnArrow*)this->actor.parent;
|
||||
@ -216,16 +221,11 @@ void ArrowFire_Draw(Actor* thisx, PlayState* play2) {
|
||||
// Draw red effect over the screen when arrow hits
|
||||
if (this->unk_15C > 0) {
|
||||
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
||||
if (CVar_GetS32("gUseArrowsCol", 0)) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0,
|
||||
(s32)(Arrow_env.r * this->unk_15C) & 0xFF,
|
||||
(s32)(Arrow_env.g * this->unk_15C) & 0xFF,
|
||||
(s32)(Arrow_env.b * this->unk_15C) & 0xFF,
|
||||
(s32)(30.0f * this->unk_15C) & 0xFF); //Intentionnally made Alpha lower.
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(40.0f * this->unk_15C) & 0xFF, 0, 0,
|
||||
(s32)(150.0f * this->unk_15C) & 0xFF);
|
||||
}
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0,
|
||||
(s32)((secondaryColor.r / 6) * this->unk_15C) & 0xFF,
|
||||
(s32)((secondaryColor.g / 6) * this->unk_15C) & 0xFF,
|
||||
(s32)((secondaryColor.b / 6) * this->unk_15C) & 0xFF,
|
||||
(s32)(150.0f * this->unk_15C) & 0xFF);
|
||||
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
||||
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
||||
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||
@ -233,13 +233,8 @@ void ArrowFire_Draw(Actor* thisx, PlayState* play2) {
|
||||
|
||||
// Draw fire on the arrow
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
if (CVar_GetS32("gUseArrowsCol", 0)) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, Arrow_col.r, Arrow_col.g, Arrow_col.b, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, Arrow_env.r, Arrow_env.g, Arrow_env.b, 128);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, Arrow_col_ori.r, Arrow_col_ori.g, Arrow_col_ori.b, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, Arrow_env_ori.r, Arrow_env_ori.g, Arrow_env_ori.b, 128);
|
||||
}
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, primaryColor.r, primaryColor.g, primaryColor.b, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, secondaryColor.r, secondaryColor.g, secondaryColor.b, 128);
|
||||
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
||||
if (this->timer != 0) {
|
||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
@ -195,10 +195,15 @@ void ArrowIce_Draw(Actor* thisx, PlayState* play) {
|
||||
Actor* tranform;
|
||||
u32 stateFrames = play->state.frames;
|
||||
EnArrow* arrow = (EnArrow*)this->actor.parent;
|
||||
Color_RGB8 Arrow_env_ori = {0,0,255};
|
||||
Color_RGB8 Arrow_col_ori = {170, 255, 255};
|
||||
Color_RGB8 Arrow_env = CVar_GetRGB("gIceArrowColEnv", Arrow_env_ori);
|
||||
Color_RGB8 Arrow_col = CVar_GetRGB("gIceArrowCol", Arrow_col_ori);
|
||||
|
||||
Color_RGB8 primaryColor = {170, 255, 255};
|
||||
if (CVar_GetS32("gCosmetics.Arrows_IcePrimary.Changed", 0)) {
|
||||
primaryColor = CVar_GetRGB("gCosmetics.Arrows_IcePrimary.Value", primaryColor);
|
||||
}
|
||||
Color_RGB8 secondaryColor = {0, 0, 255};
|
||||
if (CVar_GetS32("gCosmetics.Arrows_IceSecondary.Changed", 0)) {
|
||||
secondaryColor = CVar_GetRGB("gCosmetics.Arrows_IceSecondary.Value", secondaryColor);
|
||||
}
|
||||
|
||||
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) {
|
||||
tranform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor;
|
||||
@ -214,16 +219,11 @@ void ArrowIce_Draw(Actor* thisx, PlayState* play) {
|
||||
// Draw blue effect over the screen when arrow hits
|
||||
if (this->unk_164 > 0) {
|
||||
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
||||
if (CVar_GetS32("gUseArrowsCol", 0)) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0,
|
||||
(s32)(Arrow_env.r * this->unk_164) & 0xFF,
|
||||
(s32)(Arrow_env.g * this->unk_164) & 0xFF,
|
||||
(s32)(Arrow_env.b * this->unk_164) & 0xFF,
|
||||
(s32)(30.0f * this->unk_164) & 0xFF); //Intentionnally made Alpha lower.
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 0, (s32)(10.0f * this->unk_164) & 0xFF,
|
||||
(s32)(50.0f * this->unk_164) & 0xFF, (s32)(150.0f * this->unk_164) & 0xFF);
|
||||
}
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0,
|
||||
(s32)((secondaryColor.r / 6) * this->unk_164) & 0xFF,
|
||||
(s32)((secondaryColor.g / 6) * this->unk_164) & 0xFF,
|
||||
(s32)((secondaryColor.b / 6) * this->unk_164) & 0xFF,
|
||||
(s32)(150.0f * this->unk_164) & 0xFF);
|
||||
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
||||
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
||||
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||
@ -231,13 +231,8 @@ void ArrowIce_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
// Draw ice on the arrow
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
if (CVar_GetS32("gUseArrowsCol", 0)) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, Arrow_col.r, Arrow_col.g, Arrow_col.b, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, Arrow_env.r, Arrow_env.g, Arrow_env.b, 128);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, Arrow_col_ori.r, Arrow_col_ori.g, Arrow_col_ori.b, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, Arrow_env_ori.r, Arrow_env_ori.g, Arrow_env_ori.b, 128);
|
||||
}
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, primaryColor.r, primaryColor.g, primaryColor.b, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, secondaryColor.r, secondaryColor.g, secondaryColor.b, 128);
|
||||
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
||||
if (this->timer != 0) {
|
||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
@ -193,10 +193,15 @@ void ArrowLight_Draw(Actor* thisx, PlayState* play) {
|
||||
u32 stateFrames = play->state.frames;
|
||||
EnArrow* arrow = (EnArrow*)this->actor.parent;
|
||||
Actor* tranform;
|
||||
Color_RGB8 Arrow_env_ori = {255, 255, 0};
|
||||
Color_RGB8 Arrow_col_ori = {255, 255, 170};
|
||||
Color_RGB8 Arrow_env = CVar_GetRGB("gLightArrowColEnv", Arrow_env_ori);
|
||||
Color_RGB8 Arrow_col = CVar_GetRGB("gLightArrowCol", Arrow_col_ori);
|
||||
|
||||
Color_RGB8 primaryColor = {255, 255, 170};
|
||||
if (CVar_GetS32("gCosmetics.Arrows_LightPrimary.Changed", 0)) {
|
||||
primaryColor = CVar_GetRGB("gCosmetics.Arrows_LightPrimary.Value", primaryColor);
|
||||
}
|
||||
Color_RGB8 secondaryColor = {255, 255, 0};
|
||||
if (CVar_GetS32("gCosmetics.Arrows_LightSecondary.Changed", 0)) {
|
||||
secondaryColor = CVar_GetRGB("gCosmetics.Arrows_LightSecondary.Value", secondaryColor);
|
||||
}
|
||||
|
||||
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) {
|
||||
tranform = (arrow->hitFlags & 2) ? &this->actor : &arrow->actor;
|
||||
@ -212,16 +217,11 @@ void ArrowLight_Draw(Actor* thisx, PlayState* play) {
|
||||
// Draw yellow effect over the screen when arrow hits
|
||||
if (this->unk_164 > 0) {
|
||||
POLY_XLU_DISP = Gfx_SetupDL_57(POLY_XLU_DISP);
|
||||
if (CVar_GetS32("gUseArrowsCol", 0)) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0,
|
||||
(s32)(Arrow_env.r * this->unk_164) & 0xFF,
|
||||
(s32)(Arrow_env.g * this->unk_164) & 0xFF,
|
||||
(s32)(Arrow_env.b * this->unk_164) & 0xFF,
|
||||
(s32)(30.0f * this->unk_164) & 0xFF); //Intentionnally made Alpha lower.
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, (s32)(30.0f * this->unk_164) & 0xFF,
|
||||
(s32)(40.0f * this->unk_164) & 0xFF, 0, (s32)(150.0f * this->unk_164) & 0xFF);
|
||||
}
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0,
|
||||
(s32)((secondaryColor.r / 6) * this->unk_164) & 0xFF,
|
||||
(s32)((secondaryColor.g / 6) * this->unk_164) & 0xFF,
|
||||
(s32)((secondaryColor.b / 6) * this->unk_164) & 0xFF,
|
||||
(s32)(150.0f * this->unk_164) & 0xFF);
|
||||
gDPSetAlphaDither(POLY_XLU_DISP++, G_AD_DISABLE);
|
||||
gDPSetColorDither(POLY_XLU_DISP++, G_CD_DISABLE);
|
||||
gDPFillRectangle(POLY_XLU_DISP++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
|
||||
@ -229,13 +229,8 @@ void ArrowLight_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
// Draw light on the arrow
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
if (CVar_GetS32("gUseArrowsCol", 0)) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, Arrow_col.r, Arrow_col.g, Arrow_col.b, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, Arrow_env.r, Arrow_env.g, Arrow_env.b, 128);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, Arrow_col_ori.r, Arrow_col_ori.g, Arrow_col_ori.b, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, Arrow_env_ori.r, Arrow_env_ori.g, Arrow_env_ori.b, 128);
|
||||
}
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, primaryColor.r, primaryColor.g, primaryColor.b, this->alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, secondaryColor.r, secondaryColor.g, secondaryColor.b, 128);
|
||||
Matrix_RotateZYX(0x4000, 0x0, 0x0, MTXMODE_APPLY);
|
||||
if (this->timer != 0) {
|
||||
Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
@ -102,9 +102,30 @@ void func_8087B938(BgHaka* this, PlayState* play) {
|
||||
Math_CosS(this->dyna.actor.world.rot.y) * this->dyna.actor.minVelocityY + this->dyna.actor.home.pos.z;
|
||||
if (sp38 != 0) {
|
||||
this->dyna.unk_150 = 0.0f;
|
||||
this->state = 1;
|
||||
u8 allPulled = 1;
|
||||
Actor* actor = play->actorCtx.actorLists[ACTORCAT_BG].head;
|
||||
|
||||
while (actor != NULL) {
|
||||
if (actor->id == ACTOR_BG_HAKA && ((BgHaka*)actor)->state == 0) {
|
||||
allPulled = 0;
|
||||
}
|
||||
actor = actor->next;
|
||||
}
|
||||
player->stateFlags2 &= ~0x10;
|
||||
if (this->dyna.actor.params == 1) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
} else if (play->sceneNum == SCENE_SPOT02 && allPulled) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
func_800F5ACC(NA_BGM_STAFF_2);
|
||||
Actor* actor2 = play->actorCtx.actorLists[ACTORCAT_BG].head;
|
||||
|
||||
while (actor2 != NULL) {
|
||||
if (actor2->id == ACTOR_BG_HAKA) {
|
||||
((BgHaka*)actor2)->state = 2;
|
||||
}
|
||||
actor2 = actor2->next;
|
||||
}
|
||||
} else if (!IS_DAY && play->sceneNum == SCENE_SPOT02) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_POH, this->dyna.actor.home.pos.x,
|
||||
this->dyna.actor.home.pos.y, this->dyna.actor.home.pos.z, 0, this->dyna.actor.shape.rot.y, 0,
|
||||
@ -147,15 +168,46 @@ void BgHaka_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
}
|
||||
|
||||
u16 graveHue = 0;
|
||||
|
||||
void BgHaka_Draw(Actor* thisx, PlayState* play) {
|
||||
u16 index = thisx->world.pos.x + thisx->world.pos.z;
|
||||
float frequency = 0.01f;
|
||||
Color_RGB8 newColor;
|
||||
newColor.r = sin(frequency * ((graveHue + index) % 360) + 0) * 127 + 128;
|
||||
newColor.g = sin(frequency * ((graveHue + index) % 360) + 2) * 127 + 128;
|
||||
newColor.b = sin(frequency * ((graveHue + index) % 360) + 4) * 127 + 128;
|
||||
|
||||
graveHue++;
|
||||
if (graveHue >= 360) graveHue = 0;
|
||||
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (((BgHaka*)thisx)->state == 2) {
|
||||
play->envCtx.adjAmbientColor[0] = newColor.r;
|
||||
play->envCtx.adjAmbientColor[1] = newColor.g;
|
||||
play->envCtx.adjAmbientColor[2] = newColor.b;
|
||||
play->envCtx.adjLight1Color[0] = newColor.r;
|
||||
play->envCtx.adjLight1Color[1] = newColor.g;
|
||||
play->envCtx.adjLight1Color[2] = newColor.b;
|
||||
D_801614B0.r = newColor.r;
|
||||
D_801614B0.g = newColor.g;
|
||||
D_801614B0.b = newColor.b;
|
||||
D_801614B0.a = 255;
|
||||
gDPSetGrayscaleColor(POLY_OPA_DISP++, newColor.r, newColor.g, newColor.b, 255);
|
||||
gSPGrayscale(POLY_OPA_DISP++, true);
|
||||
}
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gGravestoneStoneDL);
|
||||
if (((BgHaka*)thisx)->state == 2) {
|
||||
gSPGrayscale(POLY_OPA_DISP++, false);
|
||||
}
|
||||
Matrix_Translate(0.0f, 0.0f, thisx->minVelocityY * 10.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
@ -11,6 +11,7 @@ typedef void (*BgHakaActionFunc)(struct BgHaka*, PlayState*);
|
||||
typedef struct BgHaka {
|
||||
/* 0x0000 */ DynaPolyActor dyna;
|
||||
/* 0x0164 */ BgHakaActionFunc actionFunc;
|
||||
/* */ u8 state;
|
||||
} BgHaka; // size = 0x0168
|
||||
|
||||
#endif
|
||||
|
@ -461,7 +461,12 @@ void BgIceShelter_Draw(Actor* thisx, PlayState* play2) {
|
||||
break;
|
||||
}
|
||||
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, this->alpha);
|
||||
if (CVar_GetS32("gCosmetics.World_RedIce.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.World_RedIce.Value", (Color_RGB8){ 255, 0, 0});
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, color.r, color.g, color.b, this->alpha);
|
||||
} else {
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, this->alpha);
|
||||
}
|
||||
|
||||
switch ((this->dyna.actor.params >> 8) & 7) {
|
||||
case 0:
|
||||
|
@ -60,6 +60,12 @@ void func_808AAA50(BgSpot01Fusya* this, PlayState* play) {
|
||||
f32 temp;
|
||||
Actor* thisx = &this->actor;
|
||||
|
||||
if (CVar_GetS32("gCosmetics.Kak_Windmill_Speed.Changed", 0)) {
|
||||
this->unk_158 = CVar_GetFloat("gCosmetics.Kak_Windmill_Speed.Value", 100.0f);
|
||||
} else {
|
||||
this->unk_158 = 100.0f;
|
||||
}
|
||||
|
||||
if (gSaveContext.eventChkInf[6] & 0x20) {
|
||||
this->unk_158 = 1800.0f;
|
||||
}
|
||||
|
@ -84,34 +84,48 @@ void EnArrow_Init(Actor* thisx, PlayState* play) {
|
||||
};
|
||||
EnArrow* this = (EnArrow*)thisx;
|
||||
|
||||
Color_RGBA8 Arrow_env_ori = { 0, 150, 0, 0 };
|
||||
Color_RGBA8 Arrow_col_ori = { 255, 255, 170, 255 };
|
||||
Color_RGBA8 Light_env_ori = { 255, 255, 0, 255 };
|
||||
Color_RGBA8 Light_col_ori = { 255, 255, 170, 0 };
|
||||
Color_RGBA8 Fire_env_ori = { 255, 0, 0, 255 };
|
||||
Color_RGBA8 Fire_col_ori = { 255, 200, 0, 0 };
|
||||
Color_RGBA8 Ice_env_ori = { 0, 0, 255, 255 };
|
||||
Color_RGBA8 Ice_col_ori = { 170, 255, 255, 0 };
|
||||
if (CVar_GetS32("gCosmetics.Arrows_NormalPrimary.Changed", 0)) {
|
||||
blureNormal.altEnvColor = CVar_GetRGBA("gCosmetics.Arrows_NormalPrimary.Value", (Color_RGBA8){ 0, 150, 0, 0 });
|
||||
} else {
|
||||
blureNormal.altEnvColor = (Color_RGBA8){ 0, 150, 0, 0 };
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Arrows_NormalSecondary.Changed", 0)) {
|
||||
blureNormal.altPrimColor = CVar_GetRGBA("gCosmetics.Arrows_NormalSecondary.Value", (Color_RGBA8){ 255, 255, 170, 255 });
|
||||
} else {
|
||||
blureNormal.altPrimColor = (Color_RGBA8){ 255, 255, 170, 255 };
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gUseArrowsCol", 0) != 0) {
|
||||
blureNormal.altPrimColor = CVar_GetRGBA("gNormalArrowCol", Arrow_col_ori);
|
||||
blureNormal.altEnvColor = CVar_GetRGBA("gNormalArrowColEnv", Arrow_env_ori);
|
||||
blureFire.altPrimColor = CVar_GetRGBA("gFireArrowCol", Fire_col_ori);
|
||||
blureFire.altEnvColor = CVar_GetRGBA("gFireArrowColEnv", Fire_env_ori);
|
||||
blureIce.altPrimColor = CVar_GetRGBA("gIceArrowCol", Ice_col_ori);
|
||||
blureIce.altEnvColor = CVar_GetRGBA("gIceArrowColEnv", Ice_env_ori);
|
||||
blureLight.altPrimColor = CVar_GetRGBA("gLightArrowCol", Light_col_ori);
|
||||
blureLight.altEnvColor = CVar_GetRGBA("gLightArrowColEnv", Light_env_ori);
|
||||
if (CVar_GetS32("gCosmetics.Arrows_FirePrimary.Changed", 0)) {
|
||||
blureFire.altEnvColor = CVar_GetRGBA("gCosmetics.Arrows_FirePrimary.Value", (Color_RGBA8){ 255, 200, 0, 0 });
|
||||
} else {
|
||||
blureFire.altEnvColor = (Color_RGBA8){ 255, 200, 0, 0 };
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Arrows_FireSecondary.Changed", 0)) {
|
||||
blureFire.altPrimColor = CVar_GetRGBA("gCosmetics.Arrows_FireSecondary.Value", (Color_RGBA8){ 255, 0, 0, 255 });
|
||||
} else {
|
||||
blureFire.altPrimColor = (Color_RGBA8){ 255, 0, 0, 255 };
|
||||
}
|
||||
|
||||
//make sure the alpha values are correct.
|
||||
blureNormal.altPrimColor.a = 255;
|
||||
blureNormal.altEnvColor.a = 0;
|
||||
blureFire.altPrimColor.a = 255;
|
||||
blureFire.altEnvColor.a = 0;
|
||||
blureIce.altPrimColor.a = 255;
|
||||
blureIce.altEnvColor.a = 0;
|
||||
blureLight.altPrimColor.a = 255;
|
||||
blureLight.altEnvColor.a = 0;
|
||||
if (CVar_GetS32("gCosmetics.Arrows_IcePrimary.Changed", 0)) {
|
||||
blureIce.altEnvColor = CVar_GetRGBA("gCosmetics.Arrows_IcePrimary.Value", (Color_RGBA8){ 0, 0, 255, 255 });
|
||||
} else {
|
||||
blureIce.altEnvColor = (Color_RGBA8){ 0, 0, 255, 255 };
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Arrows_IceSecondary.Changed", 0)) {
|
||||
blureIce.altPrimColor = CVar_GetRGBA("gCosmetics.Arrows_IceSecondary.Value", (Color_RGBA8){ 170, 255, 255, 0 });
|
||||
} else {
|
||||
blureIce.altPrimColor = (Color_RGBA8){ 170, 255, 255, 0 };
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gCosmetics.Arrows_LightPrimary.Changed", 0)) {
|
||||
blureLight.altEnvColor = CVar_GetRGBA("gCosmetics.Arrows_LightPrimary.Value", (Color_RGBA8){ 255, 255, 0, 255 });
|
||||
} else {
|
||||
blureLight.altEnvColor = (Color_RGBA8){ 255, 255, 0, 255 };
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Arrows_LightSecondary.Changed", 0)) {
|
||||
blureLight.altPrimColor = CVar_GetRGBA("gCosmetics.Arrows_LightSecondary.Value", (Color_RGBA8){ 255, 255, 170, 0 });
|
||||
} else {
|
||||
blureLight.altPrimColor = (Color_RGBA8){ 255, 255, 170, 0 };
|
||||
}
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
|
@ -515,11 +515,15 @@ void EnBomChu_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
colorIntensity = blinkTime / (f32)blinkHalfPeriod;
|
||||
|
||||
if (CVar_GetS32("gUseTrailsCol", 0) != 0)
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, (colorIntensity * BombchuCol.r), (colorIntensity * BombchuCol.g),
|
||||
(colorIntensity * BombchuCol.b), 255);
|
||||
else gDPSetEnvColor(POLY_OPA_DISP++, 9.0f + (colorIntensity * 209.0f), 9.0f + (colorIntensity * 34.0f),
|
||||
35.0f + (colorIntensity * -35.0f), 255);
|
||||
if (CVar_GetS32("gCosmetics.Equipment_ChuBody.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Equipment_ChuBody.Value", (Color_RGB8){ 209.0f, 34.0f, -35.0f });
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, (colorIntensity * color.r), (colorIntensity * color.g),
|
||||
(colorIntensity * color.b), 255);
|
||||
} else {
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 9.0f + (colorIntensity * 209.0f), 9.0f + (colorIntensity * 34.0f),
|
||||
35.0f + (colorIntensity * -35.0f), 255);
|
||||
}
|
||||
|
||||
Matrix_Translate(this->visualJitter * (1.0f / BOMBCHU_SCALE), 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
@ -77,10 +77,15 @@ GetItemEntry sItem;
|
||||
Gfx gSkullTreasureChestChestSideAndLidDL[116] = {0};
|
||||
Gfx gGoldTreasureChestChestSideAndLidDL[116] = {0};
|
||||
Gfx gKeyTreasureChestChestSideAndLidDL[116] = {0};
|
||||
Gfx gChristmasRedTreasureChestChestSideAndLidDL[116] = {0};
|
||||
Gfx gChristmasGreenTreasureChestChestSideAndLidDL[116] = {0};
|
||||
Gfx gSkullTreasureChestChestFrontDL[128] = {0};
|
||||
Gfx gGoldTreasureChestChestFrontDL[128] = {0};
|
||||
Gfx gKeyTreasureChestChestFrontDL[128] = {0};
|
||||
Gfx gChristmasRedTreasureChestChestFrontDL[128] = {0};
|
||||
Gfx gChristmasGreenTreasureChestChestFrontDL[128] = {0};
|
||||
u8 hasCreatedRandoChestTextures = 0;
|
||||
u8 hasChristmasChestTexturesAvailable = 0;
|
||||
|
||||
void EnBox_SetupAction(EnBox* this, EnBoxActionFunc actionFunc) {
|
||||
this->actionFunc = actionFunc;
|
||||
@ -702,6 +707,16 @@ void EnBox_UpdateSizeAndTexture(EnBox* this, PlayState* play) {
|
||||
this->boxLidDL = gTreasureChestBossKeyChestSideAndTopDL;
|
||||
}
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gLetItSnow", 0) && hasChristmasChestTexturesAvailable) {
|
||||
if (this->dyna.actor.scale.x == 0.01f) {
|
||||
this->boxBodyDL = gChristmasRedTreasureChestChestFrontDL;
|
||||
this->boxLidDL = gChristmasRedTreasureChestChestSideAndLidDL;
|
||||
} else {
|
||||
this->boxBodyDL = gChristmasGreenTreasureChestChestFrontDL;
|
||||
this->boxLidDL = gChristmasGreenTreasureChestChestSideAndLidDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnBox_CreateExtraChestTextures() {
|
||||
@ -713,6 +728,10 @@ void EnBox_CreateExtraChestTextures() {
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, ResourceMgr_LoadFileRaw("assets/objects/object_box/gGoldTreasureChestSideAndTopTex")),
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, ResourceMgr_LoadFileRaw("assets/objects/object_box/gKeyTreasureChestFrontTex")),
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, ResourceMgr_LoadFileRaw("assets/objects/object_box/gKeyTreasureChestSideAndTopTex")),
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, ResourceMgr_LoadFileRaw("assets/objects/object_box/gChristmasRedTreasureChestFrontTex")),
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, ResourceMgr_LoadFileRaw("assets/objects/object_box/gChristmasRedTreasureChestSideAndTopTex")),
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, ResourceMgr_LoadFileRaw("assets/objects/object_box/gChristmasGreenTreasureChestFrontTex")),
|
||||
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, ResourceMgr_LoadFileRaw("assets/objects/object_box/gChristmasGreenTreasureChestSideAndTopTex")),
|
||||
};
|
||||
|
||||
Gfx* frontCmd = ResourceMgr_LoadGfxByName(gTreasureChestChestFrontDL);
|
||||
@ -721,12 +740,16 @@ void EnBox_CreateExtraChestTextures() {
|
||||
gSkullTreasureChestChestFrontDL[frontIndex] = *frontCmd;
|
||||
gGoldTreasureChestChestFrontDL[frontIndex] = *frontCmd;
|
||||
gKeyTreasureChestChestFrontDL[frontIndex] = *frontCmd;
|
||||
gChristmasRedTreasureChestChestFrontDL[frontIndex] = *frontCmd;
|
||||
gChristmasGreenTreasureChestChestFrontDL[frontIndex] = *frontCmd;
|
||||
frontIndex++;
|
||||
++frontCmd;
|
||||
}
|
||||
gSkullTreasureChestChestFrontDL[frontIndex] = *frontCmd;
|
||||
gGoldTreasureChestChestFrontDL[frontIndex] = *frontCmd;
|
||||
gKeyTreasureChestChestFrontDL[frontIndex] = *frontCmd;
|
||||
gChristmasRedTreasureChestChestFrontDL[frontIndex] = *frontCmd;
|
||||
gChristmasGreenTreasureChestChestFrontDL[frontIndex] = *frontCmd;
|
||||
|
||||
gSkullTreasureChestChestFrontDL[5] = gTreasureChestChestTextures[0];
|
||||
gSkullTreasureChestChestFrontDL[23] = gTreasureChestChestTextures[1];
|
||||
@ -740,6 +763,14 @@ void EnBox_CreateExtraChestTextures() {
|
||||
gKeyTreasureChestChestFrontDL[23] = gTreasureChestChestTextures[5];
|
||||
gKeyTreasureChestChestFrontDL[37] = gTreasureChestChestTextures[4];
|
||||
gKeyTreasureChestChestFrontDL[50] = gTreasureChestChestTextures[5];
|
||||
gChristmasRedTreasureChestChestFrontDL[5] = gTreasureChestChestTextures[6];
|
||||
gChristmasRedTreasureChestChestFrontDL[23] = gTreasureChestChestTextures[7];
|
||||
gChristmasRedTreasureChestChestFrontDL[37] = gTreasureChestChestTextures[6];
|
||||
gChristmasRedTreasureChestChestFrontDL[50] = gTreasureChestChestTextures[7];
|
||||
gChristmasGreenTreasureChestChestFrontDL[5] = gTreasureChestChestTextures[8];
|
||||
gChristmasGreenTreasureChestChestFrontDL[23] = gTreasureChestChestTextures[9];
|
||||
gChristmasGreenTreasureChestChestFrontDL[37] = gTreasureChestChestTextures[8];
|
||||
gChristmasGreenTreasureChestChestFrontDL[50] = gTreasureChestChestTextures[9];
|
||||
|
||||
Gfx* sideCmd = ResourceMgr_LoadGfxByName(gTreasureChestChestSideAndLidDL);
|
||||
int sideIndex = 0;
|
||||
@ -747,12 +778,16 @@ void EnBox_CreateExtraChestTextures() {
|
||||
gSkullTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd;
|
||||
gGoldTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd;
|
||||
gKeyTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd;
|
||||
gChristmasRedTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd;
|
||||
gChristmasGreenTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd;
|
||||
sideIndex++;
|
||||
++sideCmd;
|
||||
}
|
||||
gSkullTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd;
|
||||
gGoldTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd;
|
||||
gKeyTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd;
|
||||
gChristmasRedTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd;
|
||||
gChristmasGreenTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd;
|
||||
|
||||
gSkullTreasureChestChestSideAndLidDL[5] = gTreasureChestChestTextures[0];
|
||||
gSkullTreasureChestChestSideAndLidDL[29] = gTreasureChestChestTextures[1];
|
||||
@ -763,7 +798,14 @@ void EnBox_CreateExtraChestTextures() {
|
||||
gKeyTreasureChestChestSideAndLidDL[5] = gTreasureChestChestTextures[4];
|
||||
gKeyTreasureChestChestSideAndLidDL[29] = gTreasureChestChestTextures[5];
|
||||
gKeyTreasureChestChestSideAndLidDL[45] = gTreasureChestChestTextures[4];
|
||||
gChristmasRedTreasureChestChestSideAndLidDL[5] = gTreasureChestChestTextures[6];
|
||||
gChristmasRedTreasureChestChestSideAndLidDL[29] = gTreasureChestChestTextures[7];
|
||||
gChristmasRedTreasureChestChestSideAndLidDL[45] = gTreasureChestChestTextures[6];
|
||||
gChristmasGreenTreasureChestChestSideAndLidDL[5] = gTreasureChestChestTextures[8];
|
||||
gChristmasGreenTreasureChestChestSideAndLidDL[29] = gTreasureChestChestTextures[9];
|
||||
gChristmasGreenTreasureChestChestSideAndLidDL[45] = gTreasureChestChestTextures[8];
|
||||
|
||||
ResourceMgr_ListFiles("assets/objects/object_box/gChristmas*", &hasChristmasChestTexturesAvailable);
|
||||
hasCreatedRandoChestTextures = 1;
|
||||
}
|
||||
|
||||
|
@ -471,34 +471,22 @@ void EnDog_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
||||
|
||||
void EnDog_Draw(Actor* thisx, PlayState* play) {
|
||||
EnDog* this = (EnDog*)thisx;
|
||||
Color_RGBA8 colors[] = { { 255, 255, 200, 0 }, { 150, 100, 50, 0 } };
|
||||
Color_RGB8 Dog1_ori = {colors[0].r, colors[0].g, colors[0].b};
|
||||
Color_RGB8 Dog2_ori = {colors[1].r, colors[1].g, colors[1].b};
|
||||
Color_RGB8 Dog1 = CVar_GetRGB("gDog1Col", Dog1_ori);
|
||||
Color_RGB8 Dog2 = CVar_GetRGB("gDog2Col", Dog2_ori);
|
||||
Color_RGB8 colors[] = { { 255, 255, 200 }, { 150, 100, 50 } };
|
||||
|
||||
if (CVar_GetS32("gCosmetics.NPC_Dog1.Changed", 0)) {
|
||||
colors[0] = CVar_GetRGB("gCosmetics.NPC_Dog1.Value", colors[0]);
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.NPC_Dog2.Changed", 0)) {
|
||||
colors[1] = CVar_GetRGB("gCosmetics.NPC_Dog2.Value", colors[1]);
|
||||
}
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
if (CVar_GetS32("gUseDogsCol",0)) {
|
||||
colors[0].r = Dog1.r;
|
||||
colors[0].g = Dog1.g;
|
||||
colors[0].b = Dog1.b;
|
||||
colors[1].r = Dog2.r;
|
||||
colors[1].g = Dog2.g;
|
||||
colors[1].b = Dog2.b;
|
||||
} else {
|
||||
colors[0].r = Dog1_ori.r;
|
||||
colors[0].g = Dog1_ori.g;
|
||||
colors[0].b = Dog1_ori.b;
|
||||
colors[1].r = Dog2_ori.r;
|
||||
colors[1].g = Dog2_ori.g;
|
||||
colors[1].b = Dog2_ori.b;
|
||||
}
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, colors[this->actor.params & 0xF].r, colors[this->actor.params & 0xF].g,
|
||||
colors[this->actor.params & 0xF].b, colors[this->actor.params & 0xF].a);
|
||||
colors[this->actor.params & 0xF].b, 0);
|
||||
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnDog_OverrideLimbDraw, EnDog_PostLimbDraw, this);
|
||||
|
@ -1483,6 +1483,7 @@ s32 EnElf_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
||||
if (this->fairyFlags & FAIRY_FLAG_BIG) {
|
||||
scale *= 2.0f;
|
||||
}
|
||||
scale *= CVar_GetFloat("gCosmetics.Fairies_Size", 1.0f);
|
||||
|
||||
scale *= (this->actor.scale.x * 124.99999f);
|
||||
Matrix_MultVec3f(&zeroVec, &mtxMult);
|
||||
|
@ -744,11 +744,10 @@ void EnFirefly_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
static Color_RGBA8 fireAuraEnvColor = { 255, 50, 0, 0 };
|
||||
static Color_RGBA8 iceAuraPrimColor = { 100, 200, 255, 255 };
|
||||
static Color_RGBA8 iceAuraEnvColor = { 0, 0, 255, 0 };
|
||||
static Color_RGB8 fireAuraPrimColor_ori = { 255, 255, 100 };
|
||||
static Color_RGB8 fireAuraEnvColor_ori = { 255, 50, 0 };
|
||||
static Color_RGB8 iceAuraPrimColor_ori = { 100, 200, 255 };
|
||||
static Color_RGB8 iceAuraEnvColor_ori = { 0, 0, 255 };
|
||||
|
||||
Color_RGBA8 customFireAuraPrimColor = CVar_GetRGBA("gCosmetics.NPC_FireKeesePrimary.Value", fireAuraPrimColor);
|
||||
Color_RGBA8 customFireAuraEnvColor = CVar_GetRGBA("gCosmetics.NPC_FireKeeseSecondary.Value", fireAuraEnvColor);
|
||||
Color_RGBA8 customIceAuraPrimColor = CVar_GetRGBA("gCosmetics.NPC_IceKeesePrimary.Value", iceAuraPrimColor);
|
||||
Color_RGBA8 customIceAuraEnvColor = CVar_GetRGBA("gCosmetics.NPC_IceKeeseSecondary.Value", iceAuraEnvColor);
|
||||
static Vec3f effVelocity = { 0.0f, 0.5f, 0.0f };
|
||||
static Vec3f effAccel = { 0.0f, 0.5f, 0.0f };
|
||||
static Vec3f limbSrc = { 0.0f, 0.0f, 0.0f };
|
||||
@ -760,26 +759,7 @@ void EnFirefly_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
s16 effScaleStep;
|
||||
s16 effLife;
|
||||
EnFirefly* this = (EnFirefly*)thisx;
|
||||
if (CVar_GetS32("gUseKeeseCol", 0)) {
|
||||
Color_RGBA8 fireAuraPrimColor_custom = { CVar_GetRGB("gKeese1_Ef_Prim", fireAuraPrimColor_ori).r,CVar_GetRGB("gKeese1_Ef_Prim", fireAuraPrimColor_ori).g,CVar_GetRGB("gKeese1_Ef_Prim", fireAuraPrimColor_ori).b, 255 };
|
||||
Color_RGBA8 fireAuraEnvColor_custom = { CVar_GetRGB("gKeese1_Ef_Env", fireAuraEnvColor_ori).r,CVar_GetRGB("gKeese1_Ef_Env", fireAuraEnvColor_ori).g,CVar_GetRGB("gKeese1_Ef_Env", fireAuraEnvColor_ori).b, 0 };
|
||||
Color_RGBA8 iceAuraPrimColor_custom = { CVar_GetRGB("gKeese2_Ef_Prim", iceAuraPrimColor_ori).r,CVar_GetRGB("gKeese2_Ef_Prim", iceAuraPrimColor_ori).g,CVar_GetRGB("gKeese2_Ef_Prim", iceAuraPrimColor_ori).b, 255 };
|
||||
Color_RGBA8 iceAuraEnvColor_custom = { CVar_GetRGB("gKeese2_Ef_Env", iceAuraEnvColor_ori).r,CVar_GetRGB("gKeese2_Ef_Env", iceAuraEnvColor_ori).g,CVar_GetRGB("gKeese2_Ef_Env", iceAuraEnvColor_ori).b, 0 };
|
||||
fireAuraPrimColor = fireAuraPrimColor_custom;
|
||||
fireAuraEnvColor = fireAuraEnvColor_custom;
|
||||
iceAuraPrimColor = iceAuraPrimColor_custom;
|
||||
iceAuraEnvColor = iceAuraEnvColor_custom;
|
||||
} else {
|
||||
//Original colors are back there
|
||||
Color_RGBA8 fireAuraPrimColor_custom = { fireAuraPrimColor_ori.r, fireAuraPrimColor_ori.g, fireAuraPrimColor_ori.b, 255 };
|
||||
Color_RGBA8 fireAuraEnvColor_custom = { fireAuraEnvColor_ori.r, fireAuraEnvColor_ori.g, fireAuraEnvColor_ori.b, 0 };
|
||||
Color_RGBA8 iceAuraPrimColor_custom = { iceAuraPrimColor_ori.r, iceAuraPrimColor_ori.g, iceAuraPrimColor_ori.b, 255 };
|
||||
Color_RGBA8 iceAuraEnvColor_custom = { iceAuraEnvColor_ori.r, iceAuraEnvColor_ori.g, iceAuraEnvColor_ori.b, 0 };
|
||||
fireAuraPrimColor = fireAuraPrimColor_custom;
|
||||
fireAuraEnvColor = fireAuraEnvColor_custom;
|
||||
iceAuraPrimColor = iceAuraPrimColor_custom;
|
||||
iceAuraEnvColor = iceAuraEnvColor_custom;
|
||||
}
|
||||
|
||||
if (!this->onFire && (limbIndex == 27)) {
|
||||
gSPDisplayList((*gfx)++, gKeeseEyesDL);
|
||||
} else {
|
||||
@ -807,11 +787,27 @@ void EnFirefly_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
|
||||
}
|
||||
|
||||
if (this->auraType == KEESE_AURA_FIRE) {
|
||||
effPrimColor = &fireAuraPrimColor;
|
||||
effEnvColor = &fireAuraEnvColor;
|
||||
if (CVar_GetS32("gCosmetics.NPC_FireKeesePrimary.Changed", 0)) {
|
||||
effPrimColor = &customFireAuraPrimColor;
|
||||
} else {
|
||||
effPrimColor = &fireAuraPrimColor;
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.NPC_FireKeeseSecondary.Changed", 0)) {
|
||||
effEnvColor = &customFireAuraEnvColor;
|
||||
} else {
|
||||
effEnvColor = &fireAuraEnvColor;
|
||||
}
|
||||
} else {
|
||||
effPrimColor = &iceAuraPrimColor;
|
||||
effEnvColor = &iceAuraEnvColor;
|
||||
if (CVar_GetS32("gCosmetics.NPC_IceKeesePrimary.Changed", 0)) {
|
||||
effPrimColor = &customIceAuraPrimColor;
|
||||
} else {
|
||||
effPrimColor = &iceAuraPrimColor;
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.NPC_IceKeeseSecondary.Changed", 0)) {
|
||||
effEnvColor = &customIceAuraEnvColor;
|
||||
} else {
|
||||
effEnvColor = &iceAuraEnvColor;
|
||||
}
|
||||
}
|
||||
|
||||
func_8002843C(play, &effPos, &effVelocity, &effAccel, effPrimColor, effEnvColor, 250, effScaleStep,
|
||||
|
@ -503,19 +503,60 @@ void EnGSwitch_DrawRupee(Actor* thisx, PlayState* play) {
|
||||
if (this->type == ENGSWITCH_TARGET_RUPEE) {
|
||||
GetItem_Draw(play, sRupeeTexturesNew[this->colorIdx]);
|
||||
} else {
|
||||
gDPSetGrayscaleColor(POLY_OPA_DISP++, 255, 255, 255, 255);
|
||||
gSPGrayscale(POLY_OPA_DISP++, true);
|
||||
Color_RGB8 silverRupeeColor = CVar_GetRGB("gCosmetics.Consumable_SilverRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0x80, silverRupeeColor.r, silverRupeeColor.g, silverRupeeColor.b, 255);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, silverRupeeColor.r / 5, silverRupeeColor.g / 5, silverRupeeColor.b / 5, 255);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gGiRupeeInnerDL);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gGiGoldRupeeInnerColorDL);
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gGiRupeeOuterDL);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gGiGoldRupeeOuterColorDL);
|
||||
gSPGrayscale(POLY_OPA_DISP++, false);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, silverRupeeColor.r * 0.75f, silverRupeeColor.g * 0.75f, silverRupeeColor.b * 0.75f, 255);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGiRupeeOuterDL);
|
||||
}
|
||||
} else {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTextures[this->colorIdx]));
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
|
||||
Color_RGB8 rupeeColor;
|
||||
u8 shouldColor = 0;
|
||||
switch (this->colorIdx) {
|
||||
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;
|
||||
case 5:
|
||||
rupeeColor = CVar_GetRGB("gCosmetics.Consumable_SilverRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVar_GetS32("gCosmetics.Consumable_SilverRupee.Changed", 0);
|
||||
break;
|
||||
}
|
||||
|
||||
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(sRupeeTextures[this->colorIdx]));
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
|
||||
gSPGrayscale(POLY_OPA_DISP++, false);
|
||||
} else {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTextures[this->colorIdx]));
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
|
||||
}
|
||||
}
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
@ -601,8 +642,45 @@ void EnGSwitch_DrawEffects(EnGSwitch* this, PlayState* play) {
|
||||
Matrix_RotateZ(effect->rot.z, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTextures[effect->colorIdx]));
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
|
||||
Color_RGB8 rupeeColor;
|
||||
u8 shouldColor = 0;
|
||||
switch (effect->colorIdx) {
|
||||
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;
|
||||
case 5:
|
||||
rupeeColor = CVar_GetRGB("gCosmetics.Consumable_SilverRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVar_GetS32("gCosmetics.Consumable_SilverRupee.Changed", 0);
|
||||
break;
|
||||
}
|
||||
|
||||
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(sRupeeTextures[effect->colorIdx]));
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
|
||||
gSPGrayscale(POLY_OPA_DISP++, false);
|
||||
} else {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTextures[effect->colorIdx]));
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
|
||||
}
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
}
|
||||
}
|
||||
|
@ -2099,13 +2099,13 @@ s32 EnGo2_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, V
|
||||
f32 float1;
|
||||
|
||||
if (limb == 17) {
|
||||
Matrix_Translate(2800.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(2800.0f + CVar_GetFloat("gCosmetics.Goron_NeckLength", 0.0f), 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
vec1 = this->unk_194.unk_08;
|
||||
float1 = (vec1.y / (f32)0x8000) * M_PI;
|
||||
Matrix_RotateX(float1, MTXMODE_APPLY);
|
||||
float1 = (vec1.x / (f32)0x8000) * M_PI;
|
||||
Matrix_RotateZ(float1, MTXMODE_APPLY);
|
||||
Matrix_Translate(-2800.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Translate(-2800.0f + CVar_GetFloat("gCosmetics.Goron_NeckLength", 0.0f), 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
if (limb == 10) {
|
||||
vec1 = this->unk_194.unk_0E;
|
||||
|
@ -594,7 +594,12 @@ void EnGs_Draw(Actor* thisx, PlayState* play) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->flashColor.r, this->flashColor.g, this->flashColor.b,
|
||||
this->flashColor.a);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255);
|
||||
if (CVar_GetS32("gCosmetics.World_GossipStone.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.World_GossipStone.Value", (Color_RGB8){255, 255, 255});
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, color.r, color.g, color.b, 255);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255);
|
||||
}
|
||||
}
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, gGossipStoneDL);
|
||||
|
@ -803,7 +803,12 @@ Gfx* func_80A761B0(GraphicsContext* gfxCtx, u8 primR, u8 primG, u8 primB, u8 env
|
||||
displayListHead = displayList;
|
||||
|
||||
gDPPipeSync(displayListHead++);
|
||||
gDPSetPrimColor(displayListHead++, 0, 0, primR, primG, primB, 255);
|
||||
if (CVar_GetS32("gCosmetics.NPC_IronKnuckles.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.NPC_IronKnuckles.Value", (Color_RGB8){primR, primG, primB});
|
||||
gDPSetPrimColor(displayListHead++, 0, 0, color.r, color.g, color.b, 255);
|
||||
} else {
|
||||
gDPSetPrimColor(displayListHead++, 0, 0, primR, primG, primB, 255);
|
||||
}
|
||||
gDPSetEnvColor(displayListHead++, envR, envG, envB, 255);
|
||||
gSPEndDisplayList(displayListHead++);
|
||||
|
||||
|
@ -1375,6 +1375,11 @@ void EnKo_Draw(Actor* thisx, PlayState* play) {
|
||||
Color_RGBA8 tunicColor = sModelInfo[ENKO_TYPE].tunicColor;
|
||||
Color_RGBA8 bootsColor = sModelInfo[ENKO_TYPE].bootsColor;
|
||||
|
||||
if (CVar_GetS32("gCosmetics.NPC_Kokiri.Changed", 0)) {
|
||||
tunicColor = CVar_GetRGBA("gCosmetics.NPC_Kokiri.Value", sModelInfo[ENKO_TYPE].tunicColor);
|
||||
bootsColor = CVar_GetRGBA("gCosmetics.NPC_Kokiri.Value", sModelInfo[ENKO_TYPE].bootsColor);
|
||||
}
|
||||
|
||||
this->actor.shape.shadowAlpha = this->modelAlpha;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
@ -340,9 +340,9 @@ void EnMThunder_Draw(Actor* thisx, PlayState* play2) {
|
||||
|
||||
switch (this->unk_1C6) {
|
||||
case 0:
|
||||
if (CVar_GetS32("gUseChargedCol",0)) {
|
||||
Color_RGB8 SpinColor = {255, 255, 170};
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, CVar_GetRGB("gCharged2Col", SpinColor).r, CVar_GetRGB("gCharged2Col", SpinColor).g, CVar_GetRGB("gCharged2Col", SpinColor).b, (u8)(this->unk_1B0 * 255));
|
||||
if (CVar_GetS32("gCosmetics.SpinAttack_Level2Primary.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.SpinAttack_Level2Primary.Value", (Color_RGB8){255, 255, 170});
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, color.r, color.g, color.b, (u8)(this->unk_1B0 * 255));
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 170, (u8)(this->unk_1B0 * 255));
|
||||
}
|
||||
@ -350,9 +350,9 @@ void EnMThunder_Draw(Actor* thisx, PlayState* play2) {
|
||||
gSPDisplayList(POLY_XLU_DISP++, gSpinAttack4DL);
|
||||
break;
|
||||
case 1:
|
||||
if (CVar_GetS32("gUseChargedCol",0)) {
|
||||
Color_RGB8 SpinColor = {255, 255, 170};
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, CVar_GetRGB("gCharged1Col", SpinColor).r, CVar_GetRGB("gCharged1Col", SpinColor).g, CVar_GetRGB("gCharged1Col", SpinColor).b, (u8)(this->unk_1B0 * 255));
|
||||
if (CVar_GetS32("gCosmetics.SpinAttack_Level1Primary.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.SpinAttack_Level1Primary.Value", (Color_RGB8){170, 255, 255});
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, color.r, color.g, color.b, (u8)(this->unk_1B0 * 255));
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 170, 255, 255, (u8)(this->unk_1B0 * 255));
|
||||
}
|
||||
@ -383,29 +383,33 @@ void EnMThunder_Draw(Actor* thisx, PlayState* play2) {
|
||||
|
||||
if (this->unk_1B8 >= 0.85f) {
|
||||
phi_f14 = (D_80AA046C[(play->gameplayFrames & 7)] * 6.0f) + 1.0f;
|
||||
if (CVar_GetS32("gUseChargedCol",0)) {
|
||||
Color_RGB8 SpinColor1 = {255, 255, 170};
|
||||
Color_RGB8 SpinColor2 = {255, 100, 0};
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, CVar_GetRGB("gCharged2Col", SpinColor1).r, CVar_GetRGB("gCharged2Col", SpinColor1).g, CVar_GetRGB("gCharged2Col", SpinColor1).b, this->unk_1C8);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, CVar_GetRGB("gCharged2ColEnv", SpinColor2).r, CVar_GetRGB("gCharged2ColEnv", SpinColor2).g, CVar_GetRGB("gCharged2ColEnv", SpinColor2).b, 128);
|
||||
if (CVar_GetS32("gCosmetics.SpinAttack_Level2Primary.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.SpinAttack_Level2Primary.Value", (Color_RGB8){255, 255, 170});
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, color.r, color.g, color.b, this->unk_1C8);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 170, this->unk_1C8);
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.SpinAttack_Level2Secondary.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.SpinAttack_Level2Secondary.Value", (Color_RGB8){255, 100, 0});
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, color.r, color.g, color.b, 128);
|
||||
} else {
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 100, 0, 128);
|
||||
}
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 100, 0, 128);
|
||||
phi_t1 = 0x28;
|
||||
} else {
|
||||
phi_f14 = (D_80AA046C[play->gameplayFrames & 7] * 2.0f) + 1.0f;
|
||||
if (CVar_GetS32("gUseChargedCol",0)) {
|
||||
Color_RGB8 SpinColor1 = {170, 255, 255};
|
||||
Color_RGB8 SpinColor2 = {20, 100, 255};
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, CVar_GetRGB("gCharged1Col", SpinColor1).r, CVar_GetRGB("gCharged1Col", SpinColor1).g, CVar_GetRGB("gCharged1Col", SpinColor1).b, this->unk_1C8);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, CVar_GetRGB("gCharged1ColEnv", SpinColor2).r, CVar_GetRGB("gCharged1ColEnv", SpinColor2).g, CVar_GetRGB("gCharged1ColEnv", SpinColor2).b, 128);
|
||||
if (CVar_GetS32("gCosmetics.SpinAttack_Level1Primary.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.SpinAttack_Level1Primary.Value", (Color_RGB8){170, 255, 255});
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, color.r, color.g, color.b, this->unk_1C8);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 170, 255, 255, this->unk_1C8);
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.SpinAttack_Level1Secondary.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.SpinAttack_Level1Secondary.Value", (Color_RGB8){0, 100, 255});
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, color.r, color.g, color.b, 128);
|
||||
} else {
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 100, 255, 128);
|
||||
}
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 100, 255, 128);
|
||||
phi_t1 = 0x14;
|
||||
}
|
||||
Matrix_Scale(1.0f, phi_f14, phi_f14, MTXMODE_APPLY);
|
||||
|
@ -123,8 +123,6 @@ void EnMag_InitMq(Actor* thisx, PlayState* play) {
|
||||
|
||||
void EnMag_InitVanilla(Actor* thisx, PlayState* play) {
|
||||
EnMag* this = (EnMag*)thisx;
|
||||
Color_RGB8 Original_Prim = { 255, 255, 170 };
|
||||
Color_RGB8 Original_Env = { 255, 100, 0 };
|
||||
|
||||
YREG(1) = 63;
|
||||
YREG(3) = 80;
|
||||
@ -151,21 +149,12 @@ void EnMag_InitVanilla(Actor* thisx, PlayState* play) {
|
||||
this->effectScroll = 0;
|
||||
this->unk_E30C = 0;
|
||||
|
||||
if (CVar_GetS32("gHudColors",0) == 2 ){
|
||||
this->effectPrimColor[0] = (float)CVar_GetRGB("gCCTCFirePrim", Original_Prim).r;
|
||||
this->effectPrimColor[1] = (float)CVar_GetRGB("gCCTCFirePrim", Original_Prim).g;
|
||||
this->effectPrimColor[2] = (float)CVar_GetRGB("gCCTCFirePrim", Original_Prim).b;
|
||||
this->effectEnvColor[0] = (float)CVar_GetRGB("gCCTCFireEnv", Original_Env).r;
|
||||
this->effectEnvColor[1] = (float)CVar_GetRGB("gCCTCFireEnv", Original_Env).g;
|
||||
this->effectEnvColor[2] = (float)CVar_GetRGB("gCCTCFireEnv", Original_Env).b;
|
||||
} else {
|
||||
this->effectPrimColor[0] = 0.0f;
|
||||
this->effectPrimColor[1] = 100.0f;
|
||||
this->effectPrimColor[2] = 170.0f;
|
||||
this->effectEnvColor[0] = 0.0f;
|
||||
this->effectEnvColor[1] = 100.0f;
|
||||
this->effectEnvColor[2] = 0.0f;
|
||||
}
|
||||
this->effectPrimColor[0] = 0.0f;
|
||||
this->effectPrimColor[1] = 100.0f;
|
||||
this->effectPrimColor[2] = 170.0f;
|
||||
this->effectEnvColor[0] = 0.0f;
|
||||
this->effectEnvColor[1] = 100.0f;
|
||||
this->effectEnvColor[2] = 0.0f;
|
||||
|
||||
this->effectFadeInTimer = 40;
|
||||
|
||||
@ -180,21 +169,12 @@ void EnMag_InitVanilla(Actor* thisx, PlayState* play) {
|
||||
this->effectPrimLodFrac = 128.0f;
|
||||
this->effectAlpha = 255.0f;
|
||||
|
||||
if (CVar_GetS32("gHudColors",0) == 2 ){
|
||||
this->effectPrimColor[0] = (float)CVar_GetRGB("gCCTCFirePrim", Original_Prim).r;
|
||||
this->effectPrimColor[1] = (float)CVar_GetRGB("gCCTCFirePrim", Original_Prim).g;
|
||||
this->effectPrimColor[2] = (float)CVar_GetRGB("gCCTCFirePrim", Original_Prim).b;
|
||||
this->effectEnvColor[0] = (float)CVar_GetRGB("gCCTCFireEnv", Original_Env).r;
|
||||
this->effectEnvColor[1] = (float)CVar_GetRGB("gCCTCFireEnv", Original_Env).g;
|
||||
this->effectEnvColor[2] = (float)CVar_GetRGB("gCCTCFireEnv", Original_Env).b;
|
||||
} else {
|
||||
this->effectPrimColor[0] = (float)Original_Prim.r;
|
||||
this->effectPrimColor[1] = (float)Original_Prim.g;
|
||||
this->effectPrimColor[2] = (float)Original_Prim.b;
|
||||
this->effectEnvColor[0] = (float)Original_Env.r;
|
||||
this->effectEnvColor[1] = (float)Original_Env.g;
|
||||
this->effectEnvColor[2] = (float)Original_Env.b;
|
||||
}
|
||||
this->effectPrimColor[0] = 255.0f;
|
||||
this->effectPrimColor[1] = 255.0f;
|
||||
this->effectPrimColor[2] = 170.0f;
|
||||
this->effectEnvColor[0] = 255.0f;
|
||||
this->effectEnvColor[1] = 100.0f;
|
||||
this->effectEnvColor[2] = 0.0f;
|
||||
|
||||
gSaveContext.unk_13E7 = 0;
|
||||
this->globalState = MAG_STATE_DISPLAY;
|
||||
@ -377,8 +357,6 @@ void EnMag_UpdateMq(Actor* thisx, PlayState* play) {
|
||||
void EnMag_UpdateVanilla(Actor* thisx, PlayState* play) {
|
||||
s32 pad[2];
|
||||
EnMag* this = (EnMag*)thisx;
|
||||
Color_RGB8 Original_Prim = { 255, 255, 170 };
|
||||
Color_RGB8 Original_Env = { 255, 100, 0 };
|
||||
|
||||
if (gSaveContext.fileNum != 0xFEDC) {
|
||||
if (this->globalState < MAG_STATE_DISPLAY) {
|
||||
@ -395,21 +373,12 @@ void EnMag_UpdateVanilla(Actor* thisx, PlayState* play) {
|
||||
this->effectPrimLodFrac = 128.0f;
|
||||
this->effectAlpha = 255.0f;
|
||||
|
||||
if (CVar_GetS32("gHudColors",0) == 2 ){
|
||||
this->effectPrimColor[0] = (float)CVar_GetRGB("gCCTCFirePrim", Original_Prim).r;
|
||||
this->effectPrimColor[1] = (float)CVar_GetRGB("gCCTCFirePrim", Original_Prim).g;
|
||||
this->effectPrimColor[2] = (float)CVar_GetRGB("gCCTCFirePrim", Original_Prim).b;
|
||||
this->effectEnvColor[0] = (float)CVar_GetRGB("gCCTCFireEnv", Original_Env).r;
|
||||
this->effectEnvColor[1] = (float)CVar_GetRGB("gCCTCFireEnv", Original_Env).g;
|
||||
this->effectEnvColor[2] = (float)CVar_GetRGB("gCCTCFireEnv", Original_Env).b;
|
||||
} else {
|
||||
this->effectPrimColor[0] = (float)Original_Prim.r;
|
||||
this->effectPrimColor[1] = (float)Original_Prim.g;
|
||||
this->effectPrimColor[2] = (float)Original_Prim.b;
|
||||
this->effectEnvColor[0] = (float)Original_Env.r;
|
||||
this->effectEnvColor[1] = (float)Original_Env.g;
|
||||
this->effectEnvColor[2] = (float)Original_Env.b;
|
||||
}
|
||||
this->effectPrimColor[0] = 255.0f;
|
||||
this->effectPrimColor[1] = 255.0f;
|
||||
this->effectPrimColor[2] = 170.0f;
|
||||
this->effectEnvColor[0] = 255.0f;
|
||||
this->effectEnvColor[1] = 100.0f;
|
||||
this->effectEnvColor[2] = 0.0f;
|
||||
|
||||
this->globalState = MAG_STATE_DISPLAY;
|
||||
sDelayTimer = 20;
|
||||
@ -448,13 +417,11 @@ void EnMag_UpdateVanilla(Actor* thisx, PlayState* play) {
|
||||
this->effectAlpha += 6.375f;
|
||||
this->effectPrimLodFrac += 0.8f;
|
||||
|
||||
if (CVar_GetS32("gHudColors",0) != 2 ){
|
||||
this->effectPrimColor[0] += 6.375f;
|
||||
this->effectPrimColor[1] += 3.875f;
|
||||
this->effectPrimColor[2] += 2.125f;
|
||||
this->effectEnvColor[0] += 6.375f;
|
||||
this->effectEnvColor[1] += 3.875f;
|
||||
}
|
||||
this->effectPrimColor[0] += 6.375f;
|
||||
this->effectPrimColor[1] += 3.875f;
|
||||
this->effectPrimColor[2] += 2.125f;
|
||||
this->effectEnvColor[0] += 6.375f;
|
||||
this->effectEnvColor[1] += 3.875f;
|
||||
|
||||
this->effectFadeInTimer--;
|
||||
|
||||
@ -462,22 +429,18 @@ void EnMag_UpdateVanilla(Actor* thisx, PlayState* play) {
|
||||
this->effectPrimLodFrac = 32.0f;
|
||||
this->effectAlpha = 255.0f;
|
||||
|
||||
if (CVar_GetS32("gHudColors",0) != 2 ){
|
||||
this->effectPrimColor[0] = 255.0f;
|
||||
this->effectPrimColor[1] = 255.0f;
|
||||
this->effectPrimColor[2] = 255.0f;
|
||||
this->effectEnvColor[0] = 255.0f;
|
||||
this->effectEnvColor[1] = 255.0f;
|
||||
}
|
||||
this->effectPrimColor[0] = 255.0f;
|
||||
this->effectPrimColor[1] = 255.0f;
|
||||
this->effectPrimColor[2] = 255.0f;
|
||||
this->effectEnvColor[0] = 255.0f;
|
||||
this->effectEnvColor[1] = 255.0f;
|
||||
|
||||
this->effectFadeInTimer = 40;
|
||||
this->effectFadeInState = 1;
|
||||
}
|
||||
} else if (this->effectFadeInState == 1) {
|
||||
if (CVar_GetS32("gHudColors",0) != 2 ){
|
||||
this->effectPrimColor[2] += -2.125f;
|
||||
this->effectEnvColor[1] += -3.875f;
|
||||
}
|
||||
this->effectPrimColor[2] += -2.125f;
|
||||
this->effectEnvColor[1] += -3.875f;
|
||||
|
||||
this->effectPrimLodFrac += 2.4f;
|
||||
|
||||
@ -485,18 +448,9 @@ void EnMag_UpdateVanilla(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (this->effectFadeInTimer == 0) {
|
||||
this->effectPrimLodFrac = 128.0f;
|
||||
|
||||
if (CVar_GetS32("gHudColors",0) == 2 ){
|
||||
this->effectPrimColor[0] = (float)CVar_GetRGB("gCCTCFirePrim", Original_Prim).r;
|
||||
this->effectPrimColor[1] = (float)CVar_GetRGB("gCCTCFirePrim", Original_Prim).g;
|
||||
this->effectPrimColor[2] = (float)CVar_GetRGB("gCCTCFirePrim", Original_Prim).b;
|
||||
this->effectEnvColor[0] = (float)CVar_GetRGB("gCCTCFireEnv", Original_Env).r;
|
||||
this->effectEnvColor[1] = (float)CVar_GetRGB("gCCTCFireEnv", Original_Env).g;
|
||||
this->effectEnvColor[2] = (float)CVar_GetRGB("gCCTCFireEnv", Original_Env).b;
|
||||
} else {
|
||||
this->effectPrimColor[2] = 170.0f;
|
||||
this->effectEnvColor[1] = 100.0f;
|
||||
}
|
||||
|
||||
this->effectPrimColor[2] = 170.0f;
|
||||
this->effectEnvColor[1] = 100.0f;
|
||||
|
||||
this->effectFadeInTimer = 32;
|
||||
this->effectFadeInState = 2;
|
||||
|
@ -1927,8 +1927,12 @@ void EnOssan_UpdateItemSelectedProperty(EnOssan* this) {
|
||||
}
|
||||
|
||||
void EnOssan_UpdateCursorAnim(EnOssan* this) {
|
||||
Color_RGB8 A_button_ori = {0,255,80};
|
||||
Color_RGB8 A_button = CVar_GetRGB("gCCABtnPrim", A_button_ori);
|
||||
Color_RGB8 aButtonColor = { 0, 80, 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, 255, 80 };
|
||||
}
|
||||
f32 t;
|
||||
|
||||
t = this->cursorAnimTween;
|
||||
@ -1945,19 +1949,9 @@ void EnOssan_UpdateCursorAnim(EnOssan* this) {
|
||||
this->cursorAnimState = 0;
|
||||
}
|
||||
}
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
this->cursorColorR = ColChanMix(0, 0.0f, t);
|
||||
this->cursorColorG = ColChanMix(80, 80.0f, t);
|
||||
this->cursorColorB = ColChanMix(255, 0.0f, t);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
this->cursorColorR = ColChanMix(A_button_ori.r, 0.0f, t);
|
||||
this->cursorColorG = ColChanMix(A_button_ori.b, 80.0f, t);
|
||||
this->cursorColorB = ColChanMix(A_button_ori.r, 0.0f, t);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
this->cursorColorR = ColChanMix(A_button.r, ((A_button.r/255)*100), t);
|
||||
this->cursorColorG = ColChanMix(A_button.g, ((A_button.g/255)*100), t);
|
||||
this->cursorColorB = ColChanMix(A_button.b, ((A_button.b/255)*100), t);
|
||||
}
|
||||
this->cursorColorR = ColChanMix(aButtonColor.r, 0.0f, t);
|
||||
this->cursorColorG = ColChanMix(aButtonColor.g, 80.0f, t);
|
||||
this->cursorColorB = ColChanMix(aButtonColor.b, 0.0f, t);
|
||||
this->cursorColorA = ColChanMix(255, 0.0f, t);
|
||||
this->cursorAnimTween = t;
|
||||
}
|
||||
|
@ -110,9 +110,8 @@ void EndTitle_DrawFull(Actor* thisx, PlayState* play) {
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 0, 0, 0, 0);
|
||||
gSPTextureRectangle(OVERLAY_DISP++, 104 << 2, 177 << 2, 216 << 2, 192 << 2, G_TX_RENDERTILE, 0, 0, 1 << 10,
|
||||
1 << 10);
|
||||
if (D_801614B0.a > 0) {
|
||||
if (D_801614B0.a > 0)
|
||||
gSPGrayscale(OVERLAY_DISP++, true);
|
||||
}
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
|
@ -340,7 +340,13 @@ void ObjTimeblock_Draw(Actor* thisx, PlayState* play) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, primColor->r, primColor->g, primColor->b, 255);
|
||||
if (CVar_GetS32("gCosmetics.World_BlockOfTime.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.World_BlockOfTime.Value", *primColor);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, color.r, color.g, color.b, 255);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, primColor->r, primColor->g, primColor->b, 255);
|
||||
}
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, gSongOfTimeBlockDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
@ -10418,7 +10418,10 @@ void func_80848EF8(Player* this, PlayState* play) {
|
||||
|
||||
/*Prevent it on horse, while jumping and on title screen.
|
||||
If you fly around no stone of agony for you! */
|
||||
Color_RGB8 StoneOfAgony_ori = { 255, 255, 255 };
|
||||
Color_RGB8 stoneOfAgonyColor = { 255, 255, 255 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_StoneOfAgony.Changed", 0)) {
|
||||
stoneOfAgonyColor = CVar_GetRGB("gCosmetics.Hud_StoneOfAgony.Value", stoneOfAgonyColor);
|
||||
}
|
||||
if (CVar_GetS32("gVisualAgony", 0) != 0 && !this->stateFlags1) {
|
||||
s16 Top_Margins = (CVar_GetS32("gHUDMargin_T", 0) * -1);
|
||||
s16 Left_Margins = CVar_GetS32("gHUDMargin_L", 0);
|
||||
@ -10469,48 +10472,20 @@ void func_80848EF8(Player* this, PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCVSOAPrim", StoneOfAgony_ori).r,
|
||||
CVar_GetRGB("gCCVSOAPrim", StoneOfAgony_ori).g,
|
||||
CVar_GetRGB("gCCVSOAPrim", StoneOfAgony_ori).b, DefaultIconA);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, StoneOfAgony_ori.r, StoneOfAgony_ori.g, StoneOfAgony_ori.b,
|
||||
DefaultIconA);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, stoneOfAgonyColor.r, stoneOfAgonyColor.g, stoneOfAgonyColor.b, DefaultIconA);
|
||||
|
||||
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
|
||||
PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
|
||||
if (this->unk_6A0 > 4000000.0f) {
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCVSOAPrim", StoneOfAgony_ori).r,
|
||||
CVar_GetRGB("gCCVSOAPrim", StoneOfAgony_ori).g,
|
||||
CVar_GetRGB("gCCVSOAPrim", StoneOfAgony_ori).b, 255);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, StoneOfAgony_ori.r, StoneOfAgony_ori.g, StoneOfAgony_ori.b,
|
||||
255);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, stoneOfAgonyColor.r, stoneOfAgonyColor.g, stoneOfAgonyColor.b, 255);
|
||||
} else {
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCVSOAPrim", StoneOfAgony_ori).r,
|
||||
CVar_GetRGB("gCCVSOAPrim", StoneOfAgony_ori).g,
|
||||
CVar_GetRGB("gCCVSOAPrim", StoneOfAgony_ori).b, DefaultIconA);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, StoneOfAgony_ori.r, StoneOfAgony_ori.g, StoneOfAgony_ori.b,
|
||||
DefaultIconA);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, stoneOfAgonyColor.r, stoneOfAgonyColor.g, stoneOfAgonyColor.b, DefaultIconA);
|
||||
}
|
||||
if (temp == 0 || temp <= 0.1f) {
|
||||
/*Fail check, it is used to draw off the icon when
|
||||
link is standing out range but do not refresh unk_6A0.
|
||||
Also used to make a default value in my case.*/
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, CVar_GetRGB("gCCVSOAPrim", StoneOfAgony_ori).r,
|
||||
CVar_GetRGB("gCCVSOAPrim", StoneOfAgony_ori).g,
|
||||
CVar_GetRGB("gCCVSOAPrim", StoneOfAgony_ori).b, DefaultIconA);
|
||||
} else {
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, StoneOfAgony_ori.r, StoneOfAgony_ori.g, StoneOfAgony_ori.b,
|
||||
DefaultIconA);
|
||||
}
|
||||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, stoneOfAgonyColor.r, stoneOfAgonyColor.g, stoneOfAgonyColor.b, DefaultIconA);
|
||||
}
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255);
|
||||
gDPSetOtherMode(OVERLAY_DISP++,
|
||||
@ -11081,13 +11056,13 @@ void Player_DrawGameplay(PlayState* play, Player* this, s32 lod, Gfx* cullDList,
|
||||
sp68.x = D_80858AC8.unk_02 + 0x3E2;
|
||||
sp68.y = D_80858AC8.unk_04 + 0xDBE;
|
||||
sp68.z = D_80858AC8.unk_00 - 0x348A;
|
||||
Matrix_SetTranslateRotateYXZ(97.0f, -1203.0f, -240.0f, &sp68);
|
||||
Matrix_SetTranslateRotateYXZ(97.0f, -1203.0f - CVar_GetFloat("gCosmetics.BunnyHood_EarLength", 0.0f), -240.0f - CVar_GetFloat("gCosmetics.BunnyHood_EarSpread", 0.0f), &sp68);
|
||||
MATRIX_TOMTX(sp70++);
|
||||
|
||||
sp68.x = D_80858AC8.unk_02 - 0x3E2;
|
||||
sp68.y = -0xDBE - D_80858AC8.unk_04;
|
||||
sp68.z = D_80858AC8.unk_00 - 0x348A;
|
||||
Matrix_SetTranslateRotateYXZ(97.0f, -1203.0f, 240.0f, &sp68);
|
||||
Matrix_SetTranslateRotateYXZ(97.0f, -1203.0f - CVar_GetFloat("gCosmetics.BunnyHood_EarLength", 0.0f), 240.0f + CVar_GetFloat("gCosmetics.BunnyHood_EarSpread", 0.0f), &sp68);
|
||||
MATRIX_TOMTX(sp70);
|
||||
}
|
||||
|
||||
|
@ -201,7 +201,7 @@ static Gfx sScreenFillSetupDL[] = {
|
||||
|
||||
static s16 sFileInfoBoxPartWidths[] = { 36, 36, 36, 36, 24 };
|
||||
|
||||
static s16 sWindowContentColors[2][3] = {
|
||||
s16 sWindowContentColors[2][3] = {
|
||||
{ 100, 150, 255 }, // blue
|
||||
{ 100, 100, 100 }, // gray
|
||||
};
|
||||
@ -1229,8 +1229,6 @@ static s16 sQuestItemBlue[] = { 255, 255, 255, 0, 0, 255, 0, 255, 0 };
|
||||
static s16 sQuestItemFlags[] = { 0x0012, 0x0013, 0x0014, 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005 };
|
||||
static s16 sNamePrimColors[2][3] = { { 255, 255, 255 }, { 100, 100, 100 } };
|
||||
static void* sHeartTextures[] = { gHeartFullTex, gDefenseHeartFullTex };
|
||||
static s16 sHeartPrimColors[2][3] = { { 255, 70, 50 }, { 200, 0, 0 } };
|
||||
static s16 sHeartEnvColors[2][3] = { { 50, 40, 60 }, { 255, 255, 255 } };
|
||||
|
||||
void FileChoose_DrawFileInfo(GameState* thisx, s16 fileIndex, s16 isActive) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
@ -1241,6 +1239,23 @@ void FileChoose_DrawFileInfo(GameState* thisx, s16 fileIndex, s16 isActive) {
|
||||
s16 j;
|
||||
s16 deathCountSplit[3];
|
||||
|
||||
Color_RGB8 heartColor = {HEARTS_PRIM_R, HEARTS_PRIM_G, HEARTS_PRIM_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_Hearts.Changed", 0)) {
|
||||
heartColor = CVar_GetRGB("gCosmetics.Consumable_Hearts.Value", heartColor);
|
||||
}
|
||||
Color_RGB8 heartBorder = {HEARTS_ENV_R, HEARTS_ENV_G, HEARTS_ENV_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_HeartBorder.Changed", 0)) {
|
||||
heartBorder = CVar_GetRGB("gCosmetics.Consumable_HeartBorder.Value", heartBorder);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
OPEN_DISPS(this->state.gfxCtx);
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
@ -1283,10 +1298,13 @@ void FileChoose_DrawFileInfo(GameState* thisx, s16 fileIndex, s16 isActive) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
|
||||
PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x00, sHeartPrimColors[heartType][0], sHeartPrimColors[heartType][1],
|
||||
sHeartPrimColors[heartType][2], this->fileInfoAlpha[fileIndex]);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, sHeartEnvColors[heartType][0], sHeartEnvColors[heartType][1],
|
||||
sHeartEnvColors[heartType][2], 255);
|
||||
if (heartType) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x00, ddColor.r, ddColor.g, ddColor.b, this->fileInfoAlpha[fileIndex]);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, ddBorder.r, ddBorder.g, ddBorder.b, 255);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x00, heartColor.r, heartColor.g, heartColor.b, this->fileInfoAlpha[fileIndex]);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, heartBorder.r, heartBorder.g, heartBorder.b, 255);
|
||||
}
|
||||
|
||||
i = Save_GetSaveMetaInfo(fileIndex)->healthCapacity / 0x10;
|
||||
|
||||
@ -1397,7 +1415,6 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
||||
this->configMode == CM_NAME_ENTRY_TO_QUEST_MENU)
|
||||
? ResourceMgr_LoadFileRaw(FileChoose_GetQuestChooseTitleTexName(gSaveContext.language))
|
||||
: sTitleLabels[gSaveContext.language][this->titleLabel];
|
||||
Color_RGB8 Background_Color = { this->windowColor[0], this->windowColor[1], this->windowColor[2] };
|
||||
|
||||
OPEN_DISPS(this->state.gfxCtx);
|
||||
|
||||
@ -1484,15 +1501,8 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
||||
// draw file info box (large box when a file is selected)
|
||||
for (fileIndex = 0; fileIndex < 3; fileIndex++, temp += 20) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).g,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->fileInfoAlpha[fileIndex]);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, Background_Color.r, Background_Color.g, Background_Color.b,
|
||||
this->fileInfoAlpha[fileIndex]);
|
||||
}
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->fileInfoAlpha[fileIndex]);
|
||||
gSPVertex(POLY_OPA_DISP++, &this->windowContentVtx[temp], 20, 0);
|
||||
|
||||
for (quadVtxIndex = 0, i = 0; i < 5; i++, quadVtxIndex += 4) {
|
||||
@ -1512,10 +1522,6 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
||||
if (!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i)) && Save_GetSaveMetaInfo(i)->valid) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sWindowContentColors[1][0], sWindowContentColors[1][1],
|
||||
sWindowContentColors[1][2], this->fileButtonAlpha[i]);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).g,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->fileButtonAlpha[i]);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sWindowContentColors[isActive][0],
|
||||
sWindowContentColors[isActive][1], sWindowContentColors[isActive][2],
|
||||
@ -1528,11 +1534,7 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
||||
gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
|
||||
|
||||
// draw file name box
|
||||
if (CVar_GetS32("gHudColors", 1) == 2 && FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i))) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).g,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->nameBoxAlpha[i]);
|
||||
} else if (!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i))) {
|
||||
if (!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i))) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sWindowContentColors[1][0], sWindowContentColors[1][1],
|
||||
sWindowContentColors[1][2], this->nameBoxAlpha[i]);
|
||||
} else {
|
||||
@ -1548,11 +1550,7 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
||||
|
||||
// draw rando label
|
||||
if (Save_GetSaveMetaInfo(i)->randoSave) {
|
||||
if (CVar_GetS32("gHudColors", 1) == 2 && FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i))) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).g,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->nameAlpha[i]);
|
||||
} else if (!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i))) {
|
||||
if (!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i))) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sWindowContentColors[1][0], sWindowContentColors[1][1],
|
||||
sWindowContentColors[1][2], this->nameBoxAlpha[i]);
|
||||
} else {
|
||||
@ -1569,11 +1567,7 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
||||
// Draw MQ label
|
||||
if (Save_GetSaveMetaInfo(i)->requiresMasterQuest && !Save_GetSaveMetaInfo(i)->randoSave &&
|
||||
Save_GetSaveMetaInfo(i)->valid) {
|
||||
if (CVar_GetS32("gHudColors", 1) == 2 && FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i))) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).g,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->nameAlpha[i]);
|
||||
} else if (!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i))) {
|
||||
if (!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i))) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sWindowContentColors[1][0], sWindowContentColors[1][1],
|
||||
sWindowContentColors[1][2], this->nameBoxAlpha[i]);
|
||||
} else {
|
||||
@ -1589,11 +1583,7 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
||||
}
|
||||
|
||||
// draw connectors
|
||||
if (CVar_GetS32("gHudColors", 1) == 2 && FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i))) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).g,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->connectorAlpha[i]);
|
||||
} else if (!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i)) && Save_GetSaveMetaInfo(i)->valid) {
|
||||
if (!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i)) && Save_GetSaveMetaInfo(i)->valid) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sWindowContentColors[1][0], sWindowContentColors[1][1],
|
||||
sWindowContentColors[1][2], this->fileButtonAlpha[i]);
|
||||
} else {
|
||||
@ -1626,15 +1616,8 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
||||
// draw primary action buttons (copy/erase)
|
||||
for (quadVtxIndex = 0, i = 0; i < 2; i++, quadVtxIndex += 4) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).g,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->actionButtonAlpha[i]);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->actionButtonAlpha[i]);
|
||||
}
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->actionButtonAlpha[i]);
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, sActionButtonTextures[gSaveContext.language][i], G_IM_FMT_IA,
|
||||
G_IM_SIZ_16b, 64, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
@ -1647,14 +1630,8 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
||||
for (quadVtxIndex = 0, i = 0; i < 2; i++, quadVtxIndex += 4) {
|
||||
temp = this->confirmButtonTexIndices[i];
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).g,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->confirmButtonAlpha[i]);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->confirmButtonAlpha[i]);
|
||||
}
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->confirmButtonAlpha[i]);
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, sActionButtonTextures[gSaveContext.language][temp], G_IM_FMT_IA,
|
||||
G_IM_SIZ_16b, 64, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
@ -1663,15 +1640,8 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
||||
|
||||
// draw options button
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).g,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->optionButtonAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->optionButtonAlpha);
|
||||
}
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->optionButtonAlpha);
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, sOptionsButtonTextures[gSaveContext.language], G_IM_FMT_IA, G_IM_SIZ_16b,
|
||||
64, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
G_TX_NOLOD, G_TX_NOLOD);
|
||||
@ -1686,15 +1656,8 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetCombineLERP(POLY_OPA_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0, TEXEL0,
|
||||
0, PRIMITIVE, 0);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).g,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->highlightColor[3]);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->highlightColor[0], this->highlightColor[1],
|
||||
this->highlightColor[2], this->highlightColor[3]);
|
||||
}
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->highlightColor[0], this->highlightColor[1],
|
||||
this->highlightColor[2], this->highlightColor[3]);
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, gFileSelBigButtonHighlightTex, G_IM_FMT_I, G_IM_SIZ_8b, 72, 24, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
G_TX_NOLOD, G_TX_NOLOD);
|
||||
@ -1726,7 +1689,6 @@ void FileChoose_ConfigModeDraw(GameState* thisx) {
|
||||
f32 eyeX;
|
||||
f32 eyeY;
|
||||
f32 eyeZ;
|
||||
Color_RGB8 Background_Color = {this->windowColor[0], this->windowColor[1], this->windowColor[2]};
|
||||
|
||||
OPEN_DISPS(this->state.gfxCtx);
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
@ -1752,13 +1714,8 @@ void FileChoose_ConfigModeDraw(GameState* thisx) {
|
||||
(this->configMode != CM_QUEST_MENU) && this->configMode != CM_NAME_ENTRY_TO_QUEST_MENU) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r, CVar_GetRGB("gCCFileChoosePrim", Background_Color).g, CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->windowAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->windowAlpha);
|
||||
}
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->windowAlpha);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
|
||||
|
||||
Matrix_Translate(0.0f, 0.0f, -93.6f, MTXMODE_NEW);
|
||||
@ -1795,13 +1752,8 @@ void FileChoose_ConfigModeDraw(GameState* thisx) {
|
||||
if ((this->configMode >= CM_ROTATE_TO_NAME_ENTRY) && (this->configMode <= CM_NAME_ENTRY_TO_MAIN)) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r, CVar_GetRGB("gCCFileChoosePrim", Background_Color).g, CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->windowAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->windowAlpha);
|
||||
}
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->windowAlpha);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
|
||||
|
||||
Matrix_Translate(0.0f, 0.0f, -93.6f, MTXMODE_NEW);
|
||||
@ -1832,13 +1784,8 @@ void FileChoose_ConfigModeDraw(GameState* thisx) {
|
||||
if ((this->configMode >= CM_MAIN_TO_OPTIONS) && (this->configMode <= CM_OPTIONS_TO_MAIN)) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r, CVar_GetRGB("gCCFileChoosePrim", Background_Color).g, CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->windowAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->windowAlpha);
|
||||
}
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->windowAlpha);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
|
||||
|
||||
Matrix_Translate(0.0f, 0.0f, -93.6f, MTXMODE_NEW);
|
||||
@ -1869,12 +1816,8 @@ void FileChoose_ConfigModeDraw(GameState* thisx) {
|
||||
// window
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r, CVar_GetRGB("gCCFileChoosePrim", Background_Color).g, CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->windowAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->windowAlpha);
|
||||
}
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->windowAlpha);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
|
||||
|
||||
Matrix_Translate(0.0f, 0.0f, -93.6f, MTXMODE_NEW);
|
||||
@ -2224,7 +2167,6 @@ void FileChoose_SelectModeDraw(GameState* thisx) {
|
||||
f32 eyeX;
|
||||
f32 eyeY;
|
||||
f32 eyeZ;
|
||||
Color_RGB8 Background_Color = { this->windowColor[0], this->windowColor[1], this->windowColor[2] };
|
||||
|
||||
OPEN_DISPS(this->state.gfxCtx);
|
||||
|
||||
@ -2246,13 +2188,8 @@ void FileChoose_SelectModeDraw(GameState* thisx) {
|
||||
FileChoose_SetWindowContentVtx(&this->state);
|
||||
|
||||
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r, CVar_GetRGB("gCCFileChoosePrim", Background_Color).g, CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, this->windowAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->windowAlpha);
|
||||
}
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->windowAlpha);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
|
||||
|
||||
Matrix_Translate(0.0f, 0.0f, -93.6f, MTXMODE_NEW);
|
||||
@ -2297,10 +2234,36 @@ void FileChoose_Main(GameState* thisx) {
|
||||
gFileSelControlsGERTex,
|
||||
gFileSelControlsFRATex,
|
||||
};
|
||||
Color_RGB8 Text_Color = { 100, 255, 255 };
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
|
||||
Color_RGB8 helpTextColor = { 100, 255, 255 };
|
||||
if (CVar_GetS32("gCosmetics.Title_FileChoose.Changed", 0)) {
|
||||
Color_RGB8 backgroundColor = CVar_GetRGB("gCosmetics.Title_FileChoose.Value", (Color_RGB8){ 100, 150, 255 });
|
||||
this->windowColor[0] = backgroundColor.r;
|
||||
this->windowColor[1] = backgroundColor.g;
|
||||
this->windowColor[2] = backgroundColor.b;
|
||||
this->highlightColor[0] = MIN(backgroundColor.r + 100, 255);
|
||||
this->highlightColor[1] = MIN(backgroundColor.g + 100, 255);
|
||||
this->highlightColor[2] = MIN(backgroundColor.b + 100, 255);
|
||||
helpTextColor.r = MIN(backgroundColor.r + 100, 255);
|
||||
helpTextColor.g = MIN(backgroundColor.g + 100, 255);
|
||||
helpTextColor.b = MIN(backgroundColor.b + 100, 255);
|
||||
sWindowContentColors[0][0] = backgroundColor.r;
|
||||
sWindowContentColors[0][1] = backgroundColor.g;
|
||||
sWindowContentColors[0][2] = backgroundColor.b;
|
||||
} else {
|
||||
this->windowColor[0] = 100;
|
||||
this->windowColor[1] = 150;
|
||||
this->windowColor[2] = 255;
|
||||
this->highlightColor[0] = 155;
|
||||
this->highlightColor[1] = 255;
|
||||
this->highlightColor[2] = 255;
|
||||
sWindowContentColors[0][0] = 100;
|
||||
sWindowContentColors[0][1] = 150;
|
||||
sWindowContentColors[0][2] = 255;
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gTimeFlowFileSelect", 0) != 0) {
|
||||
gSaveContext.skyboxTime += 0x10;
|
||||
}
|
||||
@ -2446,12 +2409,7 @@ void FileChoose_Main(GameState* thisx) {
|
||||
|
||||
gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
|
||||
PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChooseTextPrim", Text_Color).r, CVar_GetRGB("gCCFileChooseTextPrim", Text_Color).g, CVar_GetRGB("gCCFileChooseTextPrim", Text_Color).b, this->controlsAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, Text_Color.r, Text_Color.g, Text_Color.b, this->controlsAlpha);
|
||||
}
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, helpTextColor.r, helpTextColor.g, helpTextColor.b, this->controlsAlpha);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, controlsTextures[gSaveContext.language], G_IM_FMT_IA, G_IM_SIZ_8b, 144, 16,
|
||||
0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
|
||||
|
@ -132,15 +132,8 @@ void FileChoose_SetNameEntryVtx(GameState* thisx) {
|
||||
|
||||
phi_s0 = 0x10;
|
||||
for (phi_t1 = 0; phi_t1 < 2; phi_t1++, phi_s0 += 4) {
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).g,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).b, 255);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
255);
|
||||
}
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
255);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, sBackspaceEndTextures[gSaveContext.language][phi_t1], G_IM_FMT_IA,
|
||||
G_IM_SIZ_16b, sBackspaceEndWidths[phi_t1], 16, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
@ -202,16 +195,8 @@ void FileChoose_SetNameEntryVtx(GameState* thisx) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE,
|
||||
ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).g,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).b,
|
||||
this->nameEntryBoxAlpha);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->nameEntryBoxAlpha);
|
||||
}
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->windowColor[0], this->windowColor[1], this->windowColor[2],
|
||||
this->nameEntryBoxAlpha);
|
||||
gSPVertex(POLY_OPA_DISP++, this->nameEntryVtx, 4, 0);
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, gFileSelNameBoxTex, G_IM_FMT_IA, G_IM_SIZ_16b, 108, 16, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
||||
@ -334,16 +319,8 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetCombineLERP(POLY_OPA_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0, TEXEL0, 0,
|
||||
PRIMITIVE, 0);
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, CVar_GetRGB("gCCFileChoosePrim", Background_Color).r,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).g,
|
||||
CVar_GetRGB("gCCFileChoosePrim", Background_Color).b,
|
||||
this->highlightColor[3]);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->highlightColor[0], this->highlightColor[1],
|
||||
this->highlightColor[2], this->highlightColor[3]);
|
||||
}
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->highlightColor[0], this->highlightColor[1],
|
||||
this->highlightColor[2], this->highlightColor[3]);
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, gFileSelCharHighlightTex, G_IM_FMT_I, G_IM_SIZ_8b, 24, 24, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
||||
G_TX_NOLOD);
|
||||
@ -814,14 +791,25 @@ void FileChoose_DrawOptionsImpl(GameState* thisx) {
|
||||
static s16 cursorEnvBlue = 0;
|
||||
static s16 cursorPulseDir = 1;
|
||||
static s16 cursorFlashTimer = 20;
|
||||
static s16 cursorPrimColors[][3] = {
|
||||
s16 cursorPrimColors[][3] = {
|
||||
{ 255, 255, 255 },
|
||||
{ 0, 255, 255 },
|
||||
};
|
||||
static s16 cursorEnvColors[][3] = {
|
||||
s16 cursorEnvColors[][3] = {
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 150, 150 },
|
||||
};
|
||||
|
||||
if (CVar_GetS32("gCosmetics.Title_FileChoose.Changed", 0)) {
|
||||
Color_RGB8 backgroundColor = CVar_GetRGB("gCosmetics.Title_FileChoose.Value", (Color_RGB8){ 100, 150, 255 });
|
||||
cursorPrimColors[1][0] = MIN(backgroundColor.r + 100, 255);
|
||||
cursorPrimColors[1][1] = MIN(backgroundColor.g + 100, 255);
|
||||
cursorPrimColors[1][2] = MIN(backgroundColor.b + 100, 255);
|
||||
cursorEnvColors[1][0] = MIN(backgroundColor.r + 50, 255);
|
||||
cursorEnvColors[1][1] = MIN(backgroundColor.g + 50, 255);
|
||||
cursorEnvColors[1][2] = MIN(backgroundColor.b + 50, 255);
|
||||
}
|
||||
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
s16 cursorRed;
|
||||
s16 cursorGreen;
|
||||
|
@ -212,8 +212,14 @@ void Title_Draw(TitleContext* this) {
|
||||
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_XLU_SURF2, G_RM_OPA_CI | CVG_DST_WRAP);
|
||||
gDPSetCombineLERP(POLY_OPA_DISP++, TEXEL1, PRIMITIVE, ENV_ALPHA, TEXEL0, 0, 0, 0, TEXEL0, PRIMITIVE, ENVIRONMENT,
|
||||
COMBINED, ENVIRONMENT, COMBINED, 0, PRIMITIVE, 0);
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 170, 255, 255, 255);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 255, 128);
|
||||
if (CVar_GetS32("gCosmetics.Title_NintendoLogo.Changed", 0)) {
|
||||
Color_RGB8 nintendoLogoColor = CVar_GetRGB("gCosmetics.Title_NintendoLogo.Value", (Color_RGB8){0, 0, 255});
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, nintendoLogoColor.r, nintendoLogoColor.g, nintendoLogoColor.b, 128);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 170, 255, 255, 255);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 255, 128);
|
||||
}
|
||||
|
||||
gDPLoadMultiBlock(POLY_OPA_DISP++, nintendo_rogo_static_Tex_001800, 0x100, 1, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, 2, 11);
|
||||
@ -230,7 +236,7 @@ void Title_Draw(TitleContext* this) {
|
||||
|
||||
Environment_FillScreen(this->state.gfxCtx, 0, 0, 0, (s16)this->coverAlpha, FILL_SCREEN_XLU);
|
||||
|
||||
sTitleRotY += 300;
|
||||
sTitleRotY += (300 * CVar_GetFloat("gCosmetics.N64Logo_SpinSpeed", 1.0f));
|
||||
|
||||
CLOSE_DISPS(this->state.gfxCtx);
|
||||
}
|
||||
|
@ -5,14 +5,34 @@
|
||||
extern const char* digitTextures[];
|
||||
|
||||
void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
Color_RGB8 A_button_ori = {80, 255, 150};
|
||||
Color_RGB8 A_button = CVar_GetRGB("gCCABtnPrim", A_button_ori);
|
||||
Color_RGB8 C_button_ori = {255, 255, 50};
|
||||
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 aButtonColor = { 80, 150, 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){ 80, 255, 150 };
|
||||
}
|
||||
|
||||
Color_RGB8 cButtonsColor = {255, 255, 50};
|
||||
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);
|
||||
}
|
||||
|
||||
static s16 D_8082A070[][4] = {
|
||||
{ 255, 0, 0, 255 },
|
||||
{ 255, 70, 0, 150 },
|
||||
@ -503,28 +523,18 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
|
||||
s16 Notes_alpha = D_8082A150[sp218];
|
||||
if (D_8082A124[sp218] == 0) {
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) { // A Button notes
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 80, 150, 255, Notes_alpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, A_button_ori.r, A_button_ori.g, A_button_ori.b, Notes_alpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, A_button.r, A_button.g, A_button.b, Notes_alpha);
|
||||
}
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, aButtonColor.r, aButtonColor.g, aButtonColor.b, Notes_alpha);
|
||||
} else {
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) { // C Buttons notes
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, Notes_alpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, Notes_alpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && !CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_uni.r, C_button_uni.g, C_button_uni.b, Notes_alpha);
|
||||
} else if (D_8082A124[sp218] == OCARINA_NOTE_D5 && CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_U.r, C_button_U.g, C_button_U.b, Notes_alpha);
|
||||
} else if (D_8082A124[sp218] == OCARINA_NOTE_B4 && CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_L.r, C_button_L.g, C_button_L.b, Notes_alpha);
|
||||
} else if (D_8082A124[sp218] == OCARINA_NOTE_A4 && CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_R.r, C_button_R.g, C_button_R.b, Notes_alpha);
|
||||
} else if (D_8082A124[sp218] == OCARINA_NOTE_F4 && CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_D.r, C_button_D.g, C_button_D.b, Notes_alpha);
|
||||
if (D_8082A124[sp218] == OCARINA_NOTE_D5) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cUpButtonColor.r, cUpButtonColor.g, cUpButtonColor.b, Notes_alpha);
|
||||
} else if (D_8082A124[sp218] == OCARINA_NOTE_B4) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cLeftButtonColor.r, cLeftButtonColor.g, cLeftButtonColor.b, Notes_alpha);
|
||||
} else if (D_8082A124[sp218] == OCARINA_NOTE_A4) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cRightButtonColor.r, cRightButtonColor.g, cRightButtonColor.b, Notes_alpha);
|
||||
} else if (D_8082A124[sp218] == OCARINA_NOTE_F4) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cDownButtonColor.r, cDownButtonColor.g, cDownButtonColor.b, Notes_alpha);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cButtonsColor.r, cButtonsColor.g, cButtonsColor.b, Notes_alpha);
|
||||
}
|
||||
}
|
||||
|
||||
@ -554,28 +564,18 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
if (pauseCtx->unk_1E4 == 8) {
|
||||
s16 Notes_alpha = 200;
|
||||
if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == 0) {
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) { // A Button notes
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 80, 150, 255, Notes_alpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, A_button_ori.r, A_button_ori.g, A_button_ori.b, Notes_alpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, A_button.r, A_button.g, A_button.b, Notes_alpha);
|
||||
}
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, aButtonColor.r, aButtonColor.g, aButtonColor.b, Notes_alpha);
|
||||
} else {
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) { // C Buttons notes
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, Notes_alpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, Notes_alpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && !CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_uni.r, C_button_uni.g, C_button_uni.b, Notes_alpha);
|
||||
} else if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == OCARINA_NOTE_D5 && CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_U.r, C_button_U.g, C_button_U.b, Notes_alpha);
|
||||
} else if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == OCARINA_NOTE_B4 && CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_L.r, C_button_L.g, C_button_L.b, Notes_alpha);
|
||||
} else if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == OCARINA_NOTE_A4 && CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_R.r, C_button_R.g, C_button_R.b, Notes_alpha);
|
||||
} else if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == OCARINA_NOTE_F4 && CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_D.r, C_button_D.g, C_button_D.b, Notes_alpha);
|
||||
if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == OCARINA_NOTE_D5) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cUpButtonColor.r, cUpButtonColor.g, cUpButtonColor.b, Notes_alpha);
|
||||
} else if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == OCARINA_NOTE_B4) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cLeftButtonColor.r, cLeftButtonColor.g, cLeftButtonColor.b, Notes_alpha);
|
||||
} else if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == OCARINA_NOTE_A4) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cRightButtonColor.r, cRightButtonColor.g, cRightButtonColor.b, Notes_alpha);
|
||||
} else if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == OCARINA_NOTE_F4) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cDownButtonColor.r, cDownButtonColor.g, cDownButtonColor.b, Notes_alpha);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cButtonsColor.r, cButtonsColor.g, cButtonsColor.b, Notes_alpha);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -630,26 +630,18 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
|
||||
s16 Notes_alpha = D_8082A150[phi_s3];
|
||||
if (D_8082A124[phi_s3] == 0) {
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) { // A Button notes
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 80, 150, 255, Notes_alpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, A_button_ori.r, A_button_ori.g, A_button_ori.b, Notes_alpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, A_button.r, A_button.g, A_button.b, Notes_alpha);
|
||||
}
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, aButtonColor.r, aButtonColor.g, aButtonColor.b, Notes_alpha);
|
||||
} else {
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) { // C Buttons notes
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, Notes_alpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, Notes_alpha);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && !CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_uni.r, C_button_uni.g, C_button_uni.b, Notes_alpha);
|
||||
} else if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == OCARINA_NOTE_B4 && CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_L.r, C_button_L.g, C_button_L.b, Notes_alpha);
|
||||
} else if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == OCARINA_NOTE_A4 && CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_R.r, C_button_R.g, C_button_R.b, Notes_alpha);
|
||||
} else if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == OCARINA_NOTE_F4 && CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_D.r, C_button_D.g, C_button_D.b, Notes_alpha);
|
||||
if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == OCARINA_NOTE_D5) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cUpButtonColor.r, cUpButtonColor.g, cUpButtonColor.b, Notes_alpha);
|
||||
} else if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == OCARINA_NOTE_B4) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cLeftButtonColor.r, cLeftButtonColor.g, cLeftButtonColor.b, Notes_alpha);
|
||||
} else if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == OCARINA_NOTE_A4) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cRightButtonColor.r, cRightButtonColor.g, cRightButtonColor.b, Notes_alpha);
|
||||
} else if (gOcarinaSongNotes[sp224].notesIdx[phi_s3] == OCARINA_NOTE_F4) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cDownButtonColor.r, cDownButtonColor.g, cDownButtonColor.b, Notes_alpha);
|
||||
} else {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cButtonsColor.r, cButtonsColor.g, cButtonsColor.b, Notes_alpha);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -756,10 +756,10 @@ static void* sCursorTexs[] = {
|
||||
gPauseMenuCursorBottomRightTex,
|
||||
};
|
||||
|
||||
static s16 sCursorColors[][3] = {
|
||||
static Color_RGB8 sCursorColors[3] = {
|
||||
{ 255, 255, 255 },
|
||||
{ 255, 255, 0 },
|
||||
{ 0, 255, 50 },
|
||||
{ 0, 50, 255 },
|
||||
};
|
||||
|
||||
const Color_RGB8 Cursor_ABTN_ori = {0, 255, 50};
|
||||
@ -994,28 +994,14 @@ void KaleidoScope_DrawCursor(PlayState* play, u16 pageIndex) {
|
||||
|
||||
temp = pauseCtx->unk_1E4;
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
//Will be converted to ColorRGB later.
|
||||
sCursorColors[1][0] = Cursor_CBTN_ori.r;
|
||||
sCursorColors[1][1] = Cursor_CBTN_ori.g;
|
||||
sCursorColors[1][2] = Cursor_CBTN_ori.b;
|
||||
sCursorColors[2][0] = Cursor_ABTNN64_ori.r;
|
||||
sCursorColors[2][1] = Cursor_ABTNN64_ori.g;
|
||||
sCursorColors[2][2] = Cursor_ABTNN64_ori.b;
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
sCursorColors[1][0] = Cursor_CBTN_ori.r;
|
||||
sCursorColors[1][1] = Cursor_CBTN_ori.g;
|
||||
sCursorColors[1][2] = Cursor_CBTN_ori.b;
|
||||
sCursorColors[2][0] = Cursor_ABTN_ori.r;
|
||||
sCursorColors[2][1] = Cursor_ABTN_ori.g;
|
||||
sCursorColors[2][2] = Cursor_ABTN_ori.b;
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
sCursorColors[1][0] = CVar_GetRGB("gCCCBtnPrim", Cursor_CBTN_ori).r;
|
||||
sCursorColors[1][1] = CVar_GetRGB("gCCCBtnPrim", Cursor_CBTN_ori).g;
|
||||
sCursorColors[1][2] = CVar_GetRGB("gCCCBtnPrim", Cursor_CBTN_ori).b;
|
||||
sCursorColors[2][0] = CVar_GetRGB("gCCABtnPrim", Cursor_ABTN_ori).r;
|
||||
sCursorColors[2][1] = CVar_GetRGB("gCCABtnPrim", Cursor_ABTN_ori).g;
|
||||
sCursorColors[2][2] = CVar_GetRGB("gCCABtnPrim", Cursor_ABTN_ori).b;
|
||||
if (CVar_GetS32("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
sCursorColors[2] = CVar_GetRGB("gCosmetics.Hud_AButton.Value", sCursorColors[2]);
|
||||
} else if (CVar_GetS32("gCosmetics.DefaultColorScheme", 0)) {
|
||||
sCursorColors[2] = (Color_RGB8){ 0, 255, 50 };
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gCosmetics.Hud_CButtons.Changed", 0)) {
|
||||
sCursorColors[1] = CVar_GetRGB("gCosmetics.Hud_CButtons.Value", sCursorColors[1]);
|
||||
}
|
||||
|
||||
if ((((pauseCtx->unk_1E4 == 0) || (temp == 8)) && (pauseCtx->state == 6)) ||
|
||||
@ -1028,9 +1014,9 @@ void KaleidoScope_DrawCursor(PlayState* play, u16 pageIndex) {
|
||||
gDPPipeSync(POLY_KAL_DISP++);
|
||||
gDPSetCombineLERP(POLY_KAL_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
|
||||
PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, sCursorColors[pauseCtx->cursorColorSet >> 2][0],
|
||||
sCursorColors[pauseCtx->cursorColorSet >> 2][1],
|
||||
sCursorColors[pauseCtx->cursorColorSet >> 2][2], 255);
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, sCursorColors[pauseCtx->cursorColorSet >> 2].r,
|
||||
sCursorColors[pauseCtx->cursorColorSet >> 2].g,
|
||||
sCursorColors[pauseCtx->cursorColorSet >> 2].b, 255);
|
||||
gDPSetEnvColor(POLY_KAL_DISP++, D_8082AB8C, D_8082AB90, D_8082AB94, 255);
|
||||
gSPVertex(POLY_KAL_DISP++, pauseCtx->cursorVtx, 16, 0);
|
||||
|
||||
@ -1084,58 +1070,32 @@ Gfx* KaleidoScope_DrawPageSections(Gfx* gfx, Vtx* vertices, void** textures) {
|
||||
}
|
||||
|
||||
void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
static s16 D_8082ACF4[][3] = {
|
||||
static Color_RGB8 D_8082ACF4[12] = {
|
||||
{ 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 255, 255, 0 }, { 0, 0, 0 },
|
||||
{ 0, 0, 0 }, { 255, 255, 0 }, { 0, 255, 50 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 255, 50 },
|
||||
{ 0, 0, 0 }, { 255, 255, 0 }, { 0, 50, 255 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 50, 255 },
|
||||
};
|
||||
const Color_RGB8 A_BTN_ori = {100, 255, 100};
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {
|
||||
D_8082ACF4[4][0] = Cursor_CBTN_ori.r;
|
||||
D_8082ACF4[4][1] = Cursor_CBTN_ori.g;
|
||||
D_8082ACF4[4][2] = Cursor_CBTN_ori.b;
|
||||
D_8082ACF4[7][0] = Cursor_CBTN_ori.r;
|
||||
D_8082ACF4[7][1] = Cursor_CBTN_ori.g;
|
||||
D_8082ACF4[7][2] = Cursor_CBTN_ori.b;
|
||||
D_8082ACF4[8][0] = Cursor_ABTNN64_ori.r;
|
||||
D_8082ACF4[8][1] = Cursor_ABTNN64_ori.g;
|
||||
D_8082ACF4[8][2] = Cursor_ABTNN64_ori.b;
|
||||
D_8082ACF4[11][0] = Cursor_ABTNN64_ori.r;
|
||||
D_8082ACF4[11][1] = Cursor_ABTNN64_ori.g;
|
||||
D_8082ACF4[11][2] = Cursor_ABTNN64_ori.b;
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
D_8082ACF4[4][0] = Cursor_CBTN_ori.r;
|
||||
D_8082ACF4[4][1] = Cursor_CBTN_ori.g;
|
||||
D_8082ACF4[4][2] = Cursor_CBTN_ori.b;
|
||||
D_8082ACF4[7][0] = Cursor_CBTN_ori.r;
|
||||
D_8082ACF4[7][1] = Cursor_CBTN_ori.g;
|
||||
D_8082ACF4[7][2] = Cursor_CBTN_ori.b;
|
||||
D_8082ACF4[8][0] = Cursor_ABTN_ori.r;
|
||||
D_8082ACF4[8][1] = Cursor_ABTN_ori.g;
|
||||
D_8082ACF4[8][2] = Cursor_ABTN_ori.b;
|
||||
D_8082ACF4[11][0] = Cursor_ABTN_ori.r;
|
||||
D_8082ACF4[11][1] = Cursor_ABTN_ori.g;
|
||||
D_8082ACF4[11][2] = Cursor_ABTN_ori.b;
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
D_8082ACF4[4][0] = CVar_GetRGB("gCCCBtnPrim", Cursor_CBTN_ori).r;
|
||||
D_8082ACF4[4][1] = CVar_GetRGB("gCCCBtnPrim", Cursor_CBTN_ori).g;
|
||||
D_8082ACF4[4][2] = CVar_GetRGB("gCCCBtnPrim", Cursor_CBTN_ori).b;
|
||||
D_8082ACF4[7][0] = CVar_GetRGB("gCCCBtnPrim", Cursor_CBTN_ori).r;
|
||||
D_8082ACF4[7][1] = CVar_GetRGB("gCCCBtnPrim", Cursor_CBTN_ori).g;
|
||||
D_8082ACF4[7][2] = CVar_GetRGB("gCCCBtnPrim", Cursor_CBTN_ori).b;
|
||||
D_8082ACF4[8][0] = CVar_GetRGB("gCCABtnPrim", Cursor_ABTN_ori).r;
|
||||
D_8082ACF4[8][1] = CVar_GetRGB("gCCABtnPrim", Cursor_ABTN_ori).g;
|
||||
D_8082ACF4[8][2] = CVar_GetRGB("gCCABtnPrim", Cursor_ABTN_ori).b;
|
||||
D_8082ACF4[11][0] = CVar_GetRGB("gCCABtnPrim", Cursor_ABTN_ori).r;
|
||||
D_8082ACF4[11][1] = CVar_GetRGB("gCCABtnPrim", Cursor_ABTN_ori).g;
|
||||
D_8082ACF4[11][2] = CVar_GetRGB("gCCABtnPrim", Cursor_ABTN_ori).b;
|
||||
Color_RGB8 aButtonColor = { 100, 100, 255 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
aButtonColor = CVar_GetRGB("gCosmetics.Hud_AButton.Value", aButtonColor);
|
||||
D_8082ACF4[8] = CVar_GetRGB("gCosmetics.Hud_AButton.Value", D_8082ACF4[8]);
|
||||
D_8082ACF4[11] = CVar_GetRGB("gCosmetics.Hud_AButton.Value", D_8082ACF4[11]);
|
||||
} else if (CVar_GetS32("gCosmetics.DefaultColorScheme", 0)) {
|
||||
aButtonColor = (Color_RGB8){ 100, 255, 100 };
|
||||
D_8082ACF4[8] = (Color_RGB8){ 0, 255, 50 };
|
||||
D_8082ACF4[11] = (Color_RGB8){ 0, 255, 50 };
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gCosmetics.Hud_CButtons.Changed", 0)) {
|
||||
D_8082ACF4[4] = CVar_GetRGB("gCosmetics.Hud_CButtons.Value", D_8082ACF4[4]);
|
||||
D_8082ACF4[7] = CVar_GetRGB("gCosmetics.Hud_CButtons.Value", D_8082ACF4[7]);
|
||||
}
|
||||
|
||||
static s16 D_8082AD3C = 20;
|
||||
static s16 D_8082AD40 = 0;
|
||||
static s16 D_8082AD44 = 0;
|
||||
static s16 D_8082AD48 = 0;
|
||||
static s16 D_8082AD4C = 0;
|
||||
static s16 D_8082AD50 = 0;
|
||||
const Color_RGB8 A_cursor = CVar_GetRGB("gCCABtnPrim", A_BTN_ori);
|
||||
PauseContext* pauseCtx = &play->pauseCtx;
|
||||
Input* input = &play->state.input[0];
|
||||
s16 stepR;
|
||||
@ -1147,20 +1107,20 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
|
||||
if ((pauseCtx->state < 8) || (pauseCtx->state > 0x11)) {
|
||||
if (pauseCtx->state != 7) {
|
||||
stepR = ABS(D_8082AB8C - D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][0]) / D_8082AD3C;
|
||||
stepG = ABS(D_8082AB90 - D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][1]) / D_8082AD3C;
|
||||
stepB = ABS(D_8082AB94 - D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][2]) / D_8082AD3C;
|
||||
if (D_8082AB8C >= D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][0]) {
|
||||
stepR = ABS(D_8082AB8C - D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40].r) / D_8082AD3C;
|
||||
stepG = ABS(D_8082AB90 - D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40].g) / D_8082AD3C;
|
||||
stepB = ABS(D_8082AB94 - D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40].b) / D_8082AD3C;
|
||||
if (D_8082AB8C >= D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40].r) {
|
||||
D_8082AB8C -= stepR;
|
||||
} else {
|
||||
D_8082AB8C += stepR;
|
||||
}
|
||||
if (D_8082AB90 >= D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][1]) {
|
||||
if (D_8082AB90 >= D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40].g) {
|
||||
D_8082AB90 -= stepG;
|
||||
} else {
|
||||
D_8082AB90 += stepG;
|
||||
}
|
||||
if (D_8082AB94 >= D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][2]) {
|
||||
if (D_8082AB94 >= D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40].b) {
|
||||
D_8082AB94 -= stepB;
|
||||
} else {
|
||||
D_8082AB94 += stepB;
|
||||
@ -1168,9 +1128,9 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
|
||||
D_8082AD3C--;
|
||||
if (D_8082AD3C == 0) {
|
||||
D_8082AB8C = D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][0];
|
||||
D_8082AB90 = D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][1];
|
||||
D_8082AB94 = D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40][2];
|
||||
D_8082AB8C = D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40].r;
|
||||
D_8082AB90 = D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40].g;
|
||||
D_8082AB94 = D_8082ACF4[pauseCtx->cursorColorSet + D_8082AD40].b;
|
||||
D_8082AD3C = ZREG(28 + D_8082AD40);
|
||||
D_8082AD40++;
|
||||
if (D_8082AD40 >= 4) {
|
||||
@ -1505,13 +1465,7 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
|
||||
gDPSetCombineLERP(POLY_KAL_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0, TEXEL0,
|
||||
0, PRIMITIVE, 0);
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {//Save prompt cursor colour
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 100, 255, VREG(61));
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 255, 100, VREG(61));
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, A_cursor.r, A_cursor.g, A_cursor.b, VREG(61)); //Save prompt cursor colour
|
||||
}
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, aButtonColor.r, aButtonColor.g, aButtonColor.b, VREG(61)); //Save prompt cursor colour
|
||||
|
||||
if (pauseCtx->promptChoice == 0) {
|
||||
gSPDisplayList(POLY_KAL_DISP++, gPromptCursorLeftDL);
|
||||
@ -1539,13 +1493,7 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
|
||||
gDPSetCombineLERP(POLY_KAL_DISP++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0, PRIMITIVE, 0,
|
||||
TEXEL0, 0, PRIMITIVE, 0);
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) { //Continue prompt cursor colour
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 100, 255, VREG(61));
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 100, 255, 100, VREG(61));
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, A_cursor.r, A_cursor.g, A_cursor.b, VREG(61)); //Continue prompt cursor colour
|
||||
}
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, aButtonColor.r, aButtonColor.g, aButtonColor.b, VREG(61)); //Continue prompt cursor colour
|
||||
|
||||
if (pauseCtx->promptChoice == 0) {
|
||||
gSPDisplayList(POLY_KAL_DISP++, gPromptCursorLeftDL);
|
||||
@ -1580,18 +1528,34 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
||||
}
|
||||
|
||||
void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
||||
static s16 gABtnTexColour[][4] = { //A button colors
|
||||
{ 0, 255, 100, 255 },//Gamecube
|
||||
{ 0, 100, 255, 255 },//Original N64
|
||||
};
|
||||
Color_RGB8 A_button_ori = {gABtnTexColour[0][0],gABtnTexColour[0][1],gABtnTexColour[0][2]};
|
||||
Color_RGB8 A_button = CVar_GetRGB("gCCABtnPrim", A_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 aButtonColor = { 0, 100, 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, 255, 100 };
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
static const void* sToEquipTextures[3] = {
|
||||
gPauseToEquipENGTex,
|
||||
gPauseToEquipGERTex,
|
||||
@ -1917,13 +1881,7 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
||||
|
||||
pauseCtx->infoPanelVtx[21].v.tc[0] = pauseCtx->infoPanelVtx[23].v.tc[0] = D_8082ADE0[gSaveContext.language]
|
||||
<< 5;
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {//A icon to decide in save prompt
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, gABtnTexColour[1][0], gABtnTexColour[1][1], gABtnTexColour[1][2], gABtnTexColour[1][3]);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, gABtnTexColour[0][0], gABtnTexColour[0][1], gABtnTexColour[0][2], gABtnTexColour[0][3]);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, A_button.r, A_button.g, A_button.b, gABtnTexColour[0][3]);
|
||||
}
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, aButtonColor.r, aButtonColor.g, aButtonColor.b, 255);
|
||||
//gSPDisplayList(POLY_KAL_DISP++, gAButtonIconDL);//This is changed to load the texture only so we can prim color it.
|
||||
gDPLoadTextureBlock(POLY_KAL_DISP++, gABtnSymbolTex, G_IM_FMT_IA, G_IM_SIZ_8b, 24, 16, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 4, 4, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSP1Quadrangle(POLY_KAL_DISP++, 0, 2, 3, 1, 0);
|
||||
@ -1990,33 +1948,21 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
||||
int width_crop = icon_w_crop * 1.0f; //Adjust Width with scale
|
||||
int height_factor = (1 << 10) * icon_h / height;
|
||||
int width_factor = (1 << 10) * icon_w / width;
|
||||
if (CVar_GetS32("gHudColors", 1) == 2 && CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_uni.r, C_button_uni.g, C_button_uni.b, 255);
|
||||
for (s16 i=0; i < 3; i++) {
|
||||
if (i == 0) {
|
||||
icon_x_offset = width_crop*3-3;
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_R.r, C_button_R.g, C_button_R.b, 255);
|
||||
} else if (i == 1) {
|
||||
icon_x_offset = width_crop*2-3;
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_D.r, C_button_D.g, C_button_D.b, 255);
|
||||
} else if (i == 2) {
|
||||
icon_x_offset = width_crop;
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_L.r, C_button_L.g, C_button_L.b, 255);
|
||||
}
|
||||
gDPLoadTextureBlock(POLY_KAL_DISP++, gCBtnSymbolsTex, G_IM_FMT_IA, G_IM_SIZ_8b, icon_w, icon_h, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
//gSPScisTextureRectangle(POLY_KAL_DISP++,PosX << 2, PosY << 2, (PosX + icon_x_offset) << 2, (PosY + height) << 2, G_TX_RENDERTILE, 0, 0, width_factor, height_factor);
|
||||
gSPWideTextureRectangle(POLY_KAL_DISP++, PosX << 2, PosY << 2, (PosX + icon_x_offset) << 2, (PosY + height) << 2, G_TX_WRAP, 0, 0, width_factor, height_factor);
|
||||
}
|
||||
} else {
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {//To equip text C button icon
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, 255);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_ori.r, C_button_ori.g, C_button_ori.b, 255);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2 && !CVar_GetS32("gCCparated", 0)) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, C_button_uni.r, C_button_uni.g, C_button_uni.b, 255);
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cButtonsColor.r, cButtonsColor.g, cButtonsColor.b, 255);
|
||||
for (s16 i=0; i < 3; i++) {
|
||||
if (i == 0) {
|
||||
icon_x_offset = width_crop*3-3;
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cRightButtonColor.r, cRightButtonColor.g, cRightButtonColor.b, 255);
|
||||
} else if (i == 1) {
|
||||
icon_x_offset = width_crop*2-3;
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cDownButtonColor.r, cDownButtonColor.g, cDownButtonColor.b, 255);
|
||||
} else if (i == 2) {
|
||||
icon_x_offset = width_crop;
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, cLeftButtonColor.r, cLeftButtonColor.g, cLeftButtonColor.b, 255);
|
||||
}
|
||||
gDPLoadTextureBlock(POLY_KAL_DISP++, gCBtnSymbolsTex, G_IM_FMT_IA, G_IM_SIZ_8b, icon_w, icon_h, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSPWideTextureRectangle(POLY_KAL_DISP++, PosX << 2, PosY << 2, (PosX + width) << 2, (PosY + height) << 2, G_TX_RENDERTILE, 0, 0, width_factor, height_factor);
|
||||
//gSPScisTextureRectangle(POLY_KAL_DISP++,PosX << 2, PosY << 2, (PosX + icon_x_offset) << 2, (PosY + height) << 2, G_TX_RENDERTILE, 0, 0, width_factor, height_factor);
|
||||
gSPWideTextureRectangle(POLY_KAL_DISP++, PosX << 2, PosY << 2, (PosX + icon_x_offset) << 2, (PosY + height) << 2, G_TX_WRAP, 0, 0, width_factor, height_factor);
|
||||
}
|
||||
gDPPipeSync(POLY_KAL_DISP++);
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 255, 255, 255, 255);
|
||||
@ -2049,13 +1995,7 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
||||
pauseCtx->infoPanelVtx[21].v.tc[0] = pauseCtx->infoPanelVtx[23].v.tc[0] =
|
||||
D_8082ADE8[gSaveContext.language] << 5;
|
||||
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {//To play melody A button
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, gABtnTexColour[1][0], gABtnTexColour[1][1], gABtnTexColour[1][2], gABtnTexColour[1][3]);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, gABtnTexColour[0][0], gABtnTexColour[0][1], gABtnTexColour[0][2], gABtnTexColour[0][3]);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, A_button.r, A_button.g, A_button.b, gABtnTexColour[0][3]);
|
||||
}
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, aButtonColor.r, aButtonColor.g, aButtonColor.b, 255);
|
||||
//gSPDisplayList(POLY_KAL_DISP++, gAButtonIconDL);
|
||||
gDPLoadTextureBlock(POLY_KAL_DISP++, gABtnSymbolTex, G_IM_FMT_IA, G_IM_SIZ_8b, 24, 16, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 4, 4, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSP1Quadrangle(POLY_KAL_DISP++, 0, 2, 3, 1, 0);
|
||||
@ -2089,13 +2029,7 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
||||
}
|
||||
|
||||
//gSPDisplayList(POLY_KAL_DISP++, gAButtonIconDL);
|
||||
if (CVar_GetS32("gHudColors", 1) == 0) {//To equip A button
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, gABtnTexColour[1][0], gABtnTexColour[1][1], gABtnTexColour[1][2], gABtnTexColour[1][3]);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 1) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, gABtnTexColour[0][0], gABtnTexColour[0][1], gABtnTexColour[0][2], gABtnTexColour[0][3]);
|
||||
} else if (CVar_GetS32("gHudColors", 1) == 2) {
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, A_button.r, A_button.g, A_button.b, gABtnTexColour[0][3]);
|
||||
}
|
||||
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, aButtonColor.r, aButtonColor.g, aButtonColor.b, 255);
|
||||
gDPLoadTextureBlock(POLY_KAL_DISP++, gABtnSymbolTex, G_IM_FMT_IA, G_IM_SIZ_8b, 24, 16, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 4, 4, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSP1Quadrangle(POLY_KAL_DISP++, 0, 2, 3, 1, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user