#ifndef _control_hh_ #define _control_hh_ #define NUMKEYS 322 #include #include #include #include "lands.hh" #include "landscape.hh" #include "camera.hh" typedef void (*fncptr)(); extern SDL_Surface * surface; class Keyboard{ void (*keyUp[NUMKEYS])() ; void (*keyDown[NUMKEYS])() ; void cfgParser(); int parseKey(std::string); void parseFunc(std::string,int key); public: Keyboard(); fncptr down(int i); //keypress array to functionpointers to mostly wrappers fncptr up(int i); //release void init(); } ; extern Keyboard keyboard; class Mouse{ public: Mouse(); void pick(int, int,int); }; extern Mouse mouse; #endif