diff --git a/src/core_lua.c b/src/core_lua.c
index 0b82f40e9f746bbea4b0f23ed23df8810b94ed53..819f61e3683af08f8a89021acccd96340a4223d3 100644
--- a/src/core_lua.c
+++ b/src/core_lua.c
@@ -32,6 +32,7 @@
 #include "SFMT.h"
 #include "mzip.h"
 #include "main.h"
+#include "useshader.h"
 #include <math.h>
 #include <time.h>
 
@@ -601,7 +602,6 @@ static int sdl_new_tile(lua_State *L)
 	int alpha = luaL_checknumber(L, 13);
 
 	SDL_Color color = {r,g,b};
-	SDL_Color bcolor = {0,0,0};
 	SDL_Surface *txt = TTF_RenderUTF8_Blended(*f, str, color);
 
 	SDL_Surface **s = (SDL_Surface**)lua_newuserdata(L, sizeof(SDL_Surface*));
diff --git a/src/map.c b/src/map.c
index e236bfc3a2d398094a86132b3027ea6bee159d01..ffb5b06c67917452f1fe1083a4d954507cf265c6 100644
--- a/src/map.c
+++ b/src/map.c
@@ -29,9 +29,7 @@
 #include "main.h"
 #include "script.h"
 //#include "shaders.h"
-
-extern bool shaders_active;
-extern void useShader(GLuint p, int x, int y, int w, int h, float r, float g, float b, float a);
+#include "useshader.h"
 
 static int map_object_new(lua_State *L)
 {
diff --git a/src/useshader.h b/src/useshader.h
new file mode 100644
index 0000000000000000000000000000000000000000..6a01d6f2d39d36321b949e2c0c2542e1bf6d25fe
--- /dev/null
+++ b/src/useshader.h
@@ -0,0 +1,2 @@
+extern bool shaders_active;
+extern void useShader(GLuint p, int x, int y, int w, int h, float r, float g, float b, float a);