view controler.h @ 107:5d231c9754d1

change controler.cc
author Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
date Thu, 09 Jun 2011 00:09:57 +0900
parents 0b65ca27f113
children 68e6cc686f48
line wrap: on
line source

#ifndef CONTROLER_H
#define CONTROLER_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
extern bool pad(SDL_Joystick *joy);;
extern bool keybord( void );

#endif