2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 23:47:43 +00:00

Refactored directory layout for cleaner runtime organization

This commit is contained in:
Jack Andersen
2015-08-17 12:05:00 -10:00
parent 9eb41231ea
commit 520eec7aa2
74 changed files with 449 additions and 47 deletions

60
Runtime/MP1/main.cpp Normal file
View File

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