diff --git a/CMakeLists.txt b/CMakeLists.txt index 08a48b7..6e281c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,6 +94,7 @@ add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/RecompiledPatches/patches.c ${CMAKE_SOURCE_DIR}/RecompiledPatches/recomp_overlays.inl ${CMAKE_SOURCE_DIR}/RecompiledPatches/funcs.h + # TODO: Look into why modifying patches requires two builds to take COMMAND ./N64Recomp patches.toml WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} DEPENDS ${CMAKE_SOURCE_DIR}/patches/patches.bin diff --git a/include/zelda_config.h b/include/zelda_config.h index b854ef1..f5b206a 100644 --- a/include/zelda_config.h +++ b/include/zelda_config.h @@ -9,6 +9,7 @@ namespace zelda64 { constexpr std::u8string_view program_id = u8"Zelda64Recompiled"; constexpr std::string_view program_name = "Zelda 64: Recompiled"; + // TODO: Move loading configs to the runtime once we have a way to allow per-project customization. void load_config(); void save_config(); @@ -24,7 +25,7 @@ namespace zelda64 { enum class AutosaveMode { On, Off, - OptionCount + OptionCount }; NLOHMANN_JSON_SERIALIZE_ENUM(zelda64::AutosaveMode, { diff --git a/src/main/main.cpp b/src/main/main.cpp index 6a56d0b..b28f19c 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -386,34 +386,34 @@ int main(int argc, char** argv) { recomp::register_config_path(zelda64::get_app_folder_path()); zelda64::load_config(); - const static recomp::rsp::callbacks_t &rsp_callbacks{ + recomp::rsp::callbacks_t rsp_callbacks{ .get_rsp_microcode = get_rsp_microcode, }; - const static ultramodern::gfx_callbacks_t gfx_callbacks{ + ultramodern::gfx_callbacks_t gfx_callbacks{ .create_gfx = create_gfx, .create_window = create_window, .update_gfx = update_gfx, }; - const static ultramodern::audio_callbacks_t audio_callbacks{ + ultramodern::audio_callbacks_t audio_callbacks{ .queue_samples = queue_samples, .get_frames_remaining = get_frames_remaining, .set_frequency = set_frequency, }; - const static ultramodern::input_callbacks_t input_callbacks{ + ultramodern::input_callbacks_t input_callbacks{ .poll_input = recomp::poll_inputs, .get_input = recomp::get_n64_input, .set_rumble = recomp::set_rumble, }; - const static ultramodern::events::callbacks_t thread_callbacks{ + ultramodern::events::callbacks_t thread_callbacks{ .vi_callback = recomp::update_rumble, .gfx_init_callback = recompui::update_supported_options, }; - const static ultramodern::error_handling::callbacks_t error_handling_callbacks{ + ultramodern::error_handling::callbacks_t error_handling_callbacks{ .message_box = recompui::message_box, }; diff --git a/src/main/register_overlays.cpp b/src/main/register_overlays.cpp index aac60a8..034f64f 100644 --- a/src/main/register_overlays.cpp +++ b/src/main/register_overlays.cpp @@ -4,13 +4,13 @@ #include "librecomp/overlays.hpp" void zelda64::register_overlays() { - const static recomp::overlay_section_table_data_t sections { + recomp::overlay_section_table_data_t sections { .code_sections = section_table, .num_code_sections = ARRLEN(section_table), .total_num_sections = num_sections, }; - const static recomp::overlays_by_index_t overlays { + recomp::overlays_by_index_t overlays { .table = overlay_sections_by_index, .len = ARRLEN(overlay_sections_by_index), };