diff options
| author | kkard2 <[email protected]> | 2025-09-07 09:32:45 +0200 |
|---|---|---|
| committer | kkard2 <[email protected]> | 2025-09-07 09:32:45 +0200 |
| commit | ee770e0d276bd8a46d8f036a39b2ed204b873188 (patch) | |
| tree | b4796d23f88f0ea31f8e8924de7ddd85bcd212d8 | |
| parent | ab6db2bfd9733552d6c25eaa806858ffed0e388a (diff) | |
improve bouncing behavior
| -rw-r--r-- | examples/texture.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/examples/texture.c b/examples/texture.c index 06428de..1a4382a 100644 --- a/examples/texture.c +++ b/examples/texture.c @@ -49,7 +49,6 @@ void draw_frame(sponge_Texture c) { pos_x = 0; speed_x = SPEED_X_ABS; } else if (pos_x + texture.width > c.width) { - pos_x = c.width - texture.width; speed_x = -SPEED_X_ABS; } @@ -57,7 +56,6 @@ void draw_frame(sponge_Texture c) { pos_y = 0; speed_y = SPEED_X_ABS; } else if (pos_y + texture.height > c.height) { - pos_y = c.height - texture.height; speed_y = -SPEED_Y_ABS; } |
