keys setup to use extern
authorPatrik Gornicz <Gornicz.P@gmail.com>
Tue, 2 Sep 2008 03:42:15 +0000 (23:42 -0400)
committerPatrik Gornicz <Gornicz.P@gmail.com>
Tue, 2 Sep 2008 03:42:15 +0000 (23:42 -0400)
src/config/config.cpp
src/config/keys.cpp
src/config/keys.h

index 1e15c69..0980076 100644 (file)
@@ -34,16 +34,10 @@ void cfg::init()
     readConfigs(NULL);
 
     // TODO read in config files
-
-    key::init();
-
-    cout << &key::end << endl;
 }
 void cfg::clean()
 {
     // TODO save to config files?
-
-    key::clean();
 }
 
 /// ***** Public Methods *****
index 6a15f6e..6ac87bb 100644 (file)
 
 #include <SDL/SDL.h>
 
-/// ***** Private Method Headers *****
-/// ***** Private Variables *****
-
-/// ***** Initializers/Cleaners *****
-void key::init()
-{
-    pause = SDLK_p;
-    end = SDLK_ESCAPE;
-
-    follow = SDLK_f;
-
-    well = SDLK_SPACE;
-
-    cout << &key::end << endl;
-}
-void key::clean()
-{
-}
+/// ***** Definitions of the extern keys *****
+SDLKey key::pause = SDLK_p;
+SDLKey key::end = SDLK_ESCAPE;
+SDLKey key::follow = SDLK_f;
+SDLKey key::well = SDLK_SPACE;
index 9244a6f..42fd378 100644 (file)
 /// ***** Header Methods *****
 namespace key
 {
-    void init();
-    void clean();
-
-    static SDLKey pause;
-    static SDLKey end;
-    static SDLKey follow;
-    static SDLKey well;
+    extern SDLKey pause;
+    extern SDLKey end;
+    extern SDLKey follow;
+    extern SDLKey well;
 }
 
 #endif // KEYS_H