The light effects mod branch #3798 by @JeroenDStout has become quite out of date. I plan to properly implement it, but first I want to merge in what we have already, so that I can branch off develop again and rebase (currently rebasing this branch is too difficult, far too many commits).
Most code that this is merging is protected by the __ENABLE_LIGHTFX__ directive, so it should not make any difference until its time to enable it via a new pull request.
I have isolated it as much as possible to lightfx.c.
Windows subsystem does not work like console subsystem which makes it almost impossible to obtain `stdout` until the application has finished. This adds a `--console` switch to make the game either attach to an existing console or show a new one and redirect the C streams to it.
For some reason SDL_IsTextInputActive() returns SDL_TRUE before any call to SDL_StartTextInput(). This may be an SDL bug, but I've worked around it for this feature by also checking if there is a valid gTextInput.buffer. I've made an exception for the console itself, where the backtick should probably continue to close it.
- With this change screenshot file names have the following pattern:
save file name + + YYYY-MM-DD hh-mm-ss + .png
- To get the correct date and time the method platform_get_time and platform_get_date are rewritten and to a version for UTC and a version for local time. This change gave the opportunity to simplify the code generating file names for autosaves.
- SOUND_WINDOW_OPEN is now the new "shutter" sound when taking screenshot.
Natively on Linux, using OpenRCT2 with touch is impossible because
touch events are not handled by the game. They just don't do anything.
This commit handles touch events. A single touch represents a
press of the left mouse button. If it followed by another touch
within 300ms, a right mouse button event is emitted. This timeout
is like that of mobile web browsers [1].
[1] https://developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away?hl=en
This adds --openrct-data-dir=<str> option to command line letting user
select where he wants OpenRCT2-specific data to be. By default the
search locations are:
* <exePath>/data (on all platforms)
* /var/lib/openrct2 (on Linux)
* /usr/share/openrct2 (on Linux)