Commit Graph

1179 Commits

Author SHA1 Message Date
David Capello
0401f4abd4 Remove gui/base.h from sprite.cpp 2011-03-08 15:23:29 -03:00
David Capello
47669fe6f1 Add SpriteReader wrapper to lock the sprite when Editor paints it.
+ Fixed critical bugs using "sprite resize" command and drawing
  the current editor (fixed usage of invalid memory pointers).
  It happens because the resize command is executed in a background
  thread, and at the same time the user can cancel or move a progress
  dialog (generating redraw events to the editor).
+ Anyway this change incorporates some other problems with effects
  where they keep locked the sprite in the whole command execution,
  so the effect preview cannot be visualized. This will be fixed with
  a refactor of the entire effect/preview stuff.
2011-03-08 01:25:46 -03:00
David Capello
6319af1676 Fix problems restoring preferred scroll in selected sprite. 2011-03-06 18:23:57 -03:00
David Capello
cea3ade78a Minor changes: comments to C++ style. 2011-03-06 16:55:26 -03:00
David Capello
6d5531b998 Replace old gfx-data with graphics from the skin sheet.
+ Removed gfxdata.cpp file.
+ Removed get_gfx() from modules/gfx.h/cpp.
+ Added skin parts for each removed graphics of gfxdata.
+ Added IButtonIcon interface and an implementation for skin theme.
+ Removed "icon_buttons" from gui.cpp.
+ Now icons in button are set through set_gfxicon_to_button function.
+ Removed from Theme class check/radio_icon_size member variables
  (they are replaced with the new IButtonIcon interface).
+ Removed jdraw_inverted_sprite(), now each icon has it normal/selected
  version in the skin sheet.
2011-03-06 16:15:05 -03:00
David Capello
de47c6ff59 Rewritten palette editor using ColorSliders and HexColorEntry widgets. 2011-03-03 22:17:25 -03:00
David Capello
d7458bc78f Add ColorSlidersChangeEvent so ColorSliders::ColorChange signal
can receive the modified channel.
2011-03-03 22:16:54 -03:00
David Capello
bb1151c0ac Rewrite the entire color selector as C++ class.
+ Added ColorSliders widget for RGB, HSV, and Grayscale sliders.
+ Added HexColorEntry to show a color in HTML format.
2011-03-01 22:50:49 -03:00
David Capello
2ac1d38d62 Avoid sending keys to gui manager when a popup frame is visible. 2011-03-01 22:37:00 -03:00
David Capello
fd7e95035b Add degree symbol in string representation of HSV colors. 2011-03-01 22:36:18 -03:00
David Capello
a2eab0553c Fix critical bug using "thumbnails" dead-pointer after calling "destroy_thumbnails". 2011-03-01 21:07:28 -03:00
David Capello
824c309c8f Fix issue #8: saving .gif files with transparent backgrounds
does not clear the previous frame.
2011-03-01 19:22:17 -03:00
David Capello
26715e1a08 Add Slider::getMinValue and getMaxValue. 2011-02-24 18:13:00 -03:00
David Capello
b0ff50ec0e New color-bar with scrollable palette-view.
+ Removed palette-view from Palette Editor.
+ Fixed problems pasting RGB values in #hex format and HSV sliders.
2011-02-23 19:29:57 -03:00
David Capello
22a45a9acb Include system.h because we need JI_CURSORS in skin_theme.h. 2011-02-20 20:29:34 -03:00
David Capello
344faeff00 Add Border(int) constructor. 2011-02-20 20:25:57 -03:00
David Capello
95fd6c697c Change SIGNAL_COLORBUTTON_CHANGE to ColorButton::Change signal. 2011-02-20 19:37:42 -03:00
David Capello
716aa05294 Change drawing code of ColorButton from JM_DRAW to onPaint(). 2011-02-20 19:01:34 -03:00
David Capello
4e0ad7f839 Modify short color format in Color::toFormalString(). 2011-02-20 18:59:41 -03:00
David Capello
dea3962502 Remove deprecated colorviewer widget. 2011-02-20 18:40:16 -03:00
David Capello
ad12af7c8b Refactor the entire view widget to View, Viewport, and ScrollBar C++ classes. 2011-02-20 18:35:21 -03:00
David Capello
88112b7ffe Add some operators+(Border) to Border class and Border::getSize() member function. 2011-02-19 23:44:48 -03:00
David Capello
e2848f1f55 Add support for vertical-scrolling with mouse wheel in PaletteView widget. 2011-02-19 23:44:17 -03:00
David Capello
b2ff34909f Remove quick-menu stuff (used only in old jinete examples): 2011-02-19 23:11:40 -03:00
David Capello
d1baef1555 Add text-color to Label widget. 2011-02-19 23:08:15 -03:00
David Capello
96095159bb Include new src/gui/*.h header files in src/gui/gui.h. 2011-02-19 22:50:54 -03:00
David Capello
9b2cf15e94 Remove COLOR_SIZE macro in palette_view.cpp. 2011-02-19 22:41:09 -03:00
David Capello
e309656737 Add PaletteView::IndexChange signal (to replace SIGNAL_PALETTE_EDITOR_CHANGE). 2011-02-19 22:40:46 -03:00
David Capello
d72909e130 Change "images" variable in ji_move_region() from JList to std::vector. 2011-02-16 00:13:18 -03:00
David Capello
3617ae9242 Change "thumbnails" variable in src/util/thmbnail.cpp from JList to std::vector<> type. 2011-02-16 00:07:09 -03:00
David Capello
69b7e2f8f7 Change StatusBar::m_progress from JList to std::vector<> type. 2011-02-16 00:03:56 -03:00
David Capello
9e687d84b0 Add shortcut in the tool-tip of ToolBar. 2011-02-15 09:55:44 -03:00
David Capello
82931688ad Fix position of tool tip in tool-bar. 2011-02-15 09:50:53 -03:00
David Capello
9658fc3747 Fix problem painting a new tip window (with alpha) over a dirty (non-validated) area in tool-bar. 2011-02-15 09:50:14 -03:00
David Capello
cb2eb74ff0 Add ArrowAlign to TipWindow so the tip is pointing to some widget. 2011-02-15 09:02:51 -03:00
David Capello
f96d1f7fa3 Move jwidget_init_theme() to Widget::initTheme(). 2011-02-15 09:00:29 -03:00
David Capello
5de5cfc8e1 Add Them::paintTooltip and changed the tooltip skin with rounded borders and shadow.
+ Move all parts definition to src/skin_parts.h.
2011-02-14 22:50:39 -03:00
David Capello
01f3f9ffab Use Graphics pointer in PopupFrame/TipWindow::onPreferredSize/onPaint events.
+ Add Graphics::drawString/fitString/drawStringAlgorithm.
2011-02-13 23:16:10 -03:00
David Capello
deae4d820a Setup the widget's font in Graphics created for PaintEvents. 2011-02-12 21:33:14 -03:00
David Capello
a33f10373c Add ScreenGraphics to get a "Graphics" to draw directly onto the screen. 2011-02-12 21:32:43 -03:00
David Capello
fe50b6a30a Change painting code of some widgets from JM_DRAW to onPaint().
This need future work to avoid using ji_screen and access to the
drawable area only through Graphics pointer inside the PaintEvent.
2011-02-12 09:32:57 -03:00
David Capello
890ec324f9 Add Widget::setDoubleBuffered(bool) to use double-buffering method
automatically when ji_screen == real screen. Activate this attribute
for palette editor sliders.
2011-02-05 16:26:01 -03:00
David Capello
86fb4c0f90 Change Slider paint code from JM_DRAW message handler to onPaint() method.
+ Rename Theme::draw_slider -> paintSlider(PaintEvent&)
+ Add methods in Graphics to draw images, rectangles, and text.
+ Add IntersectClip class.
+ Add Widget::getClientBounds().
+ Modify ISliderBgPainter::paint to receive a Graphics instead of BITMAP.
+ Add more methods in SkinTheme to draw theme parts in Graphics.
2011-02-05 12:03:22 -03:00
David Capello
56c8d34237 Minor changes in font.h (format). 2011-02-02 00:42:19 -03:00
David Capello
a7ea661ad0 Overload gfx::Border class operators to increment/decrement border size. 2011-01-30 23:18:52 -03:00
David Capello
f8e940d7a4 Sort #include lines in gui.h. 2011-01-30 20:38:07 -03:00
David Capello
e1e4adf68d Add unit tests for gfx::Rect class. 2011-01-30 20:03:25 -03:00
David Capello
7273b95b68 Rename Rect::inflate() -> enlarge() and Rect::deflate -> shrink(). 2011-01-30 20:03:10 -03:00
David Capello
2baa342a65 Remove "j" prefix from some files in gui library. 2011-01-30 19:12:10 -03:00
David Capello
69fa03dcd7 Avoid deprecated allegro functions. 2011-01-28 04:55:55 -08:00
David Capello
6ef082ad7f Rename PalEdit to PaletteView widget to avoid confusion with the palette editor command. 2011-01-28 09:28:54 -03:00
David Capello
ed2c870059 Replace draw_bounds_template() macro with SkinTheme::draw_bounds_template member function. 2011-01-28 09:13:43 -03:00
David Capello
1738a93fca Add Widget::get/setBorder(). 2011-01-27 23:30:11 -03:00
David Capello
034a943a0c Add gfx::Border class. 2011-01-27 23:29:46 -03:00
David Capello
40df2e1d73 Minor change in event.h. 2011-01-27 18:38:27 -03:00
David Capello
85203205b8 Add PaintEvent and Graphics (future replacement of JM_DRAW message). 2011-01-27 18:38:16 -03:00
David Capello
5eba876fce Minor changes in jintern.h 2011-01-27 17:21:43 -03:00
David Capello
5a9d991219 Convert jalert to Alert C++ class. 2011-01-27 17:21:33 -03:00
David Capello
f558666056 Move src/gui/jalert.h to src/gui/alert.h. 2011-01-27 00:29:54 -03:00
David Capello
8ae24b5a58 Refactor jimage widget to ImageView C++ class. 2011-01-27 00:18:47 -03:00
David Capello
8b67fd0bf3 Convert jgrid widget to C++ Grid class (avoid reallocs, use std::vector for internals instead). 2011-01-26 19:51:52 -03:00
David Capello
d8a3d27c0f Convert jbox widget to Box class. 2011-01-24 19:48:09 -03:00
David Capello
e32d8dc633 Rename src/gui/jview to src/gui/view. 2011-01-24 18:09:54 -03:00
David Capello
58b2c1bcd0 Improve palette editor's RGB/HSV sliders.
+ Added SkinSliderProperty and ISliderBgPainter to draw a customized background in sliders.
+ Moved SkinTheme to src/skin/ directory.
2011-01-24 00:03:38 -03:00
David Capello
18db7513a8 Open new sprites in the center of the current sprite. 2011-01-23 21:15:00 -03:00
David Capello
73d7c608a1 Convert "list" collection in "move_focus" function to std::vector. 2011-01-23 20:35:27 -03:00
David Capello
048bdbfb36 Convert "timers" collection to std::vector (to avoid using a raw array of pointers). 2011-01-23 20:33:22 -03:00
David Capello
f018ab64df Move "Constant Frame Rate" as a menu option under "Frame" menu (before it was a button in "Sprite Properties" dialog).
+ Added "frame" parameter to FrameProperties command.
+ Removed the global function dialogs_frame_length().
2011-01-23 20:27:52 -03:00
David Capello
749ff05ef7 Add support to load only the first frame of the animation (used in file selector's preview). 2011-01-23 19:35:22 -03:00
David Capello
36e605bdf2 Move jmalloc/jfree to base/ library as base_malloc/free (remove new/new0/renew macros). 2011-01-23 19:19:18 -03:00
David Capello
88f442b831 Avoid memory leaks from GuiXml singleton. 2011-01-22 20:30:44 -03:00
David Capello
1e88a438eb Rename PopupWindow to PopupFrame. 2011-01-22 11:28:40 -03:00
David Capello
05cc6f6ba6 Remove jwidget_close_window function. 2011-01-21 23:49:07 -03:00
David Capello
75e618c6fa Remove jwidget_send_message. 2011-01-21 23:33:56 -03:00
David Capello
cb6d70521f Replace jwidget_dirty/invalidate and Widget::dirty functions with new Widget::invalidate* member functions. 2011-01-21 19:45:04 -03:00
David Capello
86e145f0ed Remove jwidget_get_parent/manager/parents/children/pick/has_child functions. 2011-01-21 18:54:47 -03:00
David Capello
74b7442ae4 Replace jwidget_get/set_theme with Widget::get/setTheme. 2011-01-21 18:08:25 -03:00
David Capello
e9f7a035b1 Remove jtheme and JTheme types, use Theme class directly.
+ Added CurrentTheme namespace.
+ Rename Theme::regen() to Theme::onRegenerate().
+ ji_regen_theme() is in Theme::regenerate() member function.
2011-01-21 17:50:04 -03:00
David Capello
fc263ddb88 Move SkinneableTheme in src/modules/ directory to SkinTheme in src/. 2011-01-21 17:29:45 -03:00
David Capello
44c1c9720c Remove standard theme from gui/ directory (old ASE 0.7.2 look). 2011-01-21 17:22:05 -03:00
David Capello
e6c2fdd6ed Move pen_type.h to raster directory. 2011-01-21 17:16:21 -03:00
David Capello
45855b88d3 Move "AseException" to "base::Exception" class.
+ Created XmlException for tinyxml parsing errors.
+ Moved functionality of AseException::show() to Console::showException().
2011-01-20 23:33:57 -03:00
David Capello
cf2f042cbf Rename CommandsModule::get_command_by_name to getCommandByName. 2011-01-20 20:49:03 -03:00
David Capello
3887173fac Rename all commands to camel case. 2011-01-20 20:46:58 -03:00
David Capello
af3c4e9fba Move CommandFactory class from command.h to command_factory.h. 2011-01-20 20:02:54 -03:00
David Capello
8e8ac7aa50 Refactor all member functions of Context class to camel case. 2011-01-20 19:58:11 -03:00
David Capello
bf395fca61 More updates for copyright year to 2011. 2011-01-20 18:32:31 -03:00
David Capello
e914c9ad6a Rename ase_exception to AseException. 2011-01-20 18:03:11 -03:00
David Capello
e9bc81cc1d Add transparent color index in sprite and .ase files (it does not work in render operation yet). 2011-01-20 17:17:35 -03:00
David Capello
677fa5d4e0 Minor change: Remove one #include from render.cpp. 2011-01-20 17:13:31 -03:00
David Capello
d6eb20ef7e Update copyright year to 2011. 2011-01-18 20:49:53 -03:00
David Capello
c2e831d009 Use giflib to load gif files.
With this changes a lot of bugs loading different kind of .gif
files are fixed. GIF files must be loaded as RGBA images to
support background color and different transparent color per
frame combinations.
2011-01-18 20:42:43 -03:00
David Capello
f53b0d5816 Use a SharedPtr to delete automatically the optimized palette in fop_operate(). 2011-01-18 20:35:44 -03:00
David Capello
53896f9bfb Avoid to create an optimized palette for RGB images if the same loading process creates one.
+ Added Palette:isBlack member function.
2011-01-18 19:30:42 -03:00
David Capello
b82ec86994 Fix bug in SpriteImpl::resetPalettes() using an invalid "end" iterator after erasing an element from the m_palettes collection. 2011-01-18 19:22:03 -03:00
David Capello
75fd21164e Fix color_utils::color_for_image() when the color is of index type and the imgtype is indexed. 2011-01-18 19:21:36 -03:00
David Capello
ae918802e3 Minor changes in CelPropertiesCommand (remove buf[] local variable using Widget::setTextf). 2011-01-18 19:20:57 -03:00
David Capello
9fa71e5299 Convert FileFormat to a C++ class. 2011-01-16 17:27:18 -03:00
David Capello
28ba73c168 Do not open sub-menus when timer elapsed and we are already opening or closing a menu (base->is_processing). 2011-01-16 17:25:06 -03:00
David Capello
c5ccc5110e Add "Deleter" template parameter to SharedPtr<> class to customize the destruction of T pointer. 2011-01-16 09:41:00 -03:00
David Capello
8b6b51bec2 Fix loading of GIF files with transparent background color (without global palette). 2011-01-15 13:36:33 -03:00
David Capello
68a8907ffc Fix convert_imgtype from Indexed to RGB when the first palette entry is not black (is not transparent color). 2011-01-14 18:29:25 -03:00
David Capello
864d13fb40 Add accurate color quantization or use median cut if the sprite has more than 256 colors.
+ Implemented issue #3 - Accurate Sprite Quantize.
+ Remove Ben Davis code to quantize color palette (to avoid license problems).
2011-01-14 18:22:23 -03:00
David Capello
bc753c5bc1 Fix Palette:countDiff() bug when "to" must be equal to max-1. 2011-01-05 20:11:58 -03:00
David Capello
6a216ad6a8 Add support for 8-bit transparent PNG sprites (fixed issue #5). 2011-01-05 00:16:39 -03:00
David Capello
85e75122b5 Show current sprite's filename in window title bar. 2010-12-29 23:19:45 -03:00
David Capello
6a64fa311f Remove unnecessaries #include <allegro/...> in raster/. 2010-12-26 18:35:12 -03:00
David Capello
d301fc7530 Replace images_ref functions (src/effect) with ImagesCollector class (src/raster). 2010-12-26 17:03:35 -03:00
David Capello
4c8c7463ed Move functions related to quantization and dithering algorithms to raster/quantization.h|cpp. 2010-12-26 10:57:03 -03:00
David Capello
47a265745c Fix Quantize command call (sprite was locked). 2010-12-12 12:11:44 -03:00
David Capello
b600706e37 Remove duplicated getters in sprite (const/non-const). 2010-12-12 12:10:46 -03:00
David Capello
f7aec5a29b Fix a subtle problem in close_menuitem() setting the "is_processing" flag when it is not the last one in the chain (e.g. when it is followed by a JM_OPEN_MENUITEM message). 2010-12-12 11:58:22 -03:00
David Capello
17dea3db8d Modify sys_directx_assert() to call DebugBreak() instead of abort(). 2010-12-12 11:36:50 -03:00
David Capello
8e54e0cbd5 Include third_party/gtest/include as -I only one time. 2010-12-12 09:53:39 -03:00
David Capello
1d5274d435 Fix HSV unittests. 2010-12-11 22:14:38 -03:00
David Capello
7e8ea5886a Fix bug in Hsv::saturationInt(). 2010-12-11 22:09:37 -03:00
David Capello
dbebaec92b New "overlap" trace-policy for tools like Spray, Blur, and Jumble. 2010-12-11 21:49:44 -03:00
David Capello
06403f3ace Fix problems resizing the window on Windows.
+ Limit the minimum window size to 192x96.
+ Only accept multiples of 16 for width and height.
2010-12-11 21:39:58 -03:00
David Capello
02e82a326f Fix null pointer reference for tools without icons in StatusBar::onProcessMessage. 2010-12-11 15:28:28 -03:00
David Capello
8e007e9ca5 Fix problems loading .ico files with color_count=0, and images with pixels out of range. 2010-12-11 10:25:22 -03:00
David Capello
06be16ad59 Fix bug using uninitialized prev_x and prev_y values in Editor::editor_click. 2010-12-11 10:25:22 -03:00
David Capello
b231be51e1 Fix memory leak (one Palette object) in .ico image loader. 2010-12-11 10:25:21 -03:00
David Capello
bc22007455 Fix problems compiling unittests with a Visual Studio solution. 2010-12-11 10:03:59 -03:00
David Capello
73178cd452 Replace "tests/test.h" to <gtest/gtest.h> (as various unittests are for independent libraries). 2010-12-11 10:03:23 -03:00
David Capello
86c9fe0ee9 Include <iterator> in path.cpp, because it uses std::back_inserter. 2010-12-11 10:02:13 -03:00
David Capello
c5ba3076a5 Convert jentry to Entry class. 2010-12-08 14:28:13 -03:00
David Capello
2e87a9013f Remove all deprecated jinete and raster samples. 2010-12-08 14:04:51 -03:00
David Capello
4fae085d60 Rename src/gui/jentry.cpp,h to src/gui/entry.cpp,h. 2010-12-08 13:36:54 -03:00
David Capello
91b0a89a99 Trigger Slider::SliderReleased signal on JM_BUTTONRELEASED message. 2010-12-08 13:26:19 -03:00
David Capello
47db060bc5 Rename Slider::slider_setcursor to setupSliderCursor. 2010-12-08 13:24:35 -03:00
David Capello
0d8a15bfb4 Fix hsv_unittests using floor() in hueInt/saturationInt/valueInt. 2010-12-08 11:48:56 -03:00
David Capello
d4caa65cae Use gfx::Rgb and gfx::Hsv classes for HSV <-> RGB conversions.
+ Removed rgb_to_hsv_int() and hsv_to_rgb_int() functions.
+ Changed HSV ranges from [0,255] to H=[0,360], S=[0,100], V=[0,100].
+ Simplified Color class (src/app/color.h) using a m_type and m_value union.
2010-12-08 11:35:08 -03:00
David Capello
9dcb29749d Add Hsv and Rgb classes to gfx-lib. 2010-12-07 22:47:44 -03:00
David Capello
7ace9a2099 Remove blend modes from ImageLayers. 2010-12-05 11:44:01 -03:00
David Capello
551efd4313 Convert jslider to Slider class.
+ Changed JI_SIGNAL_SLIDER_CHANGE to Slider::Change signal.
2010-12-04 16:13:21 -03:00
David Capello
5605ae81e0 Add Widget::findChildT<>() member function. 2010-12-04 15:56:28 -03:00
David Capello
93f1584717 Rename src/gui/jslider.h to src/gui/slider.h. 2010-12-04 11:21:32 -03:00
David Capello
7a77285dc7 Fix problems drawing widgets when a key is pressed outside the main frame/window.
This bug was introduced with the drawing optimization in commit fb0e82be08.
2010-12-02 21:20:09 -03:00
David Capello
7fab4cd42f Improve RGB and HSV modifications when a range of colors is selected in the palette. 2010-12-01 23:53:27 -03:00
David Capello
ac36822222 Add undo support for palette changes.
+ Added Undo::undo_set_palette_colors() method.
2010-12-01 23:41:20 -03:00
David Capello
1d57167890 Update version to ASE 0.9 in master branch. 2010-11-30 11:49:58 -03:00
David Capello
fa4d98d599 Fix a issue with Editor's slots: when an Editor is destroyed, we have to remove all slots from signals. 2010-11-28 15:42:29 -03:00
David Capello
7f425c8acb signal.h needs remove_from_container.h. 2010-11-28 15:40:35 -03:00
David Capello
5059f39023 Minor changes in jmenu.cpp/h (JWidget -> Widget*, etc.) 2010-11-28 14:35:07 -03:00
David Capello
2e0c961bef Add serialization.cpp to base lib. 2010-11-08 20:14:53 -03:00
David Capello
67e67022fa Fix base/thread.h header guard name. 2010-11-06 21:22:25 -03:00
David Capello
581134c303 Remove path_new/free functions. 2010-11-06 20:40:54 -03:00
David Capello
1283c9d950 Replace Path's name from char* to std::string. 2010-11-06 20:40:03 -03:00
David Capello
18b0f903d7 Pen now uses a std::vector<PenScanline> instead of a raw pointer to PenScanline[] array. 2010-11-06 20:31:30 -03:00
David Capello
d0a694cbb1 More priority for GUI thread, it is necessary for better GUI response in presence of background threads (this change was removed in commit 21957f2164). 2010-11-06 20:15:11 -03:00
David Capello
982a171995 Save the mask_color field in the undo raw image data. 2010-11-06 19:10:00 -03:00
David Capello
97f04c7a79 Copy the mask_color in image_crop() function. 2010-11-06 19:09:29 -03:00
David Capello
6120c38b52 Fix ToolLoopImpl() to clear with mask_color the image used to draw. 2010-11-06 19:09:04 -03:00
David Capello
d4f67cdb73 Modify FileOp structure to use std::string and std::vector<> instead of raw pointers and JList. 2010-11-06 11:59:03 -03:00
David Capello
c78afea9a2 Remove references to Vaca namespace and old vaca source files. 2010-11-04 22:01:47 -03:00
David Capello
90708c595e Remove unused local variable in init_directx_window(). 2010-11-04 21:55:47 -03:00
David Capello
befd6a3766 Return 0 when WM_MOUSEMOVE is processed. 2010-11-04 21:55:02 -03:00
David Capello
8abc967397 Use CreateThread instead of _beginthread() to create the wnd_thread_proc. 2010-11-04 21:52:35 -03:00
David Capello
9001ce9877 Change Win32 window class name to "ASEWindowClass". 2010-11-04 21:51:34 -03:00
David Capello
21957f2164 Remove related stuff for non-background switch mode (in Allegro source code for Win32). 2010-11-04 21:51:09 -03:00
David Capello
b539bd933c Return true when a key is used to select a tool. 2010-11-04 21:48:36 -03:00
David Capello
742cf18237 As now the window can be resized in all platforms we can remove "Configure Screen" option. 2010-11-04 21:47:54 -03:00
David Capello
0139524c15 Keep only DirectX Windowed driver (no fullscreen and no GDI). 2010-11-04 21:43:36 -03:00
David Capello
b59b14444e Fix a bug when calling Editor::editor_set_sprite(NULL).
The editor_clean_cursor() function is called from
editor_set_scroll() when no sprite is selected.
2010-11-01 21:07:56 -03:00
David Capello
24c2bf40e3 Add asserts to _al_win_kbd_handle* functions(). 2010-11-01 21:05:54 -03:00
David Capello
177f089e9a Minor changes in jmessage to debug JM_KEYPRESSED/RELEASED messages. 2010-11-01 21:05:25 -03:00
David Capello
e55b757aad Fix windows keyboard handling when ToUnicode fails.
Introduced in the cumbersome commit 27ba604797.
2010-11-01 21:04:50 -03:00
David Capello
b1299d7576 Remove Allegro customization functions for HWND in Windows port. 2010-10-31 22:08:06 -03:00
David Capello
7768f2c45c Fix memory leaks (old "screen" bitmap) when resizing the window. 2010-10-31 21:32:06 -03:00
David Capello
60cb43d18c Add information about patches for resize support in Allegro source code. 2010-10-31 16:16:14 -03:00
David Capello
51c04f9d8c Add resize support to Mac OS X port. 2010-10-31 17:05:11 -02:00
David Capello
edd0e62241 Move "-arch i386" flag for Apple port in main CMakeLists.txt file. 2010-10-31 12:54:23 -02:00
David Capello
07fceb15f7 Remove config.cpp because the config.c in src/allegro already has my patch for override_config_file(). 2010-10-31 00:32:37 -03:00
David Capello
920f6275d5 Add resize support for X11 port. 2010-10-30 20:30:47 -07:00
David Capello
9562e3e714 Add resize support to Allegro library (Windows port is ready).
+ Add acknowledge_resize() function.
+ Add set_resize_callback() function and RESIZE_DISPLAY_EVENT structure.
2010-10-30 20:37:31 -03:00
David Capello
6cfc3981fb Use set_close_button_callback instead of set_window_close_hook (which is deprecated). 2010-10-30 20:31:34 -03:00
David Capello
579d652f07 Use _keyboard_installed and _mouse_installed flags to trigger keyboard and mouse events in directx_wnd_proc(). 2010-10-30 19:44:39 -03:00
David Capello
623eab27a8 Do not process keyboard shortcuts (e.g. tools shortcuts) when a foreground window is on top. 2010-10-29 11:26:32 -03:00
David Capello
27ba604797 Fix call to ToUnicode() in _al_win_kbd_handle_key_press().
This bug was introduced in commit f09318ffa7.
2010-10-29 11:19:03 -03:00
David Capello
20b535bd9c Add customizable quicktools keyboard shortcuts to the editor (feature requested by Paul Pridham). 2010-10-27 21:04:06 -03:00
David Capello
3a8711e6a6 Add GuiXml class to avoid duplicated code and loading gui.xml file several times. 2010-10-27 21:04:05 -03:00
David Capello
b09e560e04 Add Editor::getCurrentEditorTool() function. 2010-10-27 21:04:04 -03:00
David Capello
2aab911196 Add destroy_default_font() to avoid memory leak of the default font. 2010-10-26 15:23:04 -07:00
David Capello
3683e778d1 Fix memory leak in StatusBar::onProcessMessage(). 2010-10-26 15:22:33 -07:00
David Capello
51e558e1be Add jmouse_release/capture functions. 2010-10-26 15:22:17 -07:00
David Capello
7341d3b091 Fix a problem using uninitialized values (scroll_x/y) in jview (detected with valgrind). 2010-10-26 14:16:11 -07:00
David Capello
6a48cdcaa2 Fix possible bug in tok_fgets() processing an empty line. 2010-10-26 14:16:11 -07:00
David Capello
e7db41ab66 Minor style changes. 2010-10-26 14:16:11 -07:00
David Capello
c1598c01e6 Fix dirty for RGB and grayscale images (bug introduced in commit 4c5a0177cc). 2010-10-26 18:14:25 -03:00
David Capello
f09318ffa7 Do not update key_shifts flags anymore in Windows.
Update modifiers in key[] array using GetAsyncKeyState() instead of GetKeyboardState().
2010-10-20 00:12:32 -03:00
David Capello
e1bfbc4f3c Move _al_win_* functs to aintwin.h. 2010-10-20 00:09:12 -03:00
David Capello
3de0da7f93 Move PAINTSTRUCT to WM_PAINT only. 2010-10-20 00:08:07 -03:00
David Capello
b01ebedbd8 Add "Alt" possibility for keyboard shortcuts in gui.xml. 2010-10-20 00:07:48 -03:00
David Capello
39e7fc5fea Do not use key_shifts anymore. 2010-10-20 00:07:27 -03:00
David Capello
9e4972fc53 Remove dependency with DirectInput and delete winput.c file. 2010-10-17 23:43:08 -03:00
David Capello
a877d52048 Modify Allegro to use WM_KEYUP/DOWN messages instead of DirectInput. 2010-10-17 21:55:31 -03:00
David Capello
57b54ad050 Modify Allegro to use WM_MOUSEMOVE instead of DirectInput in the Windows mouse driver. 2010-10-17 20:04:26 -03:00
David Capello
f9aa176c09 Remove sound/digi/midi/sample related stuff from Allegro code. 2010-10-17 11:10:18 -07:00
David Capello
1b4ce4cf9b Remove src/allegro/src/linux code. 2010-10-17 10:35:39 -07:00
David Capello
31eb7f3348 Remove unused files from src/allegro/misc/. 2010-10-17 14:19:01 -03:00
David Capello
7d5e78ea94 Remove ASM code from Allegro source. 2010-10-17 14:12:18 -03:00
David Capello
c277b26e90 Fix compilation errors with gcc in Mac OS X (void* <-> int conversions). 2010-10-17 00:49:28 -03:00
David Capello
baae56c7d6 Remove thread::id type (to avoid using pthread_t as an unsigned int, which is an opaque pointer really). 2010-10-17 00:41:29 -03:00
David Capello
13bb881151 Remove joystick stuff from Allegro source code. 2010-10-16 23:16:55 -03:00
David Capello
0d4c1dbf9c Remove Allegro GUI related stuff. 2010-10-16 22:48:45 -03:00
David Capello
6aac8ef51d Remove PSP specific lines in Common.cmake. 2010-10-16 21:48:52 -03:00
David Capello
71cc031741 Remove DOS/BeOS/djgpp/QNX/BCC32/Watcom/DMC/PSP stuff from Allegro source code. 2010-10-16 21:42:50 -03:00
David Capello
3b983ca2a6 Remove fixes for rc compiler in MinGW. 2010-10-16 20:45:41 -03:00
David Capello
87d2d5595f Move link flags and other cmake configuration from Allegro's CMakeLists.txt to the main CMakeLists.txt.
Remove all the "modules" stuff from Allegro's CMakeLists.txt
2010-10-16 17:02:12 -03:00
David Capello
948a5e0a5d Add "allegro" library as part of the ASE build process. 2010-10-16 14:30:04 -03:00
David Capello
c6ba92dd0e Add Allegro source code (branch 4.4, svn revision 13829). 2010-10-16 14:12:10 -03:00
David Capello
5f19a15dc1 Simple fix to improve performance in Linux with pixel scaling > x1. 2010-10-14 19:19:40 -07:00
David Capello
fb0e82be08 Add JI_DIRTY flag to optimize jwidget_flush_redraw(). 2010-10-14 19:04:13 -07:00
David Capello
ab32c37955 Add "install" target so we can use "make install" on Linux. 2010-10-12 17:19:19 -07:00
David Capello
31783ffefc Remove DEFAULT_PREFIX variable (on Linux resources are searched in ../share now). 2010-10-12 17:18:42 -07:00
David Capello
a14d0cd59c Minor change in SkinneableTheme::reload_skin(). 2010-10-12 17:16:07 -07:00
David Capello
bd2db4508e Do not center the mouse pointer when zoom (Paul Pridham idea). 2010-10-12 10:37:54 -03:00
David Capello
1bbcf0af38 Remove linking two times aseprite-library in aseprite target. 2010-10-12 10:21:52 -03:00
David Capello
623c1066bd Avoid asserting leak of GfxObjs when MEMLEAK is defined. 2010-10-12 10:21:17 -03:00
David Capello
f3fcc8fd3e Temporarily commented the SpriteReader in editor's JM_DRAW because "Preview" does not work with it. 2010-10-12 10:20:47 -03:00
David Capello
4c5a0177cc Convert Dirty to a class.
Remove all deprecated code of Dirty class that was not being used because the new ASE 0.8 tools implementation.
Remove pointers to an Image/Mask from Dirty class.
2010-10-11 14:57:04 -03:00
David Capello
9f58d0378a Remove algo_dirty() and old 00dirty.cpp test/example. 2010-10-10 21:19:56 -03:00
David Capello
5b93db64ba Add imgtype_shift() and imgtype_line_size(). 2010-10-10 21:17:59 -03:00
David Capello
27fe8f2ffe Call sheet_mapping.clear() in ~SkinneableTheme() to avoid false memory leaks. 2010-10-10 18:57:37 -03:00
David Capello
7f14c8e287 Move GfxObjId type to gfxobj_id.h file. 2010-10-10 18:56:59 -03:00
David Capello
3774d6a167 Lock the editor's sprite to draw it in JM_DARW message. 2010-10-10 18:56:22 -03:00
David Capello
3917892a16 Use replaceStockImage() in Undoable::setImgType() to avoid duplicated code. 2010-10-10 18:54:30 -03:00
David Capello
8b7367a1bb Show SymGetLineFromAddr() information whatever is the SymFromAddr() result. 2010-10-10 17:09:49 -03:00
David Capello
baa0d8f469 Fix __builtin_return_address() for MSVC (problems accessing to the address pointed by eax when it is too small). 2010-10-10 17:07:55 -03:00
David Capello
2be85b1ee5 Fix huge problems using "headslot" in multiple threads. 2010-10-10 16:47:50 -03:00
David Capello
f86c306bab Add ENABLE_MEMLEAK parameter to CMakeLists.txt (fix jmem.cpp so it can be compiled when MEMLEAK is defined). 2010-10-10 16:47:01 -03:00
David Capello
f85070c1c6 Add Dirty::getMemSize() method. 2010-10-09 14:15:11 -03:00
David Capello
072b19a9bb Add a comment in Undo::updateUndo() about the usage of get_config_int() function. 2010-10-03 17:08:06 -03:00
David Capello
7dd78886e2 Remove unnecessary #include <string.h> in undo.h 2010-10-03 15:52:33 -03:00
David Capello
514d666747 Add virtual method getMemSize() to GfxObj class (overriden by Image, Cel, Layer, etc.).
These methods will be used for a new implementation of Undo.
2010-10-03 15:51:03 -03:00
David Capello
070be38e81 Remove "state" arg from UndoAction::invert() function. 2010-10-03 15:24:53 -03:00
David Capello
03c5d0030a Convert UndoStream in a class. 2010-10-03 15:19:18 -03:00
David Capello
6f50c62ace Rename undo_exception to UndoException. 2010-10-03 14:52:50 -03:00
David Capello
b49359314c Modify jnew(FileOp) with "new FileOp". 2010-10-03 13:50:01 -03:00
David Capello
911fe71c0e Fix bug introduced in commit e885fcd3a1: leave one palette after Sprite::resetPalettes(). 2010-10-02 22:58:50 -03:00
David Capello
3aad83b353 Add return statement to thread:🆔:operator=(). 2010-10-02 20:23:42 -03:00
David Capello
3f7333b9ed Fix pthread implementation of base::thread class (problems joining threads, initializing m_id field, etc.). 2010-10-02 20:20:59 -03:00
David Capello
b66371f95a Move thread class to base lib (the new thread class has a C++0x-like api). 2010-10-02 19:00:01 -03:00
David Capello
2a73d6ffb9 Fix order of libraries so we can link loadpng with alleg library with gcc on Windows. 2010-10-02 18:33:06 -03:00
David Capello
eb1815d44e Fix error passing base::string in sprintf() like routine. 2010-10-02 16:37:44 -03:00
David Capello
36d532df21 Rename src/gui/jwidget.cpp|h to src/gui/widget.cpp|h. 2010-10-02 11:19:09 -03:00
David Capello
8f6ae77a2e Rename src/gui/jlabel.cpp|h to src/gui/label.cpp|h. 2010-10-02 11:04:10 -03:00
David Capello
3721064c8b Rename src/gui/jbutton.cpp|h to src/gui/button.cpp|h. 2010-10-02 10:59:14 -03:00
David Capello
7f96084c88 Rename src/gui/jwindow.cpp|h to src/gui/frame.cpp|h. 2010-10-02 10:47:58 -03:00
David Capello
b7609686de Add resources_win32.rc in aseprite target on Windows. 2010-10-01 00:23:13 -03:00