aboutsummaryrefslogtreecommitdiff
path: root/extension/src/Utilities.hpp
blob: 681b89342752256ebe65ff0aab74b41705c4ebd8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include <godot_cpp/classes/image.hpp>

#include "openvic/Types.hpp"

#define ERR(x) ((x) == SUCCESS ? OK : FAILED)

namespace OpenVic {

   inline std::string godot_to_std_string(godot::String const& str) {
      return str.ascii().get_data();
   }

   inline godot::String std_to_godot_string(std::string const& str) {
      return str.c_str();
   }

   godot::Ref<godot::Image> load_godot_image(godot::String const& path);
}