aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Sprite.h
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-06 15:42:25 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-06 15:42:25 +0100
commit7ec1fcfcff0c01d204ccbf1bac9919ba610b8606 (patch)
treecd48865b6af69a0d71a70a720b843b4b681f53bb /src/crepe/api/Sprite.h
parent3fbe1a5c72e7512a330111665482a5babf21cc15 (diff)
implemented final max feedback
Diffstat (limited to 'src/crepe/api/Sprite.h')
-rw-r--r--src/crepe/api/Sprite.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/crepe/api/Sprite.h b/src/crepe/api/Sprite.h
index a1230db..0ccc296 100644
--- a/src/crepe/api/Sprite.h
+++ b/src/crepe/api/Sprite.h
@@ -20,11 +20,14 @@ class AnimatorSystem;
*/
class Sprite : public Component {
public:
+ //! settings to flip the image
struct FlipSettings {
+ //! horizantal flip
bool flip_x = false;
+ //! vertical flip
bool flip_y = false;
};
-
+
struct Data {
//! Color tint of the sprite
Color color = Color::WHITE;
@@ -50,10 +53,13 @@ public:
vec2 size;
//! independent sprite angle. rotating clockwise direction in degrees
- double angle_offset = 0;
+ float angle_offset = 0;
//! independent sprite scale multiplier
- double scale_offset = 1;
+ float scale_offset = 1;
+
+ //! independent sprite offset position
+ vec2 position_offset;
};
public: