Commit graph

730 commits

Author SHA1 Message Date
Sebastian Krzyszkowiak
f215bc0c83 mute audio by setting main mixer gain to 0.0
using al_set_mixer_playing causes high CPU usage for some reason
2018-07-26 16:19:32 +02:00
Sebastian Krzyszkowiak
7c92d1e05e add global audio mute config option 2018-07-26 15:33:02 +02:00
Sebastian Krzyszkowiak
6587d14530 don't pause/resume gamestates on execution pause that aren't started 2018-07-21 14:07:58 +02:00
Sebastian Krzyszkowiak
1c2e27f2b7 fix potential crash shown by clang-tidy warning 2018-07-19 01:39:53 +02:00
Sebastian Krzyszkowiak
31f6b8454d don't live-reload gamestates that don't come from dynamic libraries 2018-07-18 19:58:34 +02:00
Sebastian Krzyszkowiak
f4ca431238 gmaestate: automatically load unloaded gamestate when trying to start it 2018-07-18 19:50:35 +02:00
Sebastian Krzyszkowiak
91a3bd1efa call Gamestate_Pause and Gamestate_Resume on window focus change in debug mode (autoreload) 2018-07-18 19:47:56 +02:00
Sebastian Krzyszkowiak
3b2a675d23 don't Reload gamestates that aren't loaded 2018-07-18 19:46:59 +02:00
Sebastian Krzyszkowiak
fb7089b001 maths: restore DotProduct function missing after e5cf17a1a6 2018-07-18 01:57:31 +02:00
Sebastian Krzyszkowiak
98eaf73f8c utils: add PunchNumber utility 2018-07-18 01:49:19 +02:00
Sebastian Krzyszkowiak
6061b8d1bb tween: swap around style and duration arguments in Tween constructor 2018-07-18 01:40:23 +02:00
Sebastian Krzyszkowiak
fc404465d4 internal: rework console drawing code for better bounding rect handling
Also fixes broken timeline debug view when scaling.
2018-07-18 01:23:02 +02:00
Sebastian Krzyszkowiak
52da2d53e4 utils: move GetGameName to internal 2018-07-13 18:38:02 +02:00
Sebastian Krzyszkowiak
e5cf17a1a6 utils: add Fract util function and move math utils to separate unit 2018-07-12 20:18:23 +02:00
Sebastian Krzyszkowiak
d6f6f32e00 include math.h header in libsuperderpy.h 2018-07-12 00:03:00 +02:00
Sebastian Krzyszkowiak
7a5c2f9ed3 loading: stop time in loading when converting memory bitmaps
Avoids annoying framedrops, just stops the animation for a while instead.
2018-07-06 23:29:16 +02:00
Sebastian Krzyszkowiak
dba2ef80da add correct file extension for wasm gamestates 2018-07-06 23:17:09 +02:00
Sebastian Krzyszkowiak
ce76a53939 fix compilation on emscripten 2018-07-06 03:55:32 +02:00
Sebastian Krzyszkowiak
ab17bd8050 timeline: add TM_AddActionAfter 2018-07-05 22:31:18 +02:00
Sebastian Krzyszkowiak
c4ceb188f5 gamestate: move loading time counter to main thread to include PostLoad 2018-07-05 20:59:54 +02:00
Sebastian Krzyszkowiak
521e6bf431 gamestate: add optional PostLoad hook for stuff that needs to be done on GPU thread 2018-07-05 20:55:32 +02:00
Sebastian Krzyszkowiak
a314ad2d6d don't reload shaders multiple times when loading multiple gamestates 2018-07-05 20:47:30 +02:00
Sebastian Krzyszkowiak
e293047aba gamestate: make some API endpoints optional 2018-07-05 20:42:51 +02:00
Sebastian Krzyszkowiak
125ff97fba loading: show loading time and warn if ProgressCount isn't right 2018-07-05 19:39:11 +02:00
Sebastian Krzyszkowiak
49628de381 LoadSpritesheets: call progress function after each spritesheet 2018-07-05 19:38:31 +02:00
Sebastian Krzyszkowiak
ab8dc0f143 character: fix predecessor memory leak 2018-07-05 16:57:03 +02:00
Sebastian Krzyszkowiak
ce965a2643 character: add ability to set character destructor to free custom data 2018-07-05 16:43:13 +02:00
Sebastian Krzyszkowiak
96ab7a12ce use ALLEGRO_FRAMELESS for fullscreen windows only on Android
It will be needed for immersive mode, while it can break
fullscreen toggling on other platforms.
2018-07-05 03:28:32 +02:00
Sebastian Krzyszkowiak
2d905ce3c0 update the timestamp after Gamestate_Start to prevent high delta jump 2018-07-05 02:33:59 +02:00
Sebastian Krzyszkowiak
d512b31889 shader: downgrade GLSL to 1.20 because of macOS 2018-07-05 02:32:58 +02:00
Sebastian Krzyszkowiak
3a04729fb6 shader: automatically prepend #version line
GL: "#version 130" (3.0)
GLES: "#version 100" (2.0)
2018-07-05 01:05:50 +02:00
Sebastian Krzyszkowiak
5888cd2575 FatalError, PrintConsole: properly mark format argument as such
Thanks to that static analysis can catch nonliteral format errors.
2018-07-05 01:04:54 +02:00
Sebastian Krzyszkowiak
dcf1375e6f LoadSpritesheets: decrease the verboseness of logs in non-debug mode 2018-07-05 01:03:45 +02:00
Sebastian Krzyszkowiak
a29c7b4d2c fix clang-tidy issues 2018-07-04 19:08:39 +02:00
Sebastian Krzyszkowiak
4d5fdcffbb character: add more logging on spritesheet loading 2018-07-04 06:55:48 +02:00
Sebastian Krzyszkowiak
88ea60dd7b add missing symbol exports for ShowCharacter and HideCharacter
Fixes MinGW
2018-07-04 06:55:12 +02:00
Sebastian Krzyszkowiak
c2f6aa73cd utils: add Sign function 2018-07-03 04:22:30 +02:00
Sebastian Krzyszkowiak
7b93ced844 it's libsuperderpy 2 now 2018-07-03 04:22:12 +02:00
Sebastian Krzyszkowiak
23ffcae034 better handling of joystick, mouse and font initialization failures
Now libsuperderpy works on FreeBSD \o/
2018-07-03 00:41:57 +02:00
Sebastian Krzyszkowiak
4b4e6cc023 timeline: capitalise TM_ACTION macro to prevent confusion with function declaration 2018-06-30 16:37:43 +02:00
Sebastian Krzyszkowiak
c7fac39b79 timeline: use macros to get action name by default 2018-06-30 02:52:06 +02:00
Sebastian Krzyszkowiak
d5faec85ac mark loading.inProgress variable as volatile to prevent optimization bugs in threaded loading 2018-06-30 02:35:32 +02:00
Sebastian Krzyszkowiak
93859232d9 Fix GCC warnings 2018-06-30 01:50:29 +02:00
Sebastian Krzyszkowiak
4cf74ec0f3 timeline: delta eating
Untested. Great reason to write unit tests :)
2018-06-30 01:27:28 +02:00
Sebastian Krzyszkowiak
993a6fd2e7 Add more PrintConsoles around gamestate handling. 2018-06-30 00:59:54 +02:00
Sebastian Krzyszkowiak
40bda569b9 timeline: rework API to better handle common use cases 2018-06-30 00:50:55 +02:00
Sebastian Krzyszkowiak
b9774052eb timeline: add TM_RunningOnly convienence macro 2018-06-29 23:00:58 +02:00
Sebastian Krzyszkowiak
a4a1c356df timeline: don't use ALLEGRO_TIMERs anymore, rely on delta time instead 2018-06-29 23:00:13 +02:00
Sebastian Krzyszkowiak
b5d2b4a032 fix timeline debug mode 2018-06-28 04:38:33 +02:00
Sebastian Krzyszkowiak
ce131e50a0 character: fix switched names in CharacterCallback macro 2018-06-28 04:25:56 +02:00
Sebastian Krzyszkowiak
40df27640c character: add CharacterCallback macro for defininig animation callbacks 2018-06-27 19:30:35 +02:00
Sebastian Krzyszkowiak
12faed0921 timeline: add TM_Action macro for defining action callbacks 2018-06-27 19:30:18 +02:00
Sebastian Krzyszkowiak
1c66f219d8 timeline: expose the delta value to actions 2018-06-27 19:00:48 +02:00
Sebastian Krzyszkowiak
016c482154 convert bitmaps to video textures on every progress() when loading gamestate in threaded mode 2018-06-23 04:44:36 +02:00
Sebastian Krzyszkowiak
81488f9390 character: rework IsOnCharacter to work properly regardless of pivot, rotation and scale 2018-06-04 19:10:29 +02:00
Sebastian Krzyszkowiak
291e4c73d6 use al_reset_clipping_rectangle for clarity 2018-06-03 03:39:28 +02:00
Sebastian Krzyszkowiak
897aa8b52f character: honor x/y values from frames when calculating animation size 2018-06-03 03:39:11 +02:00
Sebastian Krzyszkowiak
71ec8b396e shader: auto rebuild and auto destroy shaders 2018-05-31 20:52:16 +02:00
Sebastian Krzyszkowiak
5fe62da08f tween: add SYMBOL_EXPORT macros 2018-05-31 20:51:44 +02:00
Sebastian Krzyszkowiak
9182cabf79 Add abstraction for GPU shaders 2018-05-30 21:11:46 +02:00
Sebastian Krzyszkowiak
52883755f1 timeline: initial API change for handling time delta 2018-05-30 03:10:03 +02:00
Sebastian Krzyszkowiak
b0d2c59596 add SwitchSpritesheet 2018-04-26 14:34:00 +02:00
Sebastian Krzyszkowiak
396e07a0ce DrawCenteredTintedScaled 2018-04-24 22:06:06 +02:00
Sebastian Krzyszkowiak
34a36c2038 DrawCenteredScaled 2018-04-24 05:01:59 +02:00
Sebastian Krzyszkowiak
80f59dd749 tween: add function to just interpolate the value, without using Tween object 2018-04-23 03:24:13 +02:00
Sebastian Krzyszkowiak
0f14629a15 Introducing the tweening engine. 2018-04-22 05:30:56 +02:00
Sebastian Krzyszkowiak
01ae741558 loading: call Gamestate_Logic in single thread mode as well 2018-04-21 01:08:39 +02:00
Sebastian Krzyszkowiak
a9c318dd78 loading: call Gamestate_Logic 2018-04-21 00:11:34 +02:00
Sebastian Krzyszkowiak
0af3d8b1d0 ResumeExecution: guard against open/link failure on live reload 2018-04-18 23:14:05 +02:00
Sebastian Krzyszkowiak
08d2e544b7 character: read width/height values from ini file 2018-04-18 23:13:31 +02:00
Sebastian Krzyszkowiak
3938a78503 live reloading 2018-04-16 01:06:58 +02:00
Sebastian Krzyszkowiak
60b960ab2c character: use Spritesheet structs instead of strings with names in callbacks 2018-04-15 23:00:53 +02:00
Sebastian Krzyszkowiak
c77c91e570 character: add GetSpritesheet for getting struct by name 2018-04-15 23:00:17 +02:00
Sebastian Krzyszkowiak
c9efd7afe2 character: don't animate hidden characters 2018-04-15 22:59:42 +02:00
Sebastian Krzyszkowiak
c3adf398b1 character: support non-repeating animations (stopping at the last frame) 2018-04-13 03:00:54 +02:00
Sebastian Krzyszkowiak
4240b47380 DestroyCharacter: print to console when the destroyed character is shared 2018-04-10 14:05:03 +02:00
Sebastian Krzyszkowiak
d017956442 IsOnCharacter: support flipped characters 2018-04-10 05:18:29 +02:00
Sebastian Krzyszkowiak
88b4399cae character: fix character placement and flipping when drawing 2018-04-08 01:35:31 +02:00
Sebastian Krzyszkowiak
a8b57934db Fix the unfamous Fajer crashing issue 2018-04-08 01:34:43 +02:00
Sebastian Krzyszkowiak
d4b2e1c65a utils: rename Clip to Clamp, add Wrap 2018-04-08 01:34:26 +02:00
Sebastian Krzyszkowiak
7f420f62ad Fixes for spritesheet handling 2018-04-08 01:34:06 +02:00
Sebastian Krzyszkowiak
adb15a9caf libsuperderpy: init video addon 2018-04-08 01:33:13 +02:00
Sebastian Krzyszkowiak
df536baa32 character: save transform to character struct for easier handling by auxiliary helpers 2018-03-21 02:15:34 +01:00
Sebastian Krzyszkowiak
d88162cab4 spritesheets: support for predecessors and reversed animations 2018-03-21 02:05:22 +01:00
Sebastian Krzyszkowiak
f097ddc54a display frame duration along with the fps counter 2018-03-20 23:49:22 +01:00
Sebastian Krzyszkowiak
b31d093e8c New spritesheets 2018-03-20 21:39:37 +01:00
Sebastian Krzyszkowiak
e58fbdb560 Add a few utils from Rumina 2018-03-20 21:38:50 +01:00
Sebastian Krzyszkowiak
8d0df727cb fix gameplay speed 2018-03-20 21:38:34 +01:00
Sebastian Krzyszkowiak
c85381644c rumina hacks 3 2018-03-15 00:46:52 +01:00
Sebastian Krzyszkowiak
aa1f7f3ab9 General Characters refactor 2018-03-15 00:42:24 +01:00
Sebastian Krzyszkowiak
f0417b09f6 rumina hacks 2 2018-03-15 00:42:24 +01:00
Sebastian Krzyszkowiak
ae70770f77 rumina hacks 2018-03-15 00:42:24 +01:00
Sebastian Krzyszkowiak
686dab729a Remove ALLEGRO_RENDER_METHOD sanity check
See liballeg/allegro5#887
2018-03-03 20:50:50 +01:00
Sebastian Krzyszkowiak
bb9bb692fe config: fix compilation on MinGW 2018-03-03 20:31:44 +01:00
Sebastian Krzyszkowiak
1ac8491396 DrawConsole: use deferred bitmap drawing to speed up text rendering 2018-02-03 03:54:01 +01:00
Sebastian Krzyszkowiak
fc37ec592e Add bunch of debug output on launch 2018-02-03 03:53:52 +01:00
Sebastian Krzyszkowiak
52fbb86d2f Add pre/post logic/draw handlers 2018-02-03 03:39:30 +01:00
Sebastian Krzyszkowiak
c6b71f1686 Add delta parameter to Gamestate_Logic calls 2018-02-03 03:37:44 +01:00
Sebastian Krzyszkowiak
749bb1ef50 character: add ability to set the size of the confines
Useful when the size of the canvas being drawn to is different
than the size of the viewport (default confine).
2018-02-03 03:17:36 +01:00
Sebastian Krzyszkowiak
cb4b9638c8 utils: add missing new lines to debug/error output 2018-01-21 03:18:51 +01:00
Sebastian Krzyszkowiak
0cfef4ddca BSOD: fix placement of the second-last line 2018-01-20 02:51:37 +01:00
Sebastian Krzyszkowiak
e2d9d21f3f BSOD: fix formatting and warnings 2018-01-20 02:45:06 +01:00
Sebastian Krzyszkowiak
18efca478e FatalError: print the error message to stderr
Printing to console outputs it to stdout, but only if
debug mode is enabled. stderr seems better suited too.
2018-01-20 02:24:33 +01:00
suve
2848753083 Use left-align for the wrapped error messages 2017-12-17 15:00:02 +01:00
suve
af53d1378f Wrap long messages in FatalError() 2017-12-17 14:58:03 +01:00
suve
705f84cbf1 Reduce code redundancy in FatalError() 2017-12-17 14:19:24 +01:00
Sebastian Krzyszkowiak
499e884a62 commit Fajer's legacy, so it won't be forgotten 2017-10-30 21:22:49 +01:00
Sebastian Krzyszkowiak
a4ec09d9cd updated .gitignore, code-cosmetics 2017-10-30 21:17:47 +01:00
Sebastian Krzyszkowiak
977a03db1e future-proof Android support by using ALLEGRO_FRAMELESS when fullscreen 2017-10-12 21:04:18 +02:00
Sebastian Krzyszkowiak
56ea82d526 GetDataFilePath: change order of lookup paths and remove "../data" 2017-09-20 18:13:49 +02:00
Sebastian Krzyszkowiak
a3cda7ba50 try to search for gamestates in directory with binary before resorting to LD_LIBRARY_PATHs 2017-09-20 18:11:29 +02:00
Sebastian Krzyszkowiak
c34c13739d add SetCharacterPivotPoint function 2017-09-15 23:44:44 +02:00
Sebastian Krzyszkowiak
ca33fd7752 make usage of clang-tidy configurable 2017-09-10 22:53:41 +02:00
Sebastian Krzyszkowiak
8cfde8c55f SUPPRESS_WARNING macro 2017-09-10 22:37:02 +02:00
Sebastian Krzyszkowiak
bf4aa069a4 don't use empty initializers (it's a GNU extension) 2017-09-10 22:07:02 +02:00
Sebastian Krzyszkowiak
2b1248ce14 clang-tidy support; clang-tidy and clang-format fixes 2017-09-10 21:35:14 +02:00
Sebastian Krzyszkowiak
0a4580a762 Android: honor tilde button for console toggling (you can attach a keyboard to Android device) 2017-09-09 02:46:07 +02:00
Sebastian Krzyszkowiak
a906b14e08 threaded screenshoting (now with gamestates redraw!) 2017-09-09 00:42:57 +02:00
Sebastian Krzyszkowiak
450e33b2e3 support of loading in separate thread; thread-safe console; various fixes from clang code model warnings 2017-09-09 00:11:43 +02:00
Sebastian Krzyszkowiak
4a2e2a3d25 try to create INT16 voice if FLOAT32 one fails
Seems to be some bug in Allegro, as it fails on OS X.
2017-09-05 03:01:18 +02:00
Sebastian Krzyszkowiak
f94930b5d5 PrintConsole: restore previous target bitmap instead of reseting to backbuffer 2017-09-04 16:02:49 +02:00
Sebastian Krzyszkowiak
9a6cbd2449 implement audio stream seeking in emscripten 2017-08-24 21:40:34 +02:00
Sebastian Krzyszkowiak
3581c6060c full emscripten support, plus flac->ogg encoding for emscripten and android 2017-08-24 21:09:07 +02:00
Sebastian Krzyszkowiak
a955820e8f emscripten support 2017-08-24 00:51:58 +02:00
Sebastian Krzyszkowiak
07d4c22199 init: call al_install_audio before al_init_acodec_addon 2017-08-19 01:27:34 +02:00
Sebastian Krzyszkowiak
b7346ea330 use leak sanitizer for debug build and break the build in case of unresolved symbols in libraries 2017-08-19 01:26:53 +02:00
Sebastian Krzyszkowiak
417d34ef1a fix stuff reported by static analyzer 2017-08-16 01:47:07 +02:00
Sebastian Krzyszkowiak
7ab739db54 config: fix config file handling when custom file interface is in effect 2017-08-15 01:41:24 +02:00
Sebastian Krzyszkowiak
b4b0403a77 GetDataFilePath: add ability to mask data files with android specific versions 2017-08-08 00:16:03 +02:00
Sebastian Krzyszkowiak
d8b7e0ec6b fix timeline removal and debug draw scaling on scaled viewports 2017-08-07 15:59:12 +02:00
Sebastian Krzyszkowiak
3fe7df2982 timeline: make debug draw optional and automatic 2017-08-07 02:26:36 +02:00
Sebastian Krzyszkowiak
b6eb181f1d timeline: fix TM_DrawDebug scaling 2017-08-07 02:01:15 +02:00
Sebastian Krzyszkowiak
4652efd6a9 timeline: update queues during cleaning
...so destructors can safely do stuff like TM_AddAction
(unless they make an infinite loop with that :P)
2017-08-07 01:52:42 +02:00
Sebastian Krzyszkowiak
505de9086d fix whitespace style 2017-07-22 21:01:29 +02:00
Sebastian Krzyszkowiak
e9bd4eefa5 update license to GPLv3+ 2017-07-22 18:22:28 +02:00
Sebastian Krzyszkowiak
519a22c9ad link to allegro5-video 2017-06-26 15:21:13 +02:00
Sebastian Krzyszkowiak
2dbabc502b always require OpenGL context 2017-06-26 03:19:32 +02:00
Sebastian Krzyszkowiak
de7311dabf fixed screen orientation support 2017-06-26 03:18:54 +02:00
Sebastian Krzyszkowiak
c97e163b31 don't require debug mode to be enabled in order to make a screenshot 2017-06-25 17:37:41 +02:00
Sebastian Krzyszkowiak
7241476886 use NotPreservedBitmap for game console 2017-06-13 14:21:17 +02:00
Sebastian Krzyszkowiak
d3f876097f add CreateNotPreservedBitmap helper 2017-06-13 14:21:17 +02:00
Sebastian Krzyszkowiak
e0c422972b add TM_DrawDebug: debug view for timelines 2017-03-16 22:05:22 +01:00
Sebastian Krzyszkowiak
e873e96194 fix compiler warning 2017-03-07 01:00:27 +01:00
Sebastian Krzyszkowiak
31f173f2a8 character: add support for repeating animation with successor
plus update README
2017-03-04 19:54:48 +01:00
Sebastian Krzyszkowiak
ca2f26e9ff add DrawScaledCharacter(F) 2016-12-06 02:54:31 +01:00
Sebastian Krzyszkowiak
bd57582b01 enable joystick support 2016-12-05 23:56:41 +01:00
Sebastian Krzyszkowiak
098231269c call Gamestate_Pause/Resume also on freezing 2016-11-11 20:17:02 +01:00
Sebastian Krzyszkowiak
fdd48433bc gamestate reloading and fix for calling Gamestate_Pause/Gamestate_Resume 2016-11-11 19:38:26 +01:00
Sebastian Krzyszkowiak
4b53b59e05 proper gamestate freezing on suspending android activity 2016-11-09 00:40:13 +01:00
Sebastian Krzyszkowiak
4ecb7e71de revamp letterbox and scaling code and add WindowCoordsToViewport util function 2016-11-08 23:28:28 +01:00
Sebastian Krzyszkowiak
625f202156 add ability to define game-specific global event handler 2016-11-08 22:11:10 +01:00
Sebastian Krzyszkowiak
a4ce032c8b don't crash on devices with no touchscreen 2016-11-08 17:56:19 +01:00
Sebastian Krzyszkowiak
6ac268f50b Revert "don't call al_get_touch_input_event_source on OSX, seems buggy"
This reverts commit d65873d63b.
2016-11-08 17:43:10 +01:00
Sebastian Krzyszkowiak
4d749b3ad1 make screen rotation working on Android
libsuperderpy now requires Allegro 5.2.2 for Android
2016-11-08 17:42:23 +01:00
Sebastian Krzyszkowiak
d65873d63b don't call al_get_touch_input_event_source on OSX, seems buggy 2016-11-08 11:17:27 +01:00
Sebastian Krzyszkowiak
51590d9788 fix blinking borders outside clipping rectangle 2016-11-08 10:34:32 +01:00
Sebastian Krzyszkowiak
c3fb2e06f1 more robust Android support 2016-11-07 01:45:12 +01:00
Sebastian Krzyszkowiak
4c09151dae basic Android support 2016-11-06 03:10:43 +01:00
Sebastian Krzyszkowiak
ce4b474b5a fix aspect ratio letterboxing on automatic resolution 2016-10-21 12:49:24 +02:00
Sebastian Krzyszkowiak
fc9317d215 add DrawWrappedTextWithShadow 2016-09-08 01:42:48 +02:00
Sebastian Krzyszkowiak
f7362d3d74 added DrawWrappedText, some clean up 2016-09-08 00:32:57 +02:00
Sebastian Krzyszkowiak
655cce6abe Timeline Manager: run next action in main queue immediatelly after the last one ended 2016-09-06 01:48:30 +02:00
Sebastian Krzyszkowiak
9c414991dd SetupViewport: clear both backbuffer and fontbuffer on setup 2016-09-06 01:47:46 +02:00
Sebastian Krzyszkowiak
9c3d284a90 fix type warning on some platforms in screenshoting code 2016-09-06 01:47:12 +02:00
Sebastian Krzyszkowiak
c7741be51a streamline al_set_new_display_flags usage 2016-09-04 21:09:19 +02:00
Sebastian Krzyszkowiak
8bebe6c5e2 timeline: add new functions: TM_IsEmpty, TM_IsBackgroundEmpty, TM_SkipDelay 2016-09-04 03:06:26 +02:00
Sebastian Krzyszkowiak
26843776a2 gamestates: mark gamestate as started before launching Gamestate_Start
This change allows to stop the current gamestate from Gamestate_Start.
2016-09-04 01:26:41 +02:00
Sebastian Krzyszkowiak
96a33c1a37 make windowed display resizable and try to fix flickering border around the viewport 2016-09-02 00:07:43 +02:00
Sebastian Krzyszkowiak
2e1a7e73fd add IsOnCharacter helper function 2016-08-29 23:44:15 +02:00
Sebastian Krzyszkowiak
40cdf33bb8 add support for user events 2016-08-29 22:47:55 +02:00
Sebastian Krzyszkowiak
b4d9d01c01 don't dlclose gamestates when running on valgrind, so it can show its report correctly 2016-08-27 00:46:38 +02:00
Sebastian Krzyszkowiak
04db328028 refine Character API
BREAKING CHANGES: character->x and character->y now refer to position relative
to screen width and height (0.0,0.0 being top left; 1.0,1.0 being bottom right).
Use GetCharacterX and GetCharacterY to get position in pixels.
For consistency, it's also recommended to use GetCharacterAngle.
SetCharacterPosition/MoveCharacter still accept pixels.
To use relative positions, call SetCharacterPositionF/MoveCharacterF instead.

