2 Copyright © 2004 Parallel Realities
3 Copyright © 2007-2008 Kővágó Zoltán <DirtY.iCE.hu@gmail.com>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 See the GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #include "CGameData.h"
26 #include "CGraphics.h"
32 // for sucking SDL implementation on windows
33 // -- no, we don't need SDL_main!!!
44 Entity defEnemy
[MAX_ENEMIES
];
45 Entity defItem
[MAX_ITEMS
];
47 Weapon weapon
[MAX_WEAPONS
];
53 printf("DirtY BLoB WaRs (Version %s)\n", VERSION
);
54 printf("Copyright (C) 2004 Parallel Realities\n");
55 printf("Copyright (C) 2007-2008 Kovago Zoltan and contributors\n");
56 printf("Licensed under the GNU General Public License (GPL)\n\n");
58 // printf("The DirtY BLoB WaRs gameplay manual can be found in,\n");
59 // printf("\t%s\n\n", GAMEPLAYMANUAL);
61 printf("Additional Commands\n");
62 printf("\t--fullscreen Start the game in Full Screen mode\n");
63 printf("\t--mono Use mono sound output instead of stereo\n");
64 printf("\t--noaudio Disables audio\n");
65 printf("\t--version Display version number\n");
66 printf("\t--help This help\n\n");
73 printf("DirtY BLoB WaRs version: %s, branch: %s\n", VERSION
, BRANCH
);
75 // showVersion is the command name, and not showVersionAndCopyright !!!
76 /* printf("Copyright (C) 2004 Parallel Realities\nCopyright (C) 2007 Kovago Zoltan\n");
77 printf("Licensed under the GNU General Public License (GPL)\n\n");*/
81 int main(int argc
, char *argv
[])
83 int requiredSection
= SECTION_INTRO
;
84 bool showSprites
= false;
87 for (int i
= 1 ; i
< argc
; i
++)
89 if (strcmp(argv
[i
], "--fullscreen") == 0) engine
.fullScreen
= true;
90 else if (strcmp(argv
[i
], "--noaudio") == 0) engine
.useAudio
= 0;
91 else if (strcmp(argv
[i
], "--mono") == 0) engine
.useAudio
= 1;
92 else if (strcmp(argv
[i
], "--version") == 0) showVersion();
93 else if (strcmp(argv
[i
], "--help") == 0) showHelp();
97 else if (strcmp(argv
[i
], "--show-func") == 0) DebugStream::show_func
= true;
98 else if ((strcmp(argv
[i
], "-d") == 0) || (strcmp(argv
[i
], "--debug") == 0)) DebugLevelManager::ParseOpts(argv
[++i
]);
100 else if (strcmp(argv
[i
], "--map") == 0) {game
.setMapName(argv
[++i
]); requiredSection
= SECTION_GAME
;}
101 else if (strcmp(argv
[i
], "--skill") == 0) game
.skill
= atoi(argv
[++i
]);
102 else if (strcmp(argv
[i
], "--showsprites") == 0) showSprites
= true;
103 else if (strcmp(argv
[i
], "--hub") == 0) hub
= true;
104 else if (strcmp(argv
[i
], "--randomscreens") == 0) graphics
.takeRandomScreenShots
= true;
105 /// @todo Move devNoMonsters to cheats..
106 else if (strcmp(argv
[i
], "--nomonsters") == 0) engine
.devNoMonsters
= true;
107 /// @todo Add a credits options to menu
108 else if (strcmp(argv
[i
], "--credits") == 0) requiredSection
= SECTION_CREDITS
;
109 else warning
<< "Unknown parameter '" << argv
[i
] << "', ignored.." << std::endl
;
113 game
.setMapName("data/floodedTunnel1");
114 requiredSection
= SECTION_GAME
;
122 player
.setName("Player");
126 engine
.allowQuit
= true;
130 requiredSection
= SECTION_HUB
;
137 game
.hasAquaLung
= game
.hasJetPack
= true;
147 switch (requiredSection
)
150 requiredSection
= doIntro();
154 requiredSection
= title();
158 requiredSection
= doHub();
162 if (!game
.continueFromCheckPoint
)
167 checkStartCutscene();
170 requiredSection
= doGame();
173 case SECTION_GAMEOVER
:
174 requiredSection
= gameover();
177 case SECTION_EASYOVER
:
181 requiredSection
= SECTION_TITLE
;
184 case SECTION_CREDITS
:
186 requiredSection
= SECTION_TITLE
;