metaforce/Runtime/main.cpp

53 lines
1.1 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 05:26:58 +00:00
class CGameGlobalObjects : public TOneStatic<CGameGlobalObjects>
{
CMemoryCardSys m_memoryCardSys;
2015-08-17 20:33:58 +00:00
CResFactory m_resFactory;
CSimplePool m_simplePool;
2015-08-17 05:26:58 +00:00
public:
2015-08-17 20:33:58 +00:00
void PostInitialize(COsContext& osctx, CMemorySys& memSys)
{
}
2015-08-17 05:26:58 +00:00
};
class CMain : public COsContext
{
2015-08-17 20:33:58 +00:00
CMemorySys m_memSys;
2015-08-17 05:26:58 +00:00
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()
2015-08-17 20:33:58 +00:00
: m_memSys(*this, 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;
}
};
int main(int argc, const char* argv[])
{
CMain main;
return main.RsMain(argc, argv);
}