aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Sprite.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-28 12:53:15 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-28 12:53:15 +0100
commit9d9c4fc4565f0ef0fc81c8baeef804389f07afc2 (patch)
treef8bfb75a2b99f40de8d8cfb68136bd0b8ee68a39 /src/crepe/api/Sprite.cpp
parent1cdaa2aaeb1b6bc71876b462fcc464800ec75732 (diff)
implemented loek feedback
Diffstat (limited to 'src/crepe/api/Sprite.cpp')
-rw-r--r--src/crepe/api/Sprite.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crepe/api/Sprite.cpp b/src/crepe/api/Sprite.cpp
index 65c6cc3..8647794 100644
--- a/src/crepe/api/Sprite.cpp
+++ b/src/crepe/api/Sprite.cpp
@@ -11,7 +11,7 @@ using namespace std;
using namespace crepe;
Sprite::Sprite(game_object_id_t id, Texture & image, const Color & color,
- const FlipSettings & flip, uint8_t sort_layer, uint8_t order_layer, int height)
+ const FlipSettings & flip, int sort_layer, int order_layer, int height)
: Component(id),
color(color),
flip(flip),
@@ -22,9 +22,9 @@ Sprite::Sprite(game_object_id_t id, Texture & image, const Color & color,
dbg_trace();
- this->sprite_rect.w = sprite_image.get_width();
- this->sprite_rect.h = sprite_image.get_height();
- this->aspect_ratio = static_cast<double>(this->sprite_rect.w) / this->sprite_rect.h;
+ this->mask.w = sprite_image.get_width();
+ this->mask.h = sprite_image.get_height();
+ this->aspect_ratio = static_cast<double>(this->mask.w) / this->mask.h;
}
Sprite::~Sprite() { dbg_trace(); }