source: abuse/trunk/src/sdl2port/joy.h @ 731

Last change on this file since 731 was 731, checked in by jjsimpso, 8 years ago

sdlport: Add support for SDL2, inculding the game controller API. Configure
script will check for SDL2 and use it if present, otherwise it will fall
back to SDL v1. Some old SDL v1 features not implemented yet on SDL2, such
as saving screenshots.

core: Small change for SDL2 game controller API to disable the game
controller in the save/load game menu.

Summary of game controller API changes:

  • Enable with -gamepad
  • Tested with PS3 dualshock 3.
  • D-pad moves, right analog controls aiming
  • X: change weapon, []: jump, R1: fire, L1: special ability, /\:use/activate
  • All menu navigation requires the mouse, which is disabled during normal game play.
File size: 561 bytes
RevLine 
[731]1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5 *
6 *  This software was released into the Public Domain. As with most public
7 *  domain software, no warranty is made or implied by Crack dot Com, by
8 *  Jonathan Clark, or by Sam Hocevar.
9 */
10
11#ifndef __JOYSTICK_HPP_
12#define __JOYSTICK_HPP_
13
14int joy_init(int argc, char **argv); // returns 0 if no joystick is available
15void joy_status(int &b1, int &b2, int &b3, int &xv, int &yv);
16void joy_calibrate();
17
18#endif
Note: See TracBrowser for help on using the repository browser.