Commit Graph

44 Commits (master)

Author SHA1 Message Date
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
Nicolas Hake 22f42123e8 C4AbstractApp: Remove StdStrBuf 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
Julius Michaelis 376ca5a9df Prevent using USE_CONSOLE in lib{misc,c4script} 2016-10-22 17:42:23 +02:00
Lukas Werling 2044fc3c06 SDL: Fix wrong keyboad button labels 2016-08-20 23:16:31 +02:00
Lukas Werling ec128bede4 Qt editor: Fix freeze during lobby and loading on Linux 2016-08-08 17:24:44 +02:00
Lukas Werling b7359e0c27 Remove the GTK platform (USE_GTK)
The GTK code does not work with the Qt editor. The simpler SDL2 platform
does, so we have little reason to keep the GTK code.

Note that GTK is still a dependency for mape.

Discussion: http://forum.openclonk.org/topic_show.pl?tid=3328
2016-08-03 16:25:46 +02:00
Lukas Werling de98bbef46 Fix compile errors on Linux/SDL 2016-04-06 19:17:52 +02: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
Günther Brammer c9c8b0c408 Move modifier key masks to the keycode definitions 2016-02-13 22:36:41 +01:00
Günther Brammer 59e5a327b2 gtk: Add support for microsoft windows 2016-02-06 16:47:44 +01:00
Nicolas Hake e9cf0f6fdc Stop pretending we support 16 bit color
The GTK and OS X platforms already ignored the requested bit depth and
always used 32 bit. Windows and SDL would set a 16 bit color depth for
the screen, but still did all of the rendering short of the final
present in 32 bit.
2016-02-02 00:00:23 +01:00
Günther Brammer 7167459f67 win32: Move PIXELFORMATDESCRIPTOR from C4AbstractApp to CStdGLCtx
That is the only user.
2016-01-23 22:02:52 +01:00
Günther Brammer aa931ac623 Drop some dead code in C4App.h and C4WindowGTK.cpp 2016-01-23 20:36:34 +01:00
Günther Brammer 93f12150c4 CMake: Remove obsolete USE_X11 option and add USE_WIN32_WINDOWS
USE_WIN32_WINDOWS was previously defined in PlatformAbstraction.h. Move it
to CMakeLists.txt and config.h like its peers. Replace USE_X11 with USE_GTK
or GDK_WINDOWING_X11 as appropriate.
2016-01-23 20:36:34 +01:00
Armin Burgmeier d7a5ac373d Fix the console build on Mac
cmake still does not create a nice bundle for it, but at least
the build does not fail anymore.
2015-12-23 16:31:19 -08:00
Sven Eberhardt 43165e24cd Change C4AbstractApp:SetVideoMode spatial resolution parameters to signed int.
The magic value -1 is used to denote "current screen mode", but it has trouble fitting into the unsigned concept. An alternative would be to use 0 as the magic value, but that would include quite a few places (including existing configuration settings) to change.
2015-09-01 22:51:32 -04:00
Peter Wortmann 30857e835e Shader gamma implementation
In comparison to the old system, this is a downgrade - instead of being
able to set a full color mapping by gamma ramp, we now get just a value
per colour channel.

Upside is that we do not need to play around with the global gamma ramps
any more, which was arguably the wrong way to do it.

