From 303eb0e94eb79ce1c138d6329d5a14eeae0a2b16 Mon Sep 17 00:00:00 2001
From: "p.kosyh"
Date: Thu, 14 Apr 2011 13:49:15 +0000
Subject: [PATCH] sprites cleanup
---
src/sdl-instead/instead.c | 4 ++++
1 file changed, 4 insertions(+)
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;