aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/interface/GFXObject.hpp
diff options
context:
space:
mode:
author Nemrav <>2024-08-25 04:14:54 +0200
committer Nemrav <>2024-08-25 04:14:54 +0200
commit31c9050bc15a208e73e406bc52aa5d1b3200f2e0 (patch)
treedd1a9c3779226aa8bfef6c213f510055c5418549 /src/openvic-simulation/interface/GFXObject.hpp
parent53bf0ac14be0fd7a049306d6e20c01030916fdc6 (diff)
map item defines loaded
Diffstat (limited to 'src/openvic-simulation/interface/GFXObject.hpp')
-rw-r--r--src/openvic-simulation/interface/GFXObject.hpp205
1 files changed, 204 insertions, 1 deletions
diff --git a/src/openvic-simulation/interface/GFXObject.hpp b/src/openvic-simulation/interface/GFXObject.hpp
index db15096..a633cb5 100644
--- a/src/openvic-simulation/interface/GFXObject.hpp
+++ b/src/openvic-simulation/interface/GFXObject.hpp
@@ -74,4 +74,207 @@ namespace OpenVic::GFX {
OV_DETAIL_GET_TYPE
};
-}
+
+ /* arrows.gfx */
+ class ArrowType final : public Object {
+ friend std::unique_ptr<ArrowType> std::make_unique<ArrowType>();
+
+ private:
+ //Named<> already handles the name property
+ fixed_point_t PROPERTY(size);
+ std::string PROPERTY(texture_file);
+ std::string PROPERTY(body_texture_file);
+ colour_t PROPERTY(back_colour);
+ colour_t PROPERTY(progress_colour);
+
+ fixed_point_t PROPERTY(end_at); //how should float be repd? >> fixed_point handles it
+ fixed_point_t PROPERTY(height);
+ uint64_t PROPERTY(arrow_type);
+ fixed_point_t PROPERTY(heading); //also float
+
+ std::string PROPERTY(effect_file);
+
+ protected:
+ ArrowType();
+
+ bool _fill_key_map(NodeTools::case_insensitive_key_map_t& key_map) override;
+
+ public:
+ ArrowType(ArrowType&&) = default;
+ virtual ~ArrowType() = default;
+
+ OV_DETAIL_GET_TYPE
+ };
+
+ /* battlearrow.gfx */
+ class BattleArrow final : public Object {
+ friend std::unique_ptr<BattleArrow> std::make_unique<BattleArrow>();
+
+ private:
+ //Named<> already handles the name property
+ //TODO verify the texture places
+ std::string PROPERTY(texture_file);
+ std::string PROPERTY(back_texture_file);
+
+ fixed_point_t PROPERTY(start);
+ fixed_point_t PROPERTY(stop);
+ uint64_t PROPERTY(x);
+ uint64_t PROPERTY(y);
+
+ std::string PROPERTY(font);
+ uint64_t PROPERTY(scale);
+ bool PROPERTY(no_fade);
+ fixed_point_t PROPERTY(texture_loop);
+
+ protected:
+ BattleArrow();
+
+ bool _fill_key_map(NodeTools::case_insensitive_key_map_t& key_map) override;
+
+ public:
+ BattleArrow(BattleArrow&&) = default;
+ virtual ~BattleArrow() = default;
+
+ OV_DETAIL_GET_TYPE
+ };
+
+ class MapInfo final : public Object {
+ friend std::unique_ptr<MapInfo> std::make_unique<MapInfo>();
+
+ private:
+ std::string PROPERTY(texture_file);
+ fixed_point_t PROPERTY(scale);
+
+ protected:
+ MapInfo();
+
+ bool _fill_key_map(NodeTools::case_insensitive_key_map_t& key_map) override;
+
+ public:
+ MapInfo(MapInfo&&) = default;
+ virtual ~MapInfo() = default;
+
+ OV_DETAIL_GET_TYPE
+ };
+
+ /* mapitems.gfx */
+ class Projection final : public Object {
+ friend std::unique_ptr<Projection> std::make_unique<Projection>();
+
+ private:
+ //Named<> already handles the name property
+ std::string PROPERTY(texture_file);
+ //TODO: should size, pulseSpeed, duration, fadeout be ints or fixed points? assume fixed_point_t to start
+ fixed_point_t PROPERTY(size);
+ fixed_point_t PROPERTY(spin);
+ bool PROPERTY(pulsating);
+ fixed_point_t PROPERTY(pulse_lowest);
+ fixed_point_t PROPERTY(pulse_speed);
+ bool PROPERTY(additative);
+ fixed_point_t PROPERTY(expanding);
+ std::optional<fixed_point_t> PROPERTY(duration);
+ std::optional<fixed_point_t> PROPERTY(fadeout);
+
+ protected:
+ Projection();
+
+ bool _fill_key_map(NodeTools::case_insensitive_key_map_t& key_map) override;
+
+ public:
+ Projection(Projection&&) = default;
+ virtual ~Projection() = default;
+
+ OV_DETAIL_GET_TYPE
+ };
+
+ class Billboard final : public Object {
+ friend std::unique_ptr<Billboard> std::make_unique<Billboard>();
+
+ public:
+ struct Offset {
+ friend class Billboard;
+
+ private:
+ fixed_point_t PROPERTY(x);
+ fixed_point_t PROPERTY(y);
+ fixed_point_t PROPERTY(z);
+
+ Offset(fixed_point_t new_x, fixed_point_t new_y, fixed_point_t new_z);
+
+ public:
+ Offset(Offset&&) = default;
+ };
+
+ private:
+ std::string PROPERTY(texture_file);
+ fixed_point_t PROPERTY(scale);
+ int64_t PROPERTY(no_of_frames);
+ int64_t PROPERTY(font_size); //TODO: is this fixed point?
+ Offset PROPERTY(offset);
+ std::string PROPERTY(font);
+
+ protected:
+ Billboard();
+
+ bool _fill_key_map(NodeTools::case_insensitive_key_map_t& key_map) override;
+
+ public:
+ Billboard(Billboard&&) = default;
+ virtual ~Billboard() = default;
+
+ OV_DETAIL_GET_TYPE
+ };
+
+
+ class UnitStatsBillboard final : public Object {
+ friend std::unique_ptr<UnitStatsBillboard> std::make_unique<UnitStatsBillboard>();
+
+ private:
+ //Named<> already handles the name property
+ std::string PROPERTY(texture_file);
+ std::string PROPERTY(effect_file);
+ std::string PROPERTY(mask_file);
+ fixed_point_t PROPERTY(scale);
+ int64_t PROPERTY(no_of_frames);
+ int64_t PROPERTY(font_size); //TODO: is this fixed point?
+ std::string PROPERTY(font);
+
+ protected:
+ UnitStatsBillboard();
+
+ bool _fill_key_map(NodeTools::case_insensitive_key_map_t& key_map) override;
+
+ public:
+ UnitStatsBillboard(UnitStatsBillboard&&) = default;
+ virtual ~UnitStatsBillboard() = default;
+
+ OV_DETAIL_GET_TYPE
+ };
+
+ class ProgressBar3d final : public Object {
+ friend std::unique_ptr<ProgressBar3d> std::make_unique<ProgressBar3d>();
+
+ private:
+ //Named<> already handles the name property
+ //TODO: are there any other properties which are unused
+ colour_t PROPERTY(back_colour);
+ colour_t PROPERTY(progress_colour);
+ ivec2_t PROPERTY(size);
+ std::string PROPERTY(effect_file);
+
+ protected:
+ ProgressBar3d();
+
+ bool _fill_key_map(NodeTools::case_insensitive_key_map_t& key_map) override;
+
+ public:
+ ProgressBar3d(ProgressBar3d&&) = default;
+ virtual ~ProgressBar3d() = default;
+
+ OV_DETAIL_GET_TYPE
+ };
+
+ /* Core.gfx */
+
+
+} \ No newline at end of file