Changes on brushes memory management, in preparation for Issue 362

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1699 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2011-01-27 19:52:36 +00:00
parent 4175226a4a
commit 40a7bcf40e
6 changed files with 304 additions and 440 deletions

View File

@@ -161,10 +161,11 @@ int L_SetBrushSize(lua_State* L)
LUA_ARG_NUMBER(1, "setbrushsize", w, 1, 10000);
LUA_ARG_NUMBER(2, "setbrushsize", h, 1, 10000);
if (Realloc_brush(w, h))
if (Realloc_brush(w, h, NULL, NULL))
{
return luaL_error(L, "setbrushsize: Resize failed");
}
Brush_was_altered=1;
// Fill with Back_color
memset(Brush,Back_color,(long)Brush_width*Brush_height);