view controler.h @ 122:5219bf3d5e71

title_draw
author e085768
date Mon, 27 Jun 2011 19:44:46 +0900
parents f2e2460b4011
children
line wrap: on
line source

#ifndef CONTROLER_H
#define CONTROLER_H

#include <SDL.h>
/*PS2_PAD*/
#define PS2_CROSS 0
#define PS2_CIRCLE 1
#define PS2_SQUARE 2
#define PS2_TRIANGLE 3

#define PS2_L1 4
#define PS2_R1 5
#define PS2_L2 6
#define PS2_R2 7
#define PS2_START 8
#define PS2_SELECT 9
#define PS2_L3 10
#define PS2_R3 11

#define PS2_LEFT 12
#define PS2_RIGHT 13
#define PS2_UP 14
#define PS2_DOWN 15


/*
 * チャタリング防止
 * value = 0: 押してない
 *         1: 1回押した
 *         2: 押し続けている
 */


typedef struct SGO_PAD {
  short st;
  short se;
  short left;
  short right;
  short up;
  short down;
  short r1;
  short r2;
  short l1;
  short l2;
  short cross;
  short circle;
  short triangle;
  short square;
} SGO_PAD;



extern struct SGO_PAD pad;

//padCheck を rename
bool padCheck(SDL_Joystick *joy);
extern bool keybord( void );

#endif