Fix mistake
This commit is contained in:
parent
e5914a3f54
commit
39be3b57d7
@ -19,7 +19,7 @@ end
|
|||||||
|
|
||||||
lastFrame = 0
|
lastFrame = 0
|
||||||
function tick()
|
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()
|
engine_window_present()
|
||||||
trackFps()
|
trackFps()
|
||||||
local curFrame = engine_time_get()
|
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;
|
int ex = sx + texture->width;
|
||||||
if (ex > engine_width) { ex = engine_width; }
|
if (ex > engine_width) { ex = engine_width; }
|
||||||
int ey = sy + texture->height;
|
int ey = sy + texture->height;
|
||||||
if (ey > engine_width) { ey = engine_height; }
|
if (ey > engine_height) { ey = engine_height; }
|
||||||
int x = sx;
|
int x = sx;
|
||||||
if (x < 0) { x = 0; }
|
if (x < 0) { x = 0; }
|
||||||
int y = sy;
|
int y = sy;
|
||||||
|
Loading…
Reference in New Issue
Block a user