Commit Graph

64 Commits (376ca5a9dfb6b51ad02253a429ef0bd935d85799)

Author SHA1 Message Date
Julius Michaelis 376ca5a9df Prevent using USE_CONSOLE in lib{misc,c4script} 2016-10-22 17:42:23 +02:00
Sven Eberhardt c78a98d4b3 Fix crash on uninitialized pointer in Qt GL window initialization 2016-08-06 15:22:58 -04:00
Sven Eberhardt 69fff71abf Qt editor: Fix crash on player removal 2016-07-31 23:22:09 -04:00
Nicolas Hake 9dddf289db Merge branch 'master' into qteditor 2016-04-03 21:06:32 +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
Lukas Werling f8dc58e0ed Remove Windows editor rendering hacks (untested) 2016-03-26 20:54:26 +01:00
Sven Eberhardt f6ce50e9e7 Qt Editor: Use qt widgets for viewports 2016-03-10 00:07:17 -05:00
Sven Eberhardt 2af22ee824 New editor (Qt-based)
Work in progress. So far only for Windows.
2016-02-15 08:38:06 -05:00
Lukas Werling 24ef8b43af Grab the mouse while in-game (#1637)
This only implements this for the SDL port for now.
2016-02-12 21:09:40 +01:00
Günther Brammer d0fb24adda Merge epoxy preparation branch
Various changes to make the commit switching to epoxy smaller.
2016-02-02 03:35:13 +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
Nicolas Hake 98c966c7d1 Win32: Don't take/restore copies of all textures on app (de)activation
Even though we (might) change the resolution, that doesn't result in
loss of textures because we don't recreate the OpenGL context. Therefore
we also don't have to restore their data. I believe this code is a relic
from the DirectX renderer, which would lose textures when switching away
from a fullscreen window.
2016-02-01 20:48:17 +01:00
Günther Brammer 83cf09db1a GL: Replace CStdGLCtx::Reinitialize with parameter to Clear() 2016-01-29 16:52:36 +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 37fd0a88c6 win32: Rename C4Window::hRenderWindow to renderwnd to match GTK+ 2016-01-23 22:02:52 +01:00
Sven Eberhardt 8b2dd0a8bb Win32: Fix "beep" on handled hotkeys (Alt+[key]) in fullscreen mode #1488 2015-12-06 22:32:47 -05:00
Nicolas Hake eb22e357b1 Win32: Prevent Alt key presses from opening the system menu (#1468)
Pressing the Alt key enters the menu modal loop, which takes control of
the thread that everything happens on. As a quick fix, we'll suppress
this loop for simple Alt key presses, but this will still happen when
the system menu gets opened by Alt+Space or clicking the icon in the
window's title bar.

A more permanent solution would be to detach the message loop from
everything else, by having rendering etc. run in a separate background
thread.
2015-11-30 21:33:36 +01:00
Sven Eberhardt 3e2e9d5ed4 Fix some warnings. 2015-09-03 00:16:25 -04: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
Sven Eberhardt 7d9f7aee02 Fix some unused variables and integer type conversions. 2015-09-01 22:18:39 -04:00
Sven Eberhardt e5814f8841 Silence some spurious compiler warnings about partially initialized structures. 2015-09-01 21:37:16 -04:00
Sven Eberhardt 0b37c96490 Fix Windows builds.
Removed some leftover gamma ramp functionality from Win32 AbstractApp.
2015-09-01 08:20:34 -04:00
Sven Eberhardt 95baaa7934 Enable usage of LeftControl, RightControl, LeftShift and RightShift as player control keys. 2015-08-31 20:50:54 -04:00
Nicolas Hake c58e474f76 win32/GL: Reuse the same rendering context for everything
Some resources can't be shared across different rendering contexts while
others can. Additionally, the standard GLEW library does not support
multiple rendering contexts (that's what GLEX MX is for), even though it
might work on some (or even most) cards. WGL supports reuse of a
rendering context across multiple windows as long as the pixel formats
are the same.
2015-03-26 15:51:01 +01:00
Nicolas Hake 5562b09dc4 Remove a lot of disabled legacy code, round 2
Maybe at some point we'll be rid of all the commented-out code that
nobody has looked at in years.
2015-03-25 20:02:53 +01:00
Sven Eberhardt 1c994ad3c7 Windows: Do not deselect GL context when losing focus (#1208).
Fixes engine intialization when tabbing out.
2015-01-11 17:01:27 +01:00
Tobias Zwick 5e188aafb3 Fix setting small ViewOffsets. Refactor neighbouring code, enable a slight MouseAutoScroll by default
* make ViewX,ViewY,ViewOffsetX and Y private, add getters and setters that update variables that are dependent on these
2015-01-03 22:53:02 +01:00
Sven Eberhardt f50e2e9e3a Fix scroll bars in zoomed editor viewports on Windows. 2014-12-14 16:08:56 +01:00
Sven Eberhardt 8df39d06e4 Fix texture preview in editor tools dialogue on Windows. 2014-12-14 15:20:57 +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
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
Tobias Zwick a6adc2465f fix scancodes convert on windows for non-fullscreen 2013-05-30 21:51:34 +02:00
Tobias Zwick 61ee6d393f Correct the scancode numbers for windows
Also reduce the duplication of these numbers in C4Window.h and C4KeyboardInput.cpp.
2013-05-26 18:07:09 +02:00
Oliver Schneider 582e75d3da Use scancodes instead of localized key (#729)
The options dialog still shows localized keys, but the config files use US-Layout keys (when loading default files) and scancodes when saving player changes.
2013-02-09 01:05:27 +01:00
Günther Brammer 864c5c7ea8 copyright notices update 2012 2013-01-12 16:31:40 +01:00
Tobias Zwick 12423b4b4f fix possible problems with several monitors on windows 2012-10-28 02:35:29 +02:00
Tobias Zwick 1ae7d55a21 fix odd cursor jumping on mousewheel use on windows (#439) 2012-10-28 02:11:03 +02:00
Julius Michaelis c4506a2b69 Fix entering fullscreen mode in lobby
Remove a debuglog
2012-10-14 17:45:01 +02:00
Julius Michaelis 69bbc6b4d1 Fix resolution reset in editor mode and on tabbing out
Win32's SetVideoMode doesn't enumerate display modes anymore for windowed mode
2012-10-14 13:28:38 +02: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
Julius Michaelis 87854916ba Fix fix: cb043bd90678
Quickfixes are bad
2012-10-07 12:42:51 +02:00
Julius Michaelis ab880d6bd8 Fix 2c9e6ac9f614 (windows + logic) 2012-10-03 00:54:56 +02:00
Günther Brammer f6db61750e Store the size of the non-fullscreen-window separately
The size of that window can be adjusted by the player, so there is no need
for a GUI option.
2012-08-30 00:13:14 +02:00
Günther Brammer cc25878ba6 Default to not changing the resolution
1. We receive bugreports that changing the resolution doesn't work, but
can't reproduce that
2. Flat screens look best at their natural resolution
2012-08-19 20:59:01 +02:00
Nicolas Hake 58ac553956 Win32: Do not reset graphics mode if no change is required 2012-08-28 00:01:01 +02:00
Nicolas Hake faf0006a6f Win32: Improve error reporting when changing resolution 2012-08-28 00:00:29 +02:00
Günther Brammer 06cb8b595d win32: Remove obsolete #include multimon.h
multimon.h was only needed for compatibility with Windows 95.
2012-07-18 03:40:19 +02:00
Nicolas Hake 59b48f5069 Win32: Accept dropped definition files
Viewport windows had the required code to hande dropped files, but didn't tell
the window manager they'd accept drag & drop messages.

Also pull a loop invariant out of the loop (drop point can't change while we're
processing the drop message) to save function calls in cases with more than one
dropped file.
2012-05-23 22:37:07 +02:00