コード例 #1
0
ファイル: StatManager.cpp プロジェクト: Jose-Luis/age
  StatManager::~StatManager()
  {
    ILOGM("StatManager::dtor()");

    // Clear pointers we don't need anymore
    mApp = NULL;
  }
コード例 #2
0
ファイル: StatManager.cpp プロジェクト: ItsJackson/gqe
  void StatManager::DoInit(void)
  {
    ILOGM("StatManager::DoInit()");

    // Reset our counters
    mFrames = 0;
    mUpdates = 0;

    // Reset our clocks
#if (SFML_VERSION_MAJOR < 2)
    mFrameClock.Reset();
    mUpdateClock.Reset();

    // Position and color for the FPS/UPS string
    mFPS = new(std::nothrow) sf::String("", mDefaultFont, 30.0F);
    mFPS->SetColor(sf::Color(0,255,0,128));
    mFPS->SetPosition(0,0);
    
    mUPS = new(std::nothrow) sf::String("", mDefaultFont, 30.0F);
    mUPS->SetColor(sf::Color(0,255,0,128));
    mUPS->SetPosition(0,30);
#else
    mFrameClock.restart();
    mUpdateClock.restart();

    // Position and color for the FPS/UPS string
    mFPS = new(std::nothrow) sf::Text("", mDefaultFont, 30);
    mFPS->setColor(sf::Color(0,255,0,128));
    mFPS->setPosition(0,0);

    mUPS = new(std::nothrow) sf::Text("", mDefaultFont, 30);
    mUPS->setColor(sf::Color(0,255,0,128));
    mUPS->setPosition(0,30);
#endif
  }
コード例 #3
0
ファイル: StateManager.cpp プロジェクト: Jose-Luis/age
  StateManager::~StateManager()
  {
    ILOGM("StateManager::dtor()");

    // Drop all active states
    while(!mStack.empty())
    {
      // Retrieve the currently active state
      IState* anState = mStack.back();
 
      // Pop the currently active state off the stack
      mStack.pop_back();

      // Pause the currently active state
      anState->pause();

      // De-initialize the state
      anState->deInit();

      // Handle the cleanup before we pop it off the stack
      anState->cleanup();

      // Just delete the state now
      delete anState;

      // Don't keep pointers around we don't need
      anState = NULL;
    }

    // Delete all our dropped states
    while(!mDead.empty())
    {
      // Retrieve the currently active state
      IState* anState = mDead.back();

      // Pop the currently active state off the stack
      mDead.pop_back();

      // Pause the currently active state
      anState->pause();

      // De-initialize the state
      anState->deInit();

      // Handle the cleanup before we pop it off the stack
      anState->cleanup();

      // Just delete the state now
      delete anState;

      // Don't keep pointers around we don't need
      anState = NULL;
    }

    // Clear pointers we don't need anymore
    mApp = NULL;
  }
コード例 #4
0
ファイル: StatManager.cpp プロジェクト: Jose-Luis/age
  void StatManager::deInit(void)
  {
    ILOGM("StatManager::DeInit()");

    // Delete our FPS string
    delete mFPS;
    mFPS = NULL;

    // Delete our UPS string
    delete mUPS;
    mUPS = NULL;
  }
コード例 #5
0
ファイル: StatManager.cpp プロジェクト: Jose-Luis/age
  StatManager::StatManager() :
    mApp(NULL),
    mShow(false),
    mFrames(0),
    mFrameClock(),
    mDefaultFont(),
    mFPS(NULL),
    mUpdates(0),
    mUpdateClock(),
    mUPS(NULL)
  {
    ILOGM("StatManager::ctor()");
		mDefaultFont.loadFromFile("resources/arial.ttf");
  }
コード例 #6
0
ファイル: StatManager.cpp プロジェクト: ItsJackson/gqe
  StatManager::StatManager() :
    mApp(NULL),
    mShow(false),
    pad_(),
    mFrames(0),
    mUpdates(0),
    mFrameClock(),
    mDefaultFont(),
    mFPS(NULL),
    mUpdateClock(),
    mUPS(NULL)
  {
    ILOGM("StatManager::ctor()");
#if SFML_VERSION_MAJOR < 2
		mDefaultFont.LoadFromFile("resources/arial.ttf");
#else
		mDefaultFont.loadFromFile("resources/arial.ttf");
#endif
  }
コード例 #7
0
ファイル: AssetManager.cpp プロジェクト: Ostkaka/MGE
	AssetManager::~AssetManager()
	{
		ILOGM("AssetManager::dtor()");

		// Iterator to use while deleting all assets
		assetHandlerMap::iterator iter;

		// Loop through each asset handler and remove each one
		iter = mHandlers.begin();
		while(iter != mHandlers.end())
		{
			IAssetHandler* anAssetHandler = iter->second;

			// Remove this Asset Handler from our map
			mHandlers.erase(iter++);

			// Delete the Asset Handler
			delete anAssetHandler;
		}
	}
コード例 #8
0
ファイル: StatManager.cpp プロジェクト: Jose-Luis/age
  void StatManager::doInit(void)
  {
    ILOGM("StatManager::DoInit()");

    // Reset our counters
    mFrames = 0;
    mUpdates = 0;

    // Reset our clocks

    mFrameClock.restart();
    mUpdateClock.restart();

    // Position and color for the FPS/UPS string
    mFPS = new(std::nothrow) sf::Text("", mDefaultFont, 30);
    mFPS->setFillColor(sf::Color(0,255,0,128));
    mFPS->setPosition(0,0);

    mUPS = new(std::nothrow) sf::Text("", mDefaultFont, 30);
    mUPS->setFillColor(sf::Color(0,255,0,128));
    mUPS->setPosition(0,30);

  }
コード例 #9
0
ファイル: StateManager.cpp プロジェクト: Jose-Luis/age
 StateManager::StateManager() :
   mApp(NULL)
 {
   ILOGM("StateManager::ctor()");
 }
コード例 #10
0
ファイル: AssetManager.cpp プロジェクト: Ostkaka/MGE
	AssetManager::AssetManager()
	{
		ILOGM("AssetManager::ctor()");
	}