Commit graph

727 commits

Author SHA1 Message Date
Andrei "Akari" Alexeyev
3027921705 Use SDL_platform.h for more reliable and portable platform detection 2017-02-08 01:32:14 +02:00
Andrei "Akari" Alexeyev
8566c65f4b Fixed clang warnings 2017-02-07 20:34:55 +02:00
Andrei "Akari" Alexeyev
22f51b9652 Merge branch 'master' into replaysagain 2017-02-07 06:26:51 +02:00
Andrei "Akari" Alexeyev
dcfec0ffad Use scancodes instead of keycodes for keyboard input
See https://wiki.libsdl.org/CategoryKeyboard for the implications of this
2017-02-07 06:26:04 +02:00
Andrei "Akari" Alexeyev
3cae3e77a5 Fixed volume defaults 2017-02-07 06:05:32 +02:00
Andrei "Akari" Alexeyev
6c1bb1a079 Options menu: don't allow mapping multiple controls to the same key
When this is attempted, the keys are swapped
2017-02-07 05:59:11 +02:00
Andrei "Akari" Alexeyev
6cd72ab170 Fixed Elly's Scythe not spinning the first time it appears
May desync existing replays, but doesn't appear to so far
2017-02-07 04:39:14 +02:00
Andrei "Akari" Alexeyev
659979d893 Workaround to make logs accessible on windows 2017-02-07 00:54:15 +02:00
Andrei "Akari" Alexeyev
a87169bcd6 Replaced uint with unsigned int for portability
uint is non-standard and my win64 crosscompiler doesn't recognize it
2017-02-07 00:37:42 +02:00
laochailan
26143e6f36 Added random generator testing script 2017-02-06 07:59:39 +01:00
Andrei "Akari" Alexeyev
0af7aad20a typo 2017-02-06 02:10:45 +02:00
Andrei "Akari" Alexeyev
187919cb7c Turn power items into point items when their logic is processed, not when they are drawn.
See previous commit as for why. Note that this slightly changes the processing order, unlike the previous change, so any replays recorded prior to this commit will desync. The new behaviour, however, should be slightly more correct.
2017-02-06 01:18:34 +02:00
Andrei "Akari" Alexeyev
125f2441e7 Fixed a replay desync related to the stage 6 boss
There was a piece of code in the Scythe drawing function that altered the game state. I hope I don't have to explain why that is a vector for bugs in general, but in particular, this always breaks replays in frameskip mode.

I've also moved the BGM handling from stage_draw to stage_logic for similar reasons.
2017-02-06 00:02:29 +02:00
Andrei "Akari" Alexeyev
b38e41e681 Added extra checks to prevent and help debug incorrect usage of some tsrand functions 2017-02-05 22:16:50 +02:00
Andrei "Akari" Alexeyev
0db6a4ca40 Made the skip dialog key function as a fast forward when viewing replays 2017-02-05 20:28:53 +02:00
Andrei "Akari" Alexeyev
3d639aae52 Added a frameskip mode, mainly to debug replays 2017-02-05 20:25:18 +02:00
Andrei "Akari" Alexeyev
cb2cf24233 basic replay desync detection 2017-02-05 04:58:27 +02:00
Andrei "Akari" Alexeyev
3662daaff0 Fixed playback of gamepad events from replays (with hacks) 2017-02-05 04:04:31 +02:00
Andrei "Akari" Alexeyev
ff3986c6cb New binary replay format 2017-02-05 03:25:17 +02:00
Andrei "Akari" Alexeyev
5150cb91e3 Don't convert repeated keys to game events 2017-02-04 19:28:59 +02:00
Andrei "Akari" Alexeyev
2a296871e3 Support window resizing and pause on focus loss 2017-02-04 19:17:08 +02:00
Andrei "Akari" Alexeyev
cfd772d75c Clear the color buffer before resizing the viewport 2017-02-04 19:04:04 +02:00
Andrei "Akari" Alexeyev
71f57bab93 Improved handling of gamepad axis input and sensitivity 2017-02-04 15:41:15 +02:00
Andrei "Akari" Alexeyev
3714eb3710 Force windowed mode when using the fallback resolution -- this should never fail 2017-02-04 13:56:27 +02:00
Andrei "Akari" Alexeyev
a77307ff78 Use SDL_GL_GetDrawableSize instead of SDL_GetWindowSize 2017-02-04 09:25:10 +02:00
Andrei "Akari" Alexeyev
347be23de2 Use the SDL2 filesystem API to setup paths by default.
https://wiki.libsdl.org/CategoryFilesystem

This ensures that userdata will be saved in a standard user-specific location on any OS. On Linux, the XDG Base Directory Specification is followed, which means the config directory will typically be ~/.local/share/taisei/ now (further info: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html).

A static prefix is still used for the game assets by default. In RELATIVE builds, SDL_GetBasePath is used rather than the current working directory, and the config path is still defined by SDL_GetPrefPath.

Pass -DUSE_SDL2_PATHS=FALSE to cmake for old behaviour.
2017-02-04 08:27:46 +02:00
Andrei "Akari" Alexeyev
948e502466 Slightly better handling of text input 2017-02-04 06:51:00 +02:00
Andrei "Akari" Alexeyev
cc562eb253 Store keybindings in human-readable and presumably more portable format. Incompatible with old configs, they will have all keybindings reset to defaults. 2017-02-04 06:30:37 +02:00
Andrei "Akari" Alexeyev
c46b87718e video_setmode(): do nothing if the current mode matches the desired one
In particular, this eliminates an annoying flicker/window recreation after exiting the video options menu without changing the resolution.
2017-02-04 06:08:34 +02:00
Andrei "Akari" Alexeyev
9f96fb7204 Ensure a 4/3 viewport in any video mode. Black bars are better than stretching. 2017-02-04 05:58:55 +02:00
Andrei "Akari" Alexeyev
3d1851ade8 Never recreate the GL context, rebind it to the new window whenever we have to create one.
This way toggling fullscreen and changing the resolution actually works, and lets us stare at something more interesting than a black screen.
2017-02-04 05:14:39 +02:00
Andrei "Akari" Alexeyev
167e9e12f1 Initial migration to SDL2 (WIP) 2017-02-04 04:56:40 +02:00
Andrei "Akari" Alexeyev
e961fe8d79 Options: fixed SFX and BGM volumes not being set correctly after SFX/BMG are turned on. Removed unused callbacks. 2017-02-04 03:10:45 +02:00
Andrei "Akari" Alexeyev
2b824fdfe4 Fixed the item pickup radius being always doubled regardless of focus.
Bless the new GCC warnings.
2017-02-04 02:55:15 +02:00
laochailan
89d235e9dc Merge branch 'master' of github.com:laochailan/taisei 2017-02-03 23:57:28 +01:00
laochailan
1758b0e417 Dialog graphics
all missing dialog graphics and a replacement for Hina. replacements for
Youmu and Marisa to follow.
2017-02-03 23:56:33 +01:00
makise-homura
4b26b3ebb9 Boss BGM title now may have different color rather than same as stage tilte color (this makes sense on stage 4) 2017-02-03 18:56:36 +03:00
makise-homura
39ebd12959 Fixed issue #41 with kurumi_blowwall() incorrect time death calculation (also removed some tabs at the end of line) 2017-02-02 20:22:30 +03:00
makise-homura
319d844b7a Fixed bgm stopping order if BGM not found (should first stop existing BGM, and then free its resources). 2017-01-31 01:02:03 +03:00
makise-homura
0ad5a46c75 Volume controls changed to sliders from "0..10" value list 2017-01-31 00:55:53 +03:00
makise-homura
881521d8c7 ZLIB marked as required since it is specified as required dependency of libpng 2017-01-30 23:15:44 +03:00
makise-homura
623e810e12 Made type conversions (pointer-to-enum) do not produce warnings on architectures where sizeof(ptr) > sizeof(int) 2017-01-30 23:13:14 +03:00
makise-homura
14ef066d14 Added TAISEI_IDDQD cmake variable (have effect only with TAISEI_DEBUG) that makes player lives infinite (useful for stage debug) 2017-01-30 22:26:45 +03:00
makise-homura
573ea5e49c start_bgm: Make BGM stop playing if new BGM is not found (instead of still playing old BGM). 2017-01-30 22:20:07 +03:00
laochailan
003bdce57a some new sounds 2017-01-28 19:56:17 +01:00
laochailan
53d3829861 make bomb key work to cancel menus. 2017-01-28 16:39:25 +01:00
laochailan
2f5281fdda remove unnecessary EVENT_DEATH call 2017-01-28 16:35:13 +01:00
laochailan
3a45171a02 Kurumi - Blow the Walls, proper cleanup 2017-01-28 16:28:28 +01:00
laochailan
4ef1973183 make kurumi dialog reappear 2017-01-28 15:50:40 +01:00
laochailan
d8b55f2570 remove inline 2017-01-24 20:07:06 +01:00