From 6e350a3dc0b596b1f76fab3b943b67b7713ea4fa Mon Sep 17 00:00:00 2001 From: hop311 Date: Mon, 4 Dec 2023 00:12:16 +0000 Subject: Sim submodule update + extension compatibility --- extension/src/openvic-extension/utility/Utilities.hpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'extension/src/openvic-extension/utility/Utilities.hpp') diff --git a/extension/src/openvic-extension/utility/Utilities.hpp b/extension/src/openvic-extension/utility/Utilities.hpp index 752f495..9537dda 100644 --- a/extension/src/openvic-extension/utility/Utilities.hpp +++ b/extension/src/openvic-extension/utility/Utilities.hpp @@ -4,6 +4,7 @@ #include #include +#include #include #define ERR(x) ((x) ? OK : FAILED) @@ -30,6 +31,8 @@ namespace OpenVic::Utilities { return std_to_godot_string_name(static_cast(str)); } + godot::String date_to_formatted_string(Date date); + inline godot::Color to_godot_color(colour_t colour) { return { colour_byte_to_float((colour >> 16) & 0xFF), @@ -46,14 +49,14 @@ namespace OpenVic::Utilities { return { vec.x, vec.y }; } + /* Loads a Resource from a file in the Godot project directory given by a path beginning with "res://". */ + godot::Ref load_resource(godot::String const& path, godot::String const& type_hint = {}); + + /* Load an Image from anywhere on the machine, using Godot's image-loading function or, in the case of + * ".dds" image files which Godot is unable to load at runtime, GLI's DDS loading function. */ godot::Ref load_godot_image(godot::String const& path); + /* Load a Font from anywhere on the machine, combining the ".fnt" file loaded from the given path with the + * already-loaded image file containing the actual characters. */ godot::Ref load_godot_font(godot::String const& fnt_path, godot::Ref const& image); - - void draw_pie_chart( - godot::Ref image, godot::Array const& stopAngles, godot::Array const& colours, float radius, - godot::Vector2 shadow_displacement, float shadow_tightness, float shadow_radius, float shadow_thickness, - godot::Color trim_colour, float trim_size, float gradient_falloff, float gradient_base, bool donut, - bool donut_inner_trim, float donut_inner_radius - ); } -- cgit v1.2.3-56-ga3b1