From 39be3b57d7155d649d19f2c56bb5f92b0b8e1269 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Tue, 16 May 2023 12:41:30 +0200 Subject: [PATCH] Fix mistake --- mods/main/script/main.lua | 2 +- src/engine/frontend/generic/textures.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/main/script/main.lua b/mods/main/script/main.lua index 4428de7..af815c7 100644 --- a/mods/main/script/main.lua +++ b/mods/main/script/main.lua @@ -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() diff --git a/src/engine/frontend/generic/textures.c b/src/engine/frontend/generic/textures.c index f58321b..637e421 100644 --- a/src/engine/frontend/generic/textures.c +++ b/src/engine/frontend/generic/textures.c @@ -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;