git-svn-id: https://svn.eduke32.com/eduke32@528 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2007-03-22 20:58:13 +00:00
parent 456f144451
commit 4785f64476
9 changed files with 72 additions and 78 deletions

View file

@ -18,7 +18,6 @@ $(OBJ)/lzwnew.$o: $(SRC)/lzwnew.c
$(OBJ)/md4.$o: $(SRC)/md4.c $(INC)/md4.h $(INC)/compat.h
$(OBJ)/mmulti_null.$o: $(SRC)/mmulti_null.c $(INC)/mmulti.h
$(OBJ)/mmulti.$o: $(SRC)/mmulti.c $(INC)/mmulti.h
$(OBJ)/mmultirm.$o: $(SRC)/mmultirm.c $(INC)/mmulti.h
$(OBJ)/osd.$o: $(SRC)/osd.c $(INC)/build.h $(INC)/osd.h $(INC)/compat.h $(INC)/baselayer.h
$(OBJ)/pragmas.$o: $(SRC)/pragmas.c $(INC)/compat.h
$(OBJ)/scriptfile.$o: $(SRC)/scriptfile.c $(INC)/scriptfile.h $(INC)/cache1d.h $(INC)/compat.h

View file

@ -156,7 +156,7 @@ if (readconfig(fp, "renderer", val, VL) > 0) { i = Batoi(val); setrendermode(i);
option[4] = 0; // no multiplayer
option[5] = 0;
#if 0
#if 1
if (readconfig(fp, "keyforward", val, VL) > 0) keys[0] = Bstrtol(val, NULL, 16);
if (readconfig(fp, "keybackward", val, VL) > 0) keys[1] = Bstrtol(val, NULL, 16);
if (readconfig(fp, "keyturnleft", val, VL) > 0) keys[2] = Bstrtol(val, NULL, 16);
@ -260,7 +260,7 @@ int writesetup(const char *fn)
"; Mouse sensitivity\n"
"mousesensitivity = %g\n"
"\n"
#if 0
#if 1
"; Key Settings\n"
"; Here's a map of all the keyboard scan codes: NOTE: values are listed in hex!\n"
"; +---------------------------------------------------------------------------------------------+\n"
@ -320,7 +320,7 @@ int writesetup(const char *fn)
option[7]>>4, option[2],
#endif
option[3], msens,
#if 0
#if 1
keys[0], keys[1], keys[2], keys[3], keys[4], keys[5],
keys[6], keys[7], keys[8], keys[9], keys[10], keys[11],
keys[12], keys[13], keys[14], keys[15], keys[16], keys[17],

View file

@ -403,7 +403,7 @@ static int set_maxrefreshfreq(const osdfuncparm_t *parm)
static void print_os_version(void)
{
OSVERSIONINFO osv;
const char *ver;
const char *ver = NULL;
// I was going to call this 'windows_9x_is_awful', but I couldn't justify ever setting it to 0
int awful_windows_9x = 0;
@ -448,10 +448,13 @@ static void print_os_version(void)
return;
}
initprintf("OS: Windows %s (Version %lu.%lu.%lu)\n", ver, osv.dwMajorVersion, osv.dwMinorVersion,
awful_windows_9x?osv.dwBuildNumber&0xffff:osv.dwBuildNumber);
if (osv.szCSDVersion[0])
initprintf(" - %s\n", osv.szCSDVersion);
if (ver != NULL)
{
initprintf("OS: Windows %s (Version %lu.%lu.%lu)\n", ver, osv.dwMajorVersion, osv.dwMinorVersion,
awful_windows_9x?osv.dwBuildNumber&0xffff:osv.dwBuildNumber);
if (osv.szCSDVersion[0])
initprintf(" - %s\n", osv.szCSDVersion);
}
}

View file

