metaforce/Runtime/MP1/main.cpp

61 lines
1.2 KiB
C++
Raw Normal View History

2015-08-16 22:26:58 -07:00
#include <memory>
#include "COsContext.hpp"
#include "CBasics.hpp"
#include "CTweaks.hpp"
2015-08-17 13:33:58 -07:00
#include "CMemory.hpp"
2015-08-16 22:26:58 -07:00
#include "CMemoryCardSys.hpp"
2015-08-17 13:33:58 -07:00
#include "CResFactory.hpp"
#include "CSimplePool.hpp"
2015-08-16 22:26:58 -07:00
namespace Retro
2015-08-16 22:26:58 -07:00
{
namespace MP1
{
class CGameGlobalObjects : public Common::TOneStatic<CGameGlobalObjects>
{
Common::CMemoryCardSys m_memoryCardSys;
Common::CResFactory m_resFactory;
Common::CSimplePool m_simplePool;
2015-08-16 22:26:58 -07:00
public:
void PostInitialize(Common::COsContext& osctx, Common::CMemorySys& memSys)
2015-08-17 13:33:58 -07:00
{
}
2015-08-16 22:26:58 -07:00
};
class CMain : public Common::COsContext
2015-08-16 22:26:58 -07:00
{
Common::CMemorySys m_memSys;
Common::CTweaks m_tweaks;
2015-08-17 13:33:58 -07:00
bool m_run = true;
2015-08-16 22:26:58 -07:00
public:
CMain()
: m_memSys(*this, Common::CMemorySys::GetGameAllocator())
2015-08-16 22:26:58 -07:00
{
OpenWindow("", 0, 0, 640, 480);
}
void InitializeSubsystems()
{
}
int RsMain(int argc, const char* argv[])
{
2015-08-17 13:33:58 -07:00
CGameGlobalObjects* globalObjs = new CGameGlobalObjects;
InitializeSubsystems();
globalObjs->PostInitialize(*this, m_memSys);
while (m_run)
{
}
2015-08-16 22:26:58 -07:00
return 0;
}
};
}
}
2015-08-16 22:26:58 -07:00
int main(int argc, const char* argv[])
{
Retro::MP1::CMain main;
2015-08-16 22:26:58 -07:00
return main.RsMain(argc, argv);
}