Commit Graph

31 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
Lukas Werling 4d5bb7304c Fix game controllers not working with the editor 2016-10-10 14:16:18 +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
ckanibal 8f31ae22bf Make Windows build great again! 2016-03-07 00:58:23 +01:00
Lukas Werling 2d4747029d Make analog axis strength symmetrical (0 to 2^15 - 1) 2016-02-26 20:40:07 +01:00
Lukas Werling 8811356141 Make C4GamePadControl manage all controllers
The available gamepads are distributed automatically among players.

This also implements controller hot-plugging: It is possible to start a
game without a controller and plug it in later, and to reconnect a
controller after plugging it out.
2016-02-23 17:06:59 +01:00
Lukas Werling 9e0143b998 Remove gamepad ids from key codes
We want one gamepad key mapping to work with multiple gamepads, so
including the id there doesn't make sense.

Additionally, the gamepad id may change during the game (controller
hot-plugging).
2016-02-21 18:27:02 +01:00
Lukas Werling 7155ff90eb Implement controller rumbling
New script functions:
 - PlayRumble(int plr, int strength, int length)
 - StopRumble(int plr)
2016-02-21 18:27:01 +01:00
Lukas Werling 046cacc26c Remove unused and unimplemented gamepad functions
- GamePadControl::AnyButtonDown
 - GamePadOpener::SetGamePad
2016-02-21 18:27:01 +01:00
Lukas Werling 24622f3a9c Update main menu GUI gamepad control bindings
It is now possible to control all GUI menus using the left stick or the
dpad, along with the A and B buttons on the controller.

This also doubles the button emulation dead zone to make navigating the
menus with the stick easier.
2016-02-21 18:26:44 +01:00
Lukas Werling 8dd1450e94 Implement "gamepad stick moved" events for analog input
Analog moved events are only sent once per control frame.
2016-02-21 18:26:18 +01:00
Lukas Werling bd3f020068 Replace Joystick controls with SDL GameController 2016-02-13 21:03:19 +01:00
Günther Brammer 4b4b8781a0 Make GTK+ and SDL2 work together
If the gamepad code initialized the SDL video subsystem, GTK+ crashed in
libX11. Or something along those lines.

Making the optional subsystems using SDL for gamepads and audio use
SDL_InitSubSystem and only the SDL Application port do the full SDL_Init
is the proper way to do things in any case.
2016-02-06 21:12:56 +01:00
Günther Brammer 1010732ba8 Fix the SDL build 2016-02-06 16:47:56 +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
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 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
Günther Brammer 5d0df4f028 win32: Miscellanous fixes inspired by compiler warnings 2011-03-30 21:06:30 +02: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 eb26711102 C4GamePadCon: Fix some method signatures and a preprocessor directive 2010-12-24 14:18:51 +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
TomyLobo 92e506f458 Changed C4GamePadControl::Execute() to C4GamePadControl::Execute(bool send_axis_strength_changes) to match declaration. 2010-04-22 11:39:13 +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
Martin Plicht b84561075e Fix Some C4GamePadControl compiler errors when compiling with SDL 2010-02-24 16:49:00 +01:00
Sven Eberhardt c882b3ba9b send perioic gamepad axis change callbacks even if direction didn't change 2010-02-24 00:34:25 +01:00
Sven Eberhardt dda34d3897 send perioic gamepad axis change callbacks even if direction didn't change 2010-02-24 00:18:07 +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
Nicolas Hake 52bde5a579 Remove BIG_C4INCLUDE define 2009-10-20 06:21:12 +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