From: Patrik Gornicz Date: Tue, 2 Sep 2008 03:42:15 +0000 (-0400) Subject: keys setup to use extern X-Git-Tag: physics-premerge~117 X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=commitdiff_plain;h=1878e7c1f8cef670e740a8f63f48afcb98386cdf;p=libbear.git keys setup to use extern --- diff --git a/src/config/config.cpp b/src/config/config.cpp index 1e15c69..0980076 100644 --- a/src/config/config.cpp +++ b/src/config/config.cpp @@ -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 ***** diff --git a/src/config/keys.cpp b/src/config/keys.cpp index 6a15f6e..6ac87bb 100644 --- a/src/config/keys.cpp +++ b/src/config/keys.cpp @@ -20,21 +20,8 @@ #include -/// ***** 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; diff --git a/src/config/keys.h b/src/config/keys.h index 9244a6f..42fd378 100644 --- a/src/config/keys.h +++ b/src/config/keys.h @@ -24,13 +24,10 @@ /// ***** 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