@ -23,13 +23,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//-------------------------------------------------------------------------
#include "duke3d.h"
extern char numenvsnds,actor_tog;
extern long numenvsnds;
extern int actor_tog;
void updateinterpolations() //Stick at beginning of domovethings
{
long i;
long i=numinterpolations-1;
for (i=numinterpolations-1;i>=0;i--) oldipos[i] = *curipos[i];
for (;i>=0;i--) oldipos[i] = *curipos[i];
}
void setinterpolation(long *posptr)
@ -60,11 +61,9 @@ void stopinterpolation(long *posptr)
void dointerpolations(long smoothratio) //Stick at beginning of drawscreen
{
long i, j, odelta, ndelta;
long i=numinterpolations-1, j = 0, odelta, ndelta = 0;
ndelta = 0;
j = 0;
for (i=numinterpolations-1;i>=0;i--)
for (;i>=0;i--)
{
bakipos[i] = *curipos[i];
odelta = ndelta;
@ -76,18 +75,15 @@ void dointerpolations(long smoothratio) //Stick at beginning of drawscreen
void restoreinterpolations() //Stick at end of drawscreen
{
long i;
long i=numinterpolations-1;
for (i=numinterpolations-1;i>=0;i--) *curipos[i] = bakipos[i];
for (;i>=0;i--) *curipos[i] = bakipos[i];
}
long ceilingspace(int sectnum)
{
if ((sector[sectnum].ceilingstat&1) && sector[sectnum].ceilingpal == 0)
{
if ((sector[sectnum].ceilingpicnum==MOONSKY1)||(sector[sectnum].ceilingpicnum==BIGORBIT1)) return 1;
}
if ((sector[sectnum].ceilingstat&1) && sector[sectnum].ceilingpal == 0 && (sector[sectnum].ceilingpicnum==MOONSKY1 || sector[sectnum].ceilingpicnum==BIGORBIT1))
return 1;
return 0;
}
@ -219,7 +215,7 @@ void checkavailweapon(struct player_struct *p)
short i,snum;
int32 weap;
if (p->reloading == 1) return;
if (p->reloading) return;
if (p->wantweaponfire >= 0)
{
@ -282,7 +278,7 @@ void checkavailweapon(struct player_struct *p)
void hitradius(int i, long r, long hp1, long hp2, long hp3, long hp4)
{
spritetype *s,*sj;
spritetype *s=&sprite[i],*sj;
walltype *wal;
long d, q, x1, y1;
long sectcnt, sectend, dasect, startwall, endwall, nextsect;
@ -291,8 +287,6 @@ void hitradius(int i, long r, long hp1, long hp2, long hp3, long hp4)
char statlist[] = {0,1,6,10,12,2,5};
short *tempshort = (short *)tempbuf;
s = &sprite[i];
if (s->picnum == RPG && s->xrepeat < 11) goto SKIPWALLCHECK;
if (s->picnum != SHRINKSPARK)
@ -550,11 +544,9 @@ int movesprite(int spritenum, long xchange, long ychange, long zchange, unsigned
int ssp(int i,unsigned long cliptype) //The set sprite function
{
spritetype *s;
spritetype *s= &sprite[i];
long movetype;
s = &sprite[i];
movetype = movesprite(i,
(s->xvel*(sintable[(s->ang+512)&2047]))>>14,
(s->xvel*(sintable[s->ang&2047]))>>14,s->zvel,
@ -578,10 +570,10 @@ void insertspriteq(int i)
void lotsofmoney(int sp, int n)
{
int i ,j;
int i=n ,j;
spritetype *s = &sprite[sp];
for (i=n;i>0;i--)
for (;i>0;i--)
{
j = EGS(s->sectnum,s->x,s->y,s->z-(TRAND%(47<<8)),MONEY,-32,8,8,TRAND&2047,0,0,sp,5);
sprite[j].cstat = TRAND&12;
@ -590,10 +582,10 @@ void lotsofmoney(int sp, int n)
void lotsofmail(int sp, int n)
{
int i ,j;
int i=n ,j;
spritetype *s = &sprite[sp];
for (i=n;i>0;i--)
for (;i>0;i--)
{
j = EGS(s->sectnum,s->x,s->y,s->z-(TRAND%(47<<8)),MAIL,-32,8,8,TRAND&2047,0,0,sp,5);
sprite[j].cstat = TRAND&12;
@ -602,10 +594,10 @@ void lotsofmail(int sp, int n)
void lotsofpaper(int sp, int n)
{
int i ,j;
int i=n ,j;
spritetype *s = &sprite[sp];
for (i=n;i>0;i--)
for (;i>0;i--)
{
j = EGS(s->sectnum,s->x,s->y,s->z-(TRAND%(47<<8)),PAPER,-32,8,8,TRAND&2047,0,0,sp,5);
sprite[j].cstat = TRAND&12;

View file

@ -56,7 +56,7 @@ static struct strllist
*CommandPaths = NULL;
#define MAXHELP2D (signed int)(sizeof(Help2d)/sizeof(Help2d[0]))
char *Help2d[]= {
static char *Help2d[]= {
" 'A = Autosave toggle",
" 'J = Jump to location",
" 'L = Adjust sprite/wall coords",
@ -78,7 +78,7 @@ char *Help2d[]= {
" ] = Search backward",
};
char *SpriteMode[]= {
static char *SpriteMode[]= {
"NONE",
"SECTORS",
"WALLS",
@ -91,7 +91,7 @@ char *SpriteMode[]= {
};
#define MAXSKILL 5
char *SKILLMODE[MAXSKILL]= {
static char *SKILLMODE[MAXSKILL]= {
"Actor skill display: PIECE OF CAKE",
"Actor skill display: LET'S ROCK",
"Actor skill display: COME GET SOME",
@ -100,7 +100,7 @@ char *SKILLMODE[MAXSKILL]= {
};
#define MAXNOSPRITES 4
char *SPRDSPMODE[MAXNOSPRITES]= {
static char *SPRDSPMODE[MAXNOSPRITES]= {
"Sprite display: DISPLAY ALL SPRITES",
"Sprite display: NO EFFECTORS",
"Sprite display: NO ACTORS",
@ -108,7 +108,7 @@ char *SPRDSPMODE[MAXNOSPRITES]= {
};
#define MAXHELP3D (signed int)(sizeof(Help3d)/sizeof(Help3d[0]))
char *Help3d[]= {
static char *Help3d[]= {
"Mapster32 3D mode help",
" ",
" F1 = TOGGLE THIS HELP DISPLAY",
@ -142,11 +142,6 @@ char *Help3d[]= {
" END = PGUP/PGDN MODIFIER (512 UNITS)",
};
static inline long GetTime(void)
{
return totalclock;
}
static CACHE1D_FIND_REC *finddirs=NULL, *findfiles=NULL, *finddirshigh=NULL, *findfileshigh=NULL;
static int numdirs=0, numfiles=0;
static int currentlist=0;
@ -1802,11 +1797,11 @@ static void Keys3d(void)
}
}
if (keystatus[0x4] > 0) /* 3 (toggle floor-over-floor (cduke3d only) */
if (keystatus[0x04] > 0) /* 3 (toggle floor-over-floor (cduke3d only) */
{
floor_over_floor = !floor_over_floor;
// if (!floor_over_floor) ResetFOFSize();
keystatus[0x4] = 0;
keystatus[0x04] = 0;
}
if (keystatus[KEYSC_F3])
@ -2055,7 +2050,7 @@ static void Keys3d(void)
getzrange(posx,posy,posz,cursectnum,&hiz,&hihit,&loz,&lohit,128L,CLIPMASK0);
if (keystatus[KEYSC_CAPS] > 0)
if (keystatus[KEYSC_CAPS] > 0 || ((keystatus[KEYSC_Z] > 0) && (keystatus[KEYSC_QUOTE] > 0)))
{
zmode++;
if (zmode == 3) zmode = 0;
@ -2063,7 +2058,7 @@ static void Keys3d(void)
if (zmode == 0) message("Zmode = Gravity");
else if (zmode == 1) message("Zmode = Locked/Sector");
else if (zmode == 2) message("Zmode = Locked/Free");
keystatus[KEYSC_CAPS] = 0;
keystatus[KEYSC_CAPS] = keystatus[KEYSC_Z] = 0;
}
if (keystatus[KEYSC_M] > 0 && (keystatus[KEYSC_QUOTE]) > 0) // M

View file

@ -587,7 +587,7 @@ extern int packetrate;
extern long cachecount;
extern char boardfilename[BMAX_PATH],waterpal[768],slimepal[768],titlepal[768],drealms[768],endingpal[768],animpal[768];
extern char cachedebug,earthquaketime;
extern char networkmode;
extern int networkmode;
extern char lumplockbyte[11];
//DUKE3D.H - replace the end "my's" with this
@ -615,15 +615,16 @@ typedef struct {
extern STATUSBARTYPE sbar;
extern short frags[MAXPLAYERS][MAXPLAYERS];
extern long cameradist, cameraclock, dukefriction,show_shareware;
extern char networkmode, movesperpacket;
extern char gamequit;
extern int networkmode, movesperpacket;
extern int gamequit;
extern char pus,pub,camerashitable,freezerhurtowner,lasermode;
extern char pus,pub;
extern int camerashitable,freezerhurtowner,lasermode;
extern char syncstat, syncval[MAXPLAYERS][MOVEFIFOSIZ];
extern signed char multiwho, multipos, multiwhat, multiflag;
extern long syncvalhead[MAXPLAYERS], syncvaltail, syncvaltottail;
extern long numfreezebounces,rpgblastradius,pipebombblastradius,tripbombblastradius,shrinkerblastradius,morterblastradius,bouncemineblastradius,seenineblastradius;
extern char stereo,playerswhenstarted,everyothertime;
extern int everyothertime;
extern long myminlag[MAXPLAYERS], mymaxlag, otherminlag, bufferjitter;
extern long numinterpolations, startofdynamicinterpolations;
@ -647,7 +648,7 @@ extern long myaimmode, myaimstat, omyaimstat;
#define TILE_ANIM (MAXTILES-4)
#define TILE_VIEWSCR (MAXTILES-5)
extern char useprecache;
extern int useprecache;
enum events {
EVENT_INIT,
@ -885,7 +886,8 @@ enum logoflags {
LOGO_FLAG_PLUTOPAKSPRITE = 128
};
extern char numl, condebug;
extern char numl;
extern int condebug;
#define MAXCHEATLEN 20
#define NUMCHEATCODES (signed int)(sizeof(cheatquotes)/sizeof(cheatquotes[MAXCHEATLEN]))

View file

@ -52,7 +52,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <windows.h>
#include <shellapi.h>
extern int getversionfromwebsite(char *buffer);
#define BUILDDATE 20070310
#define BUILDDATE 20070321
#define UPDATEINTERVAL 86400 // 24h
#endif
@ -62,8 +62,8 @@ extern int getversionfromwebsite(char *buffer);
#define TIMERUPDATESIZ 32
long cameradist = 0, cameraclock = 0;
char playerswhenstarted;
char qe,cp,usecwd = 0;
static int playerswhenstarted;
static int qe,cp,usecwd = 0;
static int32 CommandSetup = 0;
static int32 NoSetup = 0;
@ -92,12 +92,13 @@ int votes[MAXPLAYERS], gotvote[MAXPLAYERS], voting = -1;
int vote_map = -1, vote_episode = -1;
int recfilep,totalreccnt;
char debug_on = 0,actor_tog = 0,*rtsptr,memorycheckoveride=0;
int debug_on = 0,actor_tog = 0;
static char *rtsptr;
extern char syncstate;
extern int32 numlumps;
FILE *frecfilep = (FILE *)NULL;
static FILE *frecfilep = (FILE *)NULL;
int restorepalette,screencapt;
static int nomorelogohack;

View file

@ -147,7 +147,7 @@ short weaponsandammosprites[15] = {
};
long impact_damage;
char condebug;
int condebug;
//GLOBAL.C - replace the end "my's" with this
long myx, omyx, myxvel, myy, omyy, myyvel, myz, omyz, myzvel;
@ -162,8 +162,9 @@ long myxbak[MOVEFIFOSIZ], myybak[MOVEFIFOSIZ], myzbak[MOVEFIFOSIZ];
long myhorizbak[MOVEFIFOSIZ],dukefriction = 0xcc00, show_shareware;
short myangbak[MOVEFIFOSIZ];
char myname[32],camerashitable,freezerhurtowner=0,lasermode=0;
char networkmode = 255, movesperpacket = 1,gamequit = 0,everyothertime;
char myname[32];
int camerashitable,freezerhurtowner=0,lasermode=0;
int networkmode = 255, movesperpacket = 1,gamequit = 0,everyothertime;
long numfreezebounces=3,rpgblastradius,pipebombblastradius,tripbombblastradius,shrinkerblastradius,morterblastradius,bouncemineblastradius,seenineblastradius;
STATUSBARTYPE sbar;

View file

@ -32,15 +32,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern char pow2char[];
extern char everyothertime;
static short which_palookup = 9;
char numl, useprecache = 1;
extern int everyothertime;
static int which_palookup = 9;
int useprecache = 1;
char numl;
short spritecache[MAXTILES][3];
static char precachehightile[2][MAXTILES>>3];
static int precachecount;
static void tloadtile(short tilenume, char type)
static void tloadtile(int tilenume, int type)
{
if ((picanm[tilenume]&63) < 1)
{
@ -72,10 +73,10 @@ static void tloadtile(short tilenume, char type)
}
}
static void cachespritenum(short i)
static void cachespritenum(int i)
{
char maxc;
short j;
int j;
if (ud.monsters_off && badguy(&sprite[i])) return;
@ -213,7 +214,7 @@ static void cachespritenum(short i)
static void cachegoodsprites(void)
{
short i,j;
int i,j;
for (i=0;i<MAXTILES;i++)
{
@ -270,7 +271,7 @@ static void cachegoodsprites(void)
for (i=MORTER; i<MORTER+4; i++) tloadtile(i,4);
}
static char getsound(unsigned short num)
static int getsound(unsigned int num)
{
short fp;
long l;
@ -299,7 +300,7 @@ static char getsound(unsigned short num)
static void precachenecessarysounds(void)
{
short i, j;
int i, j;
if (FXDevice < 0) return;
j = 0;
@ -834,8 +835,8 @@ static void setupbackdrop(short sky)
static void prelevel(char g)
{
short i, nexti, j, startwall, endwall, lotaglist;
short lotags[65];
int i, nexti, j, startwall, endwall, lotaglist;
int lotags[MAXSPRITES];
int switchpicnum;
@ -983,8 +984,8 @@ static void prelevel(char g)
{
lotags[lotaglist] = SLT;
lotaglist++;
if (lotaglist > 64)
gameexit("\nToo many switches (64 max).");
if (lotaglist > MAXSPRITES-1)
gameexit("\nToo many switches.");
j = headspritestat[3];
while (j >= 0)