metaforce/Runtime/MP1/main.cpp

70 lines
1.5 KiB
C++
Raw Normal View History

2015-08-17 05:26:58 +00:00
#include <memory>
#include "COsContext.hpp"
#include "CBasics.hpp"
#include "CTweaks.hpp"
2015-08-17 20:33:58 +00:00
#include "CMemory.hpp"
2015-08-17 05:26:58 +00:00
#include "CMemoryCardSys.hpp"
2015-08-17 20:33:58 +00:00
#include "CResFactory.hpp"
#include "CSimplePool.hpp"
2015-08-17 23:46:41 +00:00
#include "Character/CAssetFactory.hpp"
#include "CAi.hpp"
#include "CGameState.hpp"
#include "CInGameTweakManager.hpp"
2015-08-17 05:26:58 +00:00
namespace Retro
2015-08-17 05:26:58 +00:00
{
namespace MP1
{
class CGameGlobalObjects : public Common::TOneStatic<CGameGlobalObjects>
{
Common::CMemoryCardSys m_memoryCardSys;
Common::CResFactory m_resFactory;
Common::CSimplePool m_simplePool;
2015-08-17 23:46:41 +00:00
Common::CCharacterFactoryBuilder m_charFactoryBuilder;
Common::CAiFuncMap m_aiFuncMap;
Common::CGameState m_gameState;
Common::CInGameTweakManager m_tweakManager;
2015-08-17 05:26:58 +00:00
public:
void PostInitialize(Common::COsContext& osctx, Common::CMemorySys& memSys)
2015-08-17 20:33:58 +00:00
{
}
2015-08-17 05:26:58 +00:00
};
class CMain : public Common::COsContext
2015-08-17 05:26:58 +00:00
{
Common::CMemorySys m_memSys;
Common::CTweaks m_tweaks;
2015-08-17 20:33:58 +00:00
bool m_run = true;
2015-08-17 05:26:58 +00:00
public:
CMain()
: m_memSys(*this, Common::CMemorySys::GetGameAllocator())
2015-08-17 05:26:58 +00:00
{
OpenWindow("", 0, 0, 640, 480);
}
void InitializeSubsystems()
{
}
int RsMain(int argc, const char* argv[])
{
2015-08-17 20:33:58 +00:00
CGameGlobalObjects* globalObjs = new CGameGlobalObjects;
InitializeSubsystems();
globalObjs->PostInitialize(*this, m_memSys);
while (m_run)
{
}
2015-08-17 05:26:58 +00:00
return 0;
}
};
}
}
2015-08-17 05:26:58 +00:00
int main(int argc, const char* argv[])
{
Retro::MP1::CMain main;
2015-08-17 05:26:58 +00:00
return main.RsMain(argc, argv);
}