This commit will likely break everything that has been using gamma so far.
2015-08-31 17:35:08 +01:00
Sven Eberhardt e23c009fd9 Fix thread guards to use thread IDs instead of handles (#1161)
GetCurrentThread() returns the same pseudo-handle for every thread. It cannot be used to determine if two calls were made from the same thread.
2014-10-16 20:22:38 +02:00
Martin Plicht 46df9d758c StdScheduler: Make DoScheduleProcs virtual, override it in C4AbstractApp and set isInManualLoop flag around the DoScheduleProcs call so the FlushMessages() of C4AbstractApp will happen when isInManualLoop is true 2014-02-16 14:54:32 +01:00
Martin Plicht 911c9b7713 C4AbstractApp: ScheduleProcs timeout parameter defaults to 1000/36 instead of -1 so the timeout is not determined to be infinity down the road, leading to mac version not getting out of the poll call anymore 2014-01-23 17:53:40 +01:00
Martin Plicht d504626a40 StdScheduler: Split into StdSchedulerWin32/StdSchedulerPoll/StdSchedulerMac 2014-01-23 17:53:40 +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
Tim Blume 240193ad5a Remove remains of Direct3D support
Direct3D hasn't worked for more than a year now, and there don't seem to
be any efforts to revive it. Remove it and concentrate on better OpenGL
support.
2013-11-02 21:39:34 +01:00
Sven Eberhardt 6250ff1766 Silence a few MSVC warnings 2013-04-01 12:48:02 +02:00
Günther Brammer 864c5c7ea8 copyright notices update 2012 2013-01-12 16:31:40 +01:00
Günther Brammer b5ae4f1f9d Move CStdInProc to its own source file
It should be usable without USE_CONSOLE, even though only the dedicated server
uses it at the moment.
2012-11-30 22:18:38 +01:00
Günther Brammer a8dfeeaf7e win32: Make USE_CONSOLE compile again
There's even a plausible implementation of CStdInProc::GetEvent.
2012-11-15 23:01:24 +01:00
Sven Eberhardt 8bdd761027 PlayerControls: Allow usage of keyboard scan codes instead of virtual key names using $%x format (Win32 only)
Also re-resolves keys if the keyboard layout changed at runtime.
2012-10-09 00:54:34 +02:00
Nicolas Hake faf0006a6f Win32: Improve error reporting when changing resolution 2012-08-28 00:00:29 +02:00
Armin Burgmeier e11e9845d1 Fix Windows build 2012-04-23 21:45:01 +02:00
Martin Plicht cd4db8ebaf mac: Remove KeyMask assignment and inline HandleNSEvent 2012-04-23 20:14:42 +02:00
Armin Burgmeier 206f90adbc Pass through key state handling from event callbacks (#745)
This gets rid of Application.IsAltDown() and friends which was used for
this purpose in C4MouseControl and C4EditCursor. In case non-event
callbacks need to access the state of the modifier keys the state is
now cached in these classes (if it wasn't already).

This new solution is supposed to be more robust, since the key modifier
state comes always directly from the input event. This fixes #745, where
Application.IsAltDown was stuck for some reason.

I updated the Windows and Mac code as well, but wasn't able to test it,
it might not compile and/or not work, in which case please someone fix it :)
2012-04-22 22:09:06 +02:00
Günther Brammer 52e0b52ba9 gtk: Remove some obsolete X11 code 2012-04-10 23:39:16 +02:00
Günther Brammer c102fe19d8 gtk: Use gtk functions to make a window fullscreen 2012-04-10 03:36:09 +02:00
Günther Brammer 40de33ca3c win32: Make sdl-mainloop option work
As it doesn't have the editor, this is only useful for compiling
more of our code on more platforms.
2012-03-23 22:53:56 +01:00
Martin Plicht 62f7540b2d mac: Turns out, shift+mouse actions were never properly processed. Whoops 2012-03-22 21:08:19 +01:00
Günther Brammer 19eefbc777 Move Gammaramp code from CStdGL to C4AbstractApp
The windows code now has to delegate to StdD3D like it does for the
resolution setting, but for the other ports the code fits much better in
the app source files.
2012-02-28 20:40:19 +01:00
Günther Brammer b7f7c933b1 Remove unused Application.DoNotDelay 2012-03-11 23:06:23 +01:00
Günther Brammer afe5411709 linux: Replace Application.Location with readlink("/proc/self/exe") 2012-03-11 23:01:21 +01:00
Günther Brammer b4439ac1b7 Remove unused C4AbstractApp::ClearClipboard 2012-02-28 01:37:26 +01:00
Peter Wortmann ad79ece074 Mac: Put game data into bundle
This makes it possible to ship the bundle stand-alone. Also
note that CMake will automatically pack the game data for
release builds, but sym-link the game data for debug builds.

Note this means you will only see the parts of planet/ that
are mentioned in OC_C4GROUPS in CMakeList.txt! This is equivalent
to the behaviour of the shipped build, so I don't see this as
a problem.
2011-10-09 17:09:48 +01:00
Günther Brammer 1cafba4be8 Rename files implementing C4AbstractApp and C4Window 2011-10-03 17:19:24 +02:00