Also, DrawCharacter now casts the position to integer, effectively disabling
Allegro's subpixel precision. To disable casts, use DrawCharacterF.
2016-08-26 23:52:32 +02:00
Sebastian Krzyszkowiak
af6636009e make viewport configurable 2016-08-23 02:13:15 +02:00
Sebastian Krzyszkowiak
39eeeb44fd use al_resume_timer where appropriate 2016-08-21 21:58:47 +02:00
Sebastian Krzyszkowiak
b927a0c130 add a bunch of new gamestate lifecycle methods to simplify game pausing 2016-08-21 21:58:31 +02:00
Sebastian Krzyszkowiak
97d62e4c04 make showing loading screen on launch configurable 2016-08-20 03:32:32 +02:00
Sebastian Krzyszkowiak
63451eb858 add ChangeGamestate/ChangeCurrentGamestate API for replacing gamestates without unloading 2016-08-20 03:32:09 +02:00
Sebastian Krzyszkowiak
4aad8fabac add ability to manually register gamestate API 2016-08-20 03:02:39 +02:00
Sebastian Krzyszkowiak
1afc4a3f31 don't create and destroy bitmap on every PrintConsole call 2016-08-16 23:20:00 +02:00
Sebastian Krzyszkowiak
2dfc565178 fix gamestate lifecycle management when game logic frame takes longer than 1/60s and implement SwitchCurrentGamestate 2016-08-16 18:41:50 +02:00
Sebastian Krzyszkowiak
686514fba5 fix memory leaks and other mem-bugs 2016-08-16 18:01:12 +02:00
Sebastian Krzyszkowiak
51b08cee76 move SetupViewport to utils 2016-08-15 04:41:54 +02:00
Sebastian Krzyszkowiak
6bf5fc493b garbage collector for util functions returning strings that are usually used as function params
because why not :D
2016-08-15 04:37:27 +02:00
Sebastian Krzyszkowiak
cfb5cefff1 add UnloadAllGamestates function 2016-08-13 21:35:26 +02:00
Sebastian Krzyszkowiak
676ae31613 gamestates: handle unload/load and stop/start cycles in one tick correctly 2016-08-13 20:03:58 +02:00
Sebastian Krzyszkowiak
8087ad1afc loading screen fixes 2016-08-13 18:14:42 +02:00
Sebastian Krzyszkowiak
0b49342e39 fix character.h include 2016-08-12 06:56:06 +02:00
Sebastian Krzyszkowiak
e419df49a5 request OpenGL programmable pipeline, adjust cmake includes 2016-08-11 19:32:49 +02:00
Sebastian Krzyszkowiak
a82dfb16cf fixed OSX support 2016-07-05 01:30:06 +02:00
Sebastian Krzyszkowiak
fc44fd2d5a better symbol visibility handling 2016-07-04 01:12:55 +02:00
Sebastian Krzyszkowiak
617f9c0270 reorganize source files a bit 2016-07-04 00:56:45 +02:00
Sebastian Krzyszkowiak
c964f72d66 make it buildable by clang; adjust function visibility 2016-07-04 00:06:50 +02:00
Sebastian Krzyszkowiak
ffd44df08b split libsuperderpy function to _init, _run and _destroy 2016-07-03 22:38:36 +02:00
Sebastian Krzyszkowiak
f02caf73a2 fixed MinGW support 2016-07-03 20:34:31 +02:00
Sebastian Krzyszkowiak
b8008d2872 librarization clean up 2016-07-03 00:43:32 +02:00
Sebastian Krzyszkowiak
a8475eb99b librarify! 2016-07-02 23:23:08 +02:00
Sebastian Krzyszkowiak
0a6b70f72e clean up and generalize 2016-06-28 00:17:49 +02:00
Sebastian Krzyszkowiak
2544d94156 import Mediator codebase 2016-06-27 21:21:59 +02:00
Sebastian Krzyszkowiak
2e79fe8f7b import Tickle Monster codebase 2016-06-27 21:20:36 +02:00
Sebastian Krzyszkowiak
46827594b4 import Radio Edit codebase 2016-06-27 21:20:02 +02:00
Sebastian Krzyszkowiak
e92e4b6bec dodger: obstacle speed tweaks 2016-01-23 21:31:18 +01:00
Sebastian Krzyszkowiak
ed3b78224b Remove unnecessary supersampling. 2016-01-23 20:58:16 +01:00
Sebastian Krzyszkowiak
76cf21daeb dosowisko: put transparent pixels in checkerboard 2016-01-19 00:15:42 +01:00
Sebastian Krzyszkowiak
749da9203a menu: move bg mountain logic into logic pipeline 2015-04-18 18:07:50 +02:00
Sebastian Krzyszkowiak
25dcae6151 timeline: add TM_CleanQueue and TM_CleanBackgroundQueue functions 2015-03-18 02:48:56 +01:00
Sebastian Krzyszkowiak
937981a1df no more global timeline - from now on timelines can be instantiated! 2015-03-18 02:21:57 +01:00
Sebastian Krzyszkowiak
5172db6fe3 dosowisko: lock bitmap before generating checkerboard pattern 2015-03-16 14:32:20 +01:00
Sebastian Krzyszkowiak
feef69ce03 update docs 2015-03-15 20:51:56 +01:00
Sebastian Krzyszkowiak
8e3b1dd6d9 dosowisko: don't use FadeGamestate 2015-03-15 20:45:10 +01:00
Sebastian Krzyszkowiak
98968591fc dosowisko: don't leak target bitmap on fadeout 2015-03-15 06:01:53 +01:00
Sebastian Krzyszkowiak
34f01d0336 dosowisko: different ending 2015-03-15 05:58:02 +01:00
Sebastian Krzyszkowiak
c2df1fc036 dosowisko: don't use TM to blink the cursor 2015-03-15 05:47:28 +01:00
Sebastian Krzyszkowiak
b746ecbebd dosowisko: destroy all the things 2015-03-15 05:43:39 +01:00
Sebastian Krzyszkowiak
145727658f intro: fix moving animation speed to be independent of viewport size 2015-03-15 05:38:51 +01:00
Sebastian Krzyszkowiak
e4553576ce add dosowisko.net intro logo 2015-03-15 05:38:15 +01:00
Sebastian Krzyszkowiak
b983eac305 tweaks for character positions 2013-06-06 10:08:31 +02:00
Sebastian Krzyszkowiak
f73b9abd26 make TM_AddToArgs variadic function 2013-06-05 23:59:02 +02:00
Sebastian Krzyszkowiak
001ed62181 lots of level 1 tweaks 2013-06-05 23:20:55 +02:00
Sebastian Krzyszkowiak
d0ac545e4b fix possible delay when displaying loading screen 2013-06-04 01:44:17 +02:00
Sebastian Krzyszkowiak
f0c72edfd5 make level 1 compilable... of course it doesn't work yet :D 2013-06-04 01:37:50 +02:00
Sebastian Krzyszkowiak
ced56209c1 move shared placeholder level code to separate file 2013-06-03 13:41:03 +02:00
Sebastian Krzyszkowiak
69966ada03 working all moonwalk levels, compiling dodger module (not usable yet), some small tweaks and fixes 2013-06-03 00:42:33 +02:00
Sebastian Krzyszkowiak
e85fcdf8a6 tweaks and estetics for level2/moonwalk code 2013-02-26 00:59:20 +01:00
Sebastian Krzyszkowiak
91d3bb0d59 bring back level 2 with its moonwalk 2013-02-26 00:42:26 +01:00
Sebastian Krzyszkowiak
840202f758 AdvanceLevel implementation; sprintf hardening 2013-02-25 01:39:41 +01:00
Sebastian Krzyszkowiak
3ba92508e2 giant refactoring... and giant breakage :P 2013-02-25 01:23:27 +01:00
Sebastian Krzyszkowiak
9a43132af3 unload loading screen on exit 2012-12-28 03:46:27 +01:00
Sebastian Krzyszkowiak
c8356b815b bring back loading screen 2012-12-28 03:42:59 +01:00
Sebastian Krzyszkowiak
c39fea9c98 make fonts sharper (integer positioning) 2012-12-28 03:08:36 +01:00
Sebastian Krzyszkowiak
dd29fc6f5b Blue Screen of Death 2012-12-28 02:55:52 +01:00
Sebastian Krzyszkowiak
b39ec719be bring back support for loading progress 2012-12-28 00:00:37 +01:00
Sebastian Krzyszkowiak
3d44b4abbf [Intro] restart intro properly after Stop/Start gamestate sequence 2012-12-27 21:14:37 +01:00
Sebastian Krzyszkowiak
7293ed191a bring back Menu gamestate 2012-12-27 21:05:28 +01:00
Sebastian Krzyszkowiak
08c9506aeb [Intro] better animation scaling 2012-12-27 19:38:43 +01:00
Sebastian Krzyszkowiak
00dd653a10 don't send events to gamestates that correspond to debug functions 2012-12-27 01:02:47 +01:00
Sebastian Krzyszkowiak
5d3bb2d0d7 bring back Map gamestate 2012-12-27 00:46:23 +01:00
Sebastian Krzyszkowiak
1e901cf51b bring back Intro gamestate 2012-12-26 23:48:05 +01:00
Sebastian Krzyszkowiak
632be33eaa bring back About gamestate 2012-12-26 20:02:40 +01:00
Sebastian Krzyszkowiak
91c49e927f move building gamestates to separate CMakeLists file 2012-12-26 19:00:29 +01:00
Sebastian Krzyszkowiak
725918e3b4 merge Keydown methods with ProcessEvent 2012-12-26 15:15:02 +01:00
Sebastian Krzyszkowiak
3934ca696b exit from the game when last gamestate is unloaded 2012-12-26 13:38:15 +01:00
Sebastian Krzyszkowiak
3daa3c714f pass pointer to data structure to/from gamestates functions 2012-12-26 13:24:34 +01:00
Sebastian Krzyszkowiak
232cc6a204 initial support of run-time loading gamestates as dynamic libraries 2012-12-26 02:25:56 +01:00
Sebastian Krzyszkowiak
b36c5e8ed4 basic implementation of gamestates handling 2012-12-25 00:22:03 +01:00
Sebastian Krzyszkowiak
e29382b5dc Remove everything!
Engine should be now clean from gamestate dependences.
The next thing will be implementing dynamic gamestate loading.
2012-12-24 19:41:12 +01:00
Sebastian Krzyszkowiak
5baf800f34 Remove all gamestates except Menu and Loading.
Those two are a starting point for refactoring.
Others will be restored later.
2012-12-24 01:48:36 +01:00
Sebastian Krzyszkowiak
d98817ecbd globals are evul 2012-12-23 14:29:54 +01:00
Sebastian Krzyszkowiak
b0b26461be Fix vaporizing Owlicious 2012-12-15 02:06:43 +01:00
Sebastian Krzyszkowiak
aba6cc3a0f Aspect ratio tweaks for About screen 2012-12-15 01:58:48 +01:00
Sebastian Krzyszkowiak
6a8d7d0d8a Aspect ratio teaks in levels 2012-12-15 01:45:14 +01:00