aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Sprite.h
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-02 10:18:08 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-02 10:18:08 +0100
commit54ab44e3508d526be6275378e5979290ec188d6f (patch)
treec8768edc0066d5149f1e7088e6fc82e3d51671b3 /src/crepe/api/Sprite.h
parent3afcae9dd472ead2d5f2b667fc6479f8ee6db10c (diff)
comments i animator and sprite. added sprite indepentdent scale and angle
Diffstat (limited to 'src/crepe/api/Sprite.h')
-rw-r--r--src/crepe/api/Sprite.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/crepe/api/Sprite.h b/src/crepe/api/Sprite.h
index f04f70c..96b57e1 100644
--- a/src/crepe/api/Sprite.h
+++ b/src/crepe/api/Sprite.h
@@ -58,11 +58,27 @@ public:
//! Layer sorting level of the sprite
const int sorting_in_layer;
+
//! Order within the sorting layer
const int order_in_layer;
+ /**
+ * \size width and height of the sprite in game units
+ *
+ * if height is filled in and not width it will multiply width by aspect_ratio.
+ * if width is filled in and not height it will multiply height by aspect_ratio.
+ * if neither is filled it will not show sprite because size will be zero
+ * if both are filled will it use the width and height without making sure the aspect_ratio
+ * is correct
+ */
vec2 size;
+ //! independent sprite angle. rotating clockwise direction in degrees
+ double angle_offset;
+
+ //! independent sprite scale multiplier
+ double scale;
+
/**
* \aspect_ratio ratio of the img so that scaling will not become weird
*