print some useful info if hog not found, allow -help to work if no text available
This commit is contained in:
parent
4b3c900752
commit
d3e45e44ff
|
@ -1,3 +1,8 @@
|
||||||
|
2003-04-07 Bradley Bell <btb@icculus.org>
|
||||||
|
|
||||||
|
* main/inferno.c: print some useful info if hog not found, allow
|
||||||
|
-help to work if no text available
|
||||||
|
|
||||||
2003-04-07 Steffen Pohle <stpohle@gmx.net>
|
2003-04-07 Steffen Pohle <stpohle@gmx.net>
|
||||||
|
|
||||||
* arch/linux/Makefile.am: revert to previous version, so linux
|
* arch/linux/Makefile.am: revert to previous version, so linux
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: inferno.c,v 1.59 2003-03-31 19:52:02 btb Exp $ */
|
/* $Id: inferno.c,v 1.60 2003-04-07 23:29:28 btb Exp $ */
|
||||||
/*
|
/*
|
||||||
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
|
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
|
||||||
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
|
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
|
||||||
|
@ -870,30 +870,35 @@ void print_commandline_help()
|
||||||
if (!ifile) {
|
if (!ifile) {
|
||||||
ifile = cfopen("help.txb","rb");
|
ifile = cfopen("help.txb","rb");
|
||||||
if (!ifile)
|
if (!ifile)
|
||||||
Error("Cannot load help text file.");
|
Warning("Cannot load help text file.");
|
||||||
have_binary = 1;
|
have_binary = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (cfgets(line,LINE_LEN,ifile)) {
|
if (ifile)
|
||||||
|
{
|
||||||
|
|
||||||
if (have_binary) {
|
while (cfgets(line,LINE_LEN,ifile)) {
|
||||||
int i;
|
|
||||||
for (i = 0; i < strlen(line) - 1; i++) {
|
if (have_binary) {
|
||||||
encode_rotate_left(&(line[i]));
|
int i;
|
||||||
line[i] = line[i] ^ BITMAP_TBL_XOR;
|
for (i = 0; i < strlen(line) - 1; i++) {
|
||||||
encode_rotate_left(&(line[i]));
|
encode_rotate_left(&(line[i]));
|
||||||
|
line[i] = line[i] ^ BITMAP_TBL_XOR;
|
||||||
|
encode_rotate_left(&(line[i]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (line[0] == ';')
|
||||||
|
continue; //don't show comments
|
||||||
|
|
||||||
|
printf("%s",line);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (line[0] == ';')
|
cfclose(ifile);
|
||||||
continue; //don't show comments
|
|
||||||
|
|
||||||
printf("%s",line);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cfclose(ifile);
|
|
||||||
|
|
||||||
// printf( " Diagnostic:\n\n");
|
// printf( " Diagnostic:\n\n");
|
||||||
// printf( " -emul %s\n", "Certain video cards need this option in order to run game");
|
// printf( " -emul %s\n", "Certain video cards need this option in order to run game");
|
||||||
// printf( " -ddemul %s\n", "If -emul doesn't work, use this option");
|
// printf( " -ddemul %s\n", "If -emul doesn't work, use this option");
|
||||||
|
@ -1219,7 +1224,14 @@ int main(int argc,char **argv)
|
||||||
|
|
||||||
if (! cfile_init("descent2.hog"))
|
if (! cfile_init("descent2.hog"))
|
||||||
if (! cfile_init("d2demo.hog"))
|
if (! cfile_init("d2demo.hog"))
|
||||||
Error("Could not find a valid hog file (descent2.hog or d2demo.hog)");
|
Warning("Could not find a valid hog file (descent2.hog or d2demo.hog)\nPossible locations are:\n"
|
||||||
|
#ifdef __unix__
|
||||||
|
"\t$HOME/.d2x\n"
|
||||||
|
"\t" SHAREPATH "\n"
|
||||||
|
#else
|
||||||
|
"\tCurrent directory\n"
|
||||||
|
#endif
|
||||||
|
"Or use the -hogdir option to specify an alternate location.");
|
||||||
load_text();
|
load_text();
|
||||||
|
|
||||||
//print out the banner title
|
//print out the banner title
|
||||||
|
|
Loading…
Reference in a new issue