Commit Graph

39 Commits (master)

Author SHA1 Message Date
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
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
Sven Eberhardt 66117de82f Fix Windows config writing of custom key overloads 2017-03-26 20:55:27 -04:00
Nicolas Hake 78b43e2182 StdCompiler: Add support for std::string 2017-03-23 16:35:25 +01:00
Nicolas Hake d6c9a11678 StdRegistry: Remove unused support for separated config values
The config read/write code never uses StdCompiler::Separator. Removing
support for it from StdRegistry makes the code simpler.
2017-03-16 18:51:16 +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
Nicolas Hake eabca223f5 Update all copyright notices for 2016 2016-04-03 20:24:42 +02:00
Nicolas Hake 493c276126 Rewrite header inclusions to #include "path/to/file.h" style 2016-04-03 20:24:42 +02:00
Nicolas Hake 142b7ea7c3 RegCreateKeyEx: Pass NULL as lpClass
The lpClass parameter isn't used, and it is valid to pass NULL for it.
It is, however, not valid to pass a string literal, because the
conversion to nonconst char* has been deprecated in C++ for a long time
and doesn't exist anymore in C++11.
2016-02-08 17:36:50 +01:00
Nicolas Hake 24b54211c5 Drop Min, Max, Swap for std::min, std::max, std::swap
The C++ standard library comes with perfectly fine implementations of
these functions, so there's no point in reimplementing them just for the
hell of it.
2015-11-15 13:53:01 +01:00
Sven Eberhardt 593723e687 Windows: Fix saving of custom keys (#1313)
The registry compiler couldn't handle strings beginning with a separator, which was used for marking keys defined by scan code.
2015-05-22 21:20:36 +02:00
Nicolas Hake 802cc8ece9 Fix some uses-after-free due to terrible StdBuf semantics 2014-03-19 14:21:23 +01:00
Nicolas Hake e0dc30c59a Update copyright notices
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917, I
have merged all copyright notices into a single file and referenced that
merged file from each source file.

For the updated source files, the timeline has been split into three
parts:
 1. Pre-RWD code (before 2001)
 2. RWD code (2001 through 2009)
 3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
2013-12-23 13:03:19 +01:00
Günther Brammer 41c88ba863 Use _snwprintf instead of swprintf
Apparently the C standard committee and Microsoft couldn't agree on how
swprintf should work.
We previously tried to work around the resulting breakage, but I just got
the following compilation error. It's really better to avoid that function
entirely. Since we only used it in windows-specific code, the
windows-specific _snwprintf is a nicely compiler-independent replacement.

src/platform/PlatformAbstraction.h: In function ‘int swprintf(wchar_t*, size_t, const wchar_t*, ...)’:
src/platform/PlatformAbstraction.h:243:12: error: redefinition of ‘int swprintf(wchar_t*, size_t, const wchar_t*, ...)’
/usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/include/swprintf.inl:30:5: error: ‘int swprintf(wchar_t*, size_t, const wchar_t*, ...)’ previously defined here
2012-12-31 22:03:12 +01:00
Günther Brammer 9bc61db360 copyright notices update 2011 2011-09-01 16:58:52 +02:00
Nicolas Hake fe747db554 Clean up copyright notices
Use real names for copyright attribution wherever they are known,
drop duplicates
2011-09-01 12:47:54 +02:00
Nicolas Hake 6efa0ac05e win32: Correctly read back unicode strings from registry 2011-07-27 17:30:56 +02:00
Sven Eberhardt 6fadd97438 MSVC fix: length parameters for swprintf 2011-07-16 12:08:00 +02:00
Nicolas Hake 5e2e25cc74 win32: Fix StdCompilerConfigRead::ReadString 2011-04-05 18:04:32 +02:00
Günther Brammer 0abe1bb633 win32: Use Unicode registry APIs 2011-04-02 18:48:01 +02:00
Günther Brammer 6e30f2b7e8 win32: Remove unused StdConfig class and associated Registry APIs
It has long since been replaced by the StdCompilerConfig* classes. A few
of the Registry functions are still used in other code, and a few are now
implementation details.
2011-04-02 17:49:55 +02:00
Günther Brammer bd051a972d win32: Remove duplicate file type association code from the engine
The installer already does this, and on newer windows versions the engine
isn't able to do this anyway.
2011-04-02 17:31:01 +02:00
Sven Eberhardt 269c7b208c control config dialog 2011-03-30 22:11:47 +02:00
Günther Brammer c49f8b32d5 win32: wrap all windows.h-includes to always undef troubling macros 2011-03-13 15:48:45 +01:00
Günther Brammer 7bc20a8dc3 win32: add some missing #include <windows.h> 2011-03-13 02:03:45 +01:00
Günther Brammer 01c4845bb5 win32: add includes missing for some windows header versions 2011-03-13 01:15:52 +01:00
Günther Brammer be342d4a51 copyright notices update 2010
This time with more manual checking and using git blame -M -C, so that
a few cases of copied code get a copyright notice corresponding to
their initial introduction.
2010-12-23 01:01:24 +01:00
Julius Michaelis c80fcf1a62 correct out of screen coordinates for console windows (#288) 2010-09-17 14:07:12 +02:00
Armin Burgmeier 9f65838ae8 Fix a couple of compiler warnings 2010-04-28 23:43:25 +02:00
Armin Burgmeier c2924041c9 Fix seperate->separate everywhere 2010-04-01 23:08:06 +02:00
Benjamin Herr 4378de147c Rerun astyle with missing \ added 2010-03-28 20:58:01 +02:00
Günther Brammer b4e37b070b Change all indentation with spaces to use tabs instead
This is a whitespace-only patch. Hopefully, it'll only affect rarely-changed
parts of the engine, since all regularly maintained pieces should already
use tabs.
2010-03-27 17:05:02 +01:00
Günther Brammer e30ff99d6a Remove all superflous #include <Standard.h>
Standard.h is included by C4Include.h, and every file includes that.
2010-03-04 22:11:12 +01:00
Tobias Zwick edec15d64f merge 2009-11-30 17:24:14 +01:00
Nicolas Hake f0fdf5e992 Prepare for precompiled headers 2009-10-20 05:39:24 +02:00
Sven Eberhardt acca4a204d merge 2009-08-16 17:13:42 +02:00
Günther Brammer 9a8b5dd739 Replace BOOL by bool, TRUE by true, FALSE by false 2009-08-15 20:50:32 +02:00
Günther Brammer 572d00c32e Move all source files
This might make stuff easier to find.
2009-08-10 17:59:18 +02:00