mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp
synced 2026-08-31 10:00:42 -04:00
Mod Support (#499)
Integrates the modding functionality in N64ModernRuntime and adds several exported functions for mods to use. Also adds a ROM decompressor so that the runtime has access to the uncompressed code in the ROM for hooking purposes.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
#include "nfd.h"
|
||||
#include <filesystem>
|
||||
|
||||
std::string version_number = "v1.1.1";
|
||||
static std::string version_string;
|
||||
|
||||
Rml::DataModelHandle model_handle;
|
||||
bool mm_rom_valid = false;
|
||||
@@ -103,7 +103,9 @@ public:
|
||||
Rml::DataModelConstructor constructor = context->CreateDataModel("launcher_model");
|
||||
|
||||
constructor.Bind("mm_rom_valid", &mm_rom_valid);
|
||||
constructor.Bind("version_number", &version_number);
|
||||
|
||||
version_string = recomp::get_project_version().to_string();
|
||||
constructor.Bind("version_number", &version_string);
|
||||
|
||||
model_handle = constructor.GetModelHandle();
|
||||
}
|
||||
|
||||
@@ -1287,6 +1287,12 @@ void draw_hook(RT64::RenderCommandList* command_list, RT64::RenderFramebuffer* s
|
||||
static recompui::Menu prev_menu = recompui::Menu::None;
|
||||
recompui::Menu cur_menu = open_menu.load();
|
||||
|
||||
// Return to the launcher if no menu is open and the game isn't started.
|
||||
if (cur_menu == recompui::Menu::None && !ultramodern::is_game_started()) {
|
||||
cur_menu = recompui::Menu::Launcher;
|
||||
recompui::set_current_menu(cur_menu);
|
||||
}
|
||||
|
||||
if (reload_sheets) {
|
||||
ui_context->rml.load_documents();
|
||||
prev_menu = recompui::Menu::None;
|
||||
|
||||
Reference in New Issue
Block a user