84 |
" --version Print the executable's version number\n" |
" --version Print the executable's version number\n" |
85 |
// " --8bpp Use 256 color mode\n" |
// " --8bpp Use 256 color mode\n" |
86 |
" --nograb Do not use exclusive mouse/keyboard access\n" |
" --nograb Do not use exclusive mouse/keyboard access\n" |
87 |
" --nozoom Do not create previews\n" |
" --zoom Automatically create missing previews\n" |
88 |
// " --soundset -s [enigma|oxyd|oxyd1|peroxyd|oxydmagnum|magnumgold|oxydextra]\n" |
// " --soundset -s [enigma|oxyd|oxyd1|peroxyd|oxydmagnum|magnumgold|oxydextra]\n" |
89 |
// " Choose your preferred soundset; default is 'oxyd'\n" |
// " Choose your preferred soundset; default is 'oxyd'\n" |
90 |
"\n"); |
"\n"); |
96 |
public: |
public: |
97 |
enum { |
enum { |
98 |
OPT_NOSOUND, OPT_NOMUSIC, OPT_VERSION, OPT_HELP, |
OPT_NOSOUND, OPT_NOMUSIC, OPT_VERSION, OPT_HELP, |
99 |
OPT_WINDOW, OPT_WIZARD, OPT_NOGRAB, OPT_NOZOOM, OPT_LOG, |
OPT_WINDOW, OPT_WIZARD, OPT_NOGRAB, OPT_ZOOM, OPT_LOG, |
100 |
OPT_8BPP, OPT_GAME, |
OPT_8BPP, OPT_GAME, |
101 |
// OPT_SOUNDSET, |
// OPT_SOUNDSET, |
102 |
// OPT_PEROXYD, OPT_OXYD1, OPT_EXTRA, OPT_MAGNUM |
// OPT_PEROXYD, OPT_OXYD1, OPT_EXTRA, OPT_MAGNUM |
115 |
def (OPT_WINDOW, 'w', "window"); |
def (OPT_WINDOW, 'w', "window"); |
116 |
def (OPT_WIZARD, 0, "wizard"); |
def (OPT_WIZARD, 0, "wizard"); |
117 |
def (OPT_NOGRAB, 0, "nograb"); |
def (OPT_NOGRAB, 0, "nograb"); |
118 |
def (OPT_NOZOOM, 0, "nozoom"); |
def (OPT_ZOOM, 0, "zoom"); |
119 |
def (OPT_LOG, 'l', "log"); |
def (OPT_LOG, 'l', "log"); |
120 |
def (OPT_8BPP, '8', "8bpp"); |
def (OPT_8BPP, '8', "8bpp"); |
121 |
def (OPT_GAME, 'g', "game", true); |
def (OPT_GAME, 'g', "game", true); |
141 |
case OPT_WINDOW: options::FullScreen=false; break; |
case OPT_WINDOW: options::FullScreen=false; break; |
142 |
case OPT_WIZARD: options::WizardMode=true; break; |
case OPT_WIZARD: options::WizardMode=true; break; |
143 |
case OPT_NOGRAB: options::Nograb=true; break; |
case OPT_NOGRAB: options::Nograb=true; break; |
144 |
case OPT_NOZOOM: options::Nozoom=true; break; |
case OPT_ZOOM: options::Nozoom=false; break; |
145 |
case OPT_8BPP: options::BitsPerPixel = 8; break; |
case OPT_8BPP: options::BitsPerPixel = 8; break; |
146 |
case OPT_GAME: gamename = param; break; |
case OPT_GAME: gamename = param; break; |
147 |
case OPT_LOG: do_log = true; break; |
case OPT_LOG: do_log = true; break; |
173 |
lua::Init(); |
lua::Init(); |
174 |
|
|
175 |
// Run initialization scripts |
// Run initialization scripts |
176 |
if( lua::Dofile("init.lua") != 0) { |
if (lua::Dofile("startup.lua") != 0) { |
177 |
fprintf(stderr, "Unable to load configuration file 'init.lua'.\n"); |
fprintf(stderr, "There was an error loading 'startup.lua'.\n"); |
178 |
fprintf(stderr, "Your installation may be incomplete or invalid.\n"); |
fprintf(stderr, "Your installation may be incomplete or invalid.\n"); |
179 |
exit (1); |
exit (1); |
180 |
} |
} |