Commit Graph

65 Commits (934b519bb4426d3d5386c9d103a51afbe41388f5)

Author SHA1 Message Date
Günther Brammer 934b519bb4 Update the SDL port to SDL2
SDL2 is a much closer match to the other platform code, and
allows the creation of OpenGL 3 core contexts, which is
now required.
2016-02-06 16:48:21 +01:00
Günther Brammer 59e5a327b2 gtk: Add support for microsoft windows 2016-02-06 16:47:44 +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
Sven Eberhardt afab6ef464 func PlayerControl: Send nil instead of 0 for non-mouse controls.
The main script function always assumed this, but it was not actually implemented that way.
2016-01-16 22:06:19 -05:00
Sven Eberhardt e89779a8c7 Handle key-up events corresponding to keys that were down even if scope is not matched #1145 2016-01-09 00:19:38 -04:00
Günther Brammer 5db59e8665 Fix C4MessageBoard key binding lifetime
I think C4Game::InitKeyboard relies on the callback targets outliving the
keybindings and every other class is prepared to be deleted before
C4KeyboardInput::Clear(), so needs to hold a ref to the keybinding to
delete that in its destructor.

C4KeyBinding is the class that is used for that, and it sets the reference
count to 1 in the constructor, to represent the reference held in the
owning class.

On the other hand, C4CustomKey gets immediately forgotten by C4Game and the
only reference is held in the keymap.

To prevent this from happening again, make the C4CustomKey constructors
protected and C4Game a friend of the class.

Also remove an unused C4CustomKey constructor.
2016-01-01 16:24:43 +01:00
Nicolas Hake f0eeb3f6b3 Make headless build compile again 2015-12-15 19:45:32 +01:00
Armin Burgmeier bbdec40075 Fix a free/delete/g_free mismatch 2015-10-18 14:45:52 -04:00
Armin Burgmeier ef4ea2d931 Drop support for GTK+ 2
The minimum GTK version is now GTK+ 3.4, which is available since 2012.
It's part of Ubuntu LTS 12.04, and so should be available on any halfway
modern linux distribution.

This should allow getting rid of using deprecated GTK+ API much easier.
2015-10-18 14:45:52 -04:00
Sven Eberhardt 15a1a62521 Automatically deduce shift state in combo keys with Control/Shift combo. 2015-09-01 19:11:13 -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 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
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
Martin Plicht 1d829361f7 mac: Minimal fix after scancode merge 2013-05-24 19:55:56 +02:00
Günther Brammer 346842470d Clean up some superfluous includes 2013-03-24 18:33:01 +01: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
Armin Burgmeier cf159068b3 Fix warning about undefined backspace key on Linux 2012-10-13 16:15:01 +02:00
Armin Burgmeier 56861e4601 Implement key by scancode in PlayerControls.txt on X11
Unfortunately they seem to be different in linux and windows
2012-10-13 16:03:47 +02:00
Sven Eberhardt 420a91f5fd fix build 2012-10-09 19:04:11 +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
Armin Burgmeier e11e9845d1 Fix Windows build 2012-04-23 21:45:01 +02:00
Sven Eberhardt 80d5f01642 Added FnGetPlayerControlAssignment: Get key/button assigned to a control.
To be used by tutorial messages explaining controls.
2012-04-17 17:06:16 +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
Bernhard Bonigl 03729bdbf1 Experimental: Added Interaction-Hotkeys on <> to . (the row below the home row).
Made the Keys <> on German Keyboards an \| and ;: on US Keyboards usable
2012-03-21 21:52:32 +01:00
Bernhard Bonigl 7ab6dde1b3 Fixed Apostrophe beeing mapped to VK_OEM_5 (\| on US) to VK_OEM_7 ('" on US) 2012-03-20 15:14:47 +01:00
Sven Eberhardt c287c093cc PlayerControl: Mouse coordinate space (viewport vs landscape) is now a control property; not an assignment property.
This is in preparation for proper custom control assignments
2011-11-20 21:49:38 +01:00
Günther Brammer 1cafba4be8 Rename files implementing C4AbstractApp and C4Window 2011-10-03 17:19:24 +02:00
Günther Brammer 2fcdd4d929 Convert keyboard key names to utf-8 2011-09-28 01:12:45 +02:00
Günther Brammer 562816cfe5 Clean up some unused variables and obsolete FIXMEs 2011-09-28 01:09:56 +02:00
Günther Brammer 9bc61db360 copyright notices update 2011 2011-09-01 16:58:52 +02:00
Sven Eberhardt 269c7b208c control config dialog 2011-03-30 22:11:47 +02:00
Günther Brammer 8569eaab8c win32: Do not include windows.h from PlatformAbstraction.h
A few windows headers are still included, but not the big offenders
rpcndr.h, wingdi.h and winuser.h. Unfortunately, the latter two need to be
included from StdWindow.h, so still wind up in a lot files, which means
some of the #defines in them need to be undone. To avoid doing that in
multiple places, a few more files include StdWindow.h now.
2011-03-11 03:48:25 +01:00
Günther Brammer 2820716057 Include fewer headers from C4Game.h so C4NetIO.h isn't included from there 2011-03-11 03:43:38 +01:00
Günther Brammer 8ff6ae847c C4Group::LoadEntry takes pointer instead of non-const reference 2011-03-05 02:44:26 +01:00
Martin Plicht b82c8dc59e cocoa: Fix compilation 2011-02-05 21:35:18 +01:00
Günther Brammer cde66b249f C4Include.h: Do not include C4Gui.h
The two dialogs in headers included in C4Game.h are only used by classes in
those headers, and do not need to be defined in the headers.
2011-01-24 01:15:58 +01:00
Martin Plicht a22d5ee35c Mac: Add Cocoa port 2010-12-27 04:49:02 +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
Armin Burgmeier 9f65838ae8 Fix a couple of compiler warnings 2010-04-28 23:43:25 +02:00
Armin Burgmeier a58b07d65f Rename keycode "Back" to "Backspace" so that it matches X11 2010-04-18 16:17:55 +02:00
Armin Burgmeier d8e8eab992 C4KeyCodeEx::String2KeyCode: Return KEY_Undefined instead of 0 if key not found (#233) 2010-04-18 16:15:51 +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
Sven Eberhardt 123cc82550 fix modifier key check on non-playercontrol keys (#201) 2010-03-25 12:34:23 +01:00
Sven Eberhardt 25e5279c0d implement gamepad axis strength parameter in player controls
lowered axis threshold to 20%
2010-02-23 17:53:38 +01:00
Sven Eberhardt 526158dfe3 fix input binding fallbacks (#158)
compile fix
2010-02-23 00:35:06 +01:00
Asmageddon f3fcf7e80e fix key release event not being triggered if shift state changed during key hold (#134) 2010-02-18 18:43:38 +01:00
Nicolas Hake 8c87becfd1 Fix Win32 virtual key constants 2010-01-28 11:07:12 +01:00