-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
59 lines (45 loc) · 1.07 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
//"audiere test" - Omar Staying
// April 4, 2013, started on the 3rd. I guess.
// Buff Drinklots.
//Parts from http://lazyfoo.net/SDL_tutorials/
// I am lazy.
#include <iostream>
#include "audiere.h"
#include <string>
#include <cstdio>
#include "GameLogic.h"
#include "Music.h"
#include "Sound.h"
#include "Game.h"
#include "DebugMessage.h"
#include "config.h"
#include "SDL.h"
#include "SDL_image.h"
#include "main.h"
using namespace audiere;
using namespace std;
bool CDebugMessage::debugOn;
int main(int argc, char* argv[])
{
//If Initing everything is good, continue
if (CGameLogic::InitGame())
printf("Successfully Inited SDL");
else
return 666;
//If we reached this point, time to start the loop
main::game = 1;
if (CConfig::skiptitleFlag == 1)
CGame::SetGameState(STATE_GAME);
else
CGame::SetGameState(STATE_LOGO);
while(main::game)
{
CGame::Think();
CGame::Render();
CDebugMessage::Draw();
CGame::flip();
}
//We're done here, let's clean up the mess.
CGameLogic::CleanUp();
return 0;
}