After switching into, or out of, a magic tool, the canvas is updated.

This commit is contained in:
William Kendrick 2009-10-14 00:43:46 +00:00
parent f156c5db82
commit 44422bac91
2 changed files with 8 additions and 1 deletions

View file

@ -37,6 +37,8 @@ $Id$
* Other Improvements: * Other Improvements:
------------------- -------------------
* After switching into, or out of, a magic tool, the canvas is updated.
* Starter images can be in SVG (Scalable Vector Graphics) format. * Starter images can be in SVG (Scalable Vector Graphics) format.
(Avoids loading PNG if SVG with the same name exists.) (Avoids loading PNG if SVG with the same name exists.)

View file

@ -22,7 +22,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
June 14, 2002 - October 11, 2009 June 14, 2002 - October 13, 2009
$Id$ $Id$
*/ */
@ -20319,10 +20319,13 @@ Uint32 magic_getpixel(SDL_Surface * surface, int x, int y)
void magic_switchout(SDL_Surface * last) void magic_switchout(SDL_Surface * last)
{ {
if (cur_tool == TOOL_MAGIC) if (cur_tool == TOOL_MAGIC)
{
magic_funcs[magics[cur_magic].handle_idx].switchout(magic_api_struct, magic_funcs[magics[cur_magic].handle_idx].switchout(magic_api_struct,
magics[cur_magic].idx, magics[cur_magic].idx,
magics[cur_magic].mode, magics[cur_magic].mode,
canvas, last); canvas, last);
update_canvas(0, 0, canvas->w, canvas->h);
}
} }
void magic_switchin(SDL_Surface * last) void magic_switchin(SDL_Surface * last)
@ -20338,6 +20341,8 @@ void magic_switchin(SDL_Surface * last)
let's put the old Tux text back: */ let's put the old Tux text back: */
redraw_tux_text(); redraw_tux_text();
update_canvas(0, 0, canvas->w, canvas->h);
} }
} }