From 66db2a93282908d18abeba8b10b3c911e6b53210 Mon Sep 17 00:00:00 2001 From: KiritoDv Date: Wed, 15 Jan 2025 19:36:12 -0600 Subject: [PATCH] Fixed hashes and added information box --- CMakeLists.txt | 1 + src/port/Engine.cpp | 7 +++---- src/port/Engine.h | 3 ++- src/port/extractor/GameExtractor.cpp | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fd1e2ea1..28930439 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,6 +312,7 @@ option(BUILD_STORMLIB "Build with StormLib support" OFF) option(BUILD_SM64 "Build with Super Mario 64 support" OFF) option(BUILD_MK64 "Build with Mario Kart 64 support" OFF) +option(BUILD_FZERO "Build with F-Zero X support" OFF) add_subdirectory(tools/Torch) target_link_libraries(${PROJECT_NAME} PRIVATE torch "${ADDITIONAL_LIBRARY_DEPENDENCIES}") diff --git a/src/port/Engine.cpp b/src/port/Engine.cpp index c088e0e5..3cfa5086 100644 --- a/src/port/Engine.cpp +++ b/src/port/Engine.cpp @@ -41,7 +41,6 @@ #include "port/mods/PortEnhancements.h" #include -#include #include namespace fs = std::filesystem; @@ -219,7 +218,7 @@ bool GameEngine::GenAssetFile() { exit(1); } - ShowMessage(("Found " + game.value()).c_str(), "The extraction process will now begin.\n\nThis may take a few minutes."); + ShowMessage(("Found " + game.value()).c_str(), "The extraction process will now begin.\n\nThis may take a few minutes.", SDL_MESSAGEBOX_INFORMATION); return extractor->GenerateOTR(); } @@ -458,11 +457,11 @@ uint32_t GameEngine::GetInterpolationFPS() { CVarGetInteger("gInterpolationFPS", 60)); } -void GameEngine::ShowMessage(const char* title, const char* message) { +void GameEngine::ShowMessage(const char* title, const char* message, SDL_MessageBoxFlags type) { #if defined(__SWITCH__) SPDLOG_ERROR(message); #else - SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, title, message, nullptr); + SDL_ShowSimpleMessageBox(type, title, message, nullptr); SPDLOG_ERROR(message); #endif } diff --git a/src/port/Engine.h b/src/port/Engine.h index 4b5e6243..ef60f012 100644 --- a/src/port/Engine.h +++ b/src/port/Engine.h @@ -12,6 +12,7 @@ struct GamePool { #ifdef __cplusplus #include +#include #include #include "libultraship/src/Context.h" @@ -45,7 +46,7 @@ class GameEngine { static uint32_t GetInterpolationFPS(); static int ShowYesNoBox(const char* title, const char* box); - static void ShowMessage(const char* title, const char* message); + static void ShowMessage(const char* title, const char* message, SDL_MessageBoxFlags type = SDL_MESSAGEBOX_ERROR); }; extern "C" void* GameEngine_Malloc(size_t size); diff --git a/src/port/extractor/GameExtractor.cpp b/src/port/extractor/GameExtractor.cpp index 29d222d2..3f167c86 100644 --- a/src/port/extractor/GameExtractor.cpp +++ b/src/port/extractor/GameExtractor.cpp @@ -8,10 +8,10 @@ #include std::unordered_map mGameList = { - { "d8b1088520f7c5f81433292a9258c1184afa1457", "Star Fox 64 (U) (V1.1)" }, + { "d8b1088520f7c5f81433292a9258c1184afa1457", "Star Fox 64 (U) (V1.0)" }, { "63b69f0ef36306257481afc250f9bc304c7162b2", "Star Fox 64 (U) (V1.0) (Uncompressed)" }, { "09f0d105f476b00efa5303a3ebc42e60a7753b7a", "Star Fox 64 (U) (V1.1)" }, - { "f7475fb11e7e6830f82883412638e8390791ab87", "Star Fox 64 (U) (V1.0) (Uncompressed)" }, + { "f7475fb11e7e6830f82883412638e8390791ab87", "Star Fox 64 (U) (V1.1) (Uncompressed)" }, }; bool GameExtractor::SelectGameFromUI() {