projects
/
physics.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed up the key mapping system a little ... still does comparisons wrong ...
[physics.git]
/
src
/
config
/
keys.h
diff --git
a/src/config/keys.h
b/src/config/keys.h
index
42fd378
..
49fe66f
100644
(file)
--- a/
src/config/keys.h
+++ b/
src/config/keys.h
@@
-21,6
+21,28
@@
#include <SDL/SDL.h>
#include <SDL/SDL.h>
+#include <map>
+#include <string>
+
+#include "../debug.h"
+
+class comparestrings
+{
+ public:
+ bool operator()
+ (
+ const std::string& a,
+ const std::string& b
+ )
+ {
+ cout << a << endl;
+ cout << b << endl;
+ cout << endl;
+
+ return a.compare(b) < 0;
+ }
+};
+
/// ***** Header Methods *****
namespace key
{
/// ***** Header Methods *****
namespace key
{
@@
-28,6
+50,12
@@
namespace key
extern SDLKey end;
extern SDLKey follow;
extern SDLKey well;
extern SDLKey end;
extern SDLKey follow;
extern SDLKey well;
+
+ typedef std::map<std::string, SDLKey*, comparestrings> inputMap;
+
+ extern inputMap sdlMap;
+
+ void init();
}
#endif // KEYS_H
}
#endif // KEYS_H