aseprite/src
David Capello b986c742cd Test catching std::exception when move_range() fails
It looks like we're having problems catching std::runtime_error as
std::exception on Clang/macOS. So we'll test catching the more generic
exception which is the same that we do in timeline.cpp
2018-04-27 13:31:14 -03:00
..
allegro
app Test catching std::exception when move_range() fails 2018-04-27 13:31:14 -03:00
cfg
clip@e114d677b9 Get Windows Vista screenshots correctly (fix #1687) 2018-04-03 18:26:59 -03:00
desktop Add some information in src/desktop/README.md 2018-03-26 18:13:15 -03:00
dio
doc doc: Update copyright year 2018-04-18 16:57:20 -03:00
filters
fixmath
flic@65a6072fa0
ft
gen
gfx Include pixman header file with "..." instead of <...> 2018-04-16 10:59:59 -03:00
main
net
observable@f9a56dc12f
render Include base/base.h (and debug.h) for SGN/MID (and ASSERT) 2018-04-16 11:17:51 -03:00
script
she Update to Skia version m67 2018-04-20 09:15:21 -03:00
steam
tests
ui Add extra check in ListBox::selectChild() 2018-03-16 12:17:12 -03:00
undo@faf19f0889
updater
wacom
webserver
CMakeLists.txt
config.h
README.md

Aseprite Source Code

If you are here is because you want to learn about Aseprite source code. We'll try to write in these README.md files a summary of each module/library.

Modules & Libraries

Aseprite is separated in the following layers/modules:

Level 0: Completely independent modules

These libraries are easy to be used and embedded in other software because they don't depend on any other component.

  • allegro: Modified version of Allegro library, used for keyboard/mouse input, and drawing 2D graphics on screen.
  • clip: Clipboard library.
  • fixmath: Fixed point operations (original code from Allegro code by Shawn Hargreaves).
  • flic: Library to load/save FLI/FLC files.
  • gfx: Abstract graphics structures like point, size, rectangle, region, color, etc.
  • laf: Core/basic stuff, multithreading, utf8, sha1, file system, memory, etc.
  • observable: Signal/slot functions.
  • scripting: JavaScript engine.
  • steam: Steam API wrapper to avoid static linking to the .lib file.
  • undo: Generic library to manage a history of undoable commands.
  • wacom: Wacom definitions to use Wintab API.

Level 1

  • cfg (base): Library to load/save .ini files.
  • gen (base): Helper utility to generate C++ files from different XMLs.
  • net (base): Networking library to send HTTP requests.
  • webserver (base): HTTP web server

Level 2

  • doc (base, fixmath, gfx): Document model library.
  • she (allegro, base, gfx, wacom): A wrapper for the Allegro library.

Level 3

  • filters (base, doc, gfx): Effects for images.
  • render (base, doc, gfx): Library to render documents.
  • ui (base, gfx, she): Portable UI library (buttons, windows, text fields, etc.)
  • updater (base, cfg, net): Component to check for updates.

Level 4

  • dio (base, doc, fixmath, flic): Load/save sprites/documents.

Level 5

  • app (base, doc, dio, filters, fixmath, flic, gfx, pen, render, scripting, she, ui, undo, updater, webserver)

Level 6

  • main (app, base, she, ui)
  • desktop (base, doc, dio, render): Integration with the desktop (Windows Explorer, Finder, GNOME, KDE, etc.)

Debugging Tricks

When Aseprite is compiled with ENABLE_DEVMODE, you have the following extra commands available:

  • F5: On Windows shows the amount of used memory.
  • F1: Switch/test Screen/UI Scaling values.
  • Ctrl+Alt+Shift+Q: crashes the application in case that you want to test the anticrash feature or your need a memory dump file.
  • Ctrl+Alt+Shift+R: recover the active document from the data recovery store.

Detect Platform

You can check the platform using the following checks:

#ifdef _WIN32
  #ifdef _WIN64
    // Windows x64
  #else
    // Windows x86
  #endif
#elif defined(__APPLE__)
    // macOS
#else
    // Linux
#endif