diff --git a/src/sdl-instead/instead.c b/src/sdl-instead/instead.c index d99657e..e491239 100644 --- a/src/sdl-instead/instead.c +++ b/src/sdl-instead/instead.c @@ -915,7 +915,9 @@ static int luaB_draw_sprite(lua_State *L) { if (img2) s = img2; } + gfx_clip(game_theme.xoff, game_theme.yoff, game_theme.w, game_theme.h); gfx_draw_from(s, x + xoff0, y + yoff0, w, h, d, xx + xoff, yy + yoff); + gfx_noclip(); gfx_free_image(img2); lua_pushboolean(L, 1); return 1; @@ -963,7 +965,9 @@ static int luaB_copy_sprite(lua_State *L) { game_pict_modify(d); + gfx_clip(game_theme.xoff, game_theme.yoff, game_theme.w, game_theme.h); gfx_copy_from(s, x + xoff0, y + yoff0, w, h, d, xx + xoff, yy + yoff); + gfx_noclip(); gfx_free_image(img2); lua_pushboolean(L, 1); return 1;