Skip to content
Snippets Groups Projects
Commit 66c31685 authored by dg's avatar dg
Browse files

fix ?

git-svn-id: http://svn.net-core.org/repos/t-engine4@4198 51575b47-30f0-44d4-a5cc-537603b46e54
parent 51ebf884
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ newEntity{base="HARDWALL", define_as = "ATAMATHON_BROKEN",
nice_tiler = false,
display = 'g', color = colors.RED,
image = "npc/atamathon_broken.png",
resolvers.nice_tile{image="terrain/grass.png", add_displays = {class.new{image="npc/construct_golem_athamathon_the_giant_golem.png", display_y=-1, display_h=2}}},
resolvers.nice_tile{image="terrain/grass.png", add_displays = {class.new{z=18,image="npc/construct_golem_athamathon_the_giant_golem.png", display_y=-1, display_h=2}}},
name = "the remains of Atamathon",
show_tooltip = true,
desc = [[This giant golem was constructed by the halflings during the Pyre Wars to fight the orcs, but was felled by Garkul the Devourer.
......
......@@ -885,7 +885,6 @@ static int gl_texture_to_sdl(lua_State *L)
// Make sdl surface from it
*s = SDL_CreateRGBSurfaceFrom(tmp, w, h, 32, w*4, 0,0,0,0);
// SDL_SaveBMP(*s, "/tmp/foo.bmp");
return 1;
}
......@@ -1091,7 +1090,11 @@ static int sdl_load_image(lua_State *L)
static int sdl_free_surface(lua_State *L)
{
SDL_Surface **s = (SDL_Surface**)auxiliar_checkclass(L, "sdl{surface}", 1);
SDL_FreeSurface(*s);
if (*s)
{
if ((*s)->flags & SDL_PREALLOC) free((*s)->pixels);
SDL_FreeSurface(*s);
}
lua_pushnumber(L, 1);
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment