sprites cleanup

This commit is contained in:
p.kosyh 2011-04-14 13:49:15 +00:00
parent fa026def40
commit 303eb0e94e

View file

@ -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;