Commit Graph

3367 Commits (41cf9974f95b043ed1bbeb99d18b1ad05bc75694)

Author SHA1 Message Date
MrSimbax f2d91cde80 Update Find*.cmake modules
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.
2020-07-10 18:38:06 +02:00
MrSimbax 4ae0360640 Remove source grouping temporarily
It's probably not how it should be done with modern CMake, so I'm
removing this for now to focus on other changes first.
2020-07-10 13:03:23 +02:00
Mateusz Przybył b8523aa1db
Merge pull request #1329 from colobot/dev-msvc-sed-fix
Fix update-pot not working with MSBuild
2020-07-10 11:33:41 +02:00
MrSimbax bf1982f4e4 Change `make update-pot` comment to cmake command
`make update-pot` only works if a generator producing Makefiles was
used with `cmake`. The `cmake` command to build a specific target
will work for any generator.
2020-07-10 11:01:47 +02:00
MrSimbax 963cd1b347 Fix sed cmd not working with MSBuild
Fixes the `'\1' is not recognized as an internal or external command`
error when trying to run the target `update-pot` with MSBuild.

The `|` characters probably messed with cmd.exe or PowerShell syntax
rules so they were replaced with slashes `/`.

Also, at least some implementations of sed for Windows would produce
CRLF line endings instead of LF line endings. The issue is fixed by
adding the flag `-b`.
2020-07-10 10:53:38 +02:00
Mateusz Przybył 4c02fe9cda
Merge pull request #1323 from colobot/dev-cmake-version-bump
Bump CMake version
2020-07-09 21:47:31 +02:00
MrSimbax b9297cd9f4 Bump CMake version 2020-07-09 21:25:47 +02:00
krzys_h 1c8c01ad96
Merge pull request #1325 from colobot/dev-gh-actions-lint
Send colobot-lint results to GitHub using annotations
2020-07-09 20:14:05 +02:00
MrSimbax 97b266182b Fix MXE build 2020-07-09 19:55:11 +02:00
krzys-h 4eaa8588d7 Add missing apt-get update 2020-07-09 19:37:52 +02:00
krzys-h 76bb08779a Switch to actions/checkout@v2
As per GitHub recommendations
2020-07-09 19:37:22 +02:00
krzys-h 03c60202b8 Clean up some of the old colobot-lint run scripts 2020-07-09 19:09:38 +02:00
krzys-h dcd84523ab Send colobot-lint results to GitHub using annotations
This makes the results visible directly in the pull request UI changes
view
2020-07-09 19:09:38 +02:00
Fiftytwo 6a23e97533 Fix collisions of animated plants 2020-07-08 14:17:08 +02:00
MrSimbax 4bd6e01b65 Fix filename style of the particles generator 2020-07-07 21:30:21 +02:00
MrJohn10 35b22f7a7f
Refactor - Move UI mouse particles generation to a new class. (#1308)
* Move UI mouse particles generation to a new class.

* refactoring

* refactor - change variable name

* change backslashes to forward slashes in include directives

* remove & from variable

* Refactoring - fix linter issues

* Refactoring - fix linter issues

* refactoring - fix linter issues
2020-07-07 20:48:52 +02:00
krzys_h 6efc977286
Merge pull request #1320 from colobot/dev-gh-actions
Set up GitHub actions
2020-07-07 19:35:19 +02:00
krzys-h a6a7b0c96c Display correct PR target branch as success rather than skipped 2020-07-07 18:37:21 +02:00
krzys-h 0ef21bfdbb Test builds on Ubuntu 16.04, 18.04 and 20.04
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)
2020-07-07 18:17:24 +02:00
krzys-h 6d7aadf987 Migrate to GitHub Actions
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.
2020-07-07 18:09:12 +02:00
tomangelo 37e4ed8029
Updated license headers (#1317)
* Updated headers

* Updated more headers
2020-07-07 10:19:36 +02:00
Fiftytwo c50b36118e Revert "Make Recycler Recycle small Building Ruins." 2020-07-07 09:40:47 +02:00
MrSimbax 47687931d7 Fix compilation error
Apparently binary constants are a C++14 feature.
2020-07-06 18:29:30 +02:00
MrSimbax cb364a4f96 Fix typo 2020-07-06 18:29:30 +02:00
MrSimbax 06921e711d Fix 'uninitialized field' warnings 2020-07-06 18:29:30 +02:00
MrSimbax 124467c6e1 Fix 'naked new' warning 2020-07-06 18:29:30 +02:00
MrSimbax faa4a6eefa Fix "inconsistent declaration parameter name" 2020-07-06 18:29:30 +02:00
MrSimbax e96e8b46b2 Fix include style warnings 2020-07-06 18:29:30 +02:00
MrSimbax 6a22b709d6 Fix license headers 2020-07-06 18:29:30 +02:00
MrSimbax 7449111a00 Fix linter errors
"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.
2020-07-06 18:29:30 +02:00
MrSimbax 6c715ffef9 Ignore all build* folders and the out folder 2020-07-06 18:29:30 +02:00
Krzysztof Dermont a65776e0e7 Prevent game crash on bad savegame title
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.
2020-07-06 11:38:23 +02:00
Krzysztof Dermont c04b2738de Clear screenshot if no save selected 2020-07-06 11:36:10 +02:00
Krzysztof Dermont 86dff7396e Disable Delete/Load buttons if no save selected 2020-07-06 11:36:10 +02:00
Krzysztof Dermont 1cffbb2bd3 Fix closing Load Save dialog without game selected
Pressing Load when no savegame is selected resumes game but Load Save window stays open.
2020-07-06 11:36:10 +02:00
melex750 55c0c3221d Add missing const keyword in CBotClass.cpp 2020-07-06 11:32:15 +02:00
melex750 1b93963413 Apply suggestions from code review
Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
2020-07-06 11:32:15 +02:00
melex750 a46fee4d4e Don't reset timer in CBotStack::AllocateStack
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.
2020-07-06 11:32:15 +02:00
melex750 a5909ac4de Add private and protected keywords for methods
fixes #854
fixes #882
2020-07-06 11:32:15 +02:00
melex750 4a62e9ed76 Separate searching for functions and methods
fixes #207
fixes #1016
2020-07-06 11:32:15 +02:00
Emxx52 0102e45855
Merge pull request #1049 from colobot/dev-cbot-factory
Rework new functions so they follow established syntax rules
2020-07-05 17:26:04 +02:00
Fiftytwo 736c0894d1 Update data submodule 2020-07-05 15:44:43 +02:00
Krzysztof Dermont 04b1944939 Add option to mute sounds when game is not focused
Closes #823
2020-07-05 14:58:46 +02:00
melex750 e108715760 Document public member functions for CFileDialog 2020-07-05 14:33:59 +02:00
melex750 3566fb4826 Add 'select folder' mode for file dialog 2020-07-05 14:33:59 +02:00
melex750 a3dbeb9829 Play a sound when open/save fails 2020-07-05 14:33:59 +02:00
melex750 50b2afbda8 Renaming variables and other minor fixes 2020-07-05 14:33:59 +02:00
melex750 5cc565439c Move open/save dialog from CStudio to CFileDialog 2020-07-05 14:33:59 +02:00
suve e2eb5b91e0 Throw an exception on invalid input in StringUtils::Utf8CharSizeAt() 2020-07-05 13:57:39 +02:00
suve 86ef158c00 Detect invalid values in StringUtils::Utf8CharSizeAt() 2020-07-05 13:57:39 +02:00