Removed src/dialogs/effect/*.c

This commit is contained in:
David Capello 2007-11-08 00:54:31 +00:00
parent 0acca25989
commit 36f861ddd7
34 changed files with 2388 additions and 2101 deletions

View File

@ -1,7 +1,21 @@
2007-11-07 David A. Capello <dacap@users.sourceforge.net>
* src/commands/cmd_color_curve.c: Done. Removed src/dialogs/effect/dcolcurv.c
* src/commands/cmd_convolution_matrix.c: Done. Removed src/dialogs/effect/dconvmtr.c
* src/commands/cmd_despeckle.c: Done. Removed src/dialogs/effect/dmedian.c
* src/commands/cmd_replace_color.c: Done. Removed src/dialogs/effect/dreplcol.c
* src/commands/cmd_invert_color.c: Done. Removed src/dialogs/effect/dinvcol.c
* src/commands/cmd_flip.c: Done. Removed src/util/flip.c
2007-10-07 David A. Capello <dacap@users.sourceforge.net>
* src/commands/cmd_new_frame.c (command_execute_new_frame): Added
from new_frame() routine (now with undo of everything).
from new_frame() routine (now with undo of sprite_set_frames).
* src/raster/undo.c (undo_set_frames): Added.

View File

@ -1,9 +1,10 @@
High priority work
------------------
- search for XXX (XXXX is supposed to be high priority);
+ replace XXX to TODO;
- add support for PNG files.
- ver por el nuevo load_font de Allegro.
- search for XXX (XXXX is supposed to be high priority);
- complete palette operations, and palette editor (it needs a slider
or something to move between palette changes);
- fix undo of big chunks (more than limit):
@ -44,7 +45,14 @@ High priority work
Wish-list
---------
- Add menu customization through UI (Tools/Customize).
- my wish-list:
+ keyboard shortcuts for snap-to-grid and view-grid
+ different snap-to-grid for paste operation
+ better dialogs: widder buttons, more borders.
+ better film editor
+ "middle mouse button" for the film editor.
+ don't use LINKs when load a sequence of bitmaps.
- add menu customization through UI (Tools/Customize).
- Mateusz Czaplinski ideas:
+ when move selections, will be good the possibility to see relative
position from the starting point of movement;

View File

@ -21,8 +21,6 @@
<key command="copy" shortcut="Ctrl+C" /> <key command="copy" shortcut="Ctrl+Ins" />
<key command="paste" shortcut="Ctrl+V" /> <key command="paste" shortcut="Shift+Ins" />
<key command="clear" shortcut="Ctrl+B" /> <key command="clear" shortcut="Ctrl+Del" />
<key command="quick_move" shortcut="Shift+M" />
<key command="quick_copy" shortcut="Shift+C" />
<key command="flip_horizontal" shortcut="Shift+H" />
<key command="flip_vertical" shortcut="Shift+V" />
<key command="replace_color" shortcut="Shift+R" />
@ -99,9 +97,6 @@
<item command="paste" name="&Paste" />
<item command="clear" name="C&lear" />
<separator />
<item command="quick_move" name="Quick &Move" />
<item command="quick_copy" name="Quick C&opy" />
<separator />
<item command="flip_horizontal" name="Flip &Horizontal" />
<item command="flip_vertical" name="Flip &Vertical" />
<separator />

View File

@ -146,7 +146,6 @@ void ji_set_standard_theme(void)
{
if (!ji_standard_theme) {
ji_standard_theme = jtheme_new_standard();
/* ji_standard_theme = jtheme_new_simple(); */
if (!ji_standard_theme)
return;
}

File diff suppressed because it is too large Load Diff

View File

@ -84,10 +84,10 @@ $(ZLIB_LIB): $(ZLIB_OBJS)
VPATH = src \
src/commands \
src/commands/fx \
src/console \
src/core \
src/dialogs \
src/dialogs/effect \
src/effect \
src/file \
src/file/gif \

View File

