Commit graph

1003 commits

Author SHA1 Message Date
Sebastian Krzyszkowiak
31de1a7d08
cmake: Don't look for Allegro addons on Emscripten
We're putting all addons into one object file there.
2020-04-25 19:40:25 +02:00
Sebastian Krzyszkowiak
312ff915f6
Fix warnings reported by clang-tidy 2020-04-25 19:28:47 +02:00
Sebastian Krzyszkowiak
4336b707c5
cmake: Make the variable names match the module name in Allegro packages 2020-04-25 19:28:26 +02:00
Sebastian Krzyszkowiak
0981175a78
Clean up global speed handling and add GetGameSpeed API function 2020-04-19 07:40:39 +02:00
Sebastian Krzyszkowiak
9a2f26c609
Reset getopt state when parsing arguments
This lets the application parse some arguments itself.
2020-04-11 00:10:42 +02:00
Sebastian Krzyszkowiak
4fd703f821
emscripten: Don't use WebGL2 contexts by default
The only thing it usually brings us is support for bigger texture sizes.
Games that rely on that can enable WebGL2 explicitly.
2020-04-09 05:58:24 +02:00
Sebastian Krzyszkowiak
4980be9e32
utils: BSOD: String tweak 2020-04-04 04:47:54 +02:00
Sebastian Krzyszkowiak
2e15e4d8dc
Use al_store_state and al_restore_state when dealing with threads
This lets the active Allegro file interface to be used by the new thread.
2020-04-04 04:47:10 +02:00
Sebastian Krzyszkowiak
5f7c0ff18f
cmake: Put data files into /data directory on emulated emscripten filesystem 2020-04-04 04:45:53 +02:00
Sebastian Krzyszkowiak
e0192420f6
cmake: Add DATA_EXCLUDE_REGEX variable to configure exclusions in data dir installation 2020-03-22 07:49:54 +01:00
Sebastian Krzyszkowiak
6d6112e12e
defines: Add LIBSUPERDERPY_VENDOR to defined variables 2020-03-20 06:00:41 +01:00
Sebastian Krzyszkowiak
5f4f5bafaf
character: Pass current frame number to animation stream callback
Without that there's no way to restart an already running animation.
2020-03-19 04:29:33 +01:00
Sebastian Krzyszkowiak
5476be3631
libsuperderpy: Fix compilation failure when using mouse emulation mode 2020-03-19 02:46:25 +01:00
Sebastian Krzyszkowiak
21f7424f89
character: Take ownership of frame bitmaps when preloading streamed spritesheets
Since a non-owned frame is valid only until the next invocation of
stream callback, we need to clone it and take ownership.
2020-03-19 02:45:22 +01:00
Sebastian Krzyszkowiak
7cb7c361f0
character: Add ability for a streamed frame bitmap to be owned by API user
In such case we won't try to free it.
2020-03-18 06:16:34 +01:00
Sebastian Krzyszkowiak
79bcc96d9b
config: Use localStorage on Emscripten 2020-03-13 03:21:26 +01:00
Sebastian Krzyszkowiak
58f97730db
config: Add DeleteConfigOption function 2020-03-13 03:21:10 +01:00
Sebastian Krzyszkowiak
e57db1d127
Update 3rdparty submodules 2020-03-09 04:07:47 +01:00
Sebastian Krzyszkowiak
d753279764
emscripten-pre-js: remove autoplay workaround
It didn't work with recent emscripten versions anyway. A better fix
is coming to emscripten's SDL port.
2020-03-02 03:23:01 +01:00
Sebastian Krzyszkowiak
4fe091d93c
particle: explicitly cast RAND_MAX to float
This silences a warning in clang-11
2020-03-01 23:45:42 +01:00
Sebastian Krzyszkowiak
b592a3382f
character: use calloc instead of malloc 2020-01-16 03:02:44 +01:00
Sebastian Krzyszkowiak
11c49a786d
character: fix unset scale when using RegisterSpritesheetFromBitmap 2020-01-16 03:01:58 +01:00
Sebastian Krzyszkowiak
cddb35dd95
emscripten: enable GNU extensions
They're needed for some features like EM_ASM
2019-12-10 03:21:22 +01:00
Sebastian Krzyszkowiak
2adbb131e6
emscripten-audio-stream: resume stream from correct position after pausing 2019-12-09 02:50:59 +01:00
Sebastian Krzyszkowiak
4a0e7a77cc
emscripten: enable -Oz size optimization in release modes 2019-12-09 02:03:06 +01:00
Sebastian Krzyszkowiak
7d816e28ef
emscripten: fix fullscreen with fixed_size param 2019-12-09 02:02:50 +01:00
Sebastian Krzyszkowiak
34bcf97375
params: add fixed_size property 2019-12-08 09:24:38 +01:00
Sebastian Krzyszkowiak
1d8fb9f2f3
move showconsole variable to public struct 2019-12-08 09:23:56 +01:00
Sebastian Krzyszkowiak
9ce1957968
cmake: emscripten: add "--use-preload-cache --lz4" to compiler params 2019-12-07 03:13:09 +01:00
Sebastian Krzyszkowiak
e6888ab049
gamestates: create/destroy framebuffers on start/stop
Games with lots of gamestates suffered due to lots of empty framebuffers
being allocated, making window resize awfully slow and pointlessly eating
plenty of RAM.
2019-12-05 09:27:06 +01:00
Sebastian Krzyszkowiak
3dd72ec389
gamestate: fix incorrect guard condition in PauseAllGamestates 2019-12-03 03:35:44 +01:00
Sebastian Krzyszkowiak
c74fbc2be8
character: store image scale as spritesheet property
This allows streamed spritesheets to not be mistakenly rescaled.
2019-11-18 12:56:46 +01:00
Sebastian Krzyszkowiak
5981486764
mainloop: cosmetic change to silence clang-tidy 2019-11-18 12:46:57 +01:00
Sebastian Krzyszkowiak
9ec64c46b3
character: introduce streamed spritesheets
Streamed spritesheets can be generated on-the-go and don't need to be
loaded from any file (or loading can be handled manually). Streamed
spritesheet can also be "preloaded", that is - converted to regular
spritesheet by preemptively reading the stream and storing the results.
2019-11-18 12:04:23 +01:00
Sebastian Krzyszkowiak
332c668717
character: don't call character callback indefinitely after animation finishes
This could happen when the repeats counter went down to 0 with
no successor - the callback would then be called every frame.
2019-11-18 09:47:13 +01:00
Sebastian Krzyszkowiak
08a3c24c56
mainloop: call al_convert_memory_bitmaps after gamestate loading
This handles a case where "progress" function hasn't been called
by the gamestate at all.
2019-11-18 09:41:43 +01:00
Sebastian Krzyszkowiak
e9d645ecee
test: fix compiler warnings about missing return value checks 2019-11-12 01:25:49 +01:00
Sebastian Krzyszkowiak
0062dbac3b
defines.h: define LIBSUPERDERPY_GAME_VERSION 2019-11-11 23:36:55 +01:00
Sebastian Krzyszkowiak
a0dabfdeec
cmake: unix: install man page if it exists 2019-11-11 22:42:04 +01:00
Sebastian Krzyszkowiak
3c0f104add
TestDataFilePath: handle /usr/share/games/ data path
This makes it work with proper Debian packages.
2019-11-11 21:24:43 +01:00
Sebastian Krzyszkowiak
5c9ebfdbdd
cmake: make bin, lib and share directories configurable 2019-11-11 21:23:43 +01:00
Sebastian Krzyszkowiak
ae2c483111
Update embedded allegro copy 2019-11-11 21:23:03 +01:00
Sebastian Krzyszkowiak
63d1ae8bf7
init: add --fullscreen and --windowed command line options 2019-10-17 03:51:11 +02:00
Sebastian Krzyszkowiak
1ff0d6ddac
emscripten: compensate canvas size for device pixel ratio 2019-10-17 03:50:48 +02:00
Sebastian Krzyszkowiak
a112e5de0d
cmake: set BINARYEN_TRAP_MODE=clamp for wasm
It's necessary to avoid random breakage due to llvm optimizations.
2019-10-07 00:01:18 +02:00
Sebastian Krzyszkowiak
11267cd3b1
character: fix stopping of non-repeating reversed spritesheets 2019-10-06 08:06:53 +02:00
Sebastian Krzyszkowiak
1d6dc5e0d0
test: add tests for characters 2019-10-06 08:06:52 +02:00
Sebastian Krzyszkowiak
b8d44792f1
cmake: support memory sanitizer 2019-10-06 08:06:40 +02:00
Sebastian Krzyszkowiak
356cb6c2e8
cmake: specify LIBSUPERDERPY_EMBEDDED_ALLEGRO as an option 2019-10-06 08:01:08 +02:00
Sebastian Krzyszkowiak
861850aafb
cmake: set _POSIX_C_SOURCE instead of _XOPEN_SOURCE
On Maemo we set _GNU_SOURCE instead because of its old glibc.
2019-10-06 08:00:32 +02:00