-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
82 lines (70 loc) · 1.45 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#include "app.h"
ISceneNode *pScene;
ISceneNode *pSceneStatic;
App *pApp;
#if defined(_IPHONE_)
ePlatformType nPlatform = TouchDevice;
#elif defined(_WII_)
ePlatformType nPlatform = GameConsole;
#else
ePlatformType nPlatform = PersonalComputer;
#endif
void seed_main(int argc, char **argv)
{
App app;
pApp = &app;
Seed::SetGameApp(&app, argc, argv);
if (Seed::Initialize())
{
if (argv[1] && STRCASECMP(argv[1], "--fullscreen") == 0)
pScreen->ToggleFullscreen();
while (!pSystem->IsShuttingDown())
{
if (!app.HasError())
{
Seed::Update();
}
pTimer->Sleep(1);
}
}
Seed::Shutdown();
}
#ifdef APPUP_STORE
#include "adpcore.h"
#if DEBUG
#define INTEL_APPUP_GUID ADP_DEBUG_APPLICATIONID
//#define INTEL_APPUP_GUID ADP_EXPIRED_APPLICATIONID
#else
ADP_APPLICATIONID appId;
#define INTEL_APPUP_GUID appId
#endif
int main(int argc, char **argv)
{
#ifndef DEBUG
appId.field[0] = 0x6FBFE8F7;
appId.field[1] = 0x18B04D4C;
appId.field[2] = 0xB2E3CF44;
appId.field[3] = 0xBC6AA937;
#endif
ADP_RET_CODE ret = ADP_Initialize();
ret = ADP_IsAuthorized(INTEL_APPUP_GUID);
if (ret == ADP_AUTHORIZED)
{
ret = ADP_ApplicationBeginEvent();
seed_main(argc, argv);
ret = ADP_ApplicationEndEvent();
}
else
{
MessageBox(0, L"Something is wrong with your installation.", L"Error", 0);
}
ret = ADP_Close();
return EXIT_SUCCESS;
}
#elif !defined(_IPHONE_)
int main(int argc, char **argv)
{
seed_main(argc, argv);
return EXIT_SUCCESS;
}
#endif