Fix mistake

This commit is contained in:
Fierelier 2023-05-16 12:41:30 +02:00
parent e5914a3f54
commit 39be3b57d7
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ end
lastFrame = 0
function tick()
engine_texture_render_2d(texture,math.random(0,88),math.random(0,56))
engine_texture_render_2d(texture,math.random(-8,102),math.random(-8,72))
engine_window_present()
trackFps()
local curFrame = engine_time_get()

View File

@ -51,7 +51,7 @@ void engine_texture_render_2d(struct ENGINE_TEXTURE * texture,int sx,int sy) {
int ex = sx + texture->width;
if (ex > engine_width) { ex = engine_width; }
int ey = sy + texture->height;
if (ey > engine_width) { ey = engine_height; }
if (ey > engine_height) { ey = engine_height; }
int x = sx;
if (x < 0) { x = 0; }
int y = sy;