aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic-extension/GameSingleton.hpp
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-09-24 23:45:37 +0200
committer Hop311 <hop3114@gmail.com>2023-09-27 15:14:46 +0200
commitde2017128313b9a322eb59c40a4180099d9c18b7 (patch)
treea8aa710f9f2024e863d489f1ab553dccb4398315 /extension/src/openvic-extension/GameSingleton.hpp
parentfadabd3e19605a7f30ee7e3dd1453f21384dd662 (diff)
DDS load + moved terrain (type) loading to sim
Diffstat (limited to 'extension/src/openvic-extension/GameSingleton.hpp')
-rw-r--r--extension/src/openvic-extension/GameSingleton.hpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/extension/src/openvic-extension/GameSingleton.hpp b/extension/src/openvic-extension/GameSingleton.hpp
index 4d9e912..2a72e2f 100644
--- a/extension/src/openvic-extension/GameSingleton.hpp
+++ b/extension/src/openvic-extension/GameSingleton.hpp
@@ -8,17 +8,16 @@
namespace OpenVic {
- struct TerrainVariant : HasIdentifierAndColour {
+ struct TerrainVariant : HasIdentifier {
friend class GameSingleton;
private:
const godot::Ref<godot::Image> image;
- TerrainVariant(const std::string_view new_identfier, colour_t new_colour,
- godot::Ref<godot::Image> const& new_image);
+ TerrainVariant(const std::string_view new_identfier, godot::Ref<godot::Image> const& new_image);
public:
- static constexpr size_t MAX_TERRIN_VARIANT_COUNT = 1 << (8 * sizeof(Map::terrain_t));
+ static constexpr size_t MAX_TERRIN_VARIANT_COUNT = 1 << (8 * sizeof(TerrainTypeMapping::index_t));
TerrainVariant(TerrainVariant&&) = default;
@@ -39,7 +38,6 @@ namespace OpenVic {
godot::Ref<godot::ImageTexture> province_colour_texture;
Mapmode::index_t mapmode_index = 0;
IdentifierRegistry<TerrainVariant> terrain_variants;
- Map::terrain_variant_map_t terrain_variant_map;
godot::Ref<godot::Texture2DArray> terrain_texture;
godot::Error _generate_terrain_texture_array();
@@ -63,6 +61,7 @@ namespace OpenVic {
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);
+ static godot::Ref<godot::Image> load_image(godot::String const& path);
static GameSingleton* get_singleton();