-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
51 lines (40 loc) · 1.01 KB
/
main.cpp
File metadata and controls
51 lines (40 loc) · 1.01 KB
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
/**
** Code Copyright (C) 2011 Jason White <whitewaterssoftwareinfo@gmail.com>
** White Waters Software - wwsoft.co.cc
**
** Copying and distributing this source is prohibited without
** expliced authorization by the copyright holder: Jason White
**/
extern "C"
{
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}
#include "config_file.h"
#include "error.h"
#include "misc.h"
#include "game_engine.h"
#include <stdlib.h>
#include <SDL_framerate.h>
//#include "main.h"
int main()
{
new error(INFO_HIGH,"WWSiGE Loading");
game_engine engine(320,240);
if (! engine.load(640,480,0,0))
{
new error(FATAL_ERROR,"WWSiGE Failed To Load Necessary Resources, Quitting ...");
return 100;
}
new error(INFO_HIGH,"WWSiGE Started");
FPSmanager manager;
SDL_initFramerate(&manager);
SDL_setFramerate(&manager, 30);
while (engine.update())
{
SDL_framerateDelay(&manager);
}
new error(INFO_HIGH,"WWSiGE Closed");
return 0;
}