Debian Codegraph @

src/main.cpp

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 /***************************************************************************
2 main.cpp - description
3 -------------------
4 begin : Thu Aug 17 15:27:08 ART 2000
5 copyright : (C) 2000 by Waldemar Baraldi
6 email : [email protected]
7 ***************************************************************************/
8
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18 #include "config.h"
19 #include <stdlib.h>
20 #include <stdio.h>
21 #include <unistd.h>
22 #include "pipenightdreams.h"
23 #include "hash.h"
24 #include "str.h"
25
26 int main(int argc, char *argv[])
27 {
28 Str * data_dir=NULL;
29 int level=1;
30 bool fullscreen=false;
31 int i=1;
32
33
34 while (i<argc){
35 if (!strcmp("--datadir", argv[i])){
36 if (data_dir) delete data_dir;
37 data_dir=new Str(argv[++i]);
38 }else
39 if (!strcmp("--fullscreen", argv[i]))
40 fullscreen=true;
41 else{
42 printf("Invalid Data Dir\nUse pipenightdreams [--datadir <DATA DIR>] [--fullscreen]\n");
43 printf("Using default: %s\n", GAME_DATADIR);
44 }
45 i++;
46 }
47
48 if (!data_dir) data_dir=new Str(GAME_DATADIR);
49
50 PipeNightDreams * g = new PipeNightDreams(fullscreen);
51 g->setDataDir(data_dir);
52 g->setStartingLevel(level);
53 g->run();
54 delete g;
55 }