aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/utility
diff options
context:
space:
mode:
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 };
}