diff options
author | perepujal <perepujal> | 2011-05-10 11:49:19 (GMT) |
---|---|---|
committer | perepujal <perepujal> | 2011-05-10 11:49:19 (GMT) |
commit | dbae9e2b4fad229c14e1ca61c7e5177ef1872e1a (patch) | |
tree | 5d34efdb0b6828f1f82887431bdda5de5b107df1 | |
parent | 332b00db4e7974a8ddef2873c27685fdfdbac7b3 (diff) |
Two of the string tools now uses MODE_PAINT_WITH_PREVIEW
-rw-r--r-- | magic/src/string.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/magic/src/string.c b/magic/src/string.c index 457d28d..dc0315c 100644 --- a/magic/src/string.c +++ b/magic/src/string.c @@ -73,9 +73,12 @@ Uint32 string_api_version(void) return(TP_MAGIC_API_VERSION); } -int string_modes(__attribute__((unused)) magic_api * api, __attribute__((unused)) int which) +int string_modes(__attribute__((unused)) magic_api * api, int which) { - return(MODE_PAINT); + if (which == STRING_TOOL_FULL_BY_OFFSET) + return(MODE_PAINT); + else + return(MODE_PAINT_WITH_PREVIEW); } void string_set_color(__attribute__((unused)) magic_api * api, Uint8 r, Uint8 g, Uint8 b) @@ -206,7 +209,7 @@ void string_switchin(__attribute__((unused)) magic_api * api, __attribute__((unu void string_switchout(__attribute__((unused)) magic_api * api, __attribute__((unused)) int which, __attribute__((unused)) int mode, __attribute__((unused)) SDL_Surface * canvas, __attribute__((unused)) SDL_Surface * snapshot) { SDL_FreeSurface(canvas_backup); - canvas_backup=0; + canvas_backup=NULL; } // Interactivity functions |