/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2009.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: sgx/src/sgx/core/gamecode/gameengine.cpp

*/

#include "sgx/core/core.hpp"

CSGXGameEngine *CSGXGameEngine::m_pSingleton = NULL;

CSGXGameEngine *CSGXGameEngine::create()
{
	m_pSingleton = new CSGXGameEngine();
	if (m_pSingleton) {
		m_pSingleton->initialize();
	}
	return m_pSingleton;
}

CSGXGameEngine *CSGXGameEngine::get()
{
	if (!m_pSingleton) {
		return create();
	}
	return m_pSingleton;
}
