3 * Iter Vehemens ad Necem (IVAN)
4 * Copyright (C) Timo Kiviluoto
5 * Released under the GNU General
8 * See LICENSING which should be included
9 * along with this file for more details
12 #include "ivancommon.h"
29 int Main (int argc
, char *argv
[]) {
30 if (argc
> 1 && (!strcmp(argv
[1], "--version") || !strcmp(argv
[1], "-v"))) {
31 std::cout
<< "Iter Vehemens ad Necem version " << IVAN_VERSION
<< std::endl
;
35 femath::SetSeed(time(0));
36 game::InitGlobalValueMap();
37 scriptsystem::Initialize();
38 databasesystem::Initialize();
40 ivanconfig::Initialize();
42 game::CreateBusyAnimationCache();
43 globalwindowhandler::SetQuitMessageHandler(game::HandleQuitMessage
);
45 protosystem::Initialize();
49 int Select
= iosystem::Menu(
50 igraph::GetMenuGraphic(),
51 v2(RES
.X
/ 2, RES
.Y
/ 2 - 20),
53 CONST_S("Start Game\rContinue Game\rConfiguration\rHighscores\rQuit\r"),
55 CONST_S("Released under the GNU\rGeneral Public License\rMore info: see COPYING\r"),
56 CONST_S("IVAN v" IVAN_VERSION
"\r"),
59 case -1: return 0; // esc
69 festring LoadName
= iosystem::ContinueMenu(WHITE
, LIGHT_GRAY
, game::GetSaveDir());
70 if (LoadName
.GetSize()) {
71 LoadName
.Resize(LoadName
.GetSize()-4);
72 if (game::Init(LoadName
)) {
95 int PASCAL
WinMain (HINSTANCE hInstance
, HINSTANCE hPrevInstance
, LPSTR lpszCmdLine
, int nCmdShow
) {
98 argv
[0] = strdup("ivan.exe");
100 return Main(1, argv
);