GameStateI.cpp

Go to the documentation of this file.
00001 ////////////////////////////////////////////////////////////////////////////////
00002 //    Scorched3D (c) 2000-2009
00003 //
00004 //    This file is part of Scorched3D.
00005 //
00006 //    Scorched3D is free software; you can redistribute it and/or modify
00007 //    it under the terms of the GNU General Public License as published by
00008 //    the Free Software Foundation; either version 2 of the License, or
00009 //    (at your option) any later version.
00010 //
00011 //    Scorched3D is distributed in the hope that it will be useful,
00012 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //    GNU General Public License for more details.
00015 //
00016 //    You should have received a copy of the GNU General Public License
00017 //    along with Scorched3D; if not, write to the Free Software
00018 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 }

Generated on Mon Feb 16 15:14:49 2009 for Scorched3D by  doxygen 1.5.3