aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/builds.yml2
-rw-r--r--README.md4
-rw-r--r--extension/src/register_types.cpp4
-rw-r--r--game/bin/openvic.gdextension1
-rw-r--r--game/project.godot10
-rw-r--r--game/src/Game/LoadingScreen.gd2
-rw-r--r--game/src/Game/Menu/OptionMenu/SettingNodes/SettingCheckBox.gd2
m---------godot-cpp0
8 files changed, 14 insertions, 11 deletions
diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml
index 52be62c..79f04aa 100644
--- a/.github/workflows/builds.yml
+++ b/.github/workflows/builds.yml
@@ -6,7 +6,7 @@ env:
GODOT_DOWNLOAD_URL: https://downloads.tuxfamily.org/godotengine
GODOT_VERSION_PREFIX: Godot_v
GODOT_VERSION_SUFFIX: stable
- GODOT_VERSION: 4.0.3
+ GODOT_VERSION: 4.1
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-macos
diff --git a/README.md b/README.md
index 7c3a3c3..14ce208 100644
--- a/README.md
+++ b/README.md
@@ -5,13 +5,13 @@ Main Repo for the OpenVic Project
For detailed instructions, view the Contributor Quickstart Guide [here](docs/contribution-quickstart-guide.md)
## Required
-* [Godot 4.0.3](https://github.com/godotengine/godot/releases/tag/4.0.3-stable)
+* [Godot 4.1](https://github.com/godotengine/godot/releases/tag/4.1-stable)
* [scons](https://scons.org/)
## [Godot Documentation](https://docs.godotengine.org/en/latest/)
## Build/Run Instructions
-1. Install [Godot 4.0.3](https://github.com/godotengine/godot/releases/tag/4.0.3-stable) and [scons](https://scons.org/) for your system.
+1. Install [Godot 4.1](https://github.com/godotengine/godot/releases/tag/4.1-stable) and [scons](https://scons.org/) for your system.
2. Run the command `git submodule update --init --recursive` to retrieve all related submodules.
3. Run `scons` in the project root, you should see a libopenvic file in `game/bin/openvic`.
4. Open with Godot 4, click import and navigate to the `game` directory.
diff --git a/extension/src/register_types.cpp b/extension/src/register_types.cpp
index 3283418..92c25a4 100644
--- a/extension/src/register_types.cpp
+++ b/extension/src/register_types.cpp
@@ -51,8 +51,8 @@ void uninitialize_openvic_types(ModuleInitializationLevel p_level) {
extern "C" {
// Initialization.
- GDExtensionBool GDE_EXPORT openvic_library_init(GDExtensionInterface const* p_interface, const GDExtensionClassLibraryPtr p_library, GDExtensionInitialization* r_initialization) {
- GDExtensionBinding::InitObject init_obj(p_interface, p_library, r_initialization);
+ GDExtensionBool GDE_EXPORT openvic_library_init(GDExtensionInterfaceGetProcAddress p_get_proc_address, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization* r_initialization) {
+ GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization);
init_obj.register_initializer(initialize_openvic_types);
init_obj.register_terminator(uninitialize_openvic_types);
diff --git a/game/bin/openvic.gdextension b/game/bin/openvic.gdextension
index 574394c..9b8af8f 100644
--- a/game/bin/openvic.gdextension
+++ b/game/bin/openvic.gdextension
@@ -1,6 +1,7 @@
[configuration]
entry_symbol = "openvic_library_init"
+compatibility_minimum = 4.1
[libraries]
diff --git a/game/project.godot b/game/project.godot
index 253a54b..e47e459 100644
--- a/game/project.godot
+++ b/game/project.godot
@@ -13,7 +13,7 @@ config_version=5
config/name="OpenVic"
config/description="A faithful recreation of Victoria 2: Heart of Darkness with a focus on enhancing performance, multiplayer stability, and modability for modern machines."
run/main_scene="res://src/Game/GameStart.tscn"
-config/features=PackedStringArray("4.0", "Forward Plus")
+config/features=PackedStringArray("4.1", "Forward Plus")
boot_splash/bg_color=Color(0.380392, 0.145098, 0.14902, 1)
boot_splash/image="res://splash_assets/splash_image.png"
config/icon="res://icon.svg"
@@ -75,24 +75,24 @@ map_west={
}
map_zoom_in={
"deadzone": 0.5,
-"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":8,"position":Vector2(174, 17),"global_position":Vector2(180, 80),"factor":1.0,"button_index":4,"pressed":true,"double_click":false,"script":null)
+"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":8,"position":Vector2(174, 17),"global_position":Vector2(180, 80),"factor":1.0,"button_index":4,"canceled":false,"pressed":true,"double_click":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":81,"physical_keycode":0,"key_label":0,"unicode":113,"echo":false,"script":null)
]
}
map_zoom_out={
"deadzone": 0.5,
-"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":16,"position":Vector2(325, 24),"global_position":Vector2(331, 87),"factor":1.0,"button_index":5,"pressed":true,"double_click":false,"script":null)
+"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":16,"position":Vector2(325, 24),"global_position":Vector2(331, 87),"factor":1.0,"button_index":5,"canceled":false,"pressed":true,"double_click":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":69,"physical_keycode":0,"key_label":0,"unicode":101,"echo":false,"script":null)
]
}
map_drag={
"deadzone": 0.5,
-"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":3,"pressed":false,"double_click":false,"script":null)
+"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":3,"canceled":false,"pressed":false,"double_click":false,"script":null)
]
}
map_click={
"deadzone": 0.5,
-"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"pressed":false,"double_click":false,"script":null)
+"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
]
}
diff --git a/game/src/Game/LoadingScreen.gd b/game/src/Game/LoadingScreen.gd
index 14acbd7..9d44b41 100644
--- a/game/src/Game/LoadingScreen.gd
+++ b/game/src/Game/LoadingScreen.gd
@@ -8,6 +8,8 @@ var loadthread: Thread
var quotes: PackedStringArray = []
func update_loading_screen(percent_complete: int, quote_should_change = false):
+ # forces the function to behave as if deferred
+ await get_tree().process_frame
progress_bar.value = percent_complete
if quote_should_change:
quote_label.text = quotes[randi() % quotes.size()]
diff --git a/game/src/Game/Menu/OptionMenu/SettingNodes/SettingCheckBox.gd b/game/src/Game/Menu/OptionMenu/SettingNodes/SettingCheckBox.gd
index fcc411e..344a2b5 100644
--- a/game/src/Game/Menu/OptionMenu/SettingNodes/SettingCheckBox.gd
+++ b/game/src/Game/Menu/OptionMenu/SettingNodes/SettingCheckBox.gd
@@ -19,7 +19,7 @@ func _ready():
Events.Options.load_settings.connect(load_setting)
Events.Options.save_settings.connect(save_setting)
Events.Options.reset_settings.connect(reset_setting)
- toggled.connect(func(pressed : bool): option_selected.emit(pressed, true))
+ toggled.connect(func(p : bool): option_selected.emit(p, true))
_setup_button()
func _set_value_from_file(load_value) -> void:
diff --git a/godot-cpp b/godot-cpp
-Subproject 3a9118cb0dafef74773216c47a030c3a4a49074
+Subproject d627942b647105aff600225a59dffa65de20624