Commit Graph

3450 Commits (fdc1792932315c084036840c94bf779018355a77)

Author SHA1 Message Date
Mateusz Przybył 7b237ce9ad
Merge pull request #1387 from colobot/dev-fix-vsync
Remove vsync loop and improve vsync UI
2021-02-07 21:40:24 +01:00
MrSimbax 404d2dbeb1 Fix segfault in CApp UT
I moved m_engine creation to the constructor.
However, it is not complete until after calling m_engine->Create().
The UT segfault because the pointer is not null and destructor calls
m_engine->Destroy() on an incomplete object.
(Yes, UTs test incomplete SUT.)

So I moved back the m_engine creation to CApp::Create() but before
the SDL initialization as m_engine holds the flag for vsync.
2021-02-07 13:38:29 +01:00
MrSimbax 9a04685101 Fix compile error 2021-02-07 13:03:12 +01:00
MrSimbax a7aaa07356 Update vsync list after user interaction
The vsync may immediately fallback to another option after change from
the user so the UI should reflect that.

Todo: show a popup in UI informing the user why their desired vsync
option couldn't be set. Right now the error message is visible only from
the logs.
2021-02-07 12:50:13 +01:00
MrSimbax 71ff89a803 Remove vsync disable/enable loop (fix #1383)
Also a small refactor due to repeated code.
The vsync flag in m_engine is now synchronized with the SDL state
during initial configuration of CApp.
2021-02-07 12:47:32 +01:00
jakac c336a67afa Fix MSVC building issues by correcting CMakeLists.txt 2021-01-03 15:46:01 +01:00
Fiftytwo 10ec454f6b Fix Target research() executing in ResearchCenter 2020-12-31 05:00:33 +01:00
Mateusz Przybył d71ee4ef68
Merge pull request #1357 from colobot/dev-fix-satcom-crash-again
Fix crashes in SatCom on some \button characters
2020-09-21 16:55:30 +02:00
MrSimbax 05de2baef5 Fix crashes in SatCom on some \button characters
The issue is that the \button fragments in SatCom are replaced with
invalid UTF-8 bytes, hence those bytes need to be handled as a special
case when checking for UTF-8 character length.

When the text is processed e.g. in `Gfx::CText::Justify`, there are
generally two arrays: `text` and `format`. The second one is interpreted
as a font for a given character, e.g. `text[i]` has font `format[i]`.

Now, in the loops the index for `text` is increased by the length of
the character, e.g. 1 to 4 bytes, whereas index for `format` is
only incremented. It seems there's an assumption that `format` treats
multibyte characters as one byte, which doesn't seem to be true by
looking at the process of filling up the `format` array. This can result
in using wrong font e.g. FONT_SATCOM for the \button character which
should be FONT_BUTTON, hence the `StrUtils::Utf8CharSizeAt` method
complains about unexpected continuation byte via exception, causing
the crash.

Incrementing the index by the UTF-8 length seems to have fixed the
issue. However, I am not sure if I haven't broken anything else by this
and if I analyzed the intended behaviour correctly.
Gfx::CText needs a major refactor IMHO.
2020-09-20 21:22:05 +02:00
Mateusz Przybył f64c610fa4
Merge pull request #1354 from suve/gcc11-diagnostics-fix
GCC11 diagnostics fix (round 2)
2020-09-15 16:20:31 +02:00
Jeff Law ad2e3db92f Fix more dynamic casts for gcc-11
Signed-off-by: suve <veg@svgames.pl>
Jeff's patch was written for the 0.1.12 stable release.
Adapted to work with the "dev" branch (as of commit 13098ee).
2020-09-15 10:20:24 +02:00
Mateusz Przybył 13098ee378
Merge pull request #1351 from suve/gcc11-diagnostics-fix
GCC11 diagnostics fix
2020-09-11 20:37:25 +02:00
MrSimbax 8fdf79958f Merge branch 'master' of https://github.com/ccao001/colobot into dev-add-guix
Fixed merge conflict
2020-09-11 19:16:00 +02:00
Jeff Law 8c6ac4cd16 Fix dynamic casts to avoid gcc-11 diagnostics 2020-09-04 11:16:45 +02:00
tomangelo 2685a1eb60
Add cell capacity parameters (#1348) 2020-08-31 13:37:45 +02:00
ccao001 a54a117ba4
README: Add Guix
GNU Guix is a transactional package manager and an advanced distribution of the GNU system that respects user freedom. Guix can be used on top of any system running the kernel Linux, or it can be used as a standalone operating system distribution for i686, x86_64, ARMv7, and AArch64 machines.

In addition to standard package management features, Guix supports transactional upgrades and roll-backs, unprivileged package management, per-user profiles, and garbage collection. When used as a standalone GNU/Linux distribution, Guix offers a declarative, stateless approach to operating system configuration management. Guix is highly customizable and hackable through Guile programming interfaces and extensions to the Scheme language.
2020-08-30 00:44:45 -04:00
Emxx52 a4cfe616a8
Merge pull request #1349 from colobot/dev-fix-abs
Fix warning regarding mismatched parameter types
2020-08-27 00:53:45 +02:00
tomangelo2 f08c67bef9 Fix warning regarding mismatched parameter types 2020-08-27 00:28:03 +02:00
Emxx52 b17a4391b0
Merge pull request #1336 from colobot/dev-mod-manager
Add Mod Manager
2020-08-21 18:43:45 +02:00
Emxx52 1c9f5f3f64
Merge branch 'dev' into dev-mod-manager 2020-08-21 18:21:08 +02:00
Fiftytwo 68c254c101 Update data submodule 2020-08-21 18:09:28 +02:00
tomangelo d7ec891ab8
Merge pull request #1346 from melex750/dev-cbot-fix-delete
Fix CBOT script hanging at delete()
2020-08-20 22:09:37 +02:00
tomangelo dbc13bad20
Merge pull request #1345 from melex750/dev-cbot-fix-abs
Fix abs() only working on floats
2020-08-17 19:28:35 +02:00
tomangelo d2c8888067
Merge pull request #1344 from colobot/dev-suppress-fonts-warning
Remove unnecessary warning if there is no fonts.ini file
2020-08-17 19:27:59 +02:00
melex750 8d5cafecb3
Fix CBOT script hanging at delete() 2020-08-15 09:41:31 -04:00
melex750 d0961a517a
Fix abs() only working on floats 2020-08-15 09:29:45 -04:00
Fiftytwo 4c1d3eecd1 Add flag() and deflag() CBOT functions 2020-08-15 03:31:17 +02:00
Fiftytwo 56c99e741e Make Vault buildable 2020-08-08 20:51:56 +02:00
tomangelo2 4bb6f9f1b3 Remove unnecessary warning if there is no fonts.ini file 2020-08-08 15:41:07 +02:00
Fiftytwo b9305dfd45 Fix Mushroom SatCom links 2020-08-08 14:34:21 +02:00
Mateusz Przybył 5749fff377
Merge pull request #1342 from colobot/dev-lighting-fix
Fixes lighting issues and mipmapping
2020-08-03 20:48:15 +02:00
Tomasz Kapuściński 4c14050b27 Fixed mipmaps being outdates after texture update. 2020-07-31 22:04:47 +02:00
Tomasz Kapuściński 33b7c893cb Allow length of the light direction vector to influence strength of the light source.
This fixes the issue with objects and terrain being darker than they should be. As it turns out, most levels have not normalized light direction which happens to make light brighter and this is the expected result. To keep in line with GL14 engine, newer engines should use the length of the vector to make light brighter.
2020-07-31 22:01:33 +02:00
Fiftytwo 2023756023 Fix factory() being able to produce non-bot units 2020-07-30 11:11:51 +02:00
Fiftytwo a92fa950e2 Make Sniffers able to plant flags 2020-07-30 11:03:12 +02:00
Fiftytwo e63afb3461 Add WayPoint animation in deletemark 2020-07-30 04:21:35 +02:00
Fiftytwo 25a8d7b5b5 Move flatground scan button from Sniffers to Builders 2020-07-30 03:48:31 +02:00
Fiftytwo 4780716c18 Update translation files 2020-07-30 03:27:39 +02:00
MrSimbax 9cb80daedf Improve sound reloading
Also some minor refactoring.

Since realoding may take a lot of time, modman no longer reloads
the whole app on entering/leaving the screen.
2020-07-27 15:59:33 +02:00
Mateusz Przybył aa8122f16f
Merge pull request #1339 from immibis/fix-quicksave-sim-speed-crash
Fix crash when quick-saving with increased game speed
2020-07-26 15:17:17 +02:00
immibis 9e743e86af Fix crash when quick-saving with increased game speed 2020-07-26 14:55:56 +02:00
MrSimbax fd36ff3840 Fix crash when changing text with UTF-8 chars
The code left a byte from the previous text in CEdit UI control if
the new text is shorter than the old one. So an exception was thrown
because it's an invalid UTF-8 byte.
2020-07-25 21:20:19 +02:00
immibis 5eebe300fc
Support new-format text models through the same code path as old models; update Blender script (#1290) 2020-07-25 21:13:26 +02:00
MrSimbax 93f3abee1a Change mod version separator to dot
I don't know why I put comma in there and how I didn't notice this
earlier.
2020-07-24 12:57:45 +02:00
Mateusz Przybył fbe2191800
Allow producing objects with no keyword in CBOT (#1335) 2020-07-24 02:20:06 +02:00
MrSimbax b685d0060c Merge branch 'dev' into dev-mod-manager 2020-07-23 18:19:42 +02:00
MrSimbax 253cca379b List which level subdirectory a mod changes 2020-07-23 18:07:02 +02:00
MrSimbax e6ce4112c6 Update translations 2020-07-23 17:57:25 +02:00
MrSimbax 51668c12d7 Add changes listing to mods
It's just listing directories of a mod for now, but should give some
idea what the mod changes.

Also moved some functionality from pathman to modman.

Mods added with the `-mod` parameter are now managed by modman.
2020-07-23 17:44:38 +02:00
MrSimbax 16795e0d49 Use level parser instead of JSON for manifest 2020-07-22 21:40:13 +02:00