aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Animator.h
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-11 19:22:24 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-11 19:22:24 +0100
commit1d303f3a506dc7b6f68edb4af0a2043c4c53ab1e (patch)
tree6881feac4996da15834e85fb56ea3f9d84285189 /src/crepe/api/Animator.h
parent37f352c20cdf3c972ad99b076bb091f698132312 (diff)
parent30c17c98e54c1534664de08ca3838c40c859d166 (diff)
mege with master
Diffstat (limited to 'src/crepe/api/Animator.h')
-rw-r--r--src/crepe/api/Animator.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/crepe/api/Animator.h b/src/crepe/api/Animator.h
index 7c850b8..5918800 100644
--- a/src/crepe/api/Animator.h
+++ b/src/crepe/api/Animator.h
@@ -75,27 +75,28 @@ public:
*
* \param id The unique identifier for the component, typically assigned automatically.
* \param spritesheet the reference to the spritesheet
- * \param max_row maximum of rows inside the given spritesheet
- * \param max_col maximum of columns inside the given spritesheet
+ * \param single_frame_size the width and height in pixels of a single frame inside the
+ * spritesheet
+ * \param grid_size the max rows and columns inside the given spritesheet
* \param data extra animation data for more control
*
* This constructor sets up the Animator with the given parameters, and initializes the
* animation system.
*/
- Animator(game_object_id_t id, Sprite & spritesheet, unsigned int max_row,
- unsigned int max_col, const Animator::Data & data);
+ Animator(game_object_id_t id, Sprite & spritesheet, const ivec2 & single_frame_size,
+ const uvec2 & grid_size, const Animator::Data & data);
~Animator(); // dbg_trace
public:
- //! The maximum number of columns in the sprite sheet.
- const unsigned int max_columns;
- //! The maximum number of rows in the sprite sheet.
- const unsigned int max_rows;
Animator::Data data;
private:
//! A reference to the Sprite sheet containing.
Sprite & spritesheet;
+
+ //! The maximum number of rows and columns inside the spritesheet
+ const uvec2 grid_size;
+
//! Uses the spritesheet
friend AnimatorSystem;
};