@ -5,182 +5,175 @@
ASE = ase$(EXE)
ASE_SOURCES = \
src/commands/cmd_about.c \
src/commands/cmd_advanced_mode.c \
src/commands/cmd_change_image_type.c \
src/commands/cmd_clear.c \
src/commands/cmd_close_file.c \
src/commands/cmd_color_curve.c \
src/commands/cmd_configure_screen.c \
src/commands/cmd_configure_tools.c \
src/commands/cmd_convolution_matrix.c \
src/commands/cmd_copy.c \
src/commands/cmd_copy_frame.c \
src/commands/cmd_crop.c \
src/commands/cmd_cut.c \
src/commands/cmd_deselect_mask.c \
src/commands/cmd_despeckle.c \
src/commands/cmd_draw_text.c \
src/commands/cmd_drawing_tools.c \
src/commands/cmd_duplicate_layer.c \
src/commands/cmd_duplicate_sprite.c \
src/commands/cmd_sprite_editor.c \
src/commands/cmd_exit.c \
src/commands/cmd_film_editor.c \
src/commands/cmd_flatten_layers.c \
src/commands/cmd_flip_horizontal.c \
src/commands/cmd_flip_vertical.c \
src/commands/cmd_frame_properties.c \
src/commands/cmd_invert_color.c \
src/commands/cmd_invert_mask.c \
src/commands/cmd_layer_properties.c \
src/commands/cmd_link_frame.c \
src/commands/cmd_load_mask.c \
src/commands/cmd_mapgen.c \
src/commands/cmd_mask_all.c \
src/commands/cmd_mask_by_color.c \
src/commands/cmd_merge_down_layer.c \
src/commands/cmd_move_frame.c \
src/commands/cmd_new_file.c \
src/commands/cmd_new_frame.c \
src/commands/cmd_new_layer.c \
src/commands/cmd_new_layer_set.c \
src/commands/cmd_open_file.c \
src/commands/cmd_options.c \
src/commands/cmd_palette_editor.c \
src/commands/cmd_paste.c \
src/commands/cmd_play_flic.c \
src/commands/cmd_preview.c \
src/commands/cmd_quick_copy.c \
src/commands/cmd_quick_move.c \
src/commands/cmd_record_screen.c \
src/commands/cmd_redo.c \
src/commands/cmd_refresh.c \
src/commands/cmd_remove_frame.c \
src/commands/cmd_remove_layer.c \
src/commands/cmd_replace_color.c \
src/commands/cmd_reselect_mask.c \
src/commands/cmd_run_script.c \
src/commands/cmd_save_file.c \
src/commands/cmd_save_file_as.c \
src/commands/cmd_save_mask.c \
src/commands/cmd_screen_shot.c \
src/commands/cmd_select_file.c \
src/commands/cmd_sprite_properties.c \
src/commands/cmd_tips.c \
src/commands/cmd_undo.c \
src/commands/commands.c \
src/console/console.c \
src/core/app.c \
src/core/config.c \
src/core/cfg.c \
src/core/core.c \
src/core/dirs.c \
src/core/modules.c \
src/dialogs/canvasze.c \
src/dialogs/colsel.c \
src/dialogs/dmapgen.c \
src/dialogs/dpaledit.c \
src/dialogs/drawtext.c \
src/dialogs/effect/dcolcurv.c \
src/dialogs/effect/dconvmtr.c \
src/dialogs/effect/dinvcol.c \
src/dialogs/effect/dmedian.c \
src/dialogs/effect/dreplcol.c \
src/dialogs/filesel.c \
src/dialogs/filmedit.c \
src/dialogs/gfxsel.c \
src/dialogs/maskcol.c \
src/dialogs/minipal.c \
src/dialogs/options.c \
src/dialogs/playfli.c \
src/dialogs/quick.c \
src/dialogs/repo.c \
src/dialogs/scrsaver.c \
src/dialogs/tips.c \
src/dialogs/vectmap.c \
src/effect/colcurve.c \
src/effect/convmatr.c \
src/effect/effect.c \
src/effect/invrtcol.c \
src/effect/median.c \
src/effect/replcol.c \
src/file/ase.c \
src/file/bmp.c \
src/file/file.c \
src/file/fli.c \
src/file/ico.c \
src/file/jpeg.c \
src/file/pcx.c \
src/file/png_file.c \
src/file/tga.c \
src/file/gif.c \
src/file/gif/format.c \
src/file/gif/lzw.c \
src/intl/intl.c \
src/intl/msgids.c \
src/main.c \
src/modules/color.c \
src/modules/editors.c \
src/modules/gfx.c \
src/modules/gui.c \
src/modules/palette.c \
src/modules/recent.c \
src/modules/render.c \
src/modules/rootmenu.c \
src/modules/sprites.c \
src/modules/tools.c \
src/modules/tools2.c \
src/raster/algo.c \
src/raster/algofill.c \
src/raster/blend.c \
src/raster/brush.c \
src/raster/dirty.c \
src/raster/frame.c \
src/raster/gfxobj.c \
src/raster/image.c \
src/raster/layer.c \
src/raster/mask.c \
src/raster/path.c \
src/raster/quant.c \
src/raster/rotate.c \
src/raster/sprite.c \
src/raster/stock.c \
src/raster/undo.c \
src/script/bindings.c \
src/script/script.c \
src/util/autocrop.c \
src/util/boundary.c \
src/util/clipbrd.c \
src/util/col_file.c \
src/util/crop.c \
src/util/filetoks.c \
src/util/flip.c \
src/util/frmove.c \
src/util/hash.c \
src/util/mapgen.c \
src/util/misc.c \
src/util/msk_file.c \
src/util/pic_file.c \
src/util/quantize.c \
src/util/recscr.c \
src/util/setgfx.c \
src/util/thmbnail.c \
src/widgets/colbar.c \
src/widgets/colbut.c \
src/widgets/colview.c \
src/widgets/curvedit.c \
src/widgets/editor/click.c \
src/widgets/editor/cursor.c \
src/widgets/editor/editor.c \
src/widgets/editor/keys.c \
src/widgets/groupbut.c \
src/widgets/menuitem.c \
src/widgets/paledit.c \
src/widgets/preview.c \
src/widgets/statebar.c \
src/widgets/target.c \
ASE_SOURCES = \
src/commands/cmd_about.c \
src/commands/cmd_advanced_mode.c \
src/commands/cmd_change_image_type.c \
src/commands/cmd_clear.c \
src/commands/cmd_close_file.c \
src/commands/cmd_configure_screen.c \
src/commands/cmd_configure_tools.c \
src/commands/cmd_copy.c \
src/commands/cmd_copy_frame.c \
src/commands/cmd_crop.c \
src/commands/cmd_cut.c \
src/commands/cmd_deselect_mask.c \
src/commands/cmd_draw_text.c \
src/commands/cmd_drawing_tools.c \
src/commands/cmd_duplicate_layer.c \
src/commands/cmd_duplicate_sprite.c \
src/commands/cmd_exit.c \
src/commands/cmd_film_editor.c \
src/commands/cmd_flatten_layers.c \
src/commands/cmd_flip.c \
src/commands/cmd_frame_properties.c \
src/commands/cmd_invert_mask.c \
src/commands/cmd_layer_properties.c \
src/commands/cmd_link_frame.c \
src/commands/cmd_load_mask.c \
src/commands/cmd_mapgen.c \
src/commands/cmd_mask_all.c \
src/commands/cmd_mask_by_color.c \
src/commands/cmd_merge_down_layer.c \
src/commands/cmd_move_frame.c \
src/commands/cmd_new_file.c \
src/commands/cmd_new_frame.c \
src/commands/cmd_new_layer.c \
src/commands/cmd_new_layer_set.c \
src/commands/cmd_open_file.c \
src/commands/cmd_options.c \
src/commands/cmd_palette_editor.c \
src/commands/cmd_paste.c \
src/commands/cmd_play_flic.c \
src/commands/cmd_preview.c \
src/commands/cmd_quick_copy.c \
src/commands/cmd_quick_move.c \
src/commands/cmd_record_screen.c \
src/commands/cmd_redo.c \
src/commands/cmd_refresh.c \
src/commands/cmd_remove_frame.c \
src/commands/cmd_remove_layer.c \
src/commands/cmd_reselect_mask.c \
src/commands/cmd_run_script.c \
src/commands/cmd_save_file.c \
src/commands/cmd_save_file_as.c \
src/commands/cmd_save_mask.c \
src/commands/cmd_screen_shot.c \
src/commands/cmd_select_file.c \
src/commands/cmd_sprite_editor.c \
src/commands/cmd_sprite_properties.c \
src/commands/cmd_tips.c \
src/commands/cmd_undo.c \
src/commands/commands.c \
src/commands/fx/cmd_color_curve.c \
src/commands/fx/cmd_convolution_matrix.c \
src/commands/fx/cmd_despeckle.c \
src/commands/fx/cmd_invert_color.c \
src/commands/fx/cmd_replace_color.c \
src/console/console.c \
src/core/app.c \
src/core/config.c \
src/core/cfg.c \
src/core/core.c \
src/core/dirs.c \
src/core/modules.c \
src/dialogs/canvasze.c \
src/dialogs/colsel.c \
src/dialogs/dmapgen.c \
src/dialogs/dpaledit.c \
src/dialogs/drawtext.c \
src/dialogs/filesel.c \
src/dialogs/filmedit.c \
src/dialogs/gfxsel.c \
src/dialogs/maskcol.c \
src/dialogs/minipal.c \
src/dialogs/options.c \
src/dialogs/playfli.c \
src/dialogs/quick.c \
src/dialogs/repo.c \
src/dialogs/scrsaver.c \
src/dialogs/tips.c \
src/dialogs/vectmap.c \
src/effect/colcurve.c \
src/effect/convmatr.c \
src/effect/effect.c \
src/effect/invrtcol.c \
src/effect/median.c \
src/effect/replcol.c \
src/file/ase.c \
src/file/bmp.c \
src/file/file.c \
src/file/fli.c \
src/file/ico.c \
src/file/jpeg.c \
src/file/pcx.c \
src/file/png_file.c \
src/file/tga.c \
src/file/gif.c \
src/file/gif/format.c \
src/file/gif/lzw.c \
src/intl/intl.c \
src/intl/msgids.c \
src/main.c \
src/modules/color.c \
src/modules/editors.c \
src/modules/gfx.c \
src/modules/gui.c \
src/modules/palette.c \
src/modules/recent.c \
src/modules/render.c \
src/modules/rootmenu.c \
src/modules/sprites.c \
src/modules/tools.c \
src/modules/tools2.c \
src/raster/algo.c \
src/raster/algofill.c \
src/raster/blend.c \
src/raster/brush.c \
src/raster/dirty.c \
src/raster/frame.c \
src/raster/gfxobj.c \
src/raster/image.c \
src/raster/layer.c \
src/raster/mask.c \
src/raster/path.c \
src/raster/quant.c \
src/raster/rotate.c \
src/raster/sprite.c \
src/raster/stock.c \
src/raster/undo.c \
src/script/bindings.c \
src/script/script.c \
src/util/autocrop.c \
src/util/boundary.c \
src/util/clipbrd.c \
src/util/col_file.c \
src/util/crop.c \
src/util/filetoks.c \
src/util/frmove.c \
src/util/hash.c \
src/util/mapgen.c \
src/util/misc.c \
src/util/msk_file.c \
src/util/pic_file.c \
src/util/quantize.c \
src/util/recscr.c \
src/util/setgfx.c \
src/util/thmbnail.c \
src/widgets/colbar.c \
src/widgets/colbut.c \
src/widgets/colview.c \
src/widgets/curvedit.c \
src/widgets/editor/click.c \
src/widgets/editor/cursor.c \
src/widgets/editor/editor.c \
src/widgets/editor/keys.c \
src/widgets/groupbut.c \
src/widgets/menuitem.c \
src/widgets/paledit.c \
src/widgets/preview.c \
src/widgets/statebar.c \
src/widgets/target.c \
src/widgets/toolbar.c
ASE_OBJS = $(addprefix $(OBJ_DIR)/, \

View File

@ -102,8 +102,8 @@ ase_files="all.h \
*.txt \
data/aseicon.* \
data/convmatr.def \
data/defgui-en.xml \
data/defgui-es.xml \
data/gui-en.xml \
data/gui-es.xml \
data/fonts/*.pcx \
data/jids/*.jid \
data/palettes/*.col \

View File

@ -27,10 +27,10 @@ rm -f makefile.dep
$GCC $CFLAGS jinete/src/*.c \
src/*.c \
src/commands/*.c \
src/commands/fx/*.c \
src/console/*.c \
src/core/*.c \
src/dialogs/*.c \
src/dialogs/effect/*.c \
src/effect/*.c \
src/file/*.c \
src/intl/*.c \

View File

@ -1,33 +0,0 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include "jinete.h"
#include "core/app.h"
#include "modules/sprites.h"
#include "raster/sprite.h"
#endif
void command_execute_color_curve(const char *argument)
{
}

View File

@ -1,33 +0,0 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include "jinete.h"
#include "core/app.h"
#include "modules/sprites.h"
#include "raster/sprite.h"
#endif
void command_execute_convolution_matrix(const char *argument)
{
}

View File

@ -1,33 +0,0 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include "jinete.h"
#include "core/app.h"
#include "modules/sprites.h"
#include "raster/sprite.h"
#endif
void command_execute_despeckle(const char *argument)
{
}

View File

@ -1,85 +1,112 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2001-2005 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include "modules/editors.h"
#include "modules/sprites.h"
#include "raster/image.h"
#include "raster/mask.h"
#include "raster/sprite.h"
#include "raster/undo.h"
#include "util/misc.h"
#endif
static void do_flip (int horz);
void flip_horizontal (void) { do_flip (TRUE); }
void flip_vertical (void) { do_flip (FALSE); }
static void do_flip (int horz)
{
Sprite *sprite = current_sprite;
Image *image, *area;
int x1, y1, x2, y2;
int x, y;
if (!sprite)
return;
image = GetImage2 (sprite, &x, &y, NULL);
if (!image)
return;
if (mask_is_empty (sprite->mask)) {
x1 = 0;
y1 = 0;
x2 = image->w-1;
y2 = image->h-1;
}
else {
/* apply the frame offset */
x1 = sprite->mask->x - x;
y1 = sprite->mask->y - y;
x2 = sprite->mask->x + sprite->mask->w - 1 - x;
y2 = sprite->mask->y + sprite->mask->h - 1 - y;
/* clip */
x1 = MID (0, x1, image->w-1);
y1 = MID (0, y1, image->h-1);
x2 = MID (0, x2, image->w-1);
y2 = MID (0, y2, image->h-1);
}
/* insert the undo operation */
if (undo_is_enabled (sprite->undo))
undo_flip (sprite->undo, image, x1, y1, x2, y2, horz);
/* flip the portion of the bitmap */
area = image_crop (image, x1, y1, x2-x1+1, y2-y1+1);
for (y=0; y<(y2-y1+1); y++)
for (x=0; x<(x2-x1+1); x++)
image_putpixel (image,
horz ? x2-x: x1+x,
!horz? y2-y: y1+y,
image_getpixel (area, x, y));
image_free (area);
}
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include "modules/editors.h"
#include "modules/gui.h"
#include "modules/sprites.h"
#include "raster/image.h"
#include "raster/mask.h"
#include "raster/sprite.h"
#include "raster/undo.h"
#include "util/misc.h"
#endif
static void do_flip(int horz);
/* ======================== */
/* flip_horizontal */
/* ======================== */
bool command_enabled_flip_horizontal(const char *argument)
{
return current_sprite != NULL;
}
void command_execute_flip_horizontal(const char *argument)
{
do_flip(TRUE);
}
/* ======================== */
/* flip_vertical */
/* ======================== */
bool command_enabled_flip_vertical(const char *argument)
{
return current_sprite != NULL;
}
void command_execute_flip_vertical(const char *argument)
{
do_flip(FALSE);
}
/************************************************************/
/* do_flip */
static void do_flip(int horz)
{
Sprite *sprite = current_sprite;
Image *image, *area;
int x1, y1, x2, y2;
int x, y;
image = GetImage2(sprite, &x, &y, NULL);
if (!image)
return;
if (mask_is_empty(sprite->mask)) {
x1 = 0;
y1 = 0;
x2 = image->w-1;
y2 = image->h-1;
}
else {
/* apply the frame offset */
x1 = sprite->mask->x - x;
y1 = sprite->mask->y - y;
x2 = sprite->mask->x + sprite->mask->w - 1 - x;
y2 = sprite->mask->y + sprite->mask->h - 1 - y;
/* clip */
x1 = MID (0, x1, image->w-1);
y1 = MID (0, y1, image->h-1);
x2 = MID (0, x2, image->w-1);
y2 = MID (0, y2, image->h-1);
}
/* insert the undo operation */
if (undo_is_enabled(sprite->undo))
undo_flip(sprite->undo, image, x1, y1, x2, y2, horz);
/* flip the portion of the bitmap */
area = image_crop(image, x1, y1, x2-x1+1, y2-y1+1);
for (y=0; y<(y2-y1+1); y++)
for (x=0; x<(x2-x1+1); x++)
image_putpixel(image,
horz ? x2-x: x1+x,
!horz? y2-y: y1+y,
image_getpixel (area, x, y));
image_free(area);
GUI_Refresh(current_sprite);
}

View File

@ -1,33 +0,0 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include "jinete.h"
#include "core/app.h"
#include "modules/sprites.h"
#include "raster/sprite.h"
#endif
void command_execute_flip_horizontal(const char *argument)
{
}

View File

@ -1,33 +0,0 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include "jinete.h"
#include "core/app.h"
#include "modules/sprites.h"
#include "raster/sprite.h"
#endif
void command_execute_flip_vertical(const char *argument)
{
}

View File

@ -1,33 +0,0 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include "jinete.h"
#include "core/app.h"
#include "modules/sprites.h"
#include "raster/sprite.h"
#endif
void command_execute_invert_color(const char *argument)
{
}

View File

@ -1,33 +0,0 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include "jinete.h"
#include "core/app.h"
#include "modules/sprites.h"
#include "raster/sprite.h"
#endif
void command_execute_quick_copy(const char *argument)
{
}

View File

@ -1,33 +0,0 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include "jinete.h"
#include "core/app.h"
#include "modules/sprites.h"
#include "raster/sprite.h"
#endif
void command_execute_quick_move(const char *argument)
{
}

View File

@ -1,33 +0,0 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include "jinete.h"
#include "core/app.h"
#include "modules/sprites.h"
#include "raster/sprite.h"
#endif
void command_execute_replace_color(const char *argument)
{
}

View File

@ -63,11 +63,13 @@ bool command_enabled_paste(const char *argument);
void command_execute_paste(const char *argument);
bool command_enabled_clear(const char *argument);
void command_execute_clear(const char *argument);
void command_execute_quick_move(const char *argument);
void command_execute_quick_copy(const char *argument);
bool command_enabled_flip_horizontal(const char *argument);
void command_execute_flip_horizontal(const char *argument);
bool command_enabled_flip_vertical(const char *argument);
void command_execute_flip_vertical(const char *argument);
bool command_enabled_replace_color(const char *argument);
void command_execute_replace_color(const char *argument);
bool command_enabled_invert_color(const char *argument);
void command_execute_invert_color(const char *argument);
void command_execute_refresh(const char *argument);
void command_execute_configure_screen(const char *argument);
@ -150,8 +152,11 @@ void command_execute_ellipse_tool(const char *argument);
bool command_enabled_film_editor(const char *argument);
void command_execute_film_editor(const char *argument);
void command_execute_palette_editor(const char *argument);
bool command_enabled_convolution_matrix(const char *argument);
void command_execute_convolution_matrix(const char *argument);
bool command_enabled_color_curve(const char *argument);
void command_execute_color_curve(const char *argument);
bool command_enabled_despeckle(const char *argument);
void command_execute_despeckle(const char *argument);
/* void command_execute_draw_text(const char *argument); */
/* void command_execute_play_flic(const char *argument); */
@ -188,12 +193,10 @@ static Command commands[] = {
CMD_EXE_ENA(copy),
CMD_EXE_ENA(paste),
CMD_EXE_ENA(clear),
{ CMD_QUICK_MOVE, NULL, NULL, NULL, NULL },
{ CMD_QUICK_COPY, NULL, NULL, NULL, NULL },
{ CMD_FLIP_HORIZONTAL, NULL, NULL, NULL, NULL },
{ CMD_FLIP_VERTICAL, NULL, NULL, NULL, NULL },
{ CMD_REPLACE_COLOR, NULL, NULL, NULL, NULL },
{ CMD_INVERT_COLOR, NULL, NULL, NULL, NULL },
CMD_EXE_ENA(flip_horizontal),
CMD_EXE_ENA(flip_vertical),
CMD_EXE_ENA(replace_color),
CMD_EXE_ENA(invert_color),
CMD_EXE(refresh),
{ CMD_CONFIGURE_SCREEN, NULL, NULL, NULL, NULL },
CMD_EXE(advanced_mode),
@ -243,9 +246,9 @@ static Command commands[] = {
CMD_EXE_CHK(ellipse_tool),
CMD_EXE_ENA(film_editor),
{ CMD_PALETTE_EDITOR, NULL, NULL, NULL, NULL },
{ CMD_CONVOLUTION_MATRIX, NULL, NULL, NULL, NULL },
{ CMD_COLOR_CURVE, NULL, NULL, NULL, NULL },
{ CMD_DESPECKLE, NULL, NULL, NULL, NULL },
CMD_EXE_ENA(convolution_matrix),
CMD_EXE_ENA(color_curve),
CMD_EXE_ENA(despeckle),
/* { CMD_DRAW_TEXT, NULL, NULL, NULL, NULL }, */
/* { CMD_PLAY_FLIC, NULL, NULL, NULL, NULL }, */
/* { CMD_MAPGEN, NULL, NULL, NULL, NULL }, */

View File

@ -39,8 +39,6 @@
#define CMD_COPY "copy"
#define CMD_PASTE "paste"
#define CMD_CLEAR "clear"
#define CMD_QUICK_MOVE "quick_move"
#define CMD_QUICK_COPY "quick_copy"
#define CMD_FLIP_HORIZONTAL "flip_horizontal"
#define CMD_FLIP_VERTICAL "flip_vertical"
#define CMD_REPLACE_COLOR "replace_color"

View File

@ -1,170 +1,172 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2001-2005, 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include "jinete.h"
#include "console/console.h"
#include "core/cfg.h"
#include "core/core.h"
#include "effect/colcurve.h"
#include "effect/effect.h"
#include "modules/color.h"
/* #include "modules/editors.h" */
#include "modules/gui.h"
#include "modules/sprites.h"
#include "raster/image.h"
#include "raster/mask.h"
#include "raster/sprite.h"
#include "util/misc.h"
#include "widgets/colbar.h"
#include "widgets/colbut.h"
#include "widgets/curvedit.h"
#include "widgets/preview.h"
#include "widgets/target.h"
#endif
static Curve *the_curve = NULL;
static JWidget check_preview, preview;
static bool hooked_msg_proc (JWidget widget, JMessage msg);
static void make_preview (void);
void dialogs_color_curve(void)
{
JWidget window, button_ok;
JWidget view_curve, curve_editor;
JWidget box_target, target_button;
Sprite *sprite = current_sprite;
Image *image;
Effect *effect;
if (!the_curve) {
/* default curve */
the_curve = curve_new (CURVE_LINEAR);
curve_add_point (the_curve, curve_point_new (0, 0));
curve_add_point (the_curve, curve_point_new (255, 255));
}
if (!is_interactive () || !sprite)
return;
image = GetImage ();
if (!image)
return;
window = load_widget ("colcurv.jid", "color_curve");
if (!window)
return;
if (!get_widgets (window,
"preview", &check_preview,
"button_ok", &button_ok,
"curve", &view_curve,
"target", &box_target, NULL)) {
jwidget_free (window);
return;
}
effect = effect_new (sprite, "color_curve");
if (!effect) {
console_printf (_("Error creating the effect applicator for this sprite\n"));
jwidget_free (window);
return;
}
preview = preview_new (effect);
set_color_curve (the_curve);
curve_editor = curve_editor_new (the_curve, 0, 0, 255, 255);
target_button = target_button_new (sprite->imgtype, TRUE);
if (get_config_bool ("ColorCurve", "Preview", TRUE))
jwidget_select (check_preview);
jview_attach (view_curve, curve_editor);
jwidget_set_static_size (view_curve, 64, 64);
jwidget_add_child (box_target, target_button);
jwidget_add_child (window, preview);
jwidget_add_hook (window, JI_WIDGET, hooked_msg_proc, NULL);
/* default position */
jwindow_remap (window);
jwindow_center (window);
/* first preview */
make_preview ();
/* load window configuration */
load_window_pos (window, "ColorCurve");
/* open the window */
jwindow_open_fg (window);
if (jwindow_get_killer (window) == button_ok) {
effect_apply_to_target (effect);
}
effect_free (effect);
/* update editors */
GUI_Refresh (sprite);
/* save window configuration */
save_window_pos (window, "ColorCurve");
jwidget_free (window);
}
static bool hooked_msg_proc (JWidget widget, JMessage msg)
{
if (msg->type == JM_SIGNAL) {
switch (msg->signal.num) {
case SIGNAL_CURVE_EDITOR_CHANGE:
set_color_curve (curve_editor_get_curve (msg->signal.from));
make_preview ();
break;
case SIGNAL_TARGET_BUTTON_CHANGE:
effect_load_target (preview_get_effect (preview));
make_preview ();
break;
case JI_SIGNAL_CHECK_CHANGE:
set_config_bool ("ColorCurve", "Preview",
jwidget_is_selected (msg->signal.from));
make_preview ();
break;
}
}
return FALSE;
}
static void make_preview (void)
{
if (jwidget_is_selected (check_preview))
preview_restart (preview);
}
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include "jinete.h"
#include "console/console.h"
#include "core/cfg.h"
#include "core/core.h"
#include "effect/colcurve.h"
#include "effect/effect.h"
#include "modules/color.h"
/* #include "modules/editors.h" */
#include "modules/gui.h"
#include "modules/sprites.h"
#include "raster/image.h"
#include "raster/mask.h"
#include "raster/sprite.h"
#include "util/misc.h"
#include "widgets/colbar.h"
#include "widgets/colbut.h"
#include "widgets/curvedit.h"
#include "widgets/preview.h"
#include "widgets/target.h"
#endif
static Curve *the_curve = NULL;
static JWidget check_preview, preview;
static bool hooked_msg_proc (JWidget widget, JMessage msg);
static void make_preview (void);
bool command_enabled_color_curve(const char *argument)
{
return current_sprite != NULL;
}
void command_execute_color_curve(const char *argument)
{
JWidget window, button_ok;
JWidget view_curve, curve_editor;
JWidget box_target, target_button;
Sprite *sprite = current_sprite;
Image *image;
Effect *effect;
if (!the_curve) {
/* default curve */
the_curve = curve_new (CURVE_LINEAR);
curve_add_point (the_curve, curve_point_new (0, 0));
curve_add_point (the_curve, curve_point_new (255, 255));
}
image = GetImage ();
if (!image)
return;
window = load_widget ("colcurv.jid", "color_curve");
if (!window)
return;
if (!get_widgets (window,
"preview", &check_preview,
"button_ok", &button_ok,
"curve", &view_curve,
"target", &box_target, NULL)) {
jwidget_free (window);
return;
}
effect = effect_new (sprite, "color_curve");
if (!effect) {
console_printf (_("Error creating the effect applicator for this sprite\n"));
jwidget_free (window);
return;
}
preview = preview_new (effect);
set_color_curve (the_curve);
curve_editor = curve_editor_new (the_curve, 0, 0, 255, 255);
target_button = target_button_new (sprite->imgtype, TRUE);
if (get_config_bool ("ColorCurve", "Preview", TRUE))
jwidget_select (check_preview);
jview_attach (view_curve, curve_editor);
jwidget_set_static_size (view_curve, 64, 64);
jwidget_add_child (box_target, target_button);
jwidget_add_child (window, preview);
jwidget_add_hook (window, JI_WIDGET, hooked_msg_proc, NULL);
/* default position */
jwindow_remap (window);
jwindow_center (window);
/* first preview */
make_preview ();
/* load window configuration */
load_window_pos (window, "ColorCurve");
/* open the window */
jwindow_open_fg (window);
if (jwindow_get_killer (window) == button_ok) {
effect_apply_to_target (effect);
}
effect_free (effect);
/* update editors */
GUI_Refresh (sprite);
/* save window configuration */
save_window_pos (window, "ColorCurve");
jwidget_free (window);
}
static bool hooked_msg_proc (JWidget widget, JMessage msg)
{
if (msg->type == JM_SIGNAL) {
switch (msg->signal.num) {
case SIGNAL_CURVE_EDITOR_CHANGE:
set_color_curve (curve_editor_get_curve (msg->signal.from));
make_preview ();
break;
case SIGNAL_TARGET_BUTTON_CHANGE:
effect_load_target (preview_get_effect (preview));
make_preview ();
break;
case JI_SIGNAL_CHECK_CHANGE:
set_config_bool ("ColorCurve", "Preview",
jwidget_is_selected (msg->signal.from));
make_preview ();
break;
}
}
return FALSE;
}
static void make_preview (void)
{
if (jwidget_is_selected (check_preview))
preview_restart (preview);
}

View File

@ -1,344 +1,346 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2001-2005, 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include <string.h>
#include "jinete/box.h"
#include "jinete/button.h"
#include "jinete/hook.h"
#include "jinete/label.h"
#include "jinete/list.h"
#include "jinete/listbox.h"
#include "jinete/slider.h"
#include "jinete/view.h"
#include "jinete/widget.h"
#include "jinete/window.h"
#include "console/console.h"
#include "core/cfg.h"
#include "core/core.h"
#include "effect/colcurve.h"
#include "effect/convmatr.h"
#include "effect/effect.h"
#include "modules/color.h"
/* #include "modules/editors.h" */
#include "modules/gui.h"
#include "modules/sprites.h"
#include "modules/tools.h"
#include "raster/image.h"
#include "raster/mask.h"
#include "raster/sprite.h"
#include "util/misc.h"
#include "widgets/colbar.h"
#include "widgets/colbut.h"
#include "widgets/curvedit.h"
#include "widgets/preview.h"
#include "widgets/target.h"
#endif
static JWidget check_preview, preview;
static JWidget check_tiled;
static JWidget listbox_generate_convmatg (void);
static void listbox_fill_convmatg (JWidget listbox);
static void listbox_select_current_convmatr (JWidget listbox);
static int reload_select_hook (JWidget widget, int user_data);
static int generate_select_hook (JWidget widget, int user_data);
static int list_change_hook (JWidget widget, int user_data);
static int target_change_hook (JWidget widget, int user_data);
static int preview_change_hook (JWidget widget, int user_data);
static int tiled_change_hook (JWidget widget, int user_data);
static void make_preview (void);
void dialogs_convolution_matrix(void)
{
JWidget window, button_ok;
JWidget view_convmatr, list_convmatr;
JWidget box_target, target_button;
JWidget reload, generate;
Sprite *sprite = current_sprite;
Image *image;
Effect *effect;
if (!is_interactive () || !sprite)
return;
image = GetImage ();
if (!image)
return;
window = load_widget ("convmatr.jid", "convolution_matrix");
if (!window)
return;
if (!get_widgets (window,
"preview", &check_preview,
"tiled", &check_tiled,
"button_ok", &button_ok,
"view", &view_convmatr,
"target", &box_target,
"reload", &reload,
"generate", &generate, NULL)) {
jwidget_free (window);
return;
}
effect = effect_new (sprite, "convolution_matrix");
if (!effect) {
console_printf (_("Error creating the effect applicator for this sprite\n"));
jwidget_free (window);
return;
}
preview = preview_new (effect);
list_convmatr = listbox_generate_convmatg ();
target_button = target_button_new (sprite->imgtype, TRUE);
if (get_config_bool ("ConvolutionMatrix", "Preview", TRUE))
jwidget_select (check_preview);
if (get_tiled_mode ())
jwidget_select (check_tiled);
jview_attach (view_convmatr, list_convmatr);
jwidget_set_static_size (view_convmatr, 64, 64);
jwidget_add_child (box_target, target_button);
jwidget_add_child (window, preview);
HOOK (target_button, SIGNAL_TARGET_BUTTON_CHANGE, target_change_hook, 0);
HOOK (check_preview, JI_SIGNAL_CHECK_CHANGE, preview_change_hook, 0);
HOOK (check_tiled, JI_SIGNAL_CHECK_CHANGE, tiled_change_hook, 0);
HOOK (reload, JI_SIGNAL_BUTTON_SELECT, reload_select_hook, list_convmatr);
HOOK (generate, JI_SIGNAL_BUTTON_SELECT, generate_select_hook, 0);
/* XXXX enable this someday */
jwidget_disable (generate);
/* default position */
jwindow_remap (window);
jwindow_center (window);
/* load window configuration */
load_window_pos (window, "ConvolutionMatrix");
/* select default convmatr */
listbox_select_current_convmatr (list_convmatr);
/* open the window */
jwindow_open_fg (window);
if (jwindow_get_killer (window) == button_ok) {
effect_apply_to_target (effect);
}
effect_free (effect);
/* update editors */
GUI_Refresh (sprite);
/* save window configuration */
save_window_pos (window, "ConvolutionMatrix");
jwidget_free (window);
}
static JWidget listbox_generate_convmatg (void)
{
JWidget listbox = jlistbox_new ();
listbox_fill_convmatg (listbox);
HOOK (listbox, JI_SIGNAL_LISTBOX_CHANGE, list_change_hook, 0);
return listbox;
}
static void listbox_fill_convmatg (JWidget listbox)
{
ConvMatr *convmatr;
JWidget listitem;
JLink link;
JI_LIST_FOR_EACH(get_convmatr_stock(), link) {
convmatr = link->data;
listitem = jlistitem_new(convmatr->name);
listitem->user_data[0] = convmatr;
jwidget_add_child(listbox, listitem);
}
}
static void listbox_select_current_convmatr (JWidget listbox)
{
const char *selected = get_config_string ("ConvolutionMatrix",
"Selected", "");
JWidget select_this = jlist_first_data(listbox->children);
JWidget child = NULL;
JLink link;
if (selected && *selected) {
JI_LIST_FOR_EACH(listbox->children, link) {
child = link->data;
if (strcmp(jwidget_get_text(child), selected) == 0) {
select_this = child;
break;
}
}
}
if (select_this) {
jwidget_select (select_this);
list_change_hook (listbox, 0);
}
}
static int reload_select_hook(JWidget widget, int user_data)
{
JWidget listbox = (JWidget)user_data;
JWidget listitem;
JLink link, next;
/* clean the list */
JI_LIST_FOR_EACH_SAFE(listbox->children, link, next) {
listitem = link->data;
jwidget_remove_child (listbox, listitem);
jwidget_free (listitem);
}
/* re-load the convolution matrix stock */
reload_matrices_stock ();
/* re-fill the list */
listbox_fill_convmatg (listbox);
listbox_select_current_convmatr (listbox);
jview_update (jwidget_get_view (listbox));
return TRUE; /* do not close */
}
static int generate_select_hook (JWidget widget, int user_data)
{
JWidget window;
JWidget view_x;
JWidget view_y;
JWidget curvedit_x;
JWidget curvedit_y;
Curve *curve_x;
Curve *curve_y;
JWidget div, div_auto;
JWidget bias, bias_auto;
window = load_widget ("convmatr.jid", "generate_convolution_matrix");
if (!window)
return TRUE; /* don't close */
if (!get_widgets (window,
"view_x", &view_x,
"view_y", &view_y,
"div", &div,
"bias", &bias,
"div_auto", &div_auto,
"bias_auto", &bias_auto, NULL)) {
jwidget_free (window);
return TRUE; /* don't close */
}
/* curve_x = curve_new (CURVE_SPLINE); */
/* curve_y = curve_new (CURVE_SPLINE); */
curve_x = curve_new (CURVE_LINEAR);
curve_y = curve_new (CURVE_LINEAR);
curve_add_point (curve_x, curve_point_new (-100, 0));
curve_add_point (curve_x, curve_point_new (0, +100));
curve_add_point (curve_x, curve_point_new (+100, 0));
curve_add_point (curve_y, curve_point_new (-100, 0));
curve_add_point (curve_y, curve_point_new (0, +100));
curve_add_point (curve_y, curve_point_new (+100, 0));
curvedit_x = curve_editor_new (curve_x, -200, -200, 200, 200);
curvedit_y = curve_editor_new (curve_y, -200, -200, 200, 200);
jview_attach (view_x, curvedit_x);
jview_attach (view_y, curvedit_y);
jwidget_set_static_size (view_x, 64, 64);
jwidget_set_static_size (view_y, 64, 64);
/* XXX fix this */
/* jwidget_get_vtable (div)->request_size = NULL; */
/* jwidget_get_vtable (bias)->request_size = NULL; */
jwidget_set_static_size (div, 1, 1);
jwidget_set_static_size (bias, 1, 1);
jwindow_open_fg (window);
/* XXX do something */
jwidget_free (window);
curve_free (curve_x);
curve_free (curve_y);
return TRUE; /* do not close */
}
static int list_change_hook (JWidget widget, int user_data)
{
JWidget selected = jlistbox_get_selected_child (widget);
ConvMatr *convmatr = selected->user_data[0];
set_config_string ("ConvolutionMatrix", "Selected", convmatr->name);
set_convmatr (convmatr);
make_preview ();
return FALSE;
}
static int target_change_hook (JWidget widget, int user_data)
{
effect_load_target (preview_get_effect (preview));
make_preview ();
return FALSE;
}
static int preview_change_hook (JWidget widget, int user_data)
{
set_config_bool ("ConvolutionMatrix", "Preview",
jwidget_is_selected (widget));
make_preview ();
return FALSE;
}
static int tiled_change_hook (JWidget widget, int user_data)
{
set_tiled_mode (jwidget_is_selected (widget));
make_preview ();
return FALSE;
}
static void make_preview (void)
{
if (jwidget_is_selected (check_preview))
preview_restart (preview);
}
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include <string.h>
#include "jinete/box.h"
#include "jinete/button.h"
#include "jinete/hook.h"
#include "jinete/label.h"
#include "jinete/list.h"
#include "jinete/listbox.h"
#include "jinete/slider.h"
#include "jinete/view.h"
#include "jinete/widget.h"
#include "jinete/window.h"
#include "console/console.h"
#include "core/cfg.h"
#include "core/core.h"
#include "effect/colcurve.h"
#include "effect/convmatr.h"
#include "effect/effect.h"
#include "modules/color.h"
/* #include "modules/editors.h" */
#include "modules/gui.h"
#include "modules/sprites.h"
#include "modules/tools.h"
#include "raster/image.h"
#include "raster/mask.h"
#include "raster/sprite.h"
#include "util/misc.h"
#include "widgets/colbar.h"
#include "widgets/colbut.h"
#include "widgets/curvedit.h"
#include "widgets/preview.h"
#include "widgets/target.h"
#endif
static JWidget check_preview, preview;
static JWidget check_tiled;
static JWidget listbox_generate_convmatg (void);
static void listbox_fill_convmatg (JWidget listbox);
static void listbox_select_current_convmatr (JWidget listbox);
static int reload_select_hook (JWidget widget, int user_data);
static int generate_select_hook (JWidget widget, int user_data);
static int list_change_hook (JWidget widget, int user_data);
static int target_change_hook (JWidget widget, int user_data);
static int preview_change_hook (JWidget widget, int user_data);
static int tiled_change_hook (JWidget widget, int user_data);
static void make_preview (void);
bool command_enabled_convolution_matrix(const char *argument)
{
return current_sprite != NULL;
}
void command_execute_convolution_matrix(const char *argument)
{
JWidget window, button_ok;
JWidget view_convmatr, list_convmatr;
JWidget box_target, target_button;
JWidget reload, generate;
Sprite *sprite = current_sprite;
Image *image;
Effect *effect;
image = GetImage ();
if (!image)
return;
window = load_widget ("convmatr.jid", "convolution_matrix");
if (!window)
return;
if (!get_widgets (window,
"preview", &check_preview,
"tiled", &check_tiled,
"button_ok", &button_ok,
"view", &view_convmatr,
"target", &box_target,
"reload", &reload,
"generate", &generate, NULL)) {
jwidget_free (window);
return;
}
effect = effect_new (sprite, "convolution_matrix");
if (!effect) {
console_printf (_("Error creating the effect applicator for this sprite\n"));
jwidget_free (window);
return;
}
preview = preview_new (effect);
list_convmatr = listbox_generate_convmatg ();
target_button = target_button_new (sprite->imgtype, TRUE);
if (get_config_bool ("ConvolutionMatrix", "Preview", TRUE))
jwidget_select (check_preview);
if (get_tiled_mode ())
jwidget_select (check_tiled);
jview_attach (view_convmatr, list_convmatr);
jwidget_set_static_size (view_convmatr, 64, 64);
jwidget_add_child (box_target, target_button);
jwidget_add_child (window, preview);
HOOK (target_button, SIGNAL_TARGET_BUTTON_CHANGE, target_change_hook, 0);
HOOK (check_preview, JI_SIGNAL_CHECK_CHANGE, preview_change_hook, 0);
HOOK (check_tiled, JI_SIGNAL_CHECK_CHANGE, tiled_change_hook, 0);
HOOK (reload, JI_SIGNAL_BUTTON_SELECT, reload_select_hook, list_convmatr);
HOOK (generate, JI_SIGNAL_BUTTON_SELECT, generate_select_hook, 0);
/* XXXX enable this someday */
jwidget_disable (generate);
/* default position */
jwindow_remap (window);
jwindow_center (window);
/* load window configuration */
load_window_pos (window, "ConvolutionMatrix");
/* select default convmatr */
listbox_select_current_convmatr (list_convmatr);
/* open the window */
jwindow_open_fg (window);
if (jwindow_get_killer (window) == button_ok) {
effect_apply_to_target (effect);
}
effect_free (effect);
/* update editors */
GUI_Refresh (sprite);
/* save window configuration */
save_window_pos (window, "ConvolutionMatrix");
jwidget_free (window);
}
static JWidget listbox_generate_convmatg (void)
{
JWidget listbox = jlistbox_new ();
listbox_fill_convmatg (listbox);
HOOK (listbox, JI_SIGNAL_LISTBOX_CHANGE, list_change_hook, 0);
return listbox;
}
static void listbox_fill_convmatg (JWidget listbox)
{
ConvMatr *convmatr;
JWidget listitem;
JLink link;
JI_LIST_FOR_EACH(get_convmatr_stock(), link) {
convmatr = link->data;
listitem = jlistitem_new(convmatr->name);
listitem->user_data[0] = convmatr;
jwidget_add_child(listbox, listitem);
}
}
static void listbox_select_current_convmatr (JWidget listbox)
{
const char *selected = get_config_string ("ConvolutionMatrix",
"Selected", "");
JWidget select_this = jlist_first_data(listbox->children);
JWidget child = NULL;
JLink link;
if (selected && *selected) {
JI_LIST_FOR_EACH(listbox->children, link) {
child = link->data;
if (strcmp(jwidget_get_text(child), selected) == 0) {
select_this = child;
break;
}
}
}
if (select_this) {
jwidget_select (select_this);
list_change_hook (listbox, 0);
}
}
static int reload_select_hook(JWidget widget, int user_data)
{
JWidget listbox = (JWidget)user_data;
JWidget listitem;
JLink link, next;
/* clean the list */
JI_LIST_FOR_EACH_SAFE(listbox->children, link, next) {
listitem = link->data;
jwidget_remove_child (listbox, listitem);
jwidget_free (listitem);
}
/* re-load the convolution matrix stock */
reload_matrices_stock ();
/* re-fill the list */
listbox_fill_convmatg (listbox);
listbox_select_current_convmatr (listbox);
jview_update (jwidget_get_view (listbox));
return TRUE; /* do not close */
}
static int generate_select_hook (JWidget widget, int user_data)
{
JWidget window;
JWidget view_x;
JWidget view_y;
JWidget curvedit_x;
JWidget curvedit_y;
Curve *curve_x;
Curve *curve_y;
JWidget div, div_auto;
JWidget bias, bias_auto;
window = load_widget ("convmatr.jid", "generate_convolution_matrix");
if (!window)
return TRUE; /* don't close */
if (!get_widgets (window,
"view_x", &view_x,
"view_y", &view_y,
"div", &div,
"bias", &bias,
"div_auto", &div_auto,
"bias_auto", &bias_auto, NULL)) {
jwidget_free (window);
return TRUE; /* don't close */
}
/* curve_x = curve_new (CURVE_SPLINE); */
/* curve_y = curve_new (CURVE_SPLINE); */
curve_x = curve_new (CURVE_LINEAR);
curve_y = curve_new (CURVE_LINEAR);
curve_add_point (curve_x, curve_point_new (-100, 0));
curve_add_point (curve_x, curve_point_new (0, +100));
curve_add_point (curve_x, curve_point_new (+100, 0));
curve_add_point (curve_y, curve_point_new (-100, 0));
curve_add_point (curve_y, curve_point_new (0, +100));
curve_add_point (curve_y, curve_point_new (+100, 0));
curvedit_x = curve_editor_new (curve_x, -200, -200, 200, 200);
curvedit_y = curve_editor_new (curve_y, -200, -200, 200, 200);
jview_attach (view_x, curvedit_x);
jview_attach (view_y, curvedit_y);
jwidget_set_static_size (view_x, 64, 64);
jwidget_set_static_size (view_y, 64, 64);
/* XXX fix this */
/* jwidget_get_vtable (div)->request_size = NULL; */
/* jwidget_get_vtable (bias)->request_size = NULL; */
jwidget_set_static_size (div, 1, 1);
jwidget_set_static_size (bias, 1, 1);
jwindow_open_fg (window);
/* XXX do something */
jwidget_free (window);
curve_free (curve_x);
curve_free (curve_y);
return TRUE; /* do not close */
}
static int list_change_hook (JWidget widget, int user_data)
{
JWidget selected = jlistbox_get_selected_child (widget);
ConvMatr *convmatr = selected->user_data[0];
set_config_string ("ConvolutionMatrix", "Selected", convmatr->name);
set_convmatr (convmatr);
make_preview ();
return FALSE;
}
static int target_change_hook (JWidget widget, int user_data)
{
effect_load_target (preview_get_effect (preview));
make_preview ();
return FALSE;
}
static int preview_change_hook (JWidget widget, int user_data)
{
set_config_bool ("ConvolutionMatrix", "Preview",
jwidget_is_selected (widget));
make_preview ();
return FALSE;
}
static int tiled_change_hook (JWidget widget, int user_data)
{
set_tiled_mode (jwidget_is_selected (widget));
make_preview ();
return FALSE;
}
static void make_preview (void)
{
if (jwidget_is_selected (check_preview))
preview_restart (preview);
}

View File

@ -1,197 +1,198 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2001-2005, 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include <stdio.h>
#include "jinete/box.h"
#include "jinete/button.h"
#include "jinete/entry.h"
#include "jinete/hook.h"
#include "jinete/widget.h"
#include "jinete/window.h"
#include "console/console.h"
#include "core/cfg.h"
#include "core/core.h"
#include "effect/effect.h"
#include "effect/median.h"
/* #include "modules/editors.h" */
#include "modules/gui.h"
#include "modules/sprites.h"
#include "modules/tools.h"
#include "raster/image.h"
#include "raster/mask.h"
#include "raster/sprite.h"
#include "util/misc.h"
#include "widgets/preview.h"
#include "widgets/target.h"
#endif
static JWidget entry_width, entry_height;
static JWidget check_preview, preview;
static JWidget check_tiled;
static int width_change_hook (JWidget widget, int user_data);
static int height_change_hook (JWidget widget, int user_data);
static int target_change_hook (JWidget widget, int user_data);
static int preview_change_hook (JWidget widget, int user_data);
static int tiled_change_hook (JWidget widget, int user_data);
static void make_preview (void);
void dialogs_median_filter(void)
{
JWidget window, box_target, target_button, button_ok;
Image *image;
Effect *effect;
char buf[32];
if (!is_interactive () || !current_sprite)
return;
image = GetImage ();
if (!image)
return;
window = load_widget ("median.jid", "median");
if (!window)
return;
if (!get_widgets (window,
"width", &entry_width,
"height", &entry_height,
"preview", &check_preview,
"tiled", &check_tiled,
"target", &box_target,
"button_ok", &button_ok, NULL)) {
jwidget_free (window);
return;
}
effect = effect_new (current_sprite, "median");
if (!effect) {
console_printf (_("Error creating the effect applicator for this sprite\n"));
jwidget_free (window);
return;
}
preview = preview_new (effect);
target_button = target_button_new (current_sprite->imgtype, TRUE);
sprintf (buf, "%d", get_config_int ("Median", "Width", 3));
jwidget_set_text (entry_width, buf);
sprintf (buf, "%d", get_config_int ("Median", "Height", 3));
jwidget_set_text (entry_height, buf);
if (get_config_bool ("Median", "Preview", TRUE))
jwidget_select (check_preview);
if (get_tiled_mode ())
jwidget_select (check_tiled);
jwidget_add_child (box_target, target_button);
jwidget_add_child (window, preview);
HOOK (entry_width, JI_SIGNAL_ENTRY_CHANGE, width_change_hook, 0);
HOOK (entry_height, JI_SIGNAL_ENTRY_CHANGE, height_change_hook, 0);
HOOK (target_button, SIGNAL_TARGET_BUTTON_CHANGE, target_change_hook, 0);
HOOK (check_preview, JI_SIGNAL_CHECK_CHANGE, preview_change_hook, 0);
HOOK (check_tiled, JI_SIGNAL_CHECK_CHANGE, tiled_change_hook, 0);
/* default position */
jwindow_remap (window);
jwindow_center (window);
/* first preview */
make_preview ();
/* load window configuration */
load_window_pos (window, "Median");
/* open the window */
jwindow_open_fg (window);
if (jwindow_get_killer (window) == button_ok) {
effect_apply_to_target (effect);
}
effect_free (effect);
/* update editors */
GUI_Refresh (current_sprite);
/* save window configuration */
save_window_pos (window, "Median");
jwidget_free (window);
}
static int width_change_hook (JWidget widget, int user_data)
{
set_config_int ("Median", "Width",
strtol (jwidget_get_text (widget), NULL, 10));
make_preview ();
return TRUE;
}
static int height_change_hook (JWidget widget, int user_data)
{
set_config_int ("Median", "Height",
strtol (jwidget_get_text (widget), NULL, 10));
make_preview ();
return TRUE;
}
static int target_change_hook (JWidget widget, int user_data)
{
effect_load_target (preview_get_effect (preview));
make_preview ();
return FALSE;
}
static int preview_change_hook (JWidget widget, int user_data)
{
set_config_bool ("Median", "Preview", jwidget_is_selected (widget));
make_preview ();
return FALSE;
}
static int tiled_change_hook (JWidget widget, int user_data)
{
set_tiled_mode (jwidget_is_selected (widget));
make_preview ();
return FALSE;
}
static void make_preview (void)
{
int w, h;
w = get_config_int ("Median", "Width", 3);
h = get_config_int ("Median", "Height", 3);
set_median_size (MID (1, w, 32), MID (1, h, 32));
if (jwidget_is_selected (check_preview))
preview_restart (preview);
}
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include <stdio.h>
#include "jinete/box.h"
#include "jinete/button.h"
#include "jinete/entry.h"
#include "jinete/hook.h"
#include "jinete/widget.h"
#include "jinete/window.h"
#include "console/console.h"
#include "core/cfg.h"
#include "core/core.h"
#include "effect/effect.h"
#include "effect/median.h"
#include "modules/gui.h"
#include "modules/sprites.h"
#include "modules/tools.h"
#include "raster/image.h"
#include "raster/mask.h"
#include "raster/sprite.h"
#include "util/misc.h"
#include "widgets/preview.h"
#include "widgets/target.h"
#endif
static JWidget entry_width, entry_height;
static JWidget check_preview, preview;
static JWidget check_tiled;
static int width_change_hook (JWidget widget, int user_data);
static int height_change_hook (JWidget widget, int user_data);
static int target_change_hook (JWidget widget, int user_data);
static int preview_change_hook (JWidget widget, int user_data);
static int tiled_change_hook (JWidget widget, int user_data);
static void make_preview (void);
bool command_enabled_despeckle(const char *argument)
{
return current_sprite != NULL;
}
void command_execute_despeckle(const char *argument)
{
JWidget window, box_target, target_button, button_ok;
Image *image;
Effect *effect;
char buf[32];
image = GetImage ();
if (!image)
return;
window = load_widget ("median.jid", "median");
if (!window)
return;
if (!get_widgets (window,
"width", &entry_width,
"height", &entry_height,
"preview", &check_preview,
"tiled", &check_tiled,
"target", &box_target,
"button_ok", &button_ok, NULL)) {
jwidget_free (window);
return;
}
effect = effect_new (current_sprite, "median");
if (!effect) {
console_printf (_("Error creating the effect applicator for this sprite\n"));
jwidget_free (window);
return;
}
preview = preview_new (effect);
target_button = target_button_new (current_sprite->imgtype, TRUE);
sprintf (buf, "%d", get_config_int ("Median", "Width", 3));
jwidget_set_text (entry_width, buf);
sprintf (buf, "%d", get_config_int ("Median", "Height", 3));
jwidget_set_text (entry_height, buf);
if (get_config_bool ("Median", "Preview", TRUE))
jwidget_select (check_preview);
if (get_tiled_mode ())
jwidget_select (check_tiled);
jwidget_add_child (box_target, target_button);
jwidget_add_child (window, preview);
HOOK (entry_width, JI_SIGNAL_ENTRY_CHANGE, width_change_hook, 0);
HOOK (entry_height, JI_SIGNAL_ENTRY_CHANGE, height_change_hook, 0);
HOOK (target_button, SIGNAL_TARGET_BUTTON_CHANGE, target_change_hook, 0);
HOOK (check_preview, JI_SIGNAL_CHECK_CHANGE, preview_change_hook, 0);
HOOK (check_tiled, JI_SIGNAL_CHECK_CHANGE, tiled_change_hook, 0);
/* default position */
jwindow_remap (window);
jwindow_center (window);
/* first preview */
make_preview ();
/* load window configuration */
load_window_pos (window, "Median");
/* open the window */
jwindow_open_fg (window);
if (jwindow_get_killer (window) == button_ok) {
effect_apply_to_target (effect);
}
effect_free (effect);
/* update editors */
GUI_Refresh (current_sprite);
/* save window configuration */
save_window_pos (window, "Median");
jwidget_free (window);
}
static int width_change_hook (JWidget widget, int user_data)
{
set_config_int ("Median", "Width",
strtol (jwidget_get_text (widget), NULL, 10));
make_preview ();
return TRUE;
}
static int height_change_hook (JWidget widget, int user_data)
{
set_config_int ("Median", "Height",
strtol (jwidget_get_text (widget), NULL, 10));
make_preview ();
return TRUE;
}
static int target_change_hook (JWidget widget, int user_data)
{
effect_load_target (preview_get_effect (preview));
make_preview ();
return FALSE;
}
static int preview_change_hook (JWidget widget, int user_data)
{
set_config_bool ("Median", "Preview", jwidget_is_selected (widget));
make_preview ();
return FALSE;
}
static int tiled_change_hook (JWidget widget, int user_data)
{
set_tiled_mode (jwidget_is_selected (widget));
make_preview ();
return FALSE;
}
static void make_preview (void)
{
int w, h;
w = get_config_int ("Median", "Width", 3);
h = get_config_int ("Median", "Height", 3);
set_median_size (MID (1, w, 32), MID (1, h, 32));
if (jwidget_is_selected (check_preview))
preview_restart (preview);
}

View File

@ -1,147 +1,148 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2001-2005, 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include "jinete/box.h"
#include "jinete/button.h"
#include "jinete/hook.h"
#include "jinete/label.h"
#include "jinete/slider.h"
#include "jinete/widget.h"
#include "jinete/window.h"
#include "console/console.h"
#include "core/cfg.h"
#include "core/core.h"
#include "effect/effect.h"
#include "modules/color.h"
/* #include "modules/editors.h" */
#include "modules/gui.h"
#include "modules/sprites.h"
#include "raster/image.h"
#include "raster/mask.h"
#include "raster/sprite.h"
#include "util/misc.h"
#include "widgets/colbar.h"
#include "widgets/colbut.h"
#include "widgets/preview.h"
#include "widgets/target.h"
#endif
static JWidget check_preview, preview;
static int target_change_hook (JWidget widget, int user_data);
static int preview_change_hook (JWidget widget, int user_data);
static void make_preview (void);
void dialogs_invert_color(void)
{
JWidget window, box_target, target_button, button_ok;
Sprite *sprite = current_sprite;
Image *image;
Effect *effect;
if (!is_interactive () || !sprite)
return;
image = GetImage ();
if (!image)
return;
window = load_widget ("invrtcol.jid", "invert_color");
if (!window)
return;
if (!get_widgets (window,
"target", &box_target,
"preview", &check_preview,
"button_ok", &button_ok, NULL)) {
jwidget_free (window);
return;
}
effect = effect_new (sprite, "invert_color");
if (!effect) {
console_printf (_("Error creating the effect applicator for this sprite\n"));
jwidget_free (window);
return;
}
preview = preview_new (effect);
target_button = target_button_new (sprite->imgtype, TRUE);
if (get_config_bool ("InvertColor", "Preview", TRUE))
jwidget_select (check_preview);
jwidget_add_child (box_target, target_button);
jwidget_add_child (window, preview);
HOOK (target_button, SIGNAL_TARGET_BUTTON_CHANGE, target_change_hook, 0);
HOOK (check_preview, JI_SIGNAL_CHECK_CHANGE, preview_change_hook, 0);
/* default position */
jwindow_remap (window);
jwindow_center (window);
/* first preview */
make_preview ();
/* load window configuration */
load_window_pos (window, "InvertColor");
/* open the window */
jwindow_open_fg (window);
if (jwindow_get_killer (window) == button_ok) {
effect_apply_to_target (effect);
}
effect_free (effect);
/* update editors */
GUI_Refresh (sprite);
/* save window configuration */
save_window_pos (window, "InvertColor");
jwidget_free (window);
}
static int target_change_hook (JWidget widget, int user_data)
{
effect_load_target (preview_get_effect (preview));
make_preview ();
return FALSE;
}
static int preview_change_hook (JWidget widget, int user_data)
{
set_config_bool ("InvertColor", "Preview", jwidget_is_selected (widget));
make_preview ();
return FALSE;
}
static void make_preview (void)
{
if (jwidget_is_selected (check_preview))
preview_restart (preview);
}
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include "jinete/box.h"
#include "jinete/button.h"
#include "jinete/hook.h"
#include "jinete/label.h"
#include "jinete/slider.h"
#include "jinete/widget.h"
#include "jinete/window.h"
#include "console/console.h"
#include "core/cfg.h"
#include "core/core.h"
#include "effect/effect.h"
#include "modules/color.h"
#include "modules/gui.h"
#include "modules/sprites.h"
#include "raster/image.h"
#include "raster/mask.h"
#include "raster/sprite.h"
#include "util/misc.h"
#include "widgets/colbar.h"
#include "widgets/colbut.h"
#include "widgets/preview.h"
#include "widgets/target.h"
#endif
static JWidget check_preview, preview;
static int target_change_hook (JWidget widget, int user_data);
static int preview_change_hook (JWidget widget, int user_data);
static void make_preview (void);
bool command_enabled_invert_color(const char *argument)
{
return current_sprite != NULL;
}
void command_execute_invert_color(const char *argument)
{
JWidget window, box_target, target_button, button_ok;
Sprite *sprite = current_sprite;
Image *image;
Effect *effect;
image = GetImage();
if (!image)
return;
window = load_widget("invrtcol.jid", "invert_color");
if (!window)
return;
if (!get_widgets(window,
"target", &box_target,
"preview", &check_preview,
"button_ok", &button_ok, NULL)) {
jwidget_free(window);
return;
}
effect = effect_new(sprite, "invert_color");
if (!effect) {
console_printf(_("Error creating the effect applicator for this sprite\n"));
jwidget_free(window);
return;
}
preview = preview_new(effect);
target_button = target_button_new(sprite->imgtype, TRUE);
if (get_config_bool("InvertColor", "Preview", TRUE))
jwidget_select(check_preview);
jwidget_add_child(box_target, target_button);
jwidget_add_child(window, preview);
HOOK(target_button, SIGNAL_TARGET_BUTTON_CHANGE, target_change_hook, 0);
HOOK(check_preview, JI_SIGNAL_CHECK_CHANGE, preview_change_hook, 0);
/* default position */
jwindow_remap(window);
jwindow_center(window);
/* first preview */
make_preview();
/* load window configuration */
load_window_pos(window, "InvertColor");
/* open the window */
jwindow_open_fg(window);
if (jwindow_get_killer(window) == button_ok) {
effect_apply_to_target(effect);
}
effect_free(effect);
/* update editors */
GUI_Refresh(sprite);
/* save window configuration */
save_window_pos(window, "InvertColor");
jwidget_free(window);
}
static int target_change_hook(JWidget widget, int user_data)
{
effect_load_target(preview_get_effect(preview));
make_preview();
return FALSE;
}
static int preview_change_hook(JWidget widget, int user_data)
{
set_config_bool("InvertColor", "Preview", jwidget_is_selected(widget));
make_preview();
return FALSE;
}
static void make_preview(void)
{
if (jwidget_is_selected(check_preview))
preview_restart(preview);
}

View File

@ -0,0 +1,233 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include <stdio.h>
#include "jinete.h"
#include "console/console.h"
#include "core/app.h"
#include "core/cfg.h"
#include "core/core.h"
#include "effect/effect.h"
#include "effect/replcol.h"
#include "modules/color.h"
#include "modules/gui.h"
#include "modules/sprites.h"
#include "raster/image.h"
#include "raster/mask.h"
#include "raster/sprite.h"
#include "util/misc.h"
#include "widgets/colbar.h"
#include "widgets/colbut.h"
#include "widgets/preview.h"
#include "widgets/target.h"
#endif
static JWidget button_color1, button_color2;
static JWidget slider_fuzziness, check_preview;
static JWidget preview;
static int button_1_select_hook(JWidget widget, int user_data);
static int button_2_select_hook(JWidget widget, int user_data);
static int color_change_hook(JWidget widget, int user_data);
static int target_change_hook(JWidget widget, int user_data);
static int slider_change_hook(JWidget widget, int user_data);
static int preview_change_hook(JWidget widget, int user_data);
static void make_preview(void);
bool command_enabled_replace_color(const char *argument)
{
return current_sprite != NULL;
}
void command_execute_replace_color(const char *argument)
{
JWidget window, color_buttons_box;
JWidget button1_1, button1_2;
JWidget button2_1, button2_2;
JWidget box_target, target_button;
JWidget button_ok;
Image *image;
Effect *effect;
image = GetImage();
if (!image)
return;
window = load_widget("replcol.jid", "replace_color");
if (!window)
return;
if (!get_widgets(window,
"color_buttons_box", &color_buttons_box,
"button1_1", &button1_1,
"button1_2", &button1_2,
"button2_1", &button2_1,
"button2_2", &button2_2,
"preview", &check_preview,
"fuzziness", &slider_fuzziness,
"target", &box_target,
"button_ok", &button_ok, NULL)) {
jwidget_free(window);
return;
}
effect = effect_new(current_sprite, "replace_color");
if (!effect) {
console_printf(_("Error creating the effect applicator for this sprite\n"));
jwidget_free(window);
return;
}
preview = preview_new(effect);
button_color1 = color_button_new
(get_config_string("ReplaceColor", "Color1",
color_bar_get_color(app_get_color_bar(), 0)),
current_sprite->imgtype);
button_color2 = color_button_new
(get_config_string("ReplaceColor", "Color2",
color_bar_get_color(app_get_color_bar(), 1)),
current_sprite->imgtype);
target_button = target_button_new(current_sprite->imgtype, FALSE);
jslider_set_value(slider_fuzziness,
get_config_int ("ReplaceColor", "Fuzziness", 0));
if (get_config_bool("ReplaceColor", "Preview", TRUE))
jwidget_select(check_preview);
jwidget_add_child(color_buttons_box, button_color1);
jwidget_add_child(color_buttons_box, button_color2);
jwidget_add_child(box_target, target_button);
jwidget_add_child(window, preview);
HOOK(button1_1, JI_SIGNAL_BUTTON_SELECT, button_1_select_hook, 1);
HOOK(button1_2, JI_SIGNAL_BUTTON_SELECT, button_2_select_hook, 1);
HOOK(button2_1, JI_SIGNAL_BUTTON_SELECT, button_1_select_hook, 2);
HOOK(button2_2, JI_SIGNAL_BUTTON_SELECT, button_2_select_hook, 2);
HOOK(button_color1, SIGNAL_COLOR_BUTTON_CHANGE, color_change_hook, 1);
HOOK(button_color2, SIGNAL_COLOR_BUTTON_CHANGE, color_change_hook, 2);
HOOK(target_button, SIGNAL_TARGET_BUTTON_CHANGE, target_change_hook, 0);
HOOK(slider_fuzziness, JI_SIGNAL_SLIDER_CHANGE, slider_change_hook, 0);
HOOK(check_preview, JI_SIGNAL_CHECK_CHANGE, preview_change_hook, 0);
/* default position */
jwindow_remap(window);
jwindow_center(window);
/* first preview */
make_preview();
/* load window configuration */
load_window_pos(window, "ReplaceColor");
/* open the window */
jwindow_open_fg(window);
if (jwindow_get_killer(window) == button_ok) {
effect_apply_to_target(effect);
}
effect_free(effect);
/* update editors */
GUI_Refresh(current_sprite);
/* save window configuration */
save_window_pos(window, "ReplaceColor");
jwidget_free(window);
}
static int button_1_select_hook (JWidget widget, int user_data)
{
JWidget w = user_data == 1 ? button_color1: button_color2;
color_button_set_color(w, color_bar_get_color(app_get_color_bar(), 0));
color_change_hook(w, user_data);
return TRUE;
}
static int button_2_select_hook (JWidget widget, int user_data)
{
JWidget w = user_data == 1 ? button_color1: button_color2;
color_button_set_color(w, color_bar_get_color(app_get_color_bar(), 1));
color_change_hook(w, user_data);
return TRUE;
}
static int color_change_hook(JWidget widget, int user_data)
{
char buf[64];
sprintf(buf, "Color%d", user_data);
set_config_string("ReplaceColor", buf, color_button_get_color(widget));
make_preview();
return FALSE;
}
static int target_change_hook(JWidget widget, int user_data)
{
effect_load_target(preview_get_effect(preview));
make_preview();
return FALSE;
}
static int slider_change_hook(JWidget widget, int user_data)
{
set_config_int("ReplaceColor", "Fuzziness", jslider_get_value (widget));
make_preview();
return FALSE;
}
static int preview_change_hook(JWidget widget, int user_data)
{
set_config_bool("ReplaceColor", "Preview", jwidget_is_selected (widget));
make_preview();
return FALSE;
}
static void make_preview(void)
{
Effect *effect = preview_get_effect(preview);
const char *from, *to;
int fuzziness;
from = get_config_string("ReplaceColor", "Color1", "mask");
to = get_config_string("ReplaceColor", "Color2", "mask");
fuzziness = get_config_int("ReplaceColor", "Fuzziness", 0);
set_replace_colors(get_color_for_image(effect->dst->imgtype, from),
get_color_for_image(effect->dst->imgtype, to),
MID(0, fuzziness, 255));
if (jwidget_is_selected(check_preview))
preview_restart(preview);
}

View File

@ -1,28 +0,0 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2001-2005, 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef DIALOGS_EFFECT_H
#define DIALOGS_EFFECT_H
void dialogs_color_curve(void);
void dialogs_convolution_matrix(void);
void dialogs_invert_color(void);
void dialogs_median_filter(void);
void dialogs_replace_color(void);
#endif /* DIALOGS_EFFECT_H */

View File

@ -1,232 +0,0 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2001-2005, 2007 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifndef USE_PRECOMPILED_HEADER
#include <stdio.h>
#include "jinete.h"
#include "console/console.h"
#include "core/app.h"
#include "core/cfg.h"
#include "core/core.h"
#include "effect/effect.h"
#include "effect/replcol.h"
#include "modules/color.h"
/* #include "modules/editors.h" */
#include "modules/gui.h"
#include "modules/sprites.h"
#include "raster/image.h"
#include "raster/mask.h"
#include "raster/sprite.h"
#include "util/misc.h"
#include "widgets/colbar.h"
#include "widgets/colbut.h"
#include "widgets/preview.h"
#include "widgets/target.h"
#endif
static JWidget button_color1, button_color2;
static JWidget slider_fuzziness, check_preview;
static JWidget preview;
static int button_1_select_hook (JWidget widget, int user_data);
static int button_2_select_hook (JWidget widget, int user_data);
static int color_change_hook (JWidget widget, int user_data);
static int target_change_hook (JWidget widget, int user_data);
static int slider_change_hook (JWidget widget, int user_data);
static int preview_change_hook (JWidget widget, int user_data);
static void make_preview (void);
void dialogs_replace_color(void)
{
JWidget window, color_buttons_box;
JWidget button1_1, button1_2;
JWidget button2_1, button2_2;
JWidget box_target, target_button;
JWidget button_ok;
Image *image;
Effect *effect;
if (!is_interactive () || !current_sprite)
return;
image = GetImage ();
if (!image)
return;
window = load_widget ("replcol.jid", "replace_color");
if (!window)
return;
if (!get_widgets (window,
"color_buttons_box", &color_buttons_box,
"button1_1", &button1_1,
"button1_2", &button1_2,
"button2_1", &button2_1,
"button2_2", &button2_2,
"preview", &check_preview,
"fuzziness", &slider_fuzziness,
"target", &box_target,
"button_ok", &button_ok, NULL)) {
jwidget_free (window);
return;
}
effect = effect_new (current_sprite, "replace_color");
if (!effect) {
console_printf (_("Error creating the effect applicator for this sprite\n"));
jwidget_free (window);
return;
}
preview = preview_new (effect);
button_color1 = color_button_new
(get_config_string ("ReplaceColor", "Color1",
color_bar_get_color (app_get_color_bar (), 0)),
current_sprite->imgtype);
button_color2 = color_button_new
(get_config_string ("ReplaceColor", "Color2",
color_bar_get_color (app_get_color_bar (), 1)),
current_sprite->imgtype);
target_button = target_button_new (current_sprite->imgtype, FALSE);
jslider_set_value (slider_fuzziness,
get_config_int ("ReplaceColor", "Fuzziness", 0));
if (get_config_bool ("ReplaceColor", "Preview", TRUE))
jwidget_select (check_preview);
jwidget_add_child (color_buttons_box, button_color1);
jwidget_add_child (color_buttons_box, button_color2);
jwidget_add_child (box_target, target_button);
jwidget_add_child (window, preview);
HOOK (button1_1, JI_SIGNAL_BUTTON_SELECT, button_1_select_hook, 1);
HOOK (button1_2, JI_SIGNAL_BUTTON_SELECT, button_2_select_hook, 1);
HOOK (button2_1, JI_SIGNAL_BUTTON_SELECT, button_1_select_hook, 2);
HOOK (button2_2, JI_SIGNAL_BUTTON_SELECT, button_2_select_hook, 2);
HOOK (button_color1, SIGNAL_COLOR_BUTTON_CHANGE, color_change_hook, 1);
HOOK (button_color2, SIGNAL_COLOR_BUTTON_CHANGE, color_change_hook, 2);
HOOK (target_button, SIGNAL_TARGET_BUTTON_CHANGE, target_change_hook, 0);
HOOK (slider_fuzziness, JI_SIGNAL_SLIDER_CHANGE, slider_change_hook, 0);
HOOK (check_preview, JI_SIGNAL_CHECK_CHANGE, preview_change_hook, 0);
/* default position */
jwindow_remap (window);
jwindow_center (window);
/* first preview */
make_preview ();
/* load window configuration */
load_window_pos (window, "ReplaceColor");
/* open the window */
jwindow_open_fg (window);
if (jwindow_get_killer (window) == button_ok) {
effect_apply_to_target (effect);
}
effect_free (effect);
/* update editors */
GUI_Refresh (current_sprite);
/* save window configuration */
save_window_pos (window, "ReplaceColor");
jwidget_free (window);
}
static int button_1_select_hook (JWidget widget, int user_data)
{
JWidget w = user_data == 1 ? button_color1: button_color2;
color_button_set_color (w, color_bar_get_color (app_get_color_bar (), 0));
color_change_hook (w, user_data);
return TRUE;
}
static int button_2_select_hook (JWidget widget, int user_data)
{
JWidget w = user_data == 1 ? button_color1: button_color2;
color_button_set_color (w, color_bar_get_color (app_get_color_bar (), 1));
color_change_hook (w, user_data);
return TRUE;
}
static int color_change_hook (JWidget widget, int user_data)
{
char buf[64];
sprintf (buf, "Color%d", user_data);
set_config_string ("ReplaceColor", buf, color_button_get_color (widget));
make_preview ();
return FALSE;
}
static int target_change_hook (JWidget widget, int user_data)
{
effect_load_target (preview_get_effect (preview));
make_preview ();
return FALSE;
}
static int slider_change_hook (JWidget widget, int user_data)
{
set_config_int ("ReplaceColor", "Fuzziness", jslider_get_value (widget));
make_preview ();
return FALSE;
}
static int preview_change_hook (JWidget widget, int user_data)
{
set_config_bool ("ReplaceColor", "Preview", jwidget_is_selected (widget));
make_preview ();
return FALSE;
}
static void make_preview (void)
{
Effect *effect = preview_get_effect (preview);
const char *from, *to;
int fuzziness;
from = get_config_string ("ReplaceColor", "Color1", "mask");
to = get_config_string ("ReplaceColor", "Color2", "mask");
fuzziness = get_config_int ("ReplaceColor", "Fuzziness", 0);
set_replace_colors (get_color_for_image (effect->dst->imgtype, from),
get_color_for_image (effect->dst->imgtype, to),
MID (0, fuzziness, 255));
if (jwidget_is_selected (check_preview))
preview_restart (preview);
}

View File

@ -95,9 +95,9 @@ int load_root_menu(void)
dirs = filename_in_datadir("usergui.xml");
{
char buf[256];
sprintf(buf, "defgui-%s.xml", intl_get_lang());
sprintf(buf, "gui-%s.xml", intl_get_lang());
dirs_cat_dirs(dirs, filename_in_datadir(buf));
dirs_cat_dirs(dirs, filename_in_datadir("defgui-en.xml"));
dirs_cat_dirs(dirs, filename_in_datadir("gui-en.xml"));
}
for (dir=dirs; dir; dir=dir->next) {

View File

@ -287,7 +287,7 @@ static int metatable_index(lua_State *L)
else if (strcmp (index, "writable") == 0)
lua_pushboolean (L, layer->writable);
else if (strcmp (index, "prev") == 0)
push_userdata (L, Type_Layer, layer_get_prev (layer));
push_userdata (L, Type_Layer, layer_get_prev (layer));
else if (strcmp (index, "next") == 0)
push_userdata (L, Type_Layer, layer_get_next (layer));
else {
@ -719,7 +719,6 @@ static int bind_jwidget_hook_signal (lua_State *L)
#include "dialogs/canvasze.h"
#include "dialogs/dmapgen.h"
#include "dialogs/drawtext.h"
#include "dialogs/effect.h"
#include "dialogs/filmedit.h"
#include "dialogs/maskcol.h"
#include "dialogs/options.h"
@ -734,7 +733,6 @@ static int bind_jwidget_hook_signal (lua_State *L)
#include "util/autocrop.h"
#include "util/clipbrd.h"
#include "util/crop.h"
#include "util/flip.h"
#include "util/frmove.h"
#include "util/mapgen.h"
#include "util/msk_file.h"

View File

@ -225,11 +225,6 @@ void crop_sprite(void);
void crop_layer(void);
void crop_frame(void);
/* util/flip.c */
void flip_horizontal(void);
void flip_vertical(void);
/* util/frame.c */
void set_frame_to_handle(Layer *layer, Frame *frame);
@ -285,17 +280,12 @@ int set_gfx(const char *card, int w, int h, int depth);
/* dialogs/... */
void dialogs_color_curve(void);
void dialogs_convolution_matrix(void);
void dialogs_draw_text(void);
void switch_between_film_and_sprite_editor(void);
void dialogs_invert_color(void);
void dialogs_mapgen(void);
void dialogs_mask_color(void);
void dialogs_median_filter(void);
void dialogs_options(void);
void dialogs_palette_editor(void);
void dialogs_replace_color(void);
void dialogs_screen_saver(void);
void dialogs_select_language(bool force);
void dialogs_tips(bool forced);

View File

@ -1133,18 +1133,6 @@ static int bind_crop_frame(lua_State *L)
return 0;
}
static int bind_flip_horizontal(lua_State *L)
{
flip_horizontal();
return 0;
}
static int bind_flip_vertical(lua_State *L)
{
flip_vertical();
return 0;
}
static int bind_set_frame_to_handle(lua_State *L)
{
Layer *layer;
@ -1317,18 +1305,6 @@ static int bind_set_gfx(lua_State *L)
return 1;
}
static int bind_dialogs_color_curve(lua_State *L)
{
dialogs_color_curve();
return 0;
}
static int bind_dialogs_convolution_matrix(lua_State *L)
{
dialogs_convolution_matrix();
return 0;
}
static int bind_dialogs_draw_text(lua_State *L)
{
dialogs_draw_text();
@ -1341,12 +1317,6 @@ static int bind_switch_between_film_and_sprite_editor(lua_State *L)
return 0;
}
static int bind_dialogs_invert_color(lua_State *L)
{
dialogs_invert_color();
return 0;
}
static int bind_dialogs_mapgen(lua_State *L)
{
dialogs_mapgen();
@ -1359,12 +1329,6 @@ static int bind_dialogs_mask_color(lua_State *L)
return 0;
}
static int bind_dialogs_median_filter(lua_State *L)
{
dialogs_median_filter();
return 0;
}
static int bind_dialogs_options(lua_State *L)
{
dialogs_options();
@ -1377,12 +1341,6 @@ static int bind_dialogs_palette_editor(lua_State *L)
return 0;
}
static int bind_dialogs_replace_color(lua_State *L)
{
dialogs_replace_color();
return 0;
}
static int bind_dialogs_screen_saver(lua_State *L)
{
dialogs_screen_saver();
@ -5725,8 +5683,6 @@ const luaL_reg bindings_routines[] = {
{ "crop_sprite", bind_crop_sprite },
{ "crop_layer", bind_crop_layer },
{ "crop_frame", bind_crop_frame },
{ "flip_horizontal", bind_flip_horizontal },
{ "flip_vertical", bind_flip_vertical },
{ "set_frame_to_handle", bind_set_frame_to_handle },
{ "move_frame", bind_move_frame },
{ "copy_frame", bind_copy_frame },
@ -5749,17 +5705,12 @@ const luaL_reg bindings_routines[] = {
{ "quick_swap", bind_quick_swap },
{ "play_fli_animation", bind_play_fli_animation },
{ "set_gfx", bind_set_gfx },
{ "dialogs_color_curve", bind_dialogs_color_curve },
{ "dialogs_convolution_matrix", bind_dialogs_convolution_matrix },
{ "dialogs_draw_text", bind_dialogs_draw_text },
{ "switch_between_film_and_sprite_editor", bind_switch_between_film_and_sprite_editor },
{ "dialogs_invert_color", bind_dialogs_invert_color },
{ "dialogs_mapgen", bind_dialogs_mapgen },
{ "dialogs_mask_color", bind_dialogs_mask_color },
{ "dialogs_median_filter", bind_dialogs_median_filter },
{ "dialogs_options", bind_dialogs_options },
{ "dialogs_palette_editor", bind_dialogs_palette_editor },
{ "dialogs_replace_color", bind_dialogs_replace_color },
{ "dialogs_screen_saver", bind_dialogs_screen_saver },
{ "dialogs_select_language", bind_dialogs_select_language },
{ "dialogs_tips", bind_dialogs_tips },

View File

@ -1,26 +0,0 @@
/* ase -- allegro-sprite-editor: the ultimate sprites factory
* Copyright (C) 2001-2005 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef UTIL_FLIP_H
#define UTIL_FLIP_H
void flip_horizontal (void);
void flip_vertical (void);
#endif /* UTIL_FLIP_H */