From 7f66cd4a9b609f6bf36d005f5e38ef2a57d1c0d3 Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Wed, 27 Nov 2024 11:15:02 +0100 Subject: removed shared_ptr from sprite --- src/crepe/facade/SDLContext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/crepe/facade/SDLContext.cpp') diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp index abb3cb7..72542e8 100644 --- a/src/crepe/facade/SDLContext.cpp +++ b/src/crepe/facade/SDLContext.cpp @@ -136,7 +136,7 @@ void SDLContext::draw_particle(const Sprite & sprite, const vec2 & pos, const do SDL_Rect srcrect = this->get_src_rect(sprite); SDL_Rect dstrect = this->get_dst_rect(sprite, pos, cam , img_scale); - SDL_RenderCopyEx(this->game_renderer.get(), sprite.sprite_image->texture.get(), &srcrect, + SDL_RenderCopyEx(this->game_renderer.get(), sprite.sprite_image.texture.get(), &srcrect, &dstrect, angle, NULL, render_flip); } @@ -150,7 +150,7 @@ void SDLContext::draw(const Sprite & sprite, const Transform & transform, const SDL_Rect dstrect = this->get_dst_rect(sprite, transform.position, cam, transform.scale); - SDL_RenderCopyEx(this->game_renderer.get(), sprite.sprite_image->texture.get(), &srcrect, + SDL_RenderCopyEx(this->game_renderer.get(), sprite.sprite_image.texture.get(), &srcrect, &dstrect, transform.rotation, NULL, render_flip); } -- cgit v1.2.3