mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
1. Reverted the savegame change. Changed to use the bitptr.
2. Updated --help. AS IS. git-svn-id: https://svn.eduke32.com/eduke32@983 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
059ecb1fb6
commit
9778af6489
2 changed files with 25 additions and 10 deletions
|
@ -8601,16 +8601,23 @@ FAKE_F3:
|
||||||
|
|
||||||
static void comlinehelp(void)
|
static void comlinehelp(void)
|
||||||
{
|
{
|
||||||
char *s = "Usage: eduke32 [OPTIONS]\n"
|
char *s = "Usage: eduke32 [FILES] [OPTIONS]\n"
|
||||||
"Example: eduke32 -q4 -a -m -tx -map nukeland.map\n\n"
|
"Example: eduke32 -q4 -a -m -tx -map nukeland.map\n\n"
|
||||||
|
"FILES\n"
|
||||||
|
"can be *.grp, *.zip, *.con, *.def\n"
|
||||||
|
""
|
||||||
|
"OPTIONS\n"
|
||||||
"-NUM\t\tLoad and run a game from slot NUM (0-9)\n"
|
"-NUM\t\tLoad and run a game from slot NUM (0-9)\n"
|
||||||
"-a\t\tUse fake player AI (fake multiplayer only)\n"
|
"-a\t\tUse fake player AI (fake multiplayer only)\n"
|
||||||
"-cNUM\t\tUse MP mode NUM, 1 = DukeMatch(spawn), 2 = Coop, 3 = Dukematch(no spawn)\n"
|
"-cNUM\t\tUse MP mode NUM, 1 = DukeMatch(spawn), 2 = Coop, 3 = Dukematch(no spawn)\n"
|
||||||
"-cfg FILE\t\tUse configuration file FILE\n"
|
"-cfg FILE\tUse configuration file FILE\n"
|
||||||
"-dFILE\t\tStart to play demo FILE\n"
|
"-dFILE\t\tStart to play demo FILE\n"
|
||||||
/* "-fNUM\t\tSend fewer packets in multiplayer (1, 2, 4) (deprecated)\n" */
|
/* "-fNUM\t\tSend fewer packets in multiplayer (1, 2, 4) (deprecated)\n" */
|
||||||
"-game_dir DIR\tSee -j\n"
|
"-game_dir DIR\tSee -j\n"
|
||||||
"-gFILE, -grp FILE\tUse extra group file FILE\n"
|
"-gFILE, -grp FILE\tUse extra group file FILE\n"
|
||||||
|
"-gamegrp FILE\tUse FILE as a default GRP\n"
|
||||||
|
"-nam\t\tRun in Nam-compatible mode\n"
|
||||||
|
"-ww2gi\t\tRun in ww2gi-compatible mode\n"
|
||||||
"-hFILE\t\tUse definitions file FILE\n"
|
"-hFILE\t\tUse definitions file FILE\n"
|
||||||
"-iNUM\t\tUse networking mode NUM (1/0) (multiplayer only) (default == 1)\n"
|
"-iNUM\t\tUse networking mode NUM (1/0) (multiplayer only) (default == 1)\n"
|
||||||
"-jDIR\t\tAdds DIR to the file path stack\n"
|
"-jDIR\t\tAdds DIR to the file path stack\n"
|
||||||
|
@ -8625,9 +8632,18 @@ static void comlinehelp(void)
|
||||||
"-qNUM\t\tUse NUM players for fake multiplayer (2-8)\n"
|
"-qNUM\t\tUse NUM players for fake multiplayer (2-8)\n"
|
||||||
"-r\t\tRecord demo\n"
|
"-r\t\tRecord demo\n"
|
||||||
"-rmnet FILE\tUse FILE for network play configuration (see documentation)\n"
|
"-rmnet FILE\tUse FILE for network play configuration (see documentation)\n"
|
||||||
|
"-keepaddr\n"
|
||||||
|
"-stun\n"
|
||||||
|
"-w\t\tShow coordinates"
|
||||||
|
|
||||||
|
"-noautoload\tDo not use the autoload directory\n"
|
||||||
|
"-nologo\t\tSkip the logo anim\n"
|
||||||
|
"-cachesize SIZE\tUse SIZE Kb for cache\n"
|
||||||
"-sNUM\t\tUse skill level NUM (1-4)\n"
|
"-sNUM\t\tUse skill level NUM (1-4)\n"
|
||||||
#if defined RENDERTYPEWIN || (defined RENDERTYPESDL && !defined __APPLE__ && defined HAVE_GTK2)
|
#if defined RENDERTYPEWIN || (defined RENDERTYPESDL && !defined __APPLE__ && defined HAVE_GTK2)
|
||||||
"-setup\t\tDisplays the configuration dialog\n"
|
"-setup\t\tDisplays the configuration dialog\n"
|
||||||
|
|
||||||
|
"-nosetup\t\t\n"
|
||||||
#endif
|
#endif
|
||||||
"-tNUM\t\tUse respawn mode NUM, 1 = Monsters, 2 = Items, 3 = Inventory, x = All\n"
|
"-tNUM\t\tUse respawn mode NUM, 1 = Monsters, 2 = Items, 3 = Inventory, x = All\n"
|
||||||
"-u#########\tUser's favorite weapon order (default: 3425689071)\n"
|
"-u#########\tUser's favorite weapon order (default: 3425689071)\n"
|
||||||
|
@ -8637,7 +8653,7 @@ static void comlinehelp(void)
|
||||||
"-vNUM\t\tWarp to volume NUM (1-4), see -l\n"
|
"-vNUM\t\tWarp to volume NUM (1-4), see -l\n"
|
||||||
"-xFILE\t\tLoad CON script FILE (default EDUKE.CON/GAME.CON)\n"
|
"-xFILE\t\tLoad CON script FILE (default EDUKE.CON/GAME.CON)\n"
|
||||||
"-zNUM,\n-condebug\tLine-by-line CON compilation debugging, NUM is verbosity\n"
|
"-zNUM,\n-condebug\tLine-by-line CON compilation debugging, NUM is verbosity\n"
|
||||||
"\n-?, -help\tDisplay this help message and exit"
|
"\n-?, -help, --help\tDisplay this help message and exit"
|
||||||
;
|
;
|
||||||
#if defined RENDERTYPEWIN
|
#if defined RENDERTYPEWIN
|
||||||
wm_msgbox(HEAD2,s);
|
wm_msgbox(HEAD2,s);
|
||||||
|
|
|
@ -24,6 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#include "duke3d.h"
|
#include "duke3d.h"
|
||||||
|
|
||||||
|
extern char *bitptr;
|
||||||
|
|
||||||
void readsavenames(void)
|
void readsavenames(void)
|
||||||
{
|
{
|
||||||
int dummy,j;
|
int dummy,j;
|
||||||
|
@ -127,7 +129,6 @@ int loadplayer(int spot)
|
||||||
int fil, bv, i, x;
|
int fil, bv, i, x;
|
||||||
intptr_t j;
|
intptr_t j;
|
||||||
int32 nump;
|
int32 nump;
|
||||||
int codeextra=0;
|
|
||||||
|
|
||||||
strcpy(fn, "egam0.sav");
|
strcpy(fn, "egam0.sav");
|
||||||
strcpy(mpfn, "egamA_00.sav");
|
strcpy(mpfn, "egamA_00.sav");
|
||||||
|
@ -276,9 +277,8 @@ int loadplayer(int spot)
|
||||||
if (kdfread(&scriptptrs[0],sizeof(scriptptrs),g_ScriptSize,fil) != g_ScriptSize) goto corrupt;
|
if (kdfread(&scriptptrs[0],sizeof(scriptptrs),g_ScriptSize,fil) != g_ScriptSize) goto corrupt;
|
||||||
if (script != NULL)
|
if (script != NULL)
|
||||||
Bfree(script);
|
Bfree(script);
|
||||||
if (bv>=183)codeextra=g_ScriptSize;
|
|
||||||
script = Bcalloc(1,g_ScriptSize * sizeof(intptr_t));
|
script = Bcalloc(1,g_ScriptSize * sizeof(intptr_t));
|
||||||
if (kdfread(&script[0],sizeof(script),g_ScriptSize+codeextra,fil) != g_ScriptSize) goto corrupt;
|
if (kdfread(&script[0],sizeof(script),g_ScriptSize,fil) != g_ScriptSize) goto corrupt;
|
||||||
for (i=0;i<g_ScriptSize;i++)
|
for (i=0;i<g_ScriptSize;i++)
|
||||||
if (scriptptrs[i])
|
if (scriptptrs[i])
|
||||||
{
|
{
|
||||||
|
@ -532,7 +532,6 @@ int saveplayer(int spot)
|
||||||
char *fnptr, *scriptptrs;
|
char *fnptr, *scriptptrs;
|
||||||
FILE *fil;
|
FILE *fil;
|
||||||
int bv = BYTEVERSION;
|
int bv = BYTEVERSION;
|
||||||
int codeextra=0;
|
|
||||||
|
|
||||||
strcpy(fn, "egam0.sav");
|
strcpy(fn, "egam0.sav");
|
||||||
strcpy(mpfn, "egamA_00.sav");
|
strcpy(mpfn, "egamA_00.sav");
|
||||||
|
@ -640,10 +639,10 @@ int saveplayer(int spot)
|
||||||
|
|
||||||
dfwrite(&g_ScriptSize,sizeof(g_ScriptSize),1,fil);
|
dfwrite(&g_ScriptSize,sizeof(g_ScriptSize),1,fil);
|
||||||
scriptptrs = Bcalloc(1, g_ScriptSize * sizeof(scriptptrs));
|
scriptptrs = Bcalloc(1, g_ScriptSize * sizeof(scriptptrs));
|
||||||
if (bv>=183)codeextra=g_ScriptSize;
|
|
||||||
for (i=0;i<g_ScriptSize;i++)
|
for (i=0;i<g_ScriptSize;i++)
|
||||||
{
|
{
|
||||||
if ((intptr_t)script[i] >= (intptr_t)(&script[0]) && (intptr_t)script[i] < (intptr_t)(&script[g_ScriptSize]))
|
if (bitptr[i])
|
||||||
|
// if ((intptr_t)script[i] >= (intptr_t)(&script[0]) && (intptr_t)script[i] < (intptr_t)(&script[g_ScriptSize]))
|
||||||
{
|
{
|
||||||
scriptptrs[i] = 1;
|
scriptptrs[i] = 1;
|
||||||
j = (intptr_t)script[i] - (intptr_t)&script[0];
|
j = (intptr_t)script[i] - (intptr_t)&script[0];
|
||||||
|
@ -653,7 +652,7 @@ int saveplayer(int spot)
|
||||||
}
|
}
|
||||||
|
|
||||||
dfwrite(&scriptptrs[0],sizeof(scriptptrs),g_ScriptSize,fil);
|
dfwrite(&scriptptrs[0],sizeof(scriptptrs),g_ScriptSize,fil);
|
||||||
dfwrite(&script[0],sizeof(script),g_ScriptSize+codeextra,fil);
|
dfwrite(&script[0],sizeof(script),g_ScriptSize,fil);
|
||||||
|
|
||||||
for (i=0;i<g_ScriptSize;i++)
|
for (i=0;i<g_ScriptSize;i++)
|
||||||
if (scriptptrs[i])
|
if (scriptptrs[i])
|
||||||
|
|
Loading…
Reference in a new issue