/***************************************************************************
main.cpp - description
-------------------
begin : Thu Aug 17 15:27:08 ART 2000
copyright : (C) 2000 by Waldemar Baraldi
email : baraldi@lacasilla.com.ar
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include "pipenightdreams.h"
#include "hash.h"
#include "str.h"
int main(int argc, char *argv[])
{
Str * data_dir=NULL;
int level=1;
if (argc >1)
if (!strcmp("--datadir", argv[1]))
data_dir=new Str(argv[2]);
if (!data_dir){
if (argc>1){
printf("Invalid Data Dir\nUse pipenightdreams --datadir <DATA DIR>\n");
printf("Using default: %s\n", GAME_DATADIR);
}
data_dir=new Str(GAME_DATADIR);
}
PipeNightDreams * g = new PipeNightDreams();
g->setDataDir(data_dir);
g->setStartingLevel(level);
g->run();
delete g;
}