aseprite/src/README.md

89 lines
3.2 KiB
Markdown
Raw Normal View History

2013-08-05 18:40:48 -07:00
# Aseprite Source Code
2013-08-05 18:40:48 -07:00
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.
2013-08-05 18:40:48 -07:00
# 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.
2016-08-01 06:29:21 -07:00
* [clip](https://github.com/aseprite/clip): Clipboard library.
* [fixmath](fixmath/): Fixed point operations (original code from Allegro code by Shawn Hargreaves).
2016-08-01 06:29:21 -07:00
* [flic](https://github.com/aseprite/flic): Library to load/save FLI/FLC files.
* [gfx](gfx/): Abstract graphics structures like point, size, rectangle, region, color, etc.
2016-11-07 10:32:35 -08:00
* [laf](https://github.com/aseprite/laf): Core/basic stuff, multithreading, utf8, sha1, file system, memory, etc.
2016-08-01 06:29:21 -07:00
* [observable](https://github.com/dacap/observable): Signal/slot functions.
2015-10-28 15:45:01 -07:00
* [scripting](scripting/): JavaScript engine.
* [steam](steam/): Steam API wrapper to avoid static linking to the .lib file.
2016-08-01 06:29:21 -07:00
* [undo](https://github.com/aseprite/undo): Generic library to manage a history of undoable commands.
* [wacom](wacom/): Wacom definitions to use Wintab API.
2013-08-05 18:40:48 -07:00
## Level 1
* [cfg](cfg/) (base): Library to load/save .ini files.
* [gen](gen/) (base): Helper utility to generate C++ files from different XMLs.
* [net](net/) (base): Networking library to send HTTP requests.
* [webserver](webserver/) (base): HTTP web server
2013-08-05 18:40:48 -07:00
## Level 2
* [doc](doc/) (base, fixmath, gfx): Document model library.
2018-08-09 08:58:43 -07:00
* [os](os/) (base, gfx, wacom): OS input/output.
## Level 3
* [filters](filters/) (base, doc, gfx): Effects for images.
* [render](render/) (base, doc, gfx): Library to render documents.
2018-08-09 08:58:43 -07:00
* [ui](ui/) (base, gfx, os): Portable UI library (buttons, windows, text fields, etc.)
* [updater](updater/) (base, cfg, net): Component to check for updates.
2013-08-05 18:40:48 -07:00
## Level 4
2013-08-05 18:40:48 -07:00
* [dio](dio/) (base, doc, fixmath, flic): Load/save sprites/documents.
2013-08-05 18:40:48 -07:00
## Level 5
2013-08-05 18:40:48 -07:00
2018-08-09 08:58:43 -07:00
* [app](app/) (base, doc, dio, filters, fixmath, flic, gfx, pen, render, scripting, os, ui, undo, updater, webserver)
## Level 6
2018-08-09 08:58:43 -07:00
* [main](main/) (app, base, os, ui)
* [desktop](desktop/) (base, doc, dio, render): Integration with the desktop (Windows Explorer, Finder, GNOME, KDE, etc.)
# Debugging Tricks
2017-08-15 11:47:06 -07:00
When Aseprite is compiled with `ENABLE_DEVMODE`, you have the
following extra commands/features available:
2017-08-15 11:47:06 -07:00
* `F5`: On Windows shows the amount of used memory.
* `F1`: Switch new/old render engine.
* `Ctrl+F1`: Switch/test Screen/UI Scaling values.
2017-08-15 11:47:06 -07:00
* `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.
* `aseprite.ini`: `[perf] show_render_time=true` shows a performance
clock in the Editor.
# 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