Commit graph

162 commits

Author SHA1 Message Date
Sebastian Krzyszkowiak
312ff915f6
Fix warnings reported by clang-tidy 2020-04-25 19:28:47 +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
5476be3631
libsuperderpy: Fix compilation failure when using mouse emulation mode 2020-03-19 02:46:25 +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
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
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
b5b938ef28
init: list connected joystick data in debug output 2019-07-25 03:26:08 +02:00
Sebastian Krzyszkowiak
5a437a27bf
fix missing loading screens with static gamestates 2019-06-07 21:35:16 +02:00
Sebastian Krzyszkowiak
63e5210796
use 44100 sample rate by default and make the default configurable by the game 2019-06-07 20:37:57 +02:00
Sebastian Krzyszkowiak
c6ef4a6199
support static linking the whole game into one binary 2019-05-17 02:31:17 +02:00
Sebastian Krzyszkowiak
3b3253ab6f
move freeing the gamestate's name outside of CloseGamestate
...and fixup the last commit
2019-05-11 00:44:45 +02:00
Sebastian Krzyszkowiak
6e8670bf12
fix a memory leak happening when there's no loading gamestate registered 2019-05-11 00:05:40 +02:00
Sebastian Krzyszkowiak
2b3a2e3d72
fix a potential division by zero in GetDefaultWindow(Width|Height) 2019-05-10 23:42:35 +02:00
Sebastian Krzyszkowiak
ddfe7cc50a
properly unset default mixer on engine destroy
fixes a segfault/broken assertion that could happen right before quiting
2019-04-22 01:34:53 +02:00
Sebastian Krzyszkowiak
d93e1a1aca
imgui: scale the whole UI by factor from configuration 2019-04-07 23:26:54 +02:00
Sebastian Krzyszkowiak
9706f61116
don't abort when there's no loading screen available 2019-03-30 03:34:55 +01:00
Sebastian Krzyszkowiak
44bee57f55
fix an endless loop on platforms where "char" is unsigned by default 2019-03-30 00:26:21 +01:00
Sebastian Krzyszkowiak
deb38e778c
don't fail on missing icon file 2019-03-29 20:54:14 +01:00
Sebastian Krzyszkowiak
993e9884e6
adjust to clang-tidy 8.0 2019-03-29 03:24:36 +01:00
Sebastian Krzyszkowiak
d54b311a3c
fix a case where SetupViewport wasn't called when it should after a display resize 2019-03-28 16:58:15 +01:00
Sebastian Krzyszkowiak
a309b8cb2b
support a command line switch "--debug" (or "-d") to enable debug mode 2019-03-28 15:33:21 +01:00
Sebastian Krzyszkowiak
6d7007b39e
don't rely on the game name string pointer to be valid for a whole lifetime 2019-03-28 15:25:37 +01:00
Sebastian Krzyszkowiak
52e128ed28
make sure to clear the screen completely on initial flips 2019-03-12 15:16:50 +01:00
Sebastian Krzyszkowiak
f375b6f0b1
use 48kHz as a default audio sample rate 2019-03-05 03:48:39 +01:00
Sebastian Krzyszkowiak
5a6e212de1
make sure to redraw the gamestates after a resize
Also affects compositor toggling
2019-03-05 03:48:11 +01:00
Sebastian Krzyszkowiak
ae9cf19778
utils: Push/PopTransform functions for easier transforming 2019-02-26 18:14:19 +01:00
Sebastian Krzyszkowiak
d05e683171
add a hack for window size correction at launch 2019-02-24 04:20:36 +01:00
Sebastian Krzyszkowiak
c80a3c5717
report Allegro version and better format the OpenGL version 2019-02-23 13:36:27 +01:00
Sebastian Krzyszkowiak
0ba9c7bbae
move first al_flip_display() way earlier 2019-02-13 23:00:33 +01:00
Sebastian Krzyszkowiak
d9dd73bfc8
make sure shaders are loaded in-between Load and PostLoad calls + call PostLoad for loading 2019-02-13 22:59:11 +01:00
Sebastian Krzyszkowiak
886034e596
use ALLEGRO_NO_PRESERVE_TEXTURE on SDL2
seems there's no reason not to; it even fixes some stuff
2019-02-13 22:54:49 +01:00
Sebastian Krzyszkowiak
26a32fd083
destroy and recreate voice on suspend and resume 2019-02-07 04:11:40 +01:00
Sebastian Krzyszkowiak
10164293ba
add ability to enable multisampling via init params 2019-02-01 03:37:15 +01:00
Sebastian Krzyszkowiak
6211dcbf57
precache glyphs in fonts 2019-01-13 18:19:44 +01:00
Sebastian Krzyszkowiak
9006427278
clean up a duplicated framebuffer of the loading gamestate 2019-01-11 12:28:08 +01:00
Sebastian Krzyszkowiak
0d32d00890
emscripten: detach/attach the voice during loading
Should prevent audio artifacts when the browser is busy...

...when Emscripten gets it fixed, that is :P
2019-01-11 02:33:17 +01:00
Sebastian Krzyszkowiak
f07b075052
emscripten: install a callback for visibility changes
Fixes an issue where focus blur event was being dispatched only after
the game has been focused again.
2019-01-08 04:57:30 +01:00
Sebastian Krzyszkowiak
2ad77b071f
move autopause feature out of debug events 2019-01-08 04:54:53 +01:00
Sebastian Krzyszkowiak
d0316cd789
don't use timer for ticking; rely on delta instead
Timer was causing an infinite loop in cases where ticking took
more time than 1/60 sec.
2019-01-08 04:53:13 +01:00
Sebastian Krzyszkowiak
f648d661e6
emscripten: set ALLEGRO_NO_PRESERVE_TEXTURE
Doesn't seem to break anything there despite of using SDL2 backend.
2019-01-07 00:40:01 +01:00
Sebastian Krzyszkowiak
5fb99a97f8
emscripten: revise compiler settings and add a pre-js file with audio autoplay workaround 2019-01-07 00:37:34 +01:00
Sebastian Krzyszkowiak
f357d75591
emscripten: use emterpreter for displaying loading screen 2019-01-03 23:22:26 +01:00
Sebastian Krzyszkowiak
dbd047c64e
emscripten: force fullscreen as off on init 2018-12-22 02:21:46 +01:00
Sebastian Krzyszkowiak
cb0f4f6ba7
audio: always try INT16 depth first and use FLOAT32 as a fallback 2018-12-18 20:32:09 +01:00
Sebastian Krzyszkowiak
1b9b16cf15
more member name cleanup 2018-12-18 14:29:48 +01:00
Sebastian Krzyszkowiak
4da588cbb2
API consistency tweaks 2018-12-16 15:35:53 +01:00
Sebastian Krzyszkowiak
df1790d242
doxygen tweaks 2018-12-16 15:15:38 +01:00