#include "stdafx.h"
#include "MainApp.h"
// Copyright 2018 RED Software, LLC. All Rights Reserved.
int WINAPI WinMain(HINSTANCE hI, HINSTANCE /* hPI */, LPSTR cmdline, int /* iWinMode */ )
{
	NiInitOptions option;
	NiStaticDataManager::Init(&option);

	MainApp* pTheApp = MainApp::Create();
	if (pTheApp == nullptr)
	{
		NiShutdown();
		return 0;
	}

	if (pTheApp->Init(hI))
	{
		pTheApp->Run();
	}

	pTheApp->Exit();

	SAFE_DELETE(pTheApp);
	NiShutdown();
}