aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/utility
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-04-21 08:58:44 +0200
committer GitHub <noreply@github.com>2024-04-21 08:58:44 +0200
commit00c03db2b10588081548b713a4272854a9051c1c (patch)
tree7f74c87115f5f066b81d47f060c75ce6ee6a76dc /extension/src/openvic-extension/utility
parent21334b0040d3c2c1456e0c18e5c2a1605f22f934 (diff)
parent2d5454c668fc866023c41f07ceed263b2c1ff237 (diff)
Merge pull request #217 from OpenVicProject/update-sim
Update SIM submodule
Diffstat (limited to 'extension/src/openvic-extension/utility')
-rw-r--r--extension/src/openvic-extension/utility/UITools.hpp2
-rw-r--r--extension/src/openvic-extension/utility/Utilities.hpp8
2 files changed, 7 insertions, 3 deletions
diff --git a/extension/src/openvic-extension/utility/UITools.hpp b/extension/src/openvic-extension/utility/UITools.hpp
index 6092853..566318a 100644
--- a/extension/src/openvic-extension/utility/UITools.hpp
+++ b/extension/src/openvic-extension/utility/UITools.hpp
@@ -2,7 +2,7 @@
#include <godot_cpp/classes/control.hpp>
-#include <openvic-simulation/interface/GFX.hpp>
+#include <openvic-simulation/interface/GFXSprite.hpp>
#include <openvic-simulation/interface/GUI.hpp>
namespace OpenVic::UITools {
diff --git a/extension/src/openvic-extension/utility/Utilities.hpp b/extension/src/openvic-extension/utility/Utilities.hpp
index f39be3e..f7a0d67 100644
--- a/extension/src/openvic-extension/utility/Utilities.hpp
+++ b/extension/src/openvic-extension/utility/Utilities.hpp
@@ -41,11 +41,15 @@ namespace OpenVic::Utilities {
return { colour.redf(), colour.greenf(), colour.bluef(), colour.alphaf() };
}
- _FORCE_INLINE_ godot::Vector2i to_godot_ivec2(ivec2_t vec) {
+ _FORCE_INLINE_ godot::Vector2i to_godot_ivec2(ivec2_t const& vec) {
return { vec.x, vec.y };
}
- _FORCE_INLINE_ godot::Vector2 to_godot_fvec2(fvec2_t vec) {
+ _FORCE_INLINE_ godot::Vector2 to_godot_fvec2(fvec2_t const& vec) {
+ return { vec.x, vec.y };
+ }
+
+ _FORCE_INLINE_ ivec2_t from_godot_ivec2(godot::Vector2i const& vec) {
return { vec.x, vec.y };
}