-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
38 lines (30 loc) · 1.03 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "LawnApp.h"
#include "Resources.h"
#include "Sexy.TodLib/TodStringFile.h"
using namespace Sexy;
bool (*gAppCloseRequest)(); //[0x69E6A0]
bool (*gAppHasUsedCheatKeys)(); //[0x69E6A4]
SexyString (*gGetCurrentLevelName)();
//0x44E8F0
int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nCmdShow)
{
//gHInstance = hInstance;
#ifdef _DEBUG
FILE* fDummy;
freopen_s(&fDummy, "CONIN$", "r", stdin);
freopen_s(&fDummy, "CONOUT$", "w", stderr);
freopen_s(&fDummy, "CONOUT$", "w", stdout);
#endif
TodStringListSetColors(gLawnStringFormats, gLawnStringFormatCount);
gGetCurrentLevelName = LawnGetCurrentLevelName;
gAppCloseRequest = LawnGetCloseRequest;
gAppHasUsedCheatKeys = LawnHasUsedCheatKeys;
gLawnApp = new LawnApp();
gLawnApp->mChangeDirTo = (!Sexy::FileExists("properties\\resources.xml") && Sexy::FileExists("..\\properties\\resources.xml")) ? ".." : ".";
gLawnApp->Init();
gLawnApp->Start();
gLawnApp->Shutdown();
if (gLawnApp)
delete gLawnApp;
return 0;
};