[go: up one dir, main page]

Menu

[r16]: / main.cpp  Maximize  Restore  History

Download this file

31 lines (23 with data), 548 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
#include "main.h"
int main()
{
cout << "Colonization v1.0" << endl << endl;
CSettings* sett;
CLog* log = new CLog();
log->info("Starting the program!");
MainMenu* menu = new MainMenu(log);
menu->show();
sett = menu->settings;
if(!menu->start) {
delete menu;
log->info("Closing the program! User cancelled.");
return 0;
}
Game* game = new Game(sett, log);
int returncode = game->start();
delete game;
delete sett;
log->info("Closing the program!");
delete log;
return returncode;
}