From ad490cad71bc8a570e5ae92fd7953152a0ad46aa Mon Sep 17 00:00:00 2001 From: scawful Date: Sat, 5 Apr 2025 13:46:56 -0400 Subject: [PATCH] Add YAZE_UTIL_SRC to CMakeLists and update flag definitions in z3ed and yaze --- src/CMakeLists.txt | 1 + src/cli/z3ed.cc | 2 -- src/yaze.cc | 7 ++++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ae699463..225100d2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -99,6 +99,7 @@ if (YAZE_BUILD_LIB) ${YAZE_APP_GFX_SRC} ${YAZE_APP_ZELDA3_SRC} ${YAZE_GUI_SRC} + ${YAZE_UTIL_SRC} ${IMGUI_SRC} ${IMGUI_TEST_ENGINE_SOURCES} ) diff --git a/src/cli/z3ed.cc b/src/cli/z3ed.cc index 8603d9d5..e7a4f534 100644 --- a/src/cli/z3ed.cc +++ b/src/cli/z3ed.cc @@ -23,8 +23,6 @@ DEFINE_FLAG(std::string, length, "", "The length of the data to read."); DEFINE_FLAG(std::string, file_size, "", "The size of the file to expand to."); DEFINE_FLAG(std::string, dest_rom, "", "The destination ROM file."); -DEFINE_FLAG(std::string, tile32_id_list, "", - "The list of tile32 IDs to transfer."); int main(int argc, char *argv[]) { yaze::util::FlagParser flag_parser(yaze::util::global_flag_registry()); diff --git a/src/yaze.cc b/src/yaze.cc index a9def383..ed551900 100644 --- a/src/yaze.cc +++ b/src/yaze.cc @@ -5,12 +5,17 @@ #include #include "app/core/platform/app_delegate.h" +#include "app/core/controller.h" #include "app/rom.h" #include "app/zelda3/overworld/overworld.h" #include "dungeon.h" #include "util/flag.h" #include "yaze_config.h" +DEFINE_FLAG( + std::string, rom_file, "", "Path to the ROM file to load. " + "If not specified, the app will run without a ROM."); + int yaze_app_main(int argc, char **argv) { yaze::util::FlagParser parser(yaze::util::global_flag_registry()); RETURN_IF_EXCEPTION(parser.Parse(argc, argv)); @@ -23,7 +28,7 @@ int yaze_app_main(int argc, char **argv) { return yaze_run_cocoa_app_delegate(rom_filename.c_str()); #endif - auto controller = std::make_unique(); + auto controller = std::make_unique(); EXIT_IF_ERROR(controller->OnEntry(rom_filename)) while (controller->IsActive()) { controller->OnInput();