Fix mistake
This commit is contained in:
parent
e5914a3f54
commit
39be3b57d7
@ -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()
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user