-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwinmain.cpp
More file actions
49 lines (34 loc) · 827 Bytes
/
Copy pathwinmain.cpp
File metadata and controls
49 lines (34 loc) · 827 Bytes
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
#define WIN32_MEAN_AND_LEAN
#define WIN32_EXTRA_LEAN
/*
WINMAIN.CPP
Contains WinMain, the main windows function
Author: Kevin Hawkins
Date: 3/19/2001
Description:
*/
#include <windows.h>
#include "oglwindow.h" // the OpenGL window class
#include "vector.h"
#include "engine.h" // the engine's main class
#include "simpengine.h"
int WinMain(HINSTANCE hInst, HINSTANCE, LPSTR, int nCmdShow)
{
int loopRet;
bool fscreen;
CSimpEngine *engine = NULL;
try
{
fscreen = (MessageBox(NULL, "Deseas ejecutarlo en modo a pantalla completa?", "Fullscreen?", MB_YESNO) == IDYES);
engine = new CSimpEngine("OpenGL Game", fscreen, 800, 600, 32);
loopRet = engine->EnterMessageLoop();
delete engine;
return loopRet;
}
catch(char *sz)
{
MessageBox(NULL, sz, 0, 0);
delete engine;
}
return -1;
}