Moved most of the variables to targets in the main src.
Made libraries in repo export targets.
Refactor STATIC flags a little and add more.
This commit definitely breaks a lot of things like tests
but the main game builds at least with MSVC.
Make them export targets instead of variables.
Some platforms need libintl, abstract it to a Find*.cmake module.
Static linking requires linking to dependencies of dependencies (it is
as horrific as it sounds). This commit handles this only for libsndfile.
SDL2_image and SDL2_ttf probably also have some hidden dependencies.
FindGLEW module is now bundled with CMake, hence it is deleted.
Added Copyright.txt since some modules are taken from CMake.
It's free, so why not?
This also partially deprecates the Docker container used for building -
now it's used only for MXE builds (because building MXE takes way too
long to do it inside the action)
This is pretty much a straight port of our Jenkinsfile to GitHub
Actions. It could use some modernization in a few places, but it should
work for now.
Note that I left the Jenkinsfile for now - we'll be using them both
until we are sure that the GitHub Actions version is stable.
"comparison of constant 240 with expression of type 'const char' is
always false"
also a whitespace issue
Changed the inequalities to bitwise comparisons, which hopefully don't
care about the sign.
I was considering just casting `c` to `unsigned char` but I doubt
it would be safe and multiplatform.
It was noted in issues #1207 and #1232 that game can crash when savegame
does not contain title. This might be a problem when saving game fails
and user is informed about it only in console. Proper fix should be a
visible error message informing that saving failed. This commit filters
invalid savegames from load windows and prevents game crash in narrow
cases.
The timer is already reset in CBotProgram::Run.
This prevents many cases where the game will hang or rendering is interrupted.
This fixes behavior of the script example in #874.
The script example in #971 doesn't hang the game anymore.