git » fp-git.git » commit ca997f2

binded add/take time actions

author ecalot
2004-08-22 23:18:38 UTC
committer ecalot
2004-08-22 23:18:38 UTC
parent 28e63ee2ed1c81dbaa7407a23fd76ad7d5b2c7fc

binded add/take time actions

FP/src/include/input.h +1 -1
FP/src/out/input.c +8 -0

diff --git a/FP/src/include/input.h b/FP/src/include/input.h
index b104810..225666c 100644
--- a/FP/src/include/input.h
+++ b/FP/src/include/input.h
@@ -33,7 +33,7 @@ input.h: Free Prince : Input devices handling
 #ifndef _INPUT_H_
 #define _INPUT_H_
 
-typedef enum {none=0,quit,load,reload,passLevel,showUp,showLeft,showRight,showDown,showScreens,showVersion,moreTime,lessTime,addLive,addHitPoint,gotoTitles,kill,resurrect,other}tAction;
+typedef enum {none=0,quit,load,reload,passLevel,showUp,showLeft,showRight,showDown,showScreens,showVersion,addTime,takeTime,addLive,addHitPoint,gotoTitles,kill,resurrect,other}tAction;
 
 /*#define inputIgnoreCtrl(a)  (a&( ~(1<<1) ))*/
 /* TODO: use inputIgnore* for each Set* */
diff --git a/FP/src/out/input.c b/FP/src/out/input.c
index 3d644ed..10d173b 100644
--- a/FP/src/out/input.c
+++ b/FP/src/out/input.c
@@ -71,6 +71,14 @@ int editAction(tKey* key,SDLKey k) {
 		case SDLK_l:
 			key->actionPerformed=passLevel;
 			break;
+		case SDLK_PLUS:
+		case SDLK_KP_PLUS:
+			key->actionPerformed=addTime;
+			break;
+		case SDLK_LESS:
+		case SDLK_KP_MINUS:
+			key->actionPerformed=takeTime;
+			break;
 		default:
 			break;
 		}