Commit graph

1062 commits

Author SHA1 Message Date
Sebastian Krzyszkowiak
92d9f1c1bf
cmake: Rework LTO support under emscripten 2020-05-10 18:06:58 +02:00
Sebastian Krzyszkowiak
6b6566d7e4
emscripten: Fix and re-enable dead code elimination by default 2020-05-10 16:57:38 +02:00
Sebastian Krzyszkowiak
bf73da41e6
Update README 2020-05-10 16:55:58 +02:00
Sebastian Krzyszkowiak
6c56bb36b9
emscripten: Destroy and recreate audio voice when in loading routines
This prevents awful audio stuttering in Blink based browsers.
2020-05-10 03:01:33 +02:00
Sebastian Krzyszkowiak
e4925f2ecb
cmake: emscripten: Remove --lz4 option
It doesn't do anything anyway - it should be -s LZ4=1. However, enabling
lz4 compression breaks preload plugins, which we rely on for asynchronous
WebAssembly compilation of gamestate modules.
2020-05-09 04:37:46 +02:00
Sebastian Krzyszkowiak
c78fead9c5
cmake: emscripten: Enable LTO across modules
Appears to work fine from initial testing.
2020-05-09 03:59:13 +02:00
Sebastian Krzyszkowiak
f45abe337c
cmake: emscripten: Pass --emit-symbol-map to the compiler 2020-05-09 03:57:55 +02:00
Sebastian Krzyszkowiak
d71f892140
cmake: emscripten: Use -O3 instead of -Oz in release builds
Oz can cause performance hits, and the size savings aren't that big in our
case to be worth it.
2020-05-09 03:57:18 +02:00
Sebastian Krzyszkowiak
50c8049c13
cmake: emscripten: Enable assertions in debug builds 2020-05-09 03:56:26 +02:00
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