changeset 108:68e6cc686f48

delete error of controler.cc
author Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
date Thu, 09 Jun 2011 00:26:27 +0900
parents 5d231c9754d1
children 165b4d902ca4
files controler.cc controler.h game.cc
diffstat 3 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/controler.cc	Thu Jun 09 00:09:57 2011 +0900
+++ b/controler.cc	Thu Jun 09 00:26:27 2011 +0900
@@ -21,7 +21,7 @@
   SgoexCerium をみながら、改変。
   引数を追加して、変数名以外の書き方を似せた
 */
-bool pad(SDL_Joystick *joy) {
+bool padCheck(SDL_Joystick *joy) {
 
   SDL_JoystickUpdate();
 
@@ -103,7 +103,7 @@
        && (SDL_JoystickGetButton(joy,PS2_R1)==SDL_PRESSED)
        && (SDL_JoystickGetButton(joy,PS2_L2)==SDL_PRESSED)
        && (SDL_JoystickGetButton(joy,PS2_R2)==SDL_PRESSED)
-  {
+  ){
     return false;
   }
 
@@ -209,21 +209,14 @@
 	//pad[0].se = 1;
     }
 
-    if (keys[SDLK_0]) {
-	pad[0].quit = 1;
-    } else {
-	pad[0].quit = 0;
-    }
-    
     //SELECT, START, L1, R1, L2, R2
-  {
     if ( (keys[SDLK_2])
        && (keys[SDLK_RETURN]) 
        && (keys[SDLK_w])
        && (keys[SDLK_e])
        && (keys[SDLK_q])
        && (keys[SDLK_r])
-    {
+    ){
       return false;
     }
     
--- a/controler.h	Thu Jun 09 00:09:57 2011 +0900
+++ b/controler.h	Thu Jun 09 00:26:27 2011 +0900
@@ -1,6 +1,8 @@
 #ifndef CONTROLER_H
 #define CONTROLER_H
 
+#include <SDL.h>
+
 /*PS2_PAD*/
 #define PS2_CROSS 0
 #define PS2_CIRCLE 1
@@ -52,7 +54,7 @@
 extern struct SGO_PAD pad;
 
 //padCheck を rename
-extern bool pad(SDL_Joystick *joy);;
+bool padCheck(SDL_Joystick *joy);
 extern bool keybord( void );
 
 #endif
--- a/game.cc	Thu Jun 09 00:09:57 2011 +0900
+++ b/game.cc	Thu Jun 09 00:26:27 2011 +0900
@@ -29,7 +29,12 @@
 #endif
   
   while (1) {
-    flg = padCheck();
+    /*
+      引数の数を変更したので、
+      エラーが出ないように一時的に削除
+      たぶん、後で新しく新調するはずなので・・・
+    */
+    //flg = padCheck();
     
     if (flg == false) {
       break;