Commit Graph

709 Commits (master)

Author SHA1 Message Date
Nicolas Hake 1cd3534740 C4KeyboardInput: Replace std::bind2nd &c by lambda
std::ptr_fun and std::bind_2nd have been deprecated since C++11, and
are no longer part of the standard since C++17.
2018-07-24 14:21:42 +02:00
Lukas Werling 5b21505efd Editor join: Serialize reference as INI
On FreeBSD, the binary serialization doesn't work for IPv4 addresses,
and we never serialize game references as binary anywhere else.
2018-02-18 00:30:08 +01:00
Lukas Werling e3017ba4ac Credits: Fix Kevin Zheng's name 2018-02-17 11:56:57 +01:00
Lukas Werling 8f285299d1 Fix Mortimer missing in Credits 2018-01-31 21:18:27 +01:00
Lukas Werling 13f082e8c8 Implement Credits.txt export from StartupAboutDlg
Pressing Ctrl+S while on the Credits screen will save everything to
Credits.txt in the current working directory. This is only meant for
developers modifying the credits; the shortcut isn't mentioned anywhere.
2018-01-31 21:07:09 +01:00
Lukas Werling 44172576af Add NativeException to credits 2018-01-28 21:16:14 +01:00
Lukas Werling 0f78e63f02 Add warning for broken runtime join (#1109)
This also fixes the "no runtime join" error appearing for pre-lobby
games, where joining usually works anyways.
2018-01-28 17:34:45 +01:00
Lukas Werling 223ab6f77b Add warning about unfinished gamepad controls 2018-01-28 17:18:20 +01:00
Kanibal 4dd97d266e C4LoaderScreen: use const string reference
C4LoaderScreen: compare file extension case-insensitive
2018-01-28 11:07:05 +01:00
Kanibal 384472f183 Modernize loader loading code (#1748) 2018-01-28 11:07:05 +01:00
Julius Michaelis 1a5a60c39e Move warning about #1965 to a better place (see d175f776a) 2018-01-28 01:14:25 +01:00
David Dormagen 3acd4a22f2 take 'left' and 'player' (and more) out of global namespace
The values from the enums are converted to numbers a lot, so using an enum class would be counter-productive.
Having 'left' in the global namespace appeared to be an actual problem with some Qt headers, according to Fulgen.
2018-01-20 18:20:51 +01:00
Julius Michaelis 9d61cc9bc9 Fix Mac build broken in b11564168, attempt 2 2018-01-19 13:01:26 +01:00
Julius Michaelis 914d3798a4 Addedum to the control fixes in b11564168 (#1693, #1982):
- Allow configuring keyboard keys with modifier keys
 - Allow using Alt as a key in game on linux
   (I'm still puzzled why only Ctrl and Shift where implemented in so many places)
 - Adjust the deserializer and PlayerControls.txt to match the serializer for mouse keys
 - Refactor C4PlayerControl::DoMouseInput a little bit
 - Try to fix the Mac build (attempt 1)
 - Fix a bug in C4KeyCodeEx::CompileFunc where it set an incorrect KeyComboItem::sKeyName
 - Fix(?) StdCompilerConfigRead not doing anything on NoSeparator
2018-01-19 11:23:51 +01:00
Julius Michaelis b115641685 Allow using mouse keys and key combinations from the control assignment configuration dialogue (#1693, #1692) 2018-01-15 00:28:13 +01:00
Lukas Werling 08393d2300 Credits: Batman is Foaly 2018-01-07 19:02:38 +01:00
Lukas Werling 64aabefe2d Credits: Add contributors who didn't commit themselves
Powered by `git log --pretty=oneline v7.0.. | grep -w by` - I hope this
covers everyone!
2018-01-07 18:11:10 +01:00
Lukas Werling 2b3863a12c Show warning when attempting to load an old savegame (#1941) 2017-12-28 21:45:20 +01:00
Lukas Werling df979bb537 Fix restoring single-digit scancodes (#1944)
Most scancodes are two hex digits long, e.g. "$24" (J). However, there
are also a couple keys like Backspace ("$e") and Escape ("$1") with a
single-digit scancode. These previously weren't restored correctly.
2017-12-28 20:50:03 +01:00
Lukas Werling 7ff92179d5 /screenshot: Default to zoom = 2
Before, it would silently fail. As we already have a default for
Ctrl+F9, we can just use that instead.
2017-12-23 12:05:13 +01:00
Lukas Werling 3f48488fef Add Fulgen's real name to credits 2017-12-22 18:08:25 +01:00
Lukas Werling e83ca471c0 Render (updated) credits with C4GUI 2017-12-21 22:57:37 +01:00
Julius Michaelis 94394c2e2a Fix some valgrind warnings and a leak in openclonk-server 2017-09-01 15:59:46 +02:00
Sven Eberhardt 0c50e81413 Scenario list loader: Ignore .ocd and .ocg files when looking recursively for scenarios 2017-07-11 20:45:57 -07:00
Sven Eberhardt 17153c6fbe Show currently loaded item in gray while loading scenario list for scenario selection 2017-07-11 20:45:19 -07:00
Sven Eberhardt 8dffeadc56 Fix slowdown during startup scenario list loading #1721
(the one that could be averted by wiggling the mouse)
2017-07-11 18:24:14 -07:00
Tushar Maheshwari a661eab867 Automatic fixes using clang-tidy for header files
A follow-up on a previous PR GH-41. The discussion in the forum can be
viewed at http://forum.openclonk.org/topic_show.pl?pid=33086.
Run clang-tidy (without auto, pass-by-value and using checks) to fix the
header files not modified in the previous PR.

Summary of the changes:

 - C++11 member initialization.
 - nullptr instead of 0 for pointers.
 - override for functions declared virtual in base class.
 - default trivial special member functions
2017-05-15 13:46:46 +02:00
Tushar Maheshwari 3a4f49ad90 Revisit #includes
Consolidate the include statements scattered across the code in accordance
with the comment in C4Include.h. The advantages are listed in the same
comment.
Furthermore, it follows llvm-include-order which is the logical
extrapolation of the project's style guideline wherever possible
(C4Include.h being the most-frequent exception).
2017-05-15 13:24:59 +02:00
Tushar Maheshwari e58a7884e4 Automatic fixes using clang-tidy
See http://forum.openclonk.org/topic_show.pl?tid=3376 for discussion.

Close GH-41
2017-05-03 20:30:45 +02:00
Nicolas Hake c41bd063bd Stop disabling debugrec code by preprocessor
The optimizer is going to remove dead code anyway, and has the
additional advantage of doing syntax checking, so the code won't
silently break when someone changes something.
2017-04-19 09:47:21 +02:00
Lukas Werling 5719524241 Move C4AchievementGraphics to its own file
Scenario parameters are useful in a script-only context (such as the one
mape uses). C4AchievementGraphics introduces a dependency on C4Surface
which isn't available in that context.
2017-04-03 11:55:22 +02:00
Nicolas Hake 007a05468e C4Scenario: Remove fixed char buffers 2017-03-23 16:35:25 +01:00
Nicolas Hake 7f2cce6f79 Fix WITH_AUTOMATIC_UPDATE, non-Windows platforms 2017-03-16 23:18:38 +01:00
Nicolas Hake 22f42123e8 C4AbstractApp: Remove StdStrBuf 2017-03-16 18:51:16 +01:00
Nicolas Hake 41f4779d74 StdCompiler: Use terms "Serializer" and "Deserializer"
Instead of "Compiler" and "Decompiler", which make me look up what's
even going on each time I see them, use the standard terms "serializer"
and "deserializer".
2017-03-11 15:05:41 +01:00
Nicolas Hake 102047f537 Implement IPv6 support to C4NetIO 2017-01-09 20:34:43 +01:00
David Dormagen 8a8593e0ba Script GUI: added TightGridLayout style (requirement of #1842)
The TightGridLayout fills spaces more aggressively. This is slower but makes for a tighter layout. Finding the best layout is NP-complete. This here is just O(N^2) or so.
2016-11-05 15:35:15 +01:00
Sven Eberhardt ebda8193ef Replace NULL by nullptr in C++ sources
We don't support pre-C++0x any more, so nullptr should be fine everywhere (except in the plain C source files)
2016-11-02 19:58:02 -04:00
Lukas Werling 9c98227a03 Fix all -Wformat warnings 2016-10-31 23:39:45 +01:00
Sven Eberhardt 15fbb1ea99 Fix editor runtime join to use a file at the temporary path 2016-10-30 20:40:40 -04:00
Julius Michaelis 55b6713185 Dedicated server: stop game when there are less than 2 clients 2016-10-30 21:36:29 +01:00
Julius Michaelis 65940080a7 Remove two unused config options, set music to default off with the dedicated.
I admit that this is just a hack to silence some warnings by default.
2016-10-30 21:36:29 +01:00
Julius Michaelis 376ca5a9df Prevent using USE_CONSOLE in lib{misc,c4script} 2016-10-22 17:42:23 +02:00
Julius Michaelis 8d2f2846b5 Fix mac build
Also move some stuff around once again…
2016-10-21 01:25:48 +02:00
Julius Michaelis 34a9a1de8d Twiddle with header organization: lib{misc,c4script} do no longer include GL/glew.h
(Yes, it is just that complicated.)
2016-10-20 18:46:32 +02:00
Sven Eberhardt 4eae2b28d7 Editor: Fix drop cursor drawing 2016-10-10 21:26:10 -04:00
Sven Eberhardt cf7134e60e Fix a few warnings / possible divisions by zero 2016-10-08 20:51:51 -04:00
Armin Burgmeier 561651b715 Fix issues with resolution switching on Linux
* Engine would always open up in Fullscreen and then switch to Windowed
   instead of just starting up as Windowed.

 * Could not change resolution because bit depth or refresh rate did not match
   * handle RefreshRate==0 as "any", just like windows

   * Remember refresh rate in combo box that enumerates all the modes and
     propagate to video mode setting instead of assuming all modes have the
     same refresh rate.

   * Report bit depth as 32 even if SDL tells us it's 24. Other parts of the
     code require it to be equal to 32, but 24 works just fine.

 * Changing from fullscreen to windowed when "Screen" was selected in
   resolution combo box (i.e. iXRes==-1) makes the window tiny (0x0 pixels).
2016-10-05 21:38:46 -07:00
Lukas Werling 2044fc3c06 SDL: Fix wrong keyboad button labels 2016-08-20 23:16:31 +02:00
Lukas Werling 26a552473c Add support for two extra mouse buttons (#mantis-is-down-right-now)
This also fixes a missing definition for "MiddleDouble". Only
implemented for SDL and Qt, someone else will have to do Windows.
2016-08-18 22:43:42 +02:00