mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 00:42:08 +00:00
Misc changes
git-svn-id: https://svn.eduke32.com/eduke32@11 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
32748e04ee
commit
f296ec24e5
22 changed files with 204 additions and 612 deletions
|
@ -31,7 +31,7 @@ RELEASE?=1
|
|||
EFENCE?=0
|
||||
|
||||
# SDK locations - adjust to match your setup
|
||||
DXROOT=c:/sdks/msc/dx61
|
||||
DXROOT=c:/sdks/directx/dx61
|
||||
FMODROOTWIN=c:/sdks/fmodapi374win/api
|
||||
|
||||
# build locations - OBJ gets overridden to the game-specific objects dir
|
||||
|
|
|
@ -19,7 +19,7 @@ asm=masm
|
|||
ENGINELIB=engine.lib
|
||||
EDITORLIB=build.lib
|
||||
|
||||
DXROOT=c:\sdks\msc\dx7
|
||||
DXROOT=c:\sdks\directx\dx7
|
||||
FMODROOT=c:\sdks\fmodapi374win\api
|
||||
|
||||
# /D these to enable certain features of the port's compile process
|
||||
|
@ -152,11 +152,13 @@ wad2art$(EXESUFFIX): $(OBJ)wad2art.$o $(OBJ)pragmas.$o $(OBJ)compat.$o
|
|||
$(OBJ)engineinfo.$o: writeengineinfo $(SRC)tmp\engineinfo.c
|
||||
|
||||
writeengineinfo:
|
||||
echo const char _engine_cflags[] = "$(CFLAGS:\=\\)"; > $(SRC)tmp\engineinfo.c
|
||||
echo const char _engine_libs[] = "$(LIBS)"; >> $(SRC)tmp\engineinfo.c
|
||||
echo const char _engine_uname[] = "unknown"; >> $(SRC)tmp\engineinfo.c
|
||||
echo const char _engine_compiler[] = "$(CC)"; >> $(SRC)tmp\engineinfo.c
|
||||
echo const char _engine_date[] = __DATE__ " " __TIME__; >> $(SRC)tmp\engineinfo.c
|
||||
copy /y << $(SRC)tmp\engineinfo.c
|
||||
const char _engine_cflags[] = "$(CFLAGS:\=\\)";
|
||||
const char _engine_libs[] = "$(LIBS)";
|
||||
const char _engine_uname[] = "unknown";
|
||||
const char _engine_compiler[] = "$(CC)";
|
||||
const char _engine_date[] = __DATE__ " " __TIME__;
|
||||
<<NOKEEP
|
||||
|
||||
# PHONIES
|
||||
clean:
|
||||
|
|
|
@ -20,7 +20,7 @@ asm=wasm
|
|||
ENGINELIB=engine.lib
|
||||
EDITORLIB=build.lib
|
||||
|
||||
DXROOT=c:\sdks\msc\dx7
|
||||
DXROOT=c:\sdks\directx\dx7
|
||||
FMODROOT=c:\sdks\fmodapi374win\api
|
||||
|
||||
!ifdef __LOADDLL__
|
||||
|
|
|
@ -495,6 +495,7 @@ int md_undefinetile(int tile);
|
|||
int md_undefinemodel(int modelid);
|
||||
|
||||
int loaddefinitionsfile(char *fn);
|
||||
int loadgroupfiles(char *fn);
|
||||
|
||||
extern long mapversion; // if loadboard() fails with -2 return, try loadoldboard(). if it fails with -2, board is dodgy
|
||||
long loadoldboard(char *filename, char fromwhere, long *daposx, long *daposy, long *daposz, short *daang, short *dacursectnum);
|
||||
|
|
|
@ -378,18 +378,10 @@ static int defsparser(scriptfile *script)
|
|||
break;
|
||||
case T_LOADGRP:
|
||||
{
|
||||
char *fn;
|
||||
if (!scriptfile_getstring(script,&fn))
|
||||
{
|
||||
int j = initgroupfile(fn);
|
||||
|
||||
if( j == -1 )
|
||||
initprintf("Could not find GRP file %s.\n",fn);
|
||||
else
|
||||
initprintf("Using GRP file %s.\n",fn);
|
||||
char *bs;
|
||||
scriptfile_getstring(script,&bs);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case T_DEFINEMODEL:
|
||||
{
|
||||
char *modelfn;
|
||||
|
@ -1069,4 +1061,50 @@ int loaddefinitionsfile(char *fn)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int defsparserpassone(scriptfile *script)
|
||||
{
|
||||
int tokn;
|
||||
char *cmdtokptr;
|
||||
while (1) {
|
||||
tokn = getatoken(script,basetokens,sizeof(basetokens)/sizeof(tokenlist));
|
||||
cmdtokptr = script->ltextptr;
|
||||
switch (tokn) {
|
||||
case T_LOADGRP:
|
||||
{
|
||||
char *fn;
|
||||
if (!scriptfile_getstring(script,&fn))
|
||||
{
|
||||
int j = initgroupfile(fn);
|
||||
|
||||
if( j == -1 )
|
||||
initprintf("Could not find GRP file %s.\n",fn);
|
||||
else
|
||||
initprintf("Using GRP file %s.\n",fn);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case T_EOF:
|
||||
return(0);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int loadgroupfiles(char *fn)
|
||||
{
|
||||
scriptfile *script;
|
||||
|
||||
script = scriptfile_fromfile(fn);
|
||||
if (!script) return -1;
|
||||
|
||||
defsparserpassone(script);
|
||||
|
||||
scriptfile_close(script);
|
||||
scriptfile_clearsymbols();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// vim:ts=4:
|
||||
|
|
|
@ -22,7 +22,9 @@ all: source binary
|
|||
source:
|
||||
rm -rf $(sourcedir) $(sourcedir).zip
|
||||
mkdir -p $(sourcedir) $(sourcedir)/eobj $(sourcedir)/obj
|
||||
mkdir -p $(sourcedir)/eobj.nix $(sourcedir)/obj.nix
|
||||
touch $(sourcedir)/eobj/keep.me $(sourcedir)/obj/keep.me
|
||||
touch $(sourcedir)/eobj.nix/keep.me $(sourcedir)/obj.nix/keep.me
|
||||
cp $(SOURCEFILES) $(sourcedir)
|
||||
find . -name "*~" -exec rm -rf '{}' ';';
|
||||
find . -name "*.orig" -exec rm -rf '{}' ';';
|
||||
|
|
|
@ -13,6 +13,7 @@ NOASM = 0
|
|||
|
||||
# Debugging options
|
||||
RELEASE?=1
|
||||
JFAUD?=1
|
||||
|
||||
# build locations
|
||||
|
||||
|
@ -39,7 +40,10 @@ OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts -Wno-unused \
|
|||
-I$(INC:/=) -I$(EINC:/=) -I$(SRC)jmact -I$(SRC)jaudiolib -I../jfaud/src
|
||||
OURCXXFLAGS=-fno-exceptions -fno-rtti
|
||||
LIBS=-lm
|
||||
#JFAUDLIBS=../jfaud/libjfaud.a ../jfaud/mpadec/libmpadec/libmpadec.a
|
||||
ifneq (0,$(JFAUD))
|
||||
JFAUDLIBS=../jfaud/libjfaud.a ../jfaud/mpadec/libmpadec/libmpadec.a
|
||||
endif
|
||||
|
||||
NASMFLAGS=-s #-g
|
||||
EXESUFFIX=
|
||||
|
||||
|
@ -91,7 +95,6 @@ GAMEOBJS=$(OBJ)game.$o \
|
|||
$(OBJ)premap.$o \
|
||||
$(OBJ)savegame.$o \
|
||||
$(OBJ)sector.$o \
|
||||
$(OBJ)sounds.$o \
|
||||
$(OBJ)rts.$o \
|
||||
$(OBJ)testcd.$o \
|
||||
$(OBJ)osdfuncs.$o \
|
||||
|
@ -109,8 +112,12 @@ endif
|
|||
|
||||
ifeq ($(RENDERTYPE),SDL)
|
||||
OURCFLAGS+= $(subst -Dmain=SDL_main,,$(shell sdl-config --cflags))
|
||||
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC_STUB) $(AUDIOLIB_FX_STUB) $(OBJ)sounds.$o
|
||||
#AUDIOLIBOBJ=$(AUDIOLIB_JFAUD)
|
||||
|
||||
ifneq (0,$(JFAUD))
|
||||
AUDIOLIBOBJ=$(AUDIOLIB_JFAUD)
|
||||
else
|
||||
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC_STUB) $(AUDIOLIB_FX_STUB) $(OBJ)sounds.$o
|
||||
endif
|
||||
|
||||
ifeq (1,$(HAVE_GTK2))
|
||||
OURCFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0)
|
||||
|
@ -123,8 +130,11 @@ ifeq ($(RENDERTYPE),SDL)
|
|||
endif
|
||||
|
||||
ifeq ($(RENDERTYPE),WIN)
|
||||
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) $(OBJ)sounds.$o
|
||||
#AUDIOLIBOBJ=$(AUDIOLIB_JFAUD)
|
||||
ifneq (0,$(JFAUD))
|
||||
AUDIOLIBOBJ=$(AUDIOLIB_JFAUD)
|
||||
else
|
||||
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) $(OBJ)sounds.$o
|
||||
endif
|
||||
endif
|
||||
|
||||
GAMEOBJS+= $(AUDIOLIBOBJ)
|
||||
|
|
|
@ -34,7 +34,7 @@ CFLAGS= /MD /J /nologo $(flags_cl) \
|
|||
/DNOCOPYPROTECT $(ENGINEOPTS) \
|
||||
/I$(DXROOT)\include /DRENDERTYPEWIN=1
|
||||
LIBS=user32.lib gdi32.lib shell32.lib dxguid.lib winmm.lib wsock32.lib \
|
||||
..\jfaud\jfaud.lib ..\jfaud\mpadec\libmpadec\mpadec.lib /NODEFAULTLIB:libFLAC.lib \
|
||||
..\jfaud\jfaud.lib ..\jfaud\mpadec\mpadec.lib /NODEFAULTLIB:libFLAC.lib \
|
||||
#opengl32.lib
|
||||
ASFLAGS=/nologo /coff
|
||||
ASFLAGS=/nologo /coff
|
||||
|
|
|
@ -2515,7 +2515,7 @@ void moveweapons(void)
|
|||
}
|
||||
}
|
||||
|
||||
if(thisprojectile[i].workslike & 8192)
|
||||
/* if(thisprojectile[i].workslike & 8192)
|
||||
{
|
||||
for(k=-3;k<2;k++)
|
||||
{
|
||||
|
@ -2531,7 +2531,8 @@ void moveweapons(void)
|
|||
|
||||
}
|
||||
}
|
||||
else if(thisprojectile[i].workslike & PROJECTILE_FLAG_SPIT) if(s->zvel < 6144)
|
||||
else */
|
||||
if(thisprojectile[i].workslike & PROJECTILE_FLAG_SPIT) if(s->zvel < 6144)
|
||||
s->zvel += gc-112;
|
||||
|
||||
if(thisprojectile[i].workslike & PROJECTILE_FLAG_WATERBUBBLES && sector[s->sectnum].lotag == 2 && rnd(140))
|
||||
|
@ -2562,7 +2563,7 @@ void moveweapons(void)
|
|||
KILLIT(i);
|
||||
}*/
|
||||
|
||||
if(thisprojectile[i].workslike & PROJECTILE_FLAG_NOENEMYHITS)
|
||||
if(thisprojectile[i].workslike & PROJECTILE_FLAG_BOUNCESOFFSPRITES)
|
||||
{
|
||||
if( wall[j].overpicnum != MIRROR && wall[j].picnum != MIRROR )
|
||||
s->yvel--;
|
||||
|
@ -2597,7 +2598,7 @@ void moveweapons(void)
|
|||
|
||||
if(ps[p].loogcnt == 0)
|
||||
{
|
||||
if(Sound[DUKE_LONGTERM_PAIN].num < 1)
|
||||
if(!isspritemakingsound(ps[p].i, DUKE_LONGTERM_PAIN))
|
||||
spritesound(DUKE_LONGTERM_PAIN,ps[p].i);
|
||||
|
||||
j = 3+(TRAND&3);
|
||||
|
@ -2752,7 +2753,7 @@ void moveweapons(void)
|
|||
}
|
||||
|
||||
|
||||
if (thisprojectile[i].workslike & PROJECTILE_FLAG_BULLET)
|
||||
if (thisprojectile[i].workslike & PROJECTILE_FLAG_HITSCAN)
|
||||
{
|
||||
p = findplayer(s,&x);
|
||||
execute(i,p,x);
|
||||
|
|
|
@ -4275,7 +4275,7 @@ int ExtInit(void)
|
|||
defsfilename = getenv("DUKE3DDEF");
|
||||
initprintf("Using %s as definitions file\n", defsfilename);
|
||||
}
|
||||
|
||||
loadgroupfiles(defsfilename);
|
||||
bpp = 8;
|
||||
if (loadsetup("build.cfg") < 0) initprintf("Configuration file not found, using defaults.\n"), rv = 1;
|
||||
|
||||
|
|
|
@ -83,9 +83,9 @@ int32 JoystickAnalogueSaturate[MAXJOYAXES];
|
|||
//
|
||||
|
||||
int32 ScreenMode = 1;
|
||||
int32 ScreenWidth = 640;
|
||||
int32 ScreenHeight = 480;
|
||||
int32 ScreenBPP = 8;
|
||||
int32 ScreenWidth = 800;
|
||||
int32 ScreenHeight = 600;
|
||||
int32 ScreenBPP = 32;
|
||||
|
||||
static char setupfilename[256]={SETUPFILENAME};
|
||||
int32 scripthandle = -1;
|
||||
|
@ -562,7 +562,7 @@ void CONFIG_ReadSetup( void )
|
|||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "Out",&ud.lockout);
|
||||
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "ScreenBPP", &ScreenBPP);
|
||||
if (ScreenBPP < 8) ScreenBPP = 8;
|
||||
if (ScreenBPP < 8) ScreenBPP = 32;
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "MaxRefreshFreq", (int32*)&maxrefreshfreq);
|
||||
|
|
|
@ -63,6 +63,8 @@ extern int shareware;
|
|||
|
||||
#define FOURSLEIGHT (1<<8)
|
||||
|
||||
#define MAXVOLUMES 7
|
||||
|
||||
#include "types.h"
|
||||
#include "file_lib.h"
|
||||
#include "develop.h"
|
||||
|
@ -451,8 +453,8 @@ extern char *music_pointer;
|
|||
|
||||
extern char ipath[80],opath[80];
|
||||
|
||||
extern char music_fn[8][11][13],music_select;
|
||||
extern char env_music_fn[8][13];
|
||||
extern char music_fn[MAXVOLUMES+1][11][13],music_select;
|
||||
extern char env_music_fn[MAXVOLUMES+1][13];
|
||||
extern short camsprite;
|
||||
|
||||
// extern char gotz;
|
||||
|
@ -505,9 +507,9 @@ extern char screencapt;
|
|||
extern short soundps[NUM_SOUNDS],soundpe[NUM_SOUNDS],soundvo[NUM_SOUNDS];
|
||||
extern char soundpr[NUM_SOUNDS],soundm[NUM_SOUNDS];
|
||||
extern long soundsiz[NUM_SOUNDS];
|
||||
extern char level_names[77][33];
|
||||
extern long partime[77],designertime[77];
|
||||
extern char volume_names[7][33];
|
||||
extern char level_names[MAXVOLUMES*11][33];
|
||||
extern long partime[MAXVOLUMES*11],designertime[MAXVOLUMES*11];
|
||||
extern char volume_names[MAXVOLUMES][33];
|
||||
extern char skill_names[5][33];
|
||||
|
||||
#define MAXGAMETYPES 32
|
||||
|
@ -534,7 +536,7 @@ enum gametypeflags {
|
|||
GAMETYPE_FLAG_PRESERVEINVENTORYDEATH = 32768
|
||||
};
|
||||
|
||||
extern char level_file_names[77][BMAX_PATH];
|
||||
extern char level_file_names[MAXVOLUMES*11][BMAX_PATH];
|
||||
extern char num_volumes;
|
||||
|
||||
extern int32 SoundToggle,MusicToggle;
|
||||
|
@ -765,7 +767,6 @@ extern long *aplWeaponInitialSound[MAX_WEAPONS]; // Sound made when initialy
|
|||
extern long *aplWeaponFireSound[MAX_WEAPONS]; // Sound made when firing (each time for automatic)
|
||||
extern long *aplWeaponSound2Time[MAX_WEAPONS]; // Alternate sound time
|
||||
extern long *aplWeaponSound2Sound[MAX_WEAPONS]; // Alternate sound sound ID
|
||||
extern long *aplWeaponRenderSize[MAX_WEAPONS]; // Rendering size
|
||||
extern long *aplWeaponReloadSound1[MAX_WEAPONS]; // Sound of magazine being removed
|
||||
extern long *aplWeaponReloadSound2[MAX_WEAPONS]; // Sound of magazine being inserted
|
||||
|
||||
|
@ -800,14 +801,14 @@ enum weaponflags {
|
|||
// custom projectiles
|
||||
|
||||
enum projectileflags {
|
||||
PROJECTILE_FLAG_BULLET = 1,
|
||||
PROJECTILE_FLAG_HITSCAN = 1,
|
||||
PROJECTILE_FLAG_RPG = 2,
|
||||
PROJECTILE_FLAG_BOUNCESOFFWALLS = 4,
|
||||
PROJECTILE_FLAG_BOUNCESOFFMIRRORS = 8,
|
||||
PROJECTILE_FLAG_KNEE = 16,
|
||||
PROJECTILE_FLAG_WATERBUBBLES = 32,
|
||||
PROJECTILE_FLAG_TIMED = 64,
|
||||
PROJECTILE_FLAG_NOENEMYHITS = 128,
|
||||
PROJECTILE_FLAG_BOUNCESOFFSPRITES = 128,
|
||||
PROJECTILE_FLAG_SPIT = 256,
|
||||
PROJECTILE_FLAG_COOLEXPLOSION1 = 512,
|
||||
PROJECTILE_FLAG_BLOOD = 1024,
|
||||
|
|
|
@ -44,7 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include "util_lib.h"
|
||||
|
||||
#define VERSION " 1.3.1-2"
|
||||
#define VERSION ""
|
||||
|
||||
#define HEAD "EDuke32"VERSION" (shareware mode)"
|
||||
#define HEAD2 "EDuke32"VERSION
|
||||
|
@ -6185,7 +6185,7 @@ char cheatquotes[][MAXCHEATLEN] = {
|
|||
"keys", // 23
|
||||
"debug", // 24
|
||||
"<RESERVED>", // 25
|
||||
"txisgod", // 26
|
||||
"screamforme", // 26
|
||||
};
|
||||
|
||||
enum cheats {
|
||||
|
@ -6215,7 +6215,7 @@ enum cheats {
|
|||
CHEAT_KEYS,
|
||||
CHEAT_DEBUG,
|
||||
CHEAT_RESERVED3,
|
||||
CHEAT_TXISGOD,
|
||||
CHEAT_SCREAMFORME,
|
||||
};
|
||||
|
||||
void CheatGetInventory(void)
|
||||
|
@ -6415,7 +6415,6 @@ FOUNDCHEAT:
|
|||
fprintf(fp,"WEAPON%d_FIRESOUND %ld\n",i,aplWeaponFireSound[i][j]);
|
||||
fprintf(fp,"WEAPON%d_SOUND2TIME %ld\n",i,aplWeaponSound2Time[i][j]);
|
||||
fprintf(fp,"WEAPON%d_SOUND2SOUND %ld\n",i,aplWeaponSound2Sound[i][j]);
|
||||
fprintf(fp,"WEAPON%d_RENDERSIZE %ld\n",i,aplWeaponRenderSize[i][j]);
|
||||
}
|
||||
fprintf(fp,"\n");
|
||||
}
|
||||
|
@ -6519,7 +6518,7 @@ FOUNDCHEAT:
|
|||
KB_FlushKeyBoardQueue();
|
||||
return;
|
||||
|
||||
case CHEAT_TXISGOD:
|
||||
case CHEAT_SCREAMFORME:
|
||||
ud.god = 1-ud.god;
|
||||
|
||||
if(ud.god)
|
||||
|
@ -6936,17 +6935,16 @@ void nonsharedkeys(void)
|
|||
{
|
||||
if(i == 5 && ps[myconnectindex].fta > 0 && ps[myconnectindex].ftq == 26)
|
||||
{
|
||||
i = (VOLUMEALL?num_volumes*11:6);
|
||||
music_select++;
|
||||
if (VOLUMEALL) {
|
||||
if(music_select == 44) music_select = 0;
|
||||
} else {
|
||||
if(music_select == 6) music_select = 0;
|
||||
}
|
||||
strcpy(&tempbuf[0],"PLAYING ");
|
||||
strcat(&tempbuf[0],&music_fn[0][music_select][0]);
|
||||
playmusic(&music_fn[0][music_select][0]);
|
||||
strcpy(&fta_quotes[26][0],&tempbuf[0]);
|
||||
while(!music_fn[0][music_select][0] && music_select < i)
|
||||
music_select++;
|
||||
if(music_select == i)
|
||||
music_select = 0;
|
||||
Bstrcpy(&fta_quotes[26][0],"PLAYING ");
|
||||
Bstrcat(&fta_quotes[26][0],&music_fn[0][music_select][0]);
|
||||
FTA(26,&ps[myconnectindex]);
|
||||
playmusic(&music_fn[0][music_select][0]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -8277,12 +8275,17 @@ void app_main(int argc,char **argv)
|
|||
|
||||
initprintf("%s%s\n",apptitle," ("__DATE__" "__TIME__")");
|
||||
initprintf("Copyright (c) 1996, 2003 3D Realms Entertainment\n");
|
||||
initprintf("Copyright (c) 2006 EDuke32 team\n\n");
|
||||
initprintf("Copyright (c) 2006 EDuke32 team\n");
|
||||
|
||||
ud.multimode = 1;
|
||||
|
||||
checkcommandline(argc,argv);
|
||||
if (!loaddefinitionsfile(duke3ddef)) initprintf("Definitions file loaded.\n");
|
||||
|
||||
if (VOLUMEALL)
|
||||
loadgroupfiles(duke3ddef);
|
||||
|
||||
initprintf("\n");
|
||||
|
||||
if (condebug)
|
||||
initprintf("CON debugging activated (%d).\n\n",condebug);
|
||||
|
||||
|
@ -8296,6 +8299,7 @@ void app_main(int argc,char **argv)
|
|||
}
|
||||
|
||||
Startup(); // a bunch of stuff including compiling cons
|
||||
if (!loaddefinitionsfile(duke3ddef)) initprintf("Definitions file loaded.\n");
|
||||
|
||||
if (quitevent) return;
|
||||
|
||||
|
@ -8343,13 +8347,22 @@ void app_main(int argc,char **argv)
|
|||
|
||||
if( setgamemode(ScreenMode,ScreenWidth,ScreenHeight,ScreenBPP) < 0 )
|
||||
{
|
||||
int i = 0;
|
||||
int xres[] = {800,640,320};
|
||||
int yres[] = {600,480,240};
|
||||
int bpp[] = {32,16,8};
|
||||
initprintf("Failure setting video mode %dx%dx%d %s! Attempting safer mode...",
|
||||
ScreenWidth,ScreenHeight,ScreenBPP,ScreenMode?"fullscreen":"windowed");
|
||||
ScreenMode = 0; // JBF: was 2
|
||||
ScreenWidth = 320;
|
||||
ScreenHeight = 240; // JBF: was 200
|
||||
ScreenBPP = 8;
|
||||
setgamemode(ScreenMode,ScreenWidth,ScreenHeight,ScreenBPP);
|
||||
/* ScreenMode = 0; // JBF: was 2
|
||||
ScreenWidth = 800;
|
||||
ScreenHeight = 600; // JBF: was 200
|
||||
ScreenBPP = 32; */
|
||||
while(setgamemode(0,xres[i],yres[i],bpp[i]) < 0) {
|
||||
i++;
|
||||
}
|
||||
ScreenWidth = xres[i];
|
||||
ScreenHeight = yres[i];
|
||||
ScreenBPP = bpp[i];
|
||||
}
|
||||
|
||||
initprintf("Initializing OSD...\n");
|
||||
|
@ -8630,7 +8643,7 @@ void opendemowrite(void)
|
|||
|
||||
ver = BYTEVERSION;
|
||||
|
||||
if ((frecfilep = fopenfrompath(d,"wb")) == NULL) return;
|
||||
if ((frecfilep = fopen(d,"wb")) == NULL) return;
|
||||
fwrite(&dummylong,4,1,frecfilep);
|
||||
fwrite(&ver,sizeof(char),1,frecfilep);
|
||||
fwrite((char *)&ud.volume_number,sizeof(char),1,frecfilep);
|
||||
|
@ -8817,6 +8830,7 @@ RECHECK:
|
|||
}
|
||||
else
|
||||
{
|
||||
if(ud.recstat != 2)
|
||||
menus();
|
||||
if( ud.multimode > 1 )
|
||||
{
|
||||
|
|
|
@ -59,7 +59,6 @@ long *aplWeaponInitialSound[MAX_WEAPONS]; // Sound made when initialy firing.
|
|||
long *aplWeaponFireSound[MAX_WEAPONS]; // Sound made when firing (each time for automatic)
|
||||
long *aplWeaponSound2Time[MAX_WEAPONS]; // Alternate sound time
|
||||
long *aplWeaponSound2Sound[MAX_WEAPONS]; // Alternate sound sound ID
|
||||
long *aplWeaponRenderSize[MAX_WEAPONS]; // size of weapon sprite, 0 = normal, 1 = half size (RR style)
|
||||
long *aplWeaponReloadSound1[MAX_WEAPONS]; // Sound of magazine being removed
|
||||
long *aplWeaponReloadSound2[MAX_WEAPONS]; // Sound of magazine being inserted
|
||||
|
||||
|
@ -4372,7 +4371,7 @@ repeatcase:
|
|||
j = *scriptptr;
|
||||
while( *textptr == ' ' ) textptr++;
|
||||
|
||||
if (j < 0 || j > 6)
|
||||
if (j < 0 || j > MAXVOLUMES-1)
|
||||
{
|
||||
initprintf("%s:%ld: error: volume number exceeds maximum volume count.\n",compilefile,line_number);
|
||||
error++;
|
||||
|
@ -4480,7 +4479,7 @@ repeatcase:
|
|||
k = *scriptptr;
|
||||
while( *textptr == ' ' ) textptr++;
|
||||
|
||||
if (j < 0 || j > 6)
|
||||
if (j < 0 || j > MAXVOLUMES-1)
|
||||
{
|
||||
initprintf("%s:%ld: error: volume number exceeds maximum volume count.\n",compilefile,line_number);
|
||||
error++;
|
||||
|
@ -4998,8 +4997,6 @@ void InitGameVarPointers(void)
|
|||
aplWeaponSound2Time[i]=GetGameValuePtr(aszBuf);
|
||||
Bsprintf(aszBuf,"WEAPON%d_SOUND2SOUND",i);
|
||||
aplWeaponSound2Sound[i]=GetGameValuePtr(aszBuf);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RENDERSIZE",i);
|
||||
aplWeaponRenderSize[i]=GetGameValuePtr(aszBuf);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND1",i);
|
||||
aplWeaponReloadSound1[i]=GetGameValuePtr(aszBuf);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND2",i);
|
||||
|
@ -5045,8 +5042,6 @@ void AddSystemVars()
|
|||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_SOUND2SOUND",KNEE_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RENDERSIZE",KNEE_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND1",KNEE_WEAPON);
|
||||
AddGameVar(aszBuf, EJECT_CLIP, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND2",KNEE_WEAPON);
|
||||
|
@ -5083,8 +5078,6 @@ void AddSystemVars()
|
|||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_SOUND2SOUND",PISTOL_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RENDERSIZE",PISTOL_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND1",PISTOL_WEAPON);
|
||||
AddGameVar(aszBuf, EJECT_CLIP, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND2",PISTOL_WEAPON);
|
||||
|
@ -5121,8 +5114,6 @@ void AddSystemVars()
|
|||
AddGameVar(aszBuf, 15, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_SOUND2SOUND",SHOTGUN_WEAPON);
|
||||
AddGameVar(aszBuf, SHOTGUN_COCK, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RENDERSIZE",SHOTGUN_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND1",SHOTGUN_WEAPON);
|
||||
AddGameVar(aszBuf, EJECT_CLIP, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND2",SHOTGUN_WEAPON);
|
||||
|
@ -5160,8 +5151,6 @@ void AddSystemVars()
|
|||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_SOUND2SOUND",CHAINGUN_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RENDERSIZE",CHAINGUN_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND1",CHAINGUN_WEAPON);
|
||||
AddGameVar(aszBuf, EJECT_CLIP, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND2",CHAINGUN_WEAPON);
|
||||
|
@ -5198,8 +5187,6 @@ void AddSystemVars()
|
|||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_SOUND2SOUND",RPG_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RENDERSIZE",RPG_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND1",RPG_WEAPON);
|
||||
AddGameVar(aszBuf, EJECT_CLIP, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND2",RPG_WEAPON);
|
||||
|
@ -5236,8 +5223,6 @@ void AddSystemVars()
|
|||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_SOUND2SOUND",HANDBOMB_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RENDERSIZE",HANDBOMB_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND1",HANDBOMB_WEAPON);
|
||||
AddGameVar(aszBuf, EJECT_CLIP, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND2",HANDBOMB_WEAPON);
|
||||
|
@ -5274,8 +5259,6 @@ void AddSystemVars()
|
|||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_SOUND2SOUND",SHRINKER_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RENDERSIZE",SHRINKER_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND1",SHRINKER_WEAPON);
|
||||
AddGameVar(aszBuf, EJECT_CLIP, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND2",SHRINKER_WEAPON);
|
||||
|
@ -5312,8 +5295,6 @@ void AddSystemVars()
|
|||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_SOUND2SOUND",DEVISTATOR_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RENDERSIZE",DEVISTATOR_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND1",DEVISTATOR_WEAPON);
|
||||
AddGameVar(aszBuf, EJECT_CLIP, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND2",DEVISTATOR_WEAPON);
|
||||
|
@ -5350,8 +5331,6 @@ void AddSystemVars()
|
|||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_SOUND2SOUND",TRIPBOMB_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RENDERSIZE",TRIPBOMB_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND1",TRIPBOMB_WEAPON);
|
||||
AddGameVar(aszBuf, EJECT_CLIP, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND2",TRIPBOMB_WEAPON);
|
||||
|
@ -5388,8 +5367,6 @@ void AddSystemVars()
|
|||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_SOUND2SOUND",FREEZE_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RENDERSIZE",FREEZE_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND1",FREEZE_WEAPON);
|
||||
AddGameVar(aszBuf, EJECT_CLIP, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND2",FREEZE_WEAPON);
|
||||
|
@ -5426,8 +5403,6 @@ void AddSystemVars()
|
|||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_SOUND2SOUND",HANDREMOTE_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RENDERSIZE",HANDREMOTE_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND1",HANDREMOTE_WEAPON);
|
||||
AddGameVar(aszBuf, EJECT_CLIP, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND2",HANDREMOTE_WEAPON);
|
||||
|
@ -5464,8 +5439,6 @@ void AddSystemVars()
|
|||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_SOUND2SOUND",GROW_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RENDERSIZE",GROW_WEAPON);
|
||||
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND1",GROW_WEAPON);
|
||||
AddGameVar(aszBuf, EJECT_CLIP, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND2",GROW_WEAPON);
|
||||
|
@ -5655,27 +5628,21 @@ void AddDefaultDefinitions(void)
|
|||
void InitProjectiles(void)
|
||||
{
|
||||
int i;
|
||||
for(i=0;i<MAXTILES;i++)
|
||||
{
|
||||
for(i=0;i<MAXTILES;i++) {
|
||||
projectile[i].workslike = 1;
|
||||
projectile[i].spawns = SMALLSMOKE;
|
||||
projectile[i].sxrepeat = -1;
|
||||
projectile[i].syrepeat = -1;
|
||||
projectile[i].sound = -1;
|
||||
projectile[i].isound = -1;
|
||||
projectile[i].sxrepeat = projectile[i].syrepeat = -1;
|
||||
projectile[i].sound = projectile[i].isound = -1;
|
||||
projectile[i].vel = 600;
|
||||
projectile[i].extra = 100;
|
||||
projectile[i].decal = BULLETHOLE;
|
||||
projectile[i].trail = -1;
|
||||
projectile[i].tnum = 0;
|
||||
projectile[i].txrepeat = -1;
|
||||
projectile[i].tyrepeat = -1;
|
||||
projectile[i].toffset = 0;
|
||||
projectile[i].drop = 0;
|
||||
projectile[i].tnum = projectile[i].toffset = 0;
|
||||
projectile[i].txrepeat = projectile[i].tyrepeat = -1;
|
||||
projectile[i].drop = projectile[i].range = 0;
|
||||
projectile[i].cstat = -1;
|
||||
projectile[i].shade = -96;
|
||||
projectile[i].xrepeat = 18;
|
||||
projectile[i].yrepeat = 18;
|
||||
projectile[i].xrepeat = projectile[i].yrepeat = 18;
|
||||
projectile[i].clipdist = 32;
|
||||
projectile[i].pal = 0;
|
||||
projectile[i].extra_rand = -1;
|
||||
|
@ -5684,7 +5651,6 @@ void InitProjectiles(void)
|
|||
projectile[i].offset = 448;
|
||||
projectile[i].bounces = numfreezebounces;
|
||||
projectile[i].bsound = PIPEBOMB_BOUNCE;
|
||||
projectile[i].range = 0;
|
||||
// defaultprojectile[i] = projectile[i];
|
||||
}
|
||||
Bmemcpy(&defaultprojectile, &projectile, sizeof(projectile));
|
||||
|
@ -5733,8 +5699,6 @@ void ResetSystemDefaults(void)
|
|||
aplWeaponSound2Time[i][j]=GetGameVar(aszBuf,0, -1, j);
|
||||
Bsprintf(aszBuf,"WEAPON%d_SOUND2SOUND",i);
|
||||
aplWeaponSound2Sound[i][j]=GetGameVar(aszBuf,0, -1, j);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RENDERSIZE",i);
|
||||
aplWeaponRenderSize[i][j]=GetGameVar(aszBuf,0, -1, j);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND1",i);
|
||||
aplWeaponReloadSound1[i][j]=GetGameVar(aszBuf,0, -1, j);
|
||||
Bsprintf(aszBuf,"WEAPON%d_RELOADSOUND2",i);
|
||||
|
|
|
@ -4783,7 +4783,7 @@ SKIPJIBS:
|
|||
Bsprintf(ud.savegame[lastsavedpos],"Auto");
|
||||
for(i=0;i<13;i++)
|
||||
Bmemcpy(&ud.savegame[lastsavedpos][i+4],&tempbuf[i+3],sizeof(tempbuf[i+3]));
|
||||
ud.savegame[lastsavedpos][Bstrlen(ud.savegame[lastsavedpos])] = '\0';
|
||||
ud.savegame[lastsavedpos][i+4] = '\0';
|
||||
OSD_Printf("Saving to slot %d\n",lastsavedpos);
|
||||
|
||||
KB_FlushKeyboardQueue();
|
||||
|
|
|
@ -55,9 +55,9 @@ int current_menu;
|
|||
|
||||
char betaname[80];
|
||||
|
||||
char level_names[77][33],level_file_names[77][BMAX_PATH];
|
||||
long partime[77],designertime[77];
|
||||
char volume_names[7][33] = { "L.A. MELTDOWN", "LUNAR APOCALYPSE", "SHRAPNEL CITY" };
|
||||
char level_names[MAXVOLUMES*11][33],level_file_names[MAXVOLUMES*11][BMAX_PATH];
|
||||
long partime[MAXVOLUMES*11],designertime[MAXVOLUMES*11];
|
||||
char volume_names[MAXVOLUMES][33] = { "L.A. MELTDOWN", "LUNAR APOCALYPSE", "SHRAPNEL CITY" };
|
||||
char skill_names[5][33] = { "PIECE OF CAKE", "LET'S ROCK", "COME GET SOME", "DAMN I'M GOOD" };
|
||||
|
||||
char gametype_names[MAXGAMETYPES][33] = { "DUKEMATCH (SPAWN)","COOPERATIVE PLAY","DUKEMATCH (NO SPAWN)"};
|
||||
|
@ -97,7 +97,6 @@ long avgfvel, avgsvel, avgavel, avghorz, avgbits, avgbits2;
|
|||
|
||||
|
||||
input inputfifo[MOVEFIFOSIZ][MAXPLAYERS];
|
||||
input recsync[RECSYNCBUFSIZ];
|
||||
|
||||
long movefifosendplc;
|
||||
|
||||
|
@ -121,8 +120,8 @@ long script[MAXSCRIPTSIZE+16];
|
|||
|
||||
char display_mirror,typebuflen,typebuf[41];
|
||||
|
||||
char music_fn[8][11][13],music_select;
|
||||
char env_music_fn[8][13];
|
||||
char music_fn[MAXVOLUMES+1][11][13],music_select;
|
||||
char env_music_fn[MAXVOLUMES+1][13];
|
||||
char rtsplaying;
|
||||
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ long numenvsnds;
|
|||
#define SOUNDM_PLAYER 128
|
||||
|
||||
#define UNITSPERMETRE 1024.0
|
||||
#define ZUNITSPERMETRE 8192.0
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
@ -191,7 +190,7 @@ void SoundStartup(void)
|
|||
#endif
|
||||
|
||||
havewave = havemidi = false;
|
||||
if (!jfaud->InitWave(NULL, NumVoices, MixRate)) {
|
||||
if (!jfaud->InitWave("software", NumVoices, MixRate)) {
|
||||
delete jfaud;
|
||||
jfaud = NULL;
|
||||
return;
|
||||
|
@ -332,8 +331,8 @@ int xyzsound(short num, short i, long x, long y, long z)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// swaplong(&y,&z);
|
||||
// y = -y>>4;
|
||||
swaplong(&y,&z);
|
||||
y = -y>>4;
|
||||
|
||||
if (soundm[num] & SOUNDM_DUKE) {
|
||||
// Duke speech, one at a time only
|
||||
|
@ -360,13 +359,11 @@ int xyzsound(short num, short i, long x, long y, long z)
|
|||
} else pitch = translatepitch(ps);
|
||||
}
|
||||
|
||||
if (ps[screenpeek].sound_pitch) pitch = translatepitch(ps[screenpeek].sound_pitch);
|
||||
|
||||
//gain += soundvo[num];
|
||||
/* if (PN != MUSICANDSFX &&
|
||||
if (PN != MUSICANDSFX &&
|
||||
!cansee(ps[screenpeek].oposx,ps[screenpeek].oposy,ps[screenpeek].oposz-(24<<8),
|
||||
ps[screenpeek].cursectnum,SX,SY,SZ-(24<<8),SECT) )
|
||||
gain *= 1.0/32.0; */
|
||||
gain *= 1.0/32.0;
|
||||
|
||||
switch(num)
|
||||
{
|
||||
|
@ -384,7 +381,8 @@ int xyzsound(short num, short i, long x, long y, long z)
|
|||
// return -1;
|
||||
break;
|
||||
}
|
||||
if (ps[screenpeek].sound_pitch) pitch = translatepitch(ps[screenpeek].sound_pitch);
|
||||
if(ps[screenpeek].sound_pitch)
|
||||
pitch = translatepitch(ps[screenpeek].sound_pitch);
|
||||
/*
|
||||
// XXX: this is shit
|
||||
if( Sound[num].num > 0 && PN != MUSICANDSFX )
|
||||
|
@ -398,7 +396,10 @@ int xyzsound(short num, short i, long x, long y, long z)
|
|||
chan = jfaud->PlaySound(sounds[num], NULL, soundpr[num]);
|
||||
if (!chan) return -1;
|
||||
|
||||
chan->SetGain(gain);
|
||||
if(ps[screenpeek].sound_pitch)
|
||||
pitch = translatepitch(ps[screenpeek].sound_pitch);
|
||||
|
||||
chan->SetGain(gain*(FXVolume/252.0));
|
||||
chan->SetPitch(pitch);
|
||||
chan->SetLoop(soundm[num] & SOUNDM_LOOP);
|
||||
if (soundm[num] & SOUNDM_GLOBAL) global = 1;
|
||||
|
@ -409,9 +410,9 @@ int xyzsound(short num, short i, long x, long y, long z)
|
|||
chan->SetFollowListener(true);
|
||||
chan->SetPosition(0.0, 0.0, 0.0);
|
||||
} else {
|
||||
chan->SetRolloff(global ? 0.0 : 0.3);
|
||||
chan->SetRolloff(global ? 0.0 : 0.2);
|
||||
chan->SetFollowListener(false);
|
||||
chan->SetPosition((float)x/UNITSPERMETRE, (float)z/ZUNITSPERMETRE, (float)y/UNITSPERMETRE);
|
||||
chan->SetPosition((float)x/UNITSPERMETRE, (float)y/UNITSPERMETRE, (float)z/UNITSPERMETRE);
|
||||
}
|
||||
|
||||
r = keephandle(chan, num, i);
|
||||
|
@ -443,10 +444,16 @@ void sound(short num)
|
|||
} else pitch = translatepitch(ps);
|
||||
}
|
||||
|
||||
if(ps[screenpeek].sound_pitch)
|
||||
pitch = translatepitch(ps[screenpeek].sound_pitch);
|
||||
|
||||
chan = jfaud->PlaySound(sounds[num], NULL, soundpr[num]);
|
||||
if (!chan) return;
|
||||
|
||||
chan->SetGain(1.0);
|
||||
if(ps[screenpeek].sound_pitch)
|
||||
pitch = translatepitch(ps[screenpeek].sound_pitch);
|
||||
|
||||
chan->SetGain(FXVolume/252.0);
|
||||
chan->SetPitch(pitch);
|
||||
chan->SetLoop(soundm[num] & SOUNDM_LOOP);
|
||||
chan->SetRolloff(0.0);
|
||||
|
@ -524,20 +531,20 @@ void pan3dsound(void)
|
|||
|
||||
if(ud.camerasprite == -1) {
|
||||
cx = ps[screenpeek].oposx;
|
||||
cy = -ps[screenpeek].oposz>>4;
|
||||
cz = ps[screenpeek].oposy;
|
||||
cy = ps[screenpeek].oposy;
|
||||
cz = ps[screenpeek].oposz;
|
||||
cs = ps[screenpeek].cursectnum;
|
||||
ca = ps[screenpeek].ang+ps[screenpeek].look_ang;
|
||||
} else {
|
||||
cx = sprite[ud.camerasprite].x;
|
||||
cy = -sprite[ud.camerasprite].z>>4;
|
||||
cz = sprite[ud.camerasprite].y;
|
||||
cy = sprite[ud.camerasprite].y;
|
||||
cz = sprite[ud.camerasprite].z;
|
||||
cs = sprite[ud.camerasprite].sectnum;
|
||||
ca = sprite[ud.camerasprite].ang;
|
||||
}
|
||||
|
||||
mix->SetListenerPosition((float)cx/UNITSPERMETRE, (float)cy/UNITSPERMETRE, (float)cz/ZUNITSPERMETRE);
|
||||
mix->SetListenerOrientation((float)sintable[(ca-512)&2047]/16384.0, 0.0, (float)sintable[ca&2047]/16384.0,
|
||||
mix->SetListenerPosition((float)cx/UNITSPERMETRE, (float)(-cz>>4)/UNITSPERMETRE, (float)cy/UNITSPERMETRE);
|
||||
mix->SetListenerOrientation((float)sintable[(ca+512)&2047]/16384.0, 0.0, (float)sintable[ca&2047]/16384.0,
|
||||
0.0, 1.0, 0.0);
|
||||
|
||||
for (j=NumVoices-1; j>=0; j--) {
|
||||
|
@ -548,12 +555,12 @@ void pan3dsound(void)
|
|||
i = chans[j].owner;
|
||||
|
||||
sx = sprite[i].x;
|
||||
sy = -sprite[i].z >> 4;
|
||||
sz = sprite[i].y;
|
||||
sy = sprite[i].y;
|
||||
sz = sprite[i].z;
|
||||
|
||||
//gain += soundvo[num];
|
||||
// if (PN != MUSICANDSFX && !cansee(cx,cy,cz-(24<<8),cs,sx,sy,sz-(24<<8),SECT) )
|
||||
// gain *= 1.0/32.0;
|
||||
if (PN != MUSICANDSFX && !cansee(cx,cy,cz-(24<<8),cs,sx,sy,sz-(24<<8),SECT) )
|
||||
gain *= 1.0/32.0;
|
||||
|
||||
if(PN == MUSICANDSFX && SLT < 999) numenvsnds++;
|
||||
if( soundm[ chans[j].soundnum ]&SOUNDM_GLOBAL ) global = 1;
|
||||
|
@ -575,15 +582,15 @@ void pan3dsound(void)
|
|||
|
||||
// A sound may move from player-relative 3D if the viewpoint shifts from the player
|
||||
// through a viewscreen or viewpoint switching
|
||||
chans[j].chan->SetGain(gain);
|
||||
chans[j].chan->SetGain(gain*(FXVolume/252.0));
|
||||
if (PN == APLAYER && sprite[i].yvel == screenpeek) {
|
||||
chans[j].chan->SetRolloff(0.0);
|
||||
chans[j].chan->SetFollowListener(true);
|
||||
chans[j].chan->SetPosition(0.0, 0.0, 0.0);
|
||||
} else {
|
||||
chans[j].chan->SetRolloff(global ? 0.0 : 0.3);
|
||||
chans[j].chan->SetRolloff(global ? 0.0 : 0.2);
|
||||
chans[j].chan->SetFollowListener(false);
|
||||
chans[j].chan->SetPosition((float)sx/UNITSPERMETRE, (float)sy/UNITSPERMETRE, (float)sz/ZUNITSPERMETRE);
|
||||
chans[j].chan->SetPosition((float)sx/UNITSPERMETRE, (float)(-sz>>4)/UNITSPERMETRE, (float)sy/UNITSPERMETRE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ byte * ANIM_DrawFrame (int32 framenumber);
|
|||
|
||||
byte * ANIM_GetPalette ( void );
|
||||
|
||||
extern anim_t * anim;
|
||||
// extern anim_t * anim;
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
|
|
|
@ -528,8 +528,7 @@ void menus(void)
|
|||
x = 0;
|
||||
|
||||
sh = 4-(sintable[(totalclock<<4)&2047]>>11);
|
||||
|
||||
if(bpp > 8 && (ps[myconnectindex].gm&MODE_GAME || (ps[myconnectindex].gm&MODE_DEMO && ud.recstat != 0)))
|
||||
if(bpp > 8)
|
||||
{
|
||||
long x,y,y1=0,y2=ydim;
|
||||
for(y=y1;y<y2;y+=tilesizy[BIGHOLE])
|
||||
|
@ -2032,7 +2031,7 @@ cheat_for_port_credits:
|
|||
}
|
||||
if( (ps[myconnectindex].gm&MODE_GAME) && ud.m_recstat != 1 )
|
||||
enabled = 0;
|
||||
gametextpal(d,yy, ud.m_recstat ? ((ud.m_recstat && enabled && ps[myconnectindex].gm&MODE_GAME) ? "Recording" : "On") : "Off", 0, !enabled ? 1 : 0); break;
|
||||
gametextpal(d,yy,ud.m_recstat?((ud.m_recstat && enabled && ps[myconnectindex].gm&MODE_GAME)?"Recording":"On"):"Off",0,enabled?0:1); break;
|
||||
case 14: if (x==io) cmenu(201); break;
|
||||
default: break;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat;
|
|||
int osdcmd_quit(const osdfuncparm_t *parm)
|
||||
{
|
||||
extern long quittimer;
|
||||
parm=parm;
|
||||
if( gamequit == 0 && ( numplayers > 1 ) )
|
||||
{
|
||||
if(ps[myconnectindex].gm&MODE_GAME)
|
||||
|
@ -93,8 +92,8 @@ int osdcmd_changelevel(const osdfuncparm_t *parm)
|
|||
}
|
||||
|
||||
if (volume == 0) {
|
||||
if (level > 5) {
|
||||
OSD_Printf("changelevel: invalid volume 1 level number (range 1-6)\n");
|
||||
if (level > 6) {
|
||||
OSD_Printf("changelevel: invalid volume 1 level number (range 1-7)\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
} else {
|
||||
|
@ -177,7 +176,6 @@ int osdcmd_map(const osdfuncparm_t *parm)
|
|||
|
||||
int osdcmd_god(const osdfuncparm_t *parm)
|
||||
{
|
||||
parm=parm;
|
||||
if (numplayers == 1 && ps[myconnectindex].gm & MODE_GAME) {
|
||||
osdcmd_cheatsinfo_stat.cheatnum = 0;
|
||||
} else {
|
||||
|
@ -189,7 +187,6 @@ int osdcmd_god(const osdfuncparm_t *parm)
|
|||
|
||||
int osdcmd_noclip(const osdfuncparm_t *parm)
|
||||
{
|
||||
parm=parm;
|
||||
if (numplayers == 1 && ps[myconnectindex].gm & MODE_GAME) {
|
||||
osdcmd_cheatsinfo_stat.cheatnum = 20;
|
||||
} else {
|
||||
|
@ -380,19 +377,27 @@ int osdcmd_setvar(const osdfuncparm_t *parm)
|
|||
varval = Batol(parm->parms[1]);
|
||||
|
||||
for(i=0;i<iGameVarCount;i++)
|
||||
{
|
||||
if( strcmp(varname, aGameVars[i].szLabel) == 0 )
|
||||
if(Bstrcmp(varname, aGameVars[i].szLabel))
|
||||
{
|
||||
SetGameVarID(i, varval, ps[myconnectindex].i, myconnectindex);
|
||||
}
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
int osdcmd_addpath(const osdfuncparm_t *parm)
|
||||
{
|
||||
char pathname[BMAX_PATH];
|
||||
|
||||
if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
||||
|
||||
strcpy(pathname,parm->parms[0]);
|
||||
addsearchpath(pathname);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
int osdcmd_cmenu(const osdfuncparm_t *parm)
|
||||
{
|
||||
if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
||||
parm=parm;
|
||||
if (numplayers > 1) {
|
||||
OSD_Printf("cmenu: disallowed in multiplayer\n");
|
||||
return OSDCMD_OK;
|
||||
|
@ -418,38 +423,6 @@ int osdcmd_exec(const osdfuncparm_t *parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
static int osdcmd_vars(const osdfuncparm_t *parm)
|
||||
{
|
||||
int showval = (parm->numparms < 1);
|
||||
|
||||
if (!Bstrcasecmp(parm->name, "myname")) {
|
||||
if (showval) { OSD_Printf("Your name is \"%s\"\n", myname); }
|
||||
else {
|
||||
Bstrncpy(myname, parm->parms[0], sizeof(myname)-1);
|
||||
myname[sizeof(myname)-1] = 0;
|
||||
// XXX: now send the update over the wire
|
||||
}
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
else if (!Bstrcasecmp(parm->name, "showcoords")) {
|
||||
if (showval) { OSD_Printf("showcoords is %d\n", ud.coords); }
|
||||
else ud.coords = (atoi(parm->parms[0]) != 0);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
else if (!Bstrcasecmp(parm->name, "useprecache")) {
|
||||
if (showval) { OSD_Printf("useprecache is %d\n", useprecache); }
|
||||
else useprecache = (atoi(parm->parms[0]) != 0);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
else if (!Bstrcasecmp(parm->name, "drawweapon")) {
|
||||
if (showval) { OSD_Printf("drawweapon is %d\n", ud.drawweapon); }
|
||||
else ud.drawweapon = (atoi(parm->parms[0]) != 0);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
*/
|
||||
enum cvartypes {
|
||||
CVAR_INT,
|
||||
CVAR_UNSIGNEDINT,
|
||||
|
@ -634,6 +607,7 @@ int registerosdcommands(void)
|
|||
OSD_RegisterFunction("sensitivity","sensitivity <value>: changes the mouse sensitivity", osdcmd_sensitivity);
|
||||
OSD_RegisterFunction("spawn","spawn <picnum> [palnum] [cstat] [ang] [x y z]: spawns a sprite with the given properties",osdcmd_spawn);
|
||||
OSD_RegisterFunction("setvar","setvar <gamevar> <value>: sets the value of a gamevar", osdcmd_setvar);
|
||||
OSD_RegisterFunction("addpath","addpath <path>: adds path to game filesystem", osdcmd_addpath);
|
||||
|
||||
OSD_RegisterFunction("fileinfo","fileinfo <file>: gets a file's information", osdcmd_fileinfo);
|
||||
OSD_RegisterFunction("quit","quit: exits the game immediately", osdcmd_quit);
|
||||
|
|
|
@ -603,10 +603,8 @@ short shoot(short i,short atwith)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if(projectile[atwith].workslike & PROJECTILE_FLAG_BULLET)
|
||||
if(projectile[atwith].workslike & PROJECTILE_FLAG_HITSCAN)
|
||||
{
|
||||
|
||||
if( s->extra >= 0 ) s->shade = projectile[atwith].shade;
|
||||
|
||||
if(p >= 0)
|
||||
|
@ -2213,8 +2211,6 @@ void displayweapon(short snum)
|
|||
pal = p->palookup;
|
||||
}
|
||||
|
||||
if(*aplWeaponRenderSize[KNEE_WEAPON] == 0)
|
||||
{
|
||||
if( (*kb) < 5 || (*kb) > 9 )
|
||||
myospal(weapon_xoffset+220-(p->look_ang>>1),
|
||||
looking_arc+250-gun_pos,KNEE,gs,o,pal);
|
||||
|
@ -2222,16 +2218,6 @@ void displayweapon(short snum)
|
|||
myospal(weapon_xoffset+160-(p->look_ang>>1),
|
||||
looking_arc+214-gun_pos,KNEE+1,gs,o,pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (*kb) < 5 || (*kb) > 9 )
|
||||
myospalx(weapon_xoffset+220-(p->look_ang>>1),
|
||||
looking_arc+250-gun_pos,KNEE,gs,o,pal);
|
||||
else
|
||||
myospalx(weapon_xoffset+160-(p->look_ang>>1),
|
||||
looking_arc+214-gun_pos,KNEE+1,gs,o,pal);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2249,8 +2235,6 @@ void displayweapon(short snum)
|
|||
weapon_xoffset += 8;
|
||||
gun_pos -= 10;
|
||||
|
||||
if(*aplWeaponRenderSize[TRIPBOMB_WEAPON] == 0)
|
||||
{
|
||||
if((*kb) > 6)
|
||||
looking_arc += ((*kb)<<3);
|
||||
else if((*kb) < 4)
|
||||
|
@ -2265,23 +2249,6 @@ void displayweapon(short snum)
|
|||
looking_arc+249-gun_pos,
|
||||
HANDHOLDINGLASER+((*kb)>>2),gs,o|4,pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
if((*kb) > 6)
|
||||
looking_arc += ((*kb)<<3);
|
||||
else if((*kb) < 4)
|
||||
|
||||
myospalx(weapon_xoffset+142-(p->look_ang>>1),
|
||||
looking_arc+234-gun_pos,HANDHOLDINGLASER+3,gs,o,pal);
|
||||
|
||||
myospalx(weapon_xoffset+130-(p->look_ang>>1),
|
||||
looking_arc+249-gun_pos,
|
||||
HANDHOLDINGLASER+((*kb)>>2),gs,o,pal);
|
||||
myospalx(weapon_xoffset+152-(p->look_ang>>1),
|
||||
looking_arc+249-gun_pos,
|
||||
HANDHOLDINGLASER+((*kb)>>2),gs,o|4,pal);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case RPG_WEAPON:
|
||||
|
@ -2297,8 +2264,6 @@ void displayweapon(short snum)
|
|||
weapon_xoffset -= sintable[(768+((*kb)<<7))&2047]>>11;
|
||||
gun_pos += sintable[(768+((*kb)<<7))&2047]>>11;
|
||||
|
||||
if(*aplWeaponRenderSize[RPG_WEAPON] == 0)
|
||||
{
|
||||
if(*kb > 0)
|
||||
{
|
||||
if(*kb < 8)
|
||||
|
@ -2311,24 +2276,6 @@ void displayweapon(short snum)
|
|||
myospal(weapon_xoffset+164,(looking_arc<<1)+176-gun_pos,
|
||||
RPGGUN,gs,o,pal);
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
{
|
||||
|
||||
if(*kb > 0)
|
||||
{
|
||||
if(*kb < 8)
|
||||
{
|
||||
myospalx(weapon_xoffset+164,(looking_arc<<1)+176-gun_pos,
|
||||
RPGGUN+((*kb)>>1),gs,o,pal);
|
||||
}
|
||||
}
|
||||
|
||||
myospalx(weapon_xoffset+164,(looking_arc<<1)+176-gun_pos,
|
||||
RPGGUN,gs,o,pal);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case SHOTGUN_WEAPON:
|
||||
|
@ -2345,8 +2292,6 @@ void displayweapon(short snum)
|
|||
|
||||
weapon_xoffset -= 8;
|
||||
|
||||
if(*aplWeaponRenderSize[SHOTGUN_WEAPON] == 0)
|
||||
{
|
||||
switch(*kb)
|
||||
{
|
||||
case 1:
|
||||
|
@ -2415,79 +2360,6 @@ void displayweapon(short snum)
|
|||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
{
|
||||
|
||||
switch(*kb)
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
myospalx(weapon_xoffset+168-(p->look_ang>>1),looking_arc+201-gun_pos,
|
||||
SHOTGUN+2,-128,o,pal);
|
||||
case 0:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
myospalx(weapon_xoffset+146-(p->look_ang>>1),looking_arc+202-gun_pos,
|
||||
SHOTGUN,gs,o,pal);
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
if( *kb > 1 && *kb < 5 )
|
||||
{
|
||||
gun_pos -= 40;
|
||||
weapon_xoffset += 20;
|
||||
|
||||
myospalx(weapon_xoffset+178-(p->look_ang>>1),looking_arc+194-gun_pos,
|
||||
SHOTGUN+1+((*(kb)-1)>>1),-128,o,pal);
|
||||
}
|
||||
|
||||
myospalx(weapon_xoffset+158-(p->look_ang>>1),looking_arc+220-gun_pos,
|
||||
SHOTGUN+3,gs,o,pal);
|
||||
|
||||
break;
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
myospalx(32+weapon_xoffset+166-(p->look_ang>>1),looking_arc+210-gun_pos,
|
||||
SHOTGUN+4,gs,o,pal);
|
||||
break;
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
myospalx(64+weapon_xoffset+170-(p->look_ang>>1),looking_arc+196-gun_pos,
|
||||
SHOTGUN+5,gs,o,pal);
|
||||
break;
|
||||
case 20:
|
||||
case 21:
|
||||
case 22:
|
||||
case 23:
|
||||
myospalx(64+weapon_xoffset+176-(p->look_ang>>1),looking_arc+196-gun_pos,
|
||||
SHOTGUN+6,gs,o,pal);
|
||||
break;
|
||||
case 24:
|
||||
case 25:
|
||||
case 26:
|
||||
case 27:
|
||||
myospalx(64+weapon_xoffset+170-(p->look_ang>>1),looking_arc+196-gun_pos,
|
||||
SHOTGUN+5,gs,o,pal);
|
||||
break;
|
||||
case 28:
|
||||
case 29:
|
||||
case 30:
|
||||
myospalx(32+weapon_xoffset+156-(p->look_ang>>1),looking_arc+206-gun_pos,
|
||||
SHOTGUN+4,gs,o,pal);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
@ -2507,9 +2379,6 @@ void displayweapon(short snum)
|
|||
|
||||
if(*kb > 0 && sprite[p->i].pal != 1) weapon_xoffset += 1-(rand()&3);
|
||||
|
||||
if(*aplWeaponRenderSize[CHAINGUN_WEAPON] == 0)
|
||||
{
|
||||
|
||||
myospal(weapon_xoffset+168-(p->look_ang>>1),looking_arc+260-gun_pos,
|
||||
CHAINGUN,gs,o,pal);
|
||||
switch(*kb)
|
||||
|
@ -2542,42 +2411,6 @@ void displayweapon(short snum)
|
|||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
myospalx(weapon_xoffset+168-(p->look_ang>>1),looking_arc+260-gun_pos,
|
||||
CHAINGUN,gs,o,pal);
|
||||
switch(*kb)
|
||||
{
|
||||
case 0:
|
||||
myospalx(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos,
|
||||
CHAINGUN+1,gs,o,pal);
|
||||
break;
|
||||
default:
|
||||
if(*kb > *aplWeaponFireDelay[CHAINGUN_WEAPON] && *kb < *aplWeaponTotalTime[CHAINGUN_WEAPON])
|
||||
{
|
||||
i = 0;
|
||||
if(sprite[p->i].pal != 1) i = rand()&7;
|
||||
myospalx(i+weapon_xoffset-4+140-(p->look_ang>>1),i+looking_arc-((*kb)>>1)+208-gun_pos,
|
||||
CHAINGUN+5+((*kb-4)/5),gs,o,pal);
|
||||
if(sprite[p->i].pal != 1) i = rand()&7;
|
||||
myospalx(i+weapon_xoffset-4+184-(p->look_ang>>1),i+looking_arc-((*kb)>>1)+208-gun_pos,
|
||||
CHAINGUN+5+((*kb-4)/5),gs,o,pal);
|
||||
}
|
||||
if(*kb < *aplWeaponTotalTime[CHAINGUN_WEAPON]-4)
|
||||
{
|
||||
i = rand()&7;
|
||||
myospalx(i+weapon_xoffset-4+162-(p->look_ang>>1),i+looking_arc-((*kb)>>1)+208-gun_pos,
|
||||
CHAINGUN+5+((*kb-2)/5),gs,o,pal);
|
||||
myospalx(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos,
|
||||
CHAINGUN+1+((*kb)>>1),gs,o,pal);
|
||||
}
|
||||
else myospalx(weapon_xoffset+178-(p->look_ang>>1),looking_arc+233-gun_pos,
|
||||
CHAINGUN+1,gs,o,pal);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case PISTOL_WEAPON:
|
||||
|
@ -2591,8 +2424,6 @@ void displayweapon(short snum)
|
|||
else
|
||||
pal = sector[p->cursectnum].floorpal;
|
||||
|
||||
if(*aplWeaponRenderSize[PISTOL_WEAPON] == 0)
|
||||
{
|
||||
if( (*kb) < *aplWeaponTotalTime[PISTOL_WEAPON]+1)
|
||||
{
|
||||
short kb_frames[] = {0,1,2,0,0,0,0},l;
|
||||
|
@ -2635,51 +2466,6 @@ void displayweapon(short snum)
|
|||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (*kb) < *aplWeaponTotalTime[PISTOL_WEAPON]+1)
|
||||
{
|
||||
short kb_frames[] = {0,1,2,0,0,0,0},l;
|
||||
|
||||
l = 195-12+weapon_xoffset;
|
||||
|
||||
if((*kb) == *aplWeaponFireDelay[PISTOL_WEAPON])
|
||||
l -= 3;
|
||||
|
||||
myospalx((l-(p->look_ang>>1)),(looking_arc+244-gun_pos),FIRSTGUN+kb_frames[*kb],gs,2,pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-17)
|
||||
myospalx(194-(p->look_ang>>1),looking_arc+230-gun_pos,FIRSTGUN+4,gs,o,pal);
|
||||
else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-12)
|
||||
{
|
||||
myospalx(244-((*kb)<<3)-(p->look_ang>>1),looking_arc+130-gun_pos+((*kb)<<4),FIRSTGUN+6,gs,o,pal);
|
||||
myospalx(224-(p->look_ang>>1),looking_arc+220-gun_pos,FIRSTGUN+5,gs,o,pal);
|
||||
}
|
||||
else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-7)
|
||||
{
|
||||
myospalx(124+((*kb)<<1)-(p->look_ang>>1),looking_arc+430-gun_pos-((*kb)<<3),FIRSTGUN+6,gs,o,pal);
|
||||
myospalx(224-(p->look_ang>>1),looking_arc+220-gun_pos,FIRSTGUN+5,gs,o,pal);
|
||||
}
|
||||
|
||||
else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-4)
|
||||
{
|
||||
myospalx(184-(p->look_ang>>1),looking_arc+235-gun_pos,FIRSTGUN+8,gs,o,pal);
|
||||
myospalx(224-(p->look_ang>>1),looking_arc+210-gun_pos,FIRSTGUN+5,gs,o,pal);
|
||||
}
|
||||
else if((*kb) < *aplWeaponReload[PISTOL_WEAPON]-2)
|
||||
{
|
||||
myospalx(164-(p->look_ang>>1),looking_arc+245-gun_pos,FIRSTGUN+8,gs,o,pal);
|
||||
myospalx(224-(p->look_ang>>1),looking_arc+220-gun_pos,FIRSTGUN+5,gs,o,pal);
|
||||
}
|
||||
else if((*kb) < *aplWeaponReload[PISTOL_WEAPON])
|
||||
myospalx(194-(p->look_ang>>1),looking_arc+235-gun_pos,FIRSTGUN+5,gs,o,pal);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case HANDBOMB_WEAPON:
|
||||
|
@ -2693,9 +2479,6 @@ void displayweapon(short snum)
|
|||
else
|
||||
pal = sector[p->cursectnum].floorpal;
|
||||
|
||||
if(*aplWeaponRenderSize[HANDBOMB_WEAPON] == 0)
|
||||
{
|
||||
|
||||
if((*kb))
|
||||
{
|
||||
if((*kb) < (*aplWeaponTotalTime[p->curr_weapon]))
|
||||
|
@ -2717,27 +2500,6 @@ void displayweapon(short snum)
|
|||
else
|
||||
myospal(weapon_xoffset+190-(p->look_ang>>1),looking_arc+260-gun_pos,HANDTHROW,gs,o,pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if((*kb))
|
||||
{
|
||||
char throw_frames[]
|
||||
= {0,0,0,0,0,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2};
|
||||
|
||||
if((*kb) < 7)
|
||||
gun_pos -= 10*(*kb); //D
|
||||
else if((*kb) < 12)
|
||||
gun_pos += 20*((*kb)-10); //U
|
||||
else if((*kb) < 20)
|
||||
gun_pos -= 9*((*kb)-14); //D
|
||||
|
||||
myospalx(weapon_xoffset+190-(p->look_ang>>1),looking_arc+250-gun_pos,HANDTHROW+throw_frames[(*kb)],gs,o,pal);
|
||||
}
|
||||
else
|
||||
myospalx(weapon_xoffset+190-(p->look_ang>>1),looking_arc+260-gun_pos,HANDTHROW,gs,o,pal);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2754,21 +2516,11 @@ void displayweapon(short snum)
|
|||
pal = sector[p->cursectnum].floorpal;
|
||||
|
||||
weapon_xoffset = -48;
|
||||
if(*aplWeaponRenderSize[HANDREMOTE_WEAPON] == 0)
|
||||
{
|
||||
if((*kb))
|
||||
myospal(weapon_xoffset+150-(p->look_ang>>1),looking_arc+258-gun_pos,HANDREMOTE+remote_frames[(*kb)],gs,o,pal);
|
||||
else
|
||||
myospal(weapon_xoffset+150-(p->look_ang>>1),looking_arc+258-gun_pos,HANDREMOTE,gs,o,pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
if((*kb))
|
||||
myospalx(weapon_xoffset+150-(p->look_ang>>1),looking_arc+258-gun_pos,HANDREMOTE+remote_frames[(*kb)],gs,o,pal);
|
||||
else
|
||||
myospalx(weapon_xoffset+150-(p->look_ang>>1),looking_arc+258-gun_pos,HANDREMOTE,gs,o,pal);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2783,8 +2535,6 @@ void displayweapon(short snum)
|
|||
else
|
||||
pal = sector[p->cursectnum].floorpal;
|
||||
|
||||
if(*aplWeaponRenderSize[DEVISTATOR_WEAPON] == 0)
|
||||
{
|
||||
if((*kb) < (*aplWeaponTotalTime[DEVISTATOR_WEAPON]+1) && (*kb) > 0)
|
||||
{
|
||||
char cycloidy[] = {0,4,12,24,12,4,0};
|
||||
|
@ -2808,32 +2558,6 @@ void displayweapon(short snum)
|
|||
myospal(weapon_xoffset+30-(p->look_ang>>1),looking_arc+240-gun_pos,DEVISTATOR,gs,o|4,pal);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if((*kb) < (*aplWeaponTotalTime[DEVISTATOR_WEAPON]+1) && (*kb) > 0)
|
||||
{
|
||||
char cycloidy[] = {0,4,12,24,12,4,0};
|
||||
|
||||
i = ksgn((*kb)>>2);
|
||||
|
||||
if(p->hbomb_hold_delay)
|
||||
{
|
||||
myospalx( (cycloidy[*kb]>>1)+weapon_xoffset+268-(p->look_ang>>1),cycloidy[*kb]+looking_arc+238-gun_pos,DEVISTATOR+i,-32,o,pal);
|
||||
myospalx(weapon_xoffset+30-(p->look_ang>>1),looking_arc+240-gun_pos,DEVISTATOR,gs,o|4,pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
myospalx( -(cycloidy[*kb]>>1)+weapon_xoffset+30-(p->look_ang>>1),cycloidy[*kb]+looking_arc+240-gun_pos,DEVISTATOR+i,-32,o|4,pal);
|
||||
myospalx(weapon_xoffset+268-(p->look_ang>>1),looking_arc+238-gun_pos,DEVISTATOR,gs,o,pal);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
myospalx(weapon_xoffset+268-(p->look_ang>>1),looking_arc+238-gun_pos,DEVISTATOR,gs,o,pal);
|
||||
myospalx(weapon_xoffset+30-(p->look_ang>>1),looking_arc+240-gun_pos,DEVISTATOR,gs,o|4,pal);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case FREEZE_WEAPON:
|
||||
|
@ -2847,8 +2571,6 @@ void displayweapon(short snum)
|
|||
else
|
||||
pal = sector[p->cursectnum].floorpal;
|
||||
|
||||
if(*aplWeaponRenderSize[FREEZE_WEAPON] == 0)
|
||||
{
|
||||
if((*kb) < (aplWeaponTotalTime[p->curr_weapon][snum]+1) && (*kb) > 0)
|
||||
{
|
||||
char cat_frames[] = { 0,0,1,1,2,2 };
|
||||
|
@ -2864,24 +2586,6 @@ void displayweapon(short snum)
|
|||
}
|
||||
else myospal(weapon_xoffset+210-(p->look_ang>>1),looking_arc+261-gun_pos,FREEZE,gs,o,pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
if((*kb) < (aplWeaponTotalTime[p->curr_weapon][snum]+1) && (*kb) > 0)
|
||||
{
|
||||
char cat_frames[] = { 0,0,1,1,2,2 };
|
||||
|
||||
if(sprite[p->i].pal != 1)
|
||||
{
|
||||
weapon_xoffset += rand()&3;
|
||||
looking_arc += rand()&3;
|
||||
}
|
||||
gun_pos -= 16;
|
||||
myospalx(weapon_xoffset+210-(p->look_ang>>1),looking_arc+261-gun_pos,FREEZE+2,-32,o,pal);
|
||||
myospalx(weapon_xoffset+210-(p->look_ang>>1),looking_arc+235-gun_pos,FREEZE+3+cat_frames[*kb%6],-32,o,pal);
|
||||
}
|
||||
else myospalx(weapon_xoffset+210-(p->look_ang>>1),looking_arc+261-gun_pos,FREEZE,gs,o,pal);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case GROW_WEAPON:
|
||||
|
@ -2896,7 +2600,6 @@ void displayweapon(short snum)
|
|||
pal = 1;
|
||||
else
|
||||
pal = sector[p->cursectnum].floorpal;
|
||||
if(*aplWeaponRenderSize[GROW_WEAPON] == 0)
|
||||
{
|
||||
if((*kb) < aplWeaponTotalTime[p->curr_weapon][snum] && (*kb) > 0)
|
||||
{
|
||||
|
@ -2924,34 +2627,6 @@ void displayweapon(short snum)
|
|||
looking_arc+240-gun_pos,SHRINKER-2,gs,o,pal);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if((*kb) < aplWeaponTotalTime[p->curr_weapon][snum] && (*kb) > 0)
|
||||
{
|
||||
if(sprite[p->i].pal != 1)
|
||||
{
|
||||
weapon_xoffset += rand()&3;
|
||||
gun_pos += (rand()&3);
|
||||
}
|
||||
|
||||
myospalx(weapon_xoffset+184-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER+3+((*kb)&3),-32,
|
||||
o,2);
|
||||
|
||||
myospalx(weapon_xoffset+188-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER-1,gs,o,pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
myospalx(weapon_xoffset+184-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER+2,
|
||||
16-(sintable[p->random_club_frame&2047]>>10),
|
||||
o,2);
|
||||
|
||||
myospalx(weapon_xoffset+188-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER-2,gs,o,pal);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2967,8 +2642,6 @@ void displayweapon(short snum)
|
|||
pal = 1;
|
||||
else
|
||||
pal = sector[p->cursectnum].floorpal;
|
||||
if(*aplWeaponRenderSize[SHRINKER_WEAPON] == 0)
|
||||
{
|
||||
if(((*kb) > 0) && ((*kb) < aplWeaponTotalTime[p->curr_weapon][snum]))
|
||||
{
|
||||
if(sprite[p->i].pal != 1)
|
||||
|
@ -2996,34 +2669,6 @@ void displayweapon(short snum)
|
|||
looking_arc+240-gun_pos,SHRINKER,gs,o,pal);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(((*kb) > 0) && ((*kb) < aplWeaponTotalTime[p->curr_weapon][snum]))
|
||||
{
|
||||
if(sprite[p->i].pal != 1)
|
||||
{
|
||||
weapon_xoffset += rand()&3;
|
||||
gun_pos += (rand()&3);
|
||||
}
|
||||
|
||||
myospalx(weapon_xoffset+184-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER+3+((*kb)&3),-32,
|
||||
o,0);
|
||||
myospalx(weapon_xoffset+188-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER+1,gs,o,pal);
|
||||
}
|
||||
else
|
||||
{
|
||||
myospalx(weapon_xoffset+184-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER+2,
|
||||
16-(sintable[p->random_club_frame&2047]>>10),
|
||||
o,0);
|
||||
|
||||
myospalx(weapon_xoffset+188-(p->look_ang>>1),
|
||||
looking_arc+240-gun_pos,SHRINKER,gs,o,pal);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
|
@ -277,6 +277,9 @@ void cacheit(void)
|
|||
long tc;
|
||||
unsigned long starttime, endtime;
|
||||
|
||||
if(ud.recstat == 2)
|
||||
return;
|
||||
|
||||
starttime = getticks();
|
||||
|
||||
precachenecessarysounds();
|
||||
|
@ -1615,71 +1618,3 @@ int enterlevel(char g)
|
|||
OnEvent(EVENT_ENTERLEVEL, -1, -1, -1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Duke Nukem V
|
||||
|
||||
Layout:
|
||||
|
||||
Settings:
|
||||
Suburbs
|
||||
Duke inflitrating neighborhoods inf. by aliens
|
||||
Death Valley:
|
||||
Sorta like a western. Bull-skulls halb buried in the sand
|
||||
Military compound: Aliens take over nuke-missle silo, duke
|
||||
must destroy.
|
||||
Abondend Aircraft field
|
||||
Vegas:
|
||||
Blast anything bright! Alien lights camoflauged.
|
||||
Alien Drug factory. The Blue Liquid
|
||||
Mountainal Cave:
|
||||
Interior cave battles.
|
||||
Jungle:
|
||||
Trees, canopee, animals, a mysterious hole in the earth
|
||||
Penetencury:
|
||||
Good use of spotlights:
|
||||
Inventory:
|
||||
Wood,
|
||||
Metal,
|
||||
Torch,
|
||||
Rope,
|
||||
Plastique,
|
||||
Cloth,
|
||||
Wiring,
|
||||
Glue,
|
||||
Cigars,
|
||||
Food,
|
||||
Duck Tape,
|
||||
Nails,
|
||||
Piping,
|
||||
Petrol,
|
||||
Uranium,
|
||||
Gold,
|
||||
Prism,
|
||||
Power Cell,
|
||||
|
||||
Hand spikes (Limited usage, they become dull)
|
||||
Oxygent (Oxygen mixed with stimulant)
|
||||
|
||||
|
||||
Player Skills:
|
||||
R-Left,R-Right,Foward,Back
|
||||
Strafe, Jump, Double Flip Jump for distance
|
||||
Help, Escape
|
||||
Fire/Use
|
||||
Use Menu
|
||||
|
||||
Programming:
|
||||
Images: Polys
|
||||
Actors:
|
||||
Multi-Object sections for change (head,arms,legs,torsoe,all change)
|
||||
Facial expressions. Pal lookup per poly?
|
||||
|
||||
struct imagetype
|
||||
{
|
||||
int *itable; // AngX,AngY,AngZ,Xoff,Yoff,Zoff;
|
||||
int *idata;
|
||||
struct imagetype *prev, *next;
|
||||
}
|
||||
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue