Complete disaster-recovery snapshot: engine/game source, game data assets, VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive. Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false, no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
48 lines
964 B
C++
48 lines
964 B
C++
#pragma warning (disable:4786)
|
|
#include "ai test.hpp"
|
|
|
|
void DoTick (void);
|
|
|
|
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
|
|
{
|
|
g_hInstance = hInstance;
|
|
|
|
InitGlobals ();
|
|
InitSystem ();
|
|
|
|
try // start our message processing, when there is now message waiting
|
|
{ // to our GameTick routine
|
|
MSG msg;
|
|
BOOL flag=TRUE;
|
|
while (flag)
|
|
{
|
|
if (PeekMessage (&msg,NULL,0,0,PM_REMOVE))
|
|
{
|
|
if (msg.message == WM_QUIT)
|
|
flag = FALSE;
|
|
TranslateMessage (&msg);
|
|
DispatchMessage (&msg);
|
|
}
|
|
else
|
|
{
|
|
DoTick ();
|
|
}
|
|
}
|
|
|
|
g_Quitting = true;
|
|
KillSystem ();
|
|
if (g_Registry)
|
|
g_Registry->SaveData (); // tell the registery to save itself since we have normal exit
|
|
}
|
|
|
|
catch (exception except) // we had an exception so kill everything
|
|
{
|
|
cerr << except.what ();
|
|
KillSystem ();
|
|
KillGlobals ();
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
|