Commit Graph

259 Commits

Author SHA1 Message Date
David Capello
5dd2d8119b Add initial support to Steam API (just inform to Steam that we're running) 2016-02-24 13:21:37 -03:00
David Capello
72338a6f26 Remove unused updater_lib variable in src/CMakeLists.txt 2016-02-02 12:21:01 -03:00
David Capello
69bb8fef9b Add flag to improve linking times when we use the Skia port 2015-10-05 21:19:11 -03:00
David Capello
4fbbd75599 Move Skia libraries as she library dependencies 2015-09-30 19:58:04 -03:00
David Capello
795c4d5a87 Use ctest to run tests 2015-09-21 16:45:25 -03:00
David Capello
3d700ab94c New FLI/FLC encoder/decoder (fix #7) 2015-09-10 16:10:31 -03:00
David Capello
e4138fdf69 Fix order of target_link_libraries() for tests
Generic libraries at the end.
2015-07-13 13:01:48 -03:00
David Capello
55f90d8b8b Add target_link_libraries() for sublibraries
With this change we remove some internal variables/lists like sys_libs,
libs3rdparty, etc. And we fix dependencies problems between targets.
2015-07-13 12:16:55 -03:00
David Capello
8da36f990b Fix libraries order to avoid linking error in updater library 2015-06-12 18:43:10 -03:00
David Capello
0d09ca6f20 Add net-lib to aseprite libraries (fix #696)
Net library must be included in link process whatever ENABLE_UPDATER value
is, because we load RSS news with net-lib anyway.
2015-06-12 11:27:47 -03:00
David Capello
47a05434fe Remove some remaining parts of USE_SHARED_GTEST option 2015-06-09 10:54:04 -03:00
David Capello
b2fb33a415 Don't use our copy of libpng header files when USE_SHARED_LIBPNG is ON 2015-06-09 10:20:56 -03:00
David Capello
ed4ff82a5e Add extra PATH_SUFFIXES to find pixman library 2015-06-08 18:21:20 -03:00
David Capello
222562db09 Remove USE_SHARED_GTEST option 2015-06-08 18:20:39 -03:00
David Capello
b3b6a28427 Now include(CheckCXXSourceCompiles) is required in src/CMakeLists.txt 2015-06-08 17:46:37 -03:00
David Capello
0c115e5567 Move code to find gtest shared version into src/CMakeLists.txt 2015-06-08 17:42:08 -03:00
David Capello
b03f6de006 Try with an alternative name for pixman shared library 2015-06-08 17:41:36 -03:00
David Capello
f395a0c768 Disable data recovery on trial mode 2015-05-09 20:18:10 -03:00
David Capello
d7bf504887 Fix flags to always compile with libcurl (as HomeView needs net-lib to load news) 2015-04-23 19:14:13 -03:00
David Capello
0350ac4bbe Initial work on Skia backend (WIP) 2015-03-16 15:05:13 -03:00
David Capello
e09cdd67cb Add support to compile with VS2013 x64 2015-03-06 17:01:08 -03:00
David Capello
5c1f2a55a5 Avoid MSVC warning using std::copy() 2015-03-05 14:37:16 -03:00
David Capello
16da2512b4 Remove dependency with Allegro library in config.h file
* Created base::write24bits() function (and detect endianness with a
  special base/config.h.cmakein)
* Use _WIN32 instead of ALLEGRO_WINDOWS
* Use _DEBUG instead of DEBUGMODE
* Replaced AL_CONST with "const" in bmp_format.cpp
* Replace stricmp() with base::utf8_icmp()
2015-02-12 10:55:58 -03:00
David Capello
0cff720ef3 Rename undo2 to undo library
Now that the old undo library doesn't exist, we can use "undo" namespace
again.
2015-01-18 22:16:29 -03:00
David Capello
e55865843e Replace undo impl: replace undoers with cmds
Undoers were little objects to swap/revert an action. They didn't
execute the action itself, they just revert its previous state. Now
undoers were replaced with cmds: A cmd is an object that
executes/undoes/redoes just one action.

Changes:
* Remove old undo library and app/objects_container_impl.cpp
  (now we use the doc::ObjectId directly to store undo info)
* Remove all Undoers from app/undoers/
* Replace DocumentApi impl with little Cmds in app/cmd/, these
  cmds handle execute/undo/redo of each action at the logic layer
* Remove doc::Dirty object
* Remove doc::Settings: all undo configuration is in the app side
* Move undo options from app:ISettings to app::Preferences
* Rename UndoTransaction to Transaction
* Create a CmdSequence to store a sequence of Cmds (as now the new
  undo library doesn't support open/close groups)
* Add doc::get<T>(ObjectId) function to get any kind of object
  from the doc library by its ID
* Add Cel::document() and Sprite::document() members
* Add Sprite::cels(frame_t) to get all cels in the given frame
* Add Layer::displaceFrames() member function
* Move the "allow non-linear history" flag from undo2::UndoHistory
  to app::DocumentUndo
2015-01-18 22:05:33 -03:00
David Capello
a9fa9f5fdc Add undo2 library 2015-01-04 20:23:05 -03:00
David Capello
da1358c5dc Unify all render code in one library
Changes:
* Create render library (move util/render.cpp to render/render.cpp)
* Move app::Zoom class to render::Zoom
* Remove doc::Image::merge() member function
* Add gfx::Clip helper class (to clip dst/src rectangles before a blit)
* Move doc::composite_image() to render::composite_image()
* Remove doc::Sprite::render()
* Replace Sprite::getPixel() with render::get_sprite_pixel()
* Remove doc::layer_render() function
* Convert DitheringMethod to a enum class
* Add AppRender to configure a render::Render with the app configuration
* Move checked background preferences as document-specific configuration
* Add doc::Sprite::layer() and palette() member functions
* Add doc::Layer::cel() member function
* Add doc::Palette::entry() member function()
* Add doc::frame_t type
* Move create_palette_from_rgb/convert_pixel_format to render library
* ExportSpriteSheet doesn't need a temporary image now that we can specify
  the source rectangle in the render routine
2014-12-28 11:06:11 -03:00
David Capello
5aea29348e Merge branch '1.0'
Conflicts:
	data/gui.xml
	src/app/CMakeLists.txt
	src/app/color_utils.cpp
	src/app/color_utils.h
	src/app/commands/cmd_preview.cpp
	src/app/document_exporter.cpp
	src/app/document_exporter.h
	src/app/ui/editor/standby_state.cpp
	src/config.h
	src/main/resources_win32.rc
2014-12-03 11:15:09 -03:00
David Capello
3b7f52ea5d Remove a custom target for each file to copy 2014-12-02 11:22:20 -03:00
David Capello
807598d5c3 Add post build target to copy the whole data/ dir into build/bin/ dir 2014-12-02 11:15:06 -03:00
David Capello
e0264787c6 Fix compilation of gen utility (and tests) under Visual Studio solution (fix #541) 2014-12-02 01:38:25 -03:00
hasufell
169edeaa69
Fix underlinking with USE_SHARED_ALLEGRO4=ON 2014-11-02 16:58:33 +01:00
David Capello
39b8e034b5 Merge branch '1.0'
Conflicts:
	.gitmodules
	CMakeLists.txt
	src/CMakeLists.txt
	src/app/app.h
	src/app/app_menus.cpp
	src/app/commands/cmd_move_mask.cpp
	src/app/commands/cmd_rotate.cpp
	src/app/modules/gui.cpp
	src/doc/resize_image_tests.cpp
	src/ui/accelerator.cpp
	third_party/CMakeLists.txt
2014-10-30 01:06:27 -03:00
David Capello
ec99866a23 Fix region_tests compilation (as now it depends on pixman library) 2014-10-29 10:37:44 -03:00
David Capello
0cf597c0f4 Add dependency with pixman library 2014-10-25 22:22:58 -03:00
David Capello
63995c6f0a Merge "raster" namespace into "doc" library 2014-10-20 22:21:31 -03:00
David Capello
2b2d0f34b2 Add simpleini to replace Allegro 4 configuration routines 2014-10-16 21:27:25 -03:00
David Capello
21e700da4f Use fixmath lib in point shapes 2014-09-21 12:13:13 -03:00
David Capello
e133c341ff Add fixmath library 2014-09-21 11:51:24 -03:00
David Capello
897513264d Compile subprojects with C++11 flags 2014-08-15 00:26:27 -03:00
David Capello
f62356d410 Add compiler flags for C++11 so we can start using it 2014-08-14 00:40:01 -03:00
David Capello
ebca329112 Add support to compile with MSVC 64bits
It's not ready, the program crashes when it starts, but at least we can
compile for 64bits.
2014-08-12 07:01:21 -03:00
David Capello
1c324c9b14 Add experimental option to use native mouse cursors (and some renames of cursor names) 2014-08-10 19:51:14 -03:00
David Capello
81ffb0c5bd Refactor: Create doc::Context and move some logic from app::Document to doc::Document
The objective of these changes is to create a more testable doc/logic API.

Included changes:
- Added doc::Context, doc::Documents (the old app::Documents),
  and doc::Sprites (and observers for each)
- Added raster::Sprite::createBasicSprite()
- Added doc::ColorMode (equal to raster::PixelFormat)
- Added some methods to doc::Document: context(), sprites(), sprite()
  (to replace app::Document::getSprite()), width/height(), colorMode(),
  name(), and close()
- Moved app::DocumentObserver/Event to doc::DocumentObserver/Event
- Replaced app::ContextObserver with doc::DocumentsObserver and a couple
  of signals.
- Renamed app::Context::getActiveDocument() with
  doc::Context::activeDocument()
- Renamed app::Context::getActiveLocation() with
  app::Context::activeLocation()
- Removed app::ContextObserverList
- Removed app::DocumentId (now we can use doc::ObjectId)
- Removed app::Context::getSettings()
2014-07-29 00:53:24 -03:00
David Capello
31e565a2b0 Add "gen" utility to generate UI widget wrappers from XML files 2014-07-13 13:24:57 -03:00
David Capello
e09bb7d3f2 Fix file_tests 2014-07-06 22:10:48 -03:00
David Capello
738d6ec4ee Rename _unittest.cpp files to _tests.cpp 2014-06-28 10:49:38 -03:00
David Capello
7ffce344bd Add CUSTOM_WEBSITE_URL option to test a local webserver 2014-06-02 21:31:44 -03:00
David Capello
852aba87f8 Minor change in src/CMakeLists.txt to see if a unit test needs she library 2014-04-12 12:29:55 -03:00
David Capello
30af4e2620 Add trial-mode without save functionality 2014-04-10 00:33:28 -03:00
David Capello
2a70e750cd Add a basic model layer (doc-lib) 2014-03-12 19:25:09 -03:00
David Capello
ebc9fa55b1 MSVC: Add support for Windows XP platform 2014-01-05 22:37:53 -03:00
David Capello
8e81fb808d Add css library
This is a base library that will be used by SkinTheme to draw parts
with CSS styles (or something similar).
2013-12-03 19:31:36 -03:00
David Capello
e5ba8e0922 Encapsulate Image implementation (private members, accessors, iterators, etc.)
- Rename _rgba/_graya to raster::rgba()/graya()
- Add raster::color_t type (alias for uint32_t)
- Rename raster::GfxObj to Object. And GfxObj::getType() to Object::type()
- Move conversion from raster::Image/Palette to Allegro BITMAP/RGB
  to raster/conversion_alleg.h file
- Add raster/color_scales.h
- Rename image_* functions to raster/primitives.h
- Reimplement ink processing with templates instead of macros
2013-11-09 19:59:05 -03:00
David Capello
c88f9b172b Refactor: Move app files to src/app subdirectory inside app namespace
- Add HAVE_CONFIG_H wrapper to #include "config.h"
- Removed widgets namespace (it's in app now)
- Move some functions from src/file/file.h to src/base/cfile.h
- Move Vector2d to base library
- Rename MenuItem2 to AppMenuItem
2013-08-05 21:20:19 -03:00
David Capello
b8c3d39c35 Add shading ink (for indexed images only) and color swatches (no UI yet) 2013-04-02 21:02:18 -03:00
David Capello
2364776c44 Add HTTP webserver feature (for testing only at the moment) 2013-03-31 00:36:00 -03:00
David Capello
bf745b1033 Add ContextBar in the MainWindow 2013-03-30 13:43:00 -03:00
David Capello
1d56133e75 Add support to split workspace views
+ Added WorkspacePart class
+ Added WorkspaceView::cloneWorkspaceView()/onClonedFrom() methods.
2013-03-27 21:19:35 -03:00
David Capello
02324f4cbb Refactor: move current frame/layer from Sprite class to Editor/DocumentView
This change is the first step to create a mini editor with the capability
to show the animation while we edit other frames. Also it will allow us
to have two or more editors of the same document in different frames.

- Added DocumentLocation: now the location in a document is a property
  of the current Context (Context::getActiveLocation()).
- Added ContextAccess/Reader/Writer classes.
- Added DocumentApi class: high-level API with the majority of methods
  in UndoTransaction class (that were not directly related to a undo
  transaction).
- Added AddFrame/RemoveFrame undoers to handle add/remove frame correctly:
  this fix issue #212.
- Removed SetCurrentLayer/Frame undoers.
2013-03-11 20:29:45 -03:00
David Capello
9b8e87da10 Update copyright year to 2013 2013-01-27 12:13:13 -03:00
David Capello
ed90055bf7 Replace modules/editors.cpp with widgets::Workspace class
Now we have one editor for each Document we want to edit. Before we were
creating one editor and switching the document on it, but now we have
several Editors (one for each opened Document). This simplifies the
Document implementation, because it doesn't need to know temporal
Editor information (like "preferred editor settings").

- Removed all code from modules/editors.cpp (legacy from C code).
- Removed PreferredEditorSettings class and
  Document::getPreferredEditorSettings().
- Added Workspace/WorkspaceView classes.
- Added DocumentView (a DocumentObserver).
- Added MiniEditorWindow class.
- Removed SelectFileCommand & CloseEditorCommand.
- Added TabView interface instead of using a raw void* in
  Tabs/TabsDelegate classes.
- Modified editors_draw_sprite() calls to Document::notifySpritePixelsModified
  notifications.
- The "current_editor" global variable wasn't removed because it's
  used in several places yet, but it will be removed in the near future.
  (Also this variable now can be NULL when we don't have an opened
  document.)
2013-01-20 18:40:37 -03:00
Ilya Barygin
9ba5ef44ca Fix FTBFS with --as-needed linker option
Libraries must be placed after object files in command line.
More information: https://bugs.gentoo.org/show_bug.cgi?id=445814

Conflicts:

	src/CMakeLists.txt
2013-01-01 21:12:22 -03:00
David Capello
f0d8703ad8 Add app::Project class to handle projects in the near future. 2012-09-13 19:57:37 -03:00
David Capello
6b4591c5fd Add shell mode to execute scripts interactively.
- Added Shell class.
- Added base::SystemConsole to adjust stdin/stdout on Windows platform.
2012-09-08 20:10:48 -03:00
David Capello
3c1ee303c6 Replace CheckArgs with app::AppOptions/base::ProgramOptions classes 2012-09-05 21:14:42 -03:00
David Capello
810b082500 Add scripting-lib (link with v8 when it's available) 2012-09-02 17:35:14 -03:00
David Capello
33e3b5c8d0 Fix unittests compilation for Windows. 2012-08-24 00:49:38 -03:00
David Capello
29898744fe Fix issue #160, crashes undoing critical actions like "remove layer" or "remove frame".
The OpenGroup & CloseGroup undoers now save the current SpritePosition
when the Undoer instance is created. Before we were using the current
Layer and Frame at the moment of the OpenGroup creation, it was generating
buggy undoers.
2012-08-23 21:44:41 -03:00
David Capello
f541fc8789 Add DataRecovery and Backup classes. They do nothing at the moment. 2012-08-22 21:05:02 -03:00
David Capello
3f7d7b00b7 Fix link problem with gcc compiler and loadpng library. 2012-08-18 17:51:37 -03:00
David Capello
25605d8c06 Fix UI unit tests: they must use/be linked to "she" library. 2012-08-18 17:51:26 -03:00
David Capello
3b99e73734 Rename "listener" to "observer" which is better to reference the "Observer" pattern. 2012-08-18 15:22:23 -03:00
David Capello
35f1249662 Add "she" layer.
This is the starting point to create a layer to isolate Allegro access.
In the future, we will be able to switch to SDL or Allegro 5 easily.
Anyway this will be a progressive refactoring.
2012-07-14 16:55:16 -03:00
David Capello
cd23721a97 Add MainWindow & MainMenuBar, and replace rootmenu module with AppMenus class.
Also the ToolBar widget was published in the toolbar.h header file.
2012-07-09 13:20:58 -03:00
David Capello
91bf74350e Rename ui::Frame to ui::Window. 2012-07-08 23:24:42 -03:00
David Capello
a35aa7559a Do not use the embedded libloadpng.
Add the option to use a shared libloadpng library.
Patch by Tobias Hansen <tobias.han@gmx.de>
2012-07-08 21:21:01 -03:00
David Capello
594a272c06 Add DocumentUndo to avoid app specific data in the undo library.
The UndoHistory was simplified, m_enabled/label/modification members
were removed because they aren't part of the undo library goal.
Now the "label" field is part of Open/CloseGroup undoers, and all undoers
must be enclosed in a group (this restriction is only for the app, the
undo library doesn't have this restriction). In this way, the
label/modification information is exchanged between an
OpenGroup <-> CloseGroup pair only.
2012-07-08 01:25:26 -03:00
David Capello
ebb8d0c5bd Replace deprecated "Monitor" struct from gui module with ui::Timers.
- Added ThumbnailGenerator class to avoid mixing the thumbnail generation
  code with FileList widget.
- Added IFileOpProgress for fop_operate() so we can update the job progress
  when the "file operation" progress changes.
2012-07-06 01:06:00 -03:00
David Capello
09ecf4c588 Remove src/widgets/editor/click.cpp and Editor::editor_click* member functions. 2012-06-17 22:58:31 -03:00
David Capello
51df7a3af6 Rename src/widgets/statebar.[cpp/h] to src/widgets/status_bar.[cpp/h]. 2012-06-17 22:56:40 -03:00
David Capello
55aca8567c Move src/gui/ to src/ui/ 2012-06-17 22:49:58 -03:00
David Capello
14dd4e7ae2 Add GUI library stuff into "ui" namespace (now ui-lib). 2012-06-17 22:02:54 -03:00
David Capello
6f91238264 Add support to load/save GIMP palettes (.gpl files). Issue #112. 2012-06-16 17:50:52 -03:00
David Capello
02e8c66da4 Remove signals and hooks in GUI code.
Several refactoring tasks where made:
- Removed the old Widget::id field (JID).
- Renamed Widget::get/setName to get/setId.
- Moved load_widget_from_xmlfile() to app::load_widget and WidgetLoader
  class.
- Removed jhook structure & jwidget_add_hook function. Hooks were replaced
  subclassing widgets.
- Added InitThemeEvent class and Widget::onInitTheme member function.
2012-06-15 23:37:59 -03:00
David Capello
3bbf7af991 Rename layer_new_flatten_copy() to create_flatten_layer_copy() and moved to src/flatten.cpp file. 2012-06-08 21:34:53 -03:00
David Capello
ccb4f11cc3 Add file_unittest.cpp with a basic test to load/save .ase file. 2012-05-19 16:22:55 -03:00
David Capello
78d3b80df3 Add ScopedAllegro class. 2012-05-12 23:25:36 -03:00
David Capello
27103a231f Convert group_button widget to ButtonSet class.
- Removed radio_button_new() function.
2012-04-19 20:33:57 -03:00
David Capello
55a4002ec5 Add posibility to scroll by-tiles using Ctrl+arrow keys (Paul Pridham idea).
+ Added ScrollCommand.
2012-04-04 00:49:13 -03:00
David Capello
58f5bbd4c0 Don't compile raster/path.cpp so libart header files are not required. 2012-03-22 19:01:05 -03:00
David Capello
ad9a5fde7a Add run_non_ui_unittests target to run tests that doesn't require X11 environment (thanks to Tobias Hansen). 2012-03-22 14:55:28 -03:00
David Capello
dfb43845a9 Updated src/allegro/src/config.c isn't necessary from Allegro 4.2.0.
ASEPRITE requires the following patch in config.c is:
http://alleg.svn.sourceforge.net/viewvc/alleg?view=revision&revision=4660
2012-03-22 13:31:40 -03:00
David Capello
a27d1d3eeb Remove deprecated dialogs: drawtext.cpp, playfli.cpp, repo.cpp. 2012-03-20 13:23:59 -03:00
David Capello
be82a49f86 Add option to compile using shared gtest library (thanks to Tobias Hansen). 2012-03-19 14:33:49 -03:00
David Capello
c6ad4a94c1 Fix find_library/path to find shared libcurl (thanks to Tobias Hansen) 2012-03-19 14:29:54 -03:00
David Capello
ae8d26bedf Replace find_library/path of giflib with find_package (thanks to Tobias Hansen). 2012-03-19 14:29:29 -03:00
David Capello
7befb6c830 Include ASEPRITE net library only when the updater is enabled. 2012-03-19 14:28:06 -03:00
David Capello
49614f6f41 Always add third_party/libpng to include directories (thanks to Tobias Hansen).
Because private libpng headers are used by loadpng and
src/file/png_format.cpp.
2012-03-19 14:27:00 -03:00
David Capello
7115806dc4 Create option to build with shared tinyxml (thanks to Tobias Hansen). 2012-03-19 14:04:24 -03:00