Shipwright/soh/soh/Enhancements/bootcommands.c
Baoulettes 0993337721
[Mod]HUD Editor - Color Scheme incl. N64 colors. (#202)
* Update SohImGuiImpl.cpp

* Add int variant of CVar_ Get/Set/Register

* Add variant of CVar_ Get/Set/Register

* Add LoadHUDColors()

* Added temporary menu for custom colors

* vars added

* added section load

* variables save/load

* register boolean for colors radiobox

* Minimap recolor

* Hearts (top left) color, incl. DD variant

* Add A/B/C/Start btn colors and rupee

* A & C button icon and save prompt cursor.

* A & C notes and cursor

* Some notes I forgot tbh was open since hours.

* Shops cursor color with included pulse

* Wrong section was added

* Fixed some logic there and removed an unused if

* Moved a condition to make it better.

* That what happen when you left it open for hours

* Update z_message_PAL.c

* Added color array for A button

* Get/Set/Register Int not needed anymore

* Update Cvar.h

* Update Cvar.cpp

* Removed HUDCOLOR_SECTION moved it to cosmetics

Updated Tunics and navi mod too.

* changed categorie name and updated

* Updated Cosmetics menu and add colors there

* Update GameSettings.cpp

* Update GameSettings.h

* A more generic name

* Update SohImGuiImpl.cpp

* Update bootcommands.c

* update var name

* var name update

* var name update (creative name I know...)

* Updated variables names to match gHudColors

* to lazy to name this one

* gHudColors renaming stuff there too

* guess what, variable renaming.

* Update Tunic/Navi mods with new variable name.

* Updated Links tunic variable names

* Fix condition for Right C button

* Add condition to check if the button is on

* Added system to check if color tunics is turned on.

* Added empty C button colors

* Add ability to move Hearts

* Ability to move minimap (incl. dgn one)

Add Dungeon icon fix requirement. once merged I will fix conflict with this one.

* Compass icon move with the minimap

* Added several button move function

* stone of agony folly the interface too.

* fix minimap alpha

* Fixes notes env color (was showing incorrectly)

* PR repo mass update, cleaning incoming

* Clean_PR stuff

* useless there ...

* Properly load the function.

Imagine creating a pseudo function to load load of colour and you actually forgot to add it, could not be me right , RIGHT ?

* fix conflict and useless edit

* Fix default color for A/B and C btns

* Fix Rupee default color in ImGUI

* Reworked Tunics handling, much better this way

* Fix minimap default color

* C button default color fix

* better behavior and default color fix

* Fixed every default color to match gamecube style

* Fix dungeon entrance icon n.2

it was not using margin and always show icon system

* This need a scene else it show everywhere oof
2022-05-21 13:16:28 -04:00

83 lines
2.3 KiB
C

#include "bootcommands.h"
#include "gameconsole.h"
#include <macros.h>
#include <z64.h>
#include <ultra64.h>
#include <functions.h>
#include <variables.h>
#include <stdarg.h>
#include <z64.h>
#include <ultra64/gbi.h>
#include <ultra64/gs2dex.h>
#include <ultra64/controller.h>
uint8_t gLoadFileSelect = 0, gSkipLogoTest = 0;
extern BootCommandFunc BootCommands_Command_SkipLogo(char** argv, s32 argc);
extern BootCommandFunc BootCommands_Command_LoadFileSelect(char** argv, s32 argc);
static BootCommand sCommands[] = { { "--skiplogo", BootCommands_Command_SkipLogo },
{ "--loadfileselect", BootCommands_Command_LoadFileSelect } };
void BootCommands_Init()
{
CVar_RegisterS32("gDisableLOD", 0);
CVar_RegisterS32("gDebugEnabled", 0);
CVar_RegisterS32("gPauseLiveLink", 0);
CVar_RegisterS32("gMinimalUI", 0);
CVar_RegisterS32("gRumbleEnabled", 0);
CVar_RegisterS32("gUniformLR", 1);
CVar_RegisterS32("gTwoHandedIdle", 0);
CVar_RegisterS32("gDekuNutUpgradeFix", 1);
CVar_RegisterS32("gNewDrops", 0);
CVar_RegisterS32("gVisualAgony", 0);
CVar_RegisterS32("gLanguages", 0); //0 = English / 1 = German / 2 = French
CVar_RegisterS32("gHudColors", 1); //0 = N64 / 1 = NGC / 2 = Custom
CVar_RegisterS32("gUseNaviCol", 0);
CVar_RegisterS32("gUseTunicsCol", 0);
}
//void BootCommands_ParseBootArgs(char* str)
void BootCommands_ParseBootArgs(s32 argc, char** argv)
{
s32 i;
// Parse the commands
for (i = 0; i < argc; i++) {
s32 j;
for (j = 0; j < ARRAY_COUNT(sCommands); j++) {
if (!strcmp(argv[i], sCommands[j].name)) {
s32 numArgsProcessed = sCommands[j].func(&argv[i], argc - i);
i += numArgsProcessed;
break;
}
}
}
for (i = 0; i < argc; i++)
DebugArena_Free(argv[i]);
DebugArena_Free(argv);
}
/*
* Command Name: --skiplogo
* Description: Skips the N64 Logo Screen
* Arguments: None
*/
BootCommandFunc BootCommands_Command_SkipLogo(char** argv, s32 argc) {
gSkipLogoTest = 1;
return 0;
}
/*
* Command Name: --loadfileselect
* Description: Loads the file select screen on bootup.
* Arguments: None
*/
BootCommandFunc BootCommands_Command_LoadFileSelect(char** argv, s32 argc) {
gLoadFileSelect = 1;
return 0;
}