diff options
author | hop311 <hop3114@gmail.com> | 2024-05-05 19:36:21 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-05-07 23:06:38 +0200 |
commit | 2ac43ba7df3b2c3dc40c6b87c2bc57c4b02ffa42 (patch) | |
tree | f251adec091f704d889360a0eb32bd4ad018192d /extension/src/openvic-extension/singletons/GameSingleton.cpp | |
parent | c29cc0dabe3e3c7d03280e74d2d10fc3cc479c7f (diff) |
Add GDScript XAC and XSM loaders
Diffstat (limited to 'extension/src/openvic-extension/singletons/GameSingleton.cpp')
-rw-r--r-- | extension/src/openvic-extension/singletons/GameSingleton.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/extension/src/openvic-extension/singletons/GameSingleton.cpp b/extension/src/openvic-extension/singletons/GameSingleton.cpp index 838542d..12e2df1 100644 --- a/extension/src/openvic-extension/singletons/GameSingleton.cpp +++ b/extension/src/openvic-extension/singletons/GameSingleton.cpp @@ -44,6 +44,7 @@ void GameSingleton::_bind_methods() { OV_BIND_METHOD(GameSingleton::load_defines_compatibility_mode, { "file_paths" }); OV_BIND_SMETHOD(search_for_game_path, { "hint_path" }, DEFVAL(String {})); + OV_BIND_METHOD(GameSingleton::lookup_file_path, { "path" }); OV_BIND_METHOD(GameSingleton::setup_game, { "bookmark_index" }); @@ -593,3 +594,7 @@ Error GameSingleton::load_defines_compatibility_mode(PackedStringArray const& fi String GameSingleton::search_for_game_path(String const& hint_path) { return std_to_godot_string(Dataloader::search_for_game_path(godot_to_std_string(hint_path)).string()); } + +String GameSingleton::lookup_file_path(String const& path) const { + return std_to_godot_string(dataloader.lookup_file(godot_to_std_string(path)).string()); +} |