aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/crepe/facade/SDLContext.cpp4
-rw-r--r--src/example/rendering_particle.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp
index daf0050..f78ec8f 100644
--- a/src/crepe/facade/SDLContext.cpp
+++ b/src/crepe/facade/SDLContext.cpp
@@ -122,7 +122,7 @@ SDL_Rect SDLContext::get_dst_rect(const Sprite & sprite, const Vector2 & pos,
void SDLContext::draw_particle(const Sprite & sprite, const Vector2 & pos,
const double & angle, const double & scale,
- const Camera & camera) const {
+ const Camera & camera) {
SDL_RendererFlip render_flip
= (SDL_RendererFlip) ((SDL_FLIP_HORIZONTAL * sprite.flip.flip_x)
@@ -136,7 +136,7 @@ void SDLContext::draw_particle(const Sprite & sprite, const Vector2 & pos,
}
void SDLContext::draw(const Sprite & sprite, const Transform & transform,
- const Camera & cam) const {
+ const Camera & cam) {
SDL_RendererFlip render_flip
= (SDL_RendererFlip) ((SDL_FLIP_HORIZONTAL * sprite.flip.flip_x)
diff --git a/src/example/rendering_particle.cpp b/src/example/rendering_particle.cpp
index 5030bc6..4571afb 100644
--- a/src/example/rendering_particle.cpp
+++ b/src/example/rendering_particle.cpp
@@ -32,7 +32,8 @@ int main(int argc, char * argv[]) {
Sprite & test_sprite = game_object.add_component<Sprite>(
make_shared<Texture>("../asset/texture/img.png"), color, FlipSettings{false, false});
test_sprite.order_in_layer = 5;
- auto test = game_object.add_component<ParticleEmitter>(ParticleEmitter::Data{
+
+ auto & test = game_object.add_component<ParticleEmitter>(ParticleEmitter::Data{
.position = {0, 0},
.max_particles = 10,
.emission_rate = 0.1,