mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-08-04 01:23:11 -04:00
Impl Option for Skipping Intros and Impl osPfsIsPlug (#451)
* Added Harbour Intro Skip * Moved setting to more applicable submenu * Update Game.cpp * Update PortMenu.cpp * Impl and fix os plug --------- Co-authored-by: sitton76 <58642183+sitton76@users.noreply.github.com>
This commit is contained in:
@@ -809,6 +809,22 @@ extern "C"
|
||||
|
||||
CustomEngineInit();
|
||||
|
||||
switch(CVarGetInteger("gSkipIntro", 0)) {
|
||||
case 0:
|
||||
gMenuSelection = HARBOUR_MASTERS_MENU;
|
||||
break;
|
||||
case 1:
|
||||
gMenuSelection = LOGO_INTRO_MENU;
|
||||
break;
|
||||
case 2:
|
||||
gMenuSelection = START_MENU;
|
||||
break;
|
||||
case 3:
|
||||
gMenuSelection = MAIN_MENU;
|
||||
break;
|
||||
}
|
||||
|
||||
// Debug mode override gSkipIntro
|
||||
if (CVarGetInteger("gEnableDebugMode", 0) == true) {
|
||||
gMenuSelection = START_MENU;
|
||||
}
|
||||
|
||||
@@ -764,6 +764,8 @@ void Menu::DrawElement() {
|
||||
// for (auto& entryName : sidebar->at(sectionIndex).sidebarOrder) {
|
||||
for (auto& entry : sidebar->at(sectionIndex).columnWidgets.at(i)) {
|
||||
MenuDrawItem(entry, 90 / sidebar->at(sectionIndex).columnCount, menuThemeIndex);
|
||||
ImGui::Spacing();
|
||||
ImGui::Spacing();
|
||||
}
|
||||
//}
|
||||
if (useColumns) {
|
||||
|
||||
@@ -60,6 +60,23 @@ class Menu : public GuiWindow {
|
||||
virtual void ProcessReset() {
|
||||
gGamestateNext = MAIN_MENU_FROM_QUIT;
|
||||
gIsGamePaused = 0;
|
||||
|
||||
switch(CVarGetInteger("gSkipIntro", 0)) {
|
||||
case 0:
|
||||
gMenuSelection = HARBOUR_MASTERS_MENU;
|
||||
break;
|
||||
case 1:
|
||||
gMenuSelection = LOGO_INTRO_MENU;
|
||||
break;
|
||||
case 2:
|
||||
gMenuSelection = START_MENU;
|
||||
break;
|
||||
case 3:
|
||||
gMenuSelection = MAIN_MENU;
|
||||
break;
|
||||
}
|
||||
|
||||
// Debug mode override gSkipIntro
|
||||
if (CVarGetInteger("gEnableDebugMode", 0) == true) {
|
||||
gMenuSelection = START_MENU;
|
||||
} else {
|
||||
|
||||
@@ -99,6 +99,12 @@ void PortMenu::AddSettings() {
|
||||
.Callback([](WidgetInfo& info) { Ship::Context::GetInstance()->GetWindow()->ToggleFullscreen(); })
|
||||
.Options(CheckboxOptions().Tooltip("Toggles Fullscreen On/Off."));
|
||||
|
||||
AddWidget(path, "Startup Behaviour", WIDGET_CVAR_COMBOBOX)
|
||||
.CVar("gSkipIntro")
|
||||
.Options(ComboboxOptions()
|
||||
.ComboMap(introBehaviourOptions)
|
||||
.Tooltip("Select which scene or menu the game launch to."));
|
||||
|
||||
AddWidget(path, "Menu Theme", WIDGET_CVAR_COMBOBOX)
|
||||
.CVar("gSettings.Menu.Theme")
|
||||
.Options(ComboboxOptions()
|
||||
|
||||
@@ -26,6 +26,13 @@ static const std::unordered_map<int32_t, const char*> menuThemeOptions = {
|
||||
{ UIWidgets::Colors::DarkGray, "Dark Gray" },
|
||||
};
|
||||
|
||||
static const std::unordered_map<int32_t, const char*> introBehaviourOptions = {
|
||||
{ 0, "Both" },
|
||||
{ 1, "Authentic" },
|
||||
{ 2, "Start Menu" },
|
||||
{ 3, "Main Menu" },
|
||||
};
|
||||
|
||||
static const std::unordered_map<int32_t, const char*> textureFilteringMap = {
|
||||
{ Fast::FilteringMode::FILTER_THREE_POINT, "Three-Point" },
|
||||
{ Fast::FilteringMode::FILTER_LINEAR, "Linear" },
|
||||
|
||||
@@ -97,6 +97,8 @@ s32 osPfsAllocateFile(OSPfs* pfs, u16 company_code, u32 game_code, u8* game_name
|
||||
}
|
||||
|
||||
s32 osPfsIsPlug(OSMesgQueue* queue, u8* pattern) {
|
||||
*pattern = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
s32 osPfsInit(OSMesgQueue* queue, OSPfs* pfs, int channel) {
|
||||
|
||||
Reference in New Issue
Block a user