00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <engine/GameStateI.h>
00022
00023 std::vector<std::string> GameStateI::perfCounterNames_;
00024
00025 GameStateI::GameStateI(const char *name) :
00026 gameStateIName_(name)
00027 {
00028
00029 }
00030
00031 GameStateI::~GameStateI()
00032 {
00033
00034 }
00035
00036 void GameStateI::simulate(const unsigned state, float simTime)
00037 {
00038
00039 }
00040
00041 void GameStateI::draw(const unsigned state)
00042 {
00043
00044 }
00045
00046 void GameStateI::keyboardCheck(const unsigned state, float frameTime,
00047 char *buffer, unsigned int keyState,
00048 KeyboardHistory::HistoryElement *, int hcount,
00049 bool &skipRest)
00050 {
00051
00052 }
00053
00054 void GameStateI::mouseDown(const unsigned state, GameState::MouseButton button,
00055 int x, int y, bool &skipRest)
00056 {
00057
00058 }
00059
00060 void GameStateI::mouseUp(const unsigned state, GameState::MouseButton button,
00061 int x, int y, bool &skipRest)
00062 {
00063
00064 }
00065
00066 void GameStateI::mouseDrag(const unsigned state, GameState::MouseButton button,
00067 int x, int y, int dx, int dy, bool &skipRest)
00068 {
00069
00070 }
00071
00072 void GameStateI::mouseWheel(const unsigned state, int x, int y, int z, bool &skipRest)
00073 {
00074
00075 }
00076
00077 void GameStateI::enterState(const unsigned state)
00078 {
00079
00080 }
00081
00082 int GameStateI::getPerfCounter(const char *perfName)
00083 {
00084 for (int i=0; i<(int) perfCounterNames_.size(); i++)
00085 {
00086 if (0 == strcmp(perfCounterNames_[i].c_str(), perfName)) return i;
00087 }
00088
00089 perfCounterNames_.push_back(perfName);
00090 return int(perfCounterNames_.size() - 1);
00091 }
00092
00093 void GameStateI::startPerfCount(int counter)
00094 {
00095 while (int(perfCounters_.size()) <= counter)
00096 {
00097 perfCounters_.push_back(new GameStatePerfCounter(perfCounterNames_[perfCounters_.size()].c_str()));
00098 }
00099 perfCounters_[counter]->start();
00100 }
00101
00102 void GameStateI::endPerfCount(int counter)
00103 {
00104 while (int(perfCounters_.size()) <= counter)
00105 {
00106 perfCounters_.push_back(new GameStatePerfCounter(perfCounterNames_[perfCounters_.size()].c_str()));
00107 }
00108 perfCounters_[counter]->end();
00109 }