diff --git a/lua.cpp b/lua.cpp index ae14991..5f5e206 100644 --- a/lua.cpp +++ b/lua.cpp @@ -323,7 +323,7 @@ extern "C" { } } - static int cpp_viewport_local(lua_State *L) { + static int cpp_viewport_tolocal(lua_State *L) { int x = luaL_checknumber(L, 1); int y = luaL_checknumber(L, 2); lua_pushinteger(L, x+camx()); @@ -834,7 +834,7 @@ void push_lua_funcs() { lua_newtable(L); lua_pushcfunction(L,cpp_viewport_clip); lua_setfield(L, -2, "clip"); lua_pushcfunction(L,cpp_viewport_origin); lua_setfield(L, -2, "origin"); - lua_pushcfunction(L,cpp_viewport_local); lua_setfield(L, -2, "local"); + lua_pushcfunction(L,cpp_viewport_tolocal); lua_setfield(L, -2, "tolocal"); lua_setglobal(L, "view"); lua_newtable(L); diff --git a/mini.cpp b/mini.cpp index 3cd5f99..b4b85a1 100644 --- a/mini.cpp +++ b/mini.cpp @@ -210,12 +210,17 @@ uint8_t newsurf(int w, int h) { surfaces[i].h = h; surfaces[i].size = w*h; surfaces[i].p = (uint8_t*)calloc(surfaces[i].size,1); + SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, "Surface %i creada.\n", i); return i; } uint8_t loadsurf(const char* filename) { // Si el gif ja s'ha carregat en una textura, tornem eixa textura - for (int i=0; i