diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-11-17 19:44:09 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-11-17 19:44:09 (GMT) |
| commit | 058a2edd75debbd0297f92572316daa704bd379f (patch) | |
| tree | ad303f091f9a08b209b91eb34a9fcad996a3de69 /src/cat/CommandInterface.h | |
| parent | e3594aba9e05c6865d396418c028049cda92c2f3 (diff) | |
| parent | 7a21ae192fe19868539956f3fe28e62b2c7c4429 (diff) | |
| download | powder-058a2edd75debbd0297f92572316daa704bd379f.zip powder-058a2edd75debbd0297f92572316daa704bd379f.tar.gz | |
Merge branch 'master' of github.com:FacialTurd/PowderToypp
Diffstat (limited to 'src/cat/CommandInterface.h')
| -rw-r--r-- | src/cat/CommandInterface.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/cat/CommandInterface.h b/src/cat/CommandInterface.h new file mode 100644 index 0000000..e6119d3 --- /dev/null +++ b/src/cat/CommandInterface.h @@ -0,0 +1,44 @@ +/* + * Kitty.h + * + * Created on: Feb 2, 2012 + * Author: Simon + */ + +#ifndef KITTY_H_ +#define KITTY_H_ + +#include <string> +#include "interface/Engine.h" +//#include "game/GameModel.h" + +class GameModel; +class GameController; +class CommandInterface { +protected: + std::string lastError; + GameModel * m; + GameController * c; +public: + enum LogType { LogError, LogWarning, LogNotice }; + enum FormatType { FormatInt, FormatString, FormatChar, FormatFloat }; + CommandInterface(GameController * c, GameModel * m); + int GetPropertyOffset(std::string key_, FormatType & format); + int GetParticleType(std::string type); + void Log(LogType type, std::string message); + //void AttachGameModel(GameModel * m); + virtual bool OnBrushChanged(int brushType, int rx, int ry) {return true;} + virtual bool OnMouseMove(int x, int y, int dx, int dy) {return true;} + virtual bool OnMouseDown(int x, int y, unsigned button) {return true;} + virtual bool OnMouseUp(int x, int y, unsigned button) {return true;} + virtual bool OnMouseWheel(int x, int y, int d) {return true;} + virtual bool OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) {return true;} + virtual bool OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) {return true;} + virtual void OnTick() {} + virtual int Command(std::string command); + virtual std::string FormatCommand(std::string command); + std::string GetLastError(); + virtual ~CommandInterface(); +}; + +#endif /* KITTY_H_ */ |
