diff options
| author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-10 16:21:05 +0100 | 
|---|---|---|
| committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-10 16:21:05 +0100 | 
| commit | 7b8de90699aea153e73b5f2cee05c69b966b81be (patch) | |
| tree | 123f8b71b59a933b2bfcffb9e43e5bea66086d8f /src/crepe/api/Animator.h | |
| parent | 33cd5566909ac089cdf56db38a3d1daf0cb7dd10 (diff) | |
implemented feedback wouter, improved animator. however if spritesheet aspect_ratio is not the same as the single frame then the scaling is wrong
Diffstat (limited to 'src/crepe/api/Animator.h')
| -rw-r--r-- | src/crepe/api/Animator.h | 12 | 
1 files changed, 5 insertions, 7 deletions
diff --git a/src/crepe/api/Animator.h b/src/crepe/api/Animator.h index 8ceddad..9a26bf0 100644 --- a/src/crepe/api/Animator.h +++ b/src/crepe/api/Animator.h @@ -82,16 +82,14 @@ public:  	 * 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 pixel_frame_x, -			 unsigned int pixel_frame_y, 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 & max_cell_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; +	//! The maximum number of rows and columns size +	const uvec2 max_cell_size; +  	Animator::Data data;  private:  |