Update the headers of all source files, add CON_SHOWVIEW based on a patch from CONAN, other minor fixes

git-svn-id: https://svn.eduke32.com/eduke32@484 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2007-02-08 04:19:39 +00:00
parent ee4573779c
commit fd4dfeb6a5
34 changed files with 1582 additions and 1515 deletions

View file

@ -1,13 +1,14 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
This file is part of EDuke32
Duke Nukem 3D is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -18,10 +19,6 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
*/
//-------------------------------------------------------------------------

View file

@ -1,13 +1,14 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
This file is part of EDuke32
Duke Nukem 3D is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -18,10 +19,6 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
*/
//-------------------------------------------------------------------------

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32
@ -19,7 +21,6 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//-------------------------------------------------------------------------
#include "duke3d.h"
extern char numenvsnds,actor_tog;

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32

View file

@ -1,11 +1,11 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2005 - Richard Gobeille (Mapster32 functionality)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of Mapster32
This file is part of EDuke32
Mapster32 is free software; you can redistribute it and/or
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
@ -18,10 +18,6 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 05/24/2003 - Charlie Wiederhold, 3D Realms
Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
*/
//-------------------------------------------------------------------------

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32

View file

@ -1,13 +1,14 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
This file is part of EDuke32
Duke Nukem 3D is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -18,10 +19,6 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
*/
//-------------------------------------------------------------------------

View file

@ -1,13 +1,14 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
This file is part of EDuke32
Duke Nukem 3D is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -18,10 +19,6 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
*/
//-------------------------------------------------------------------------

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32

View file

@ -1,13 +1,14 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
This file is part of EDuke32
Duke Nukem 3D is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -18,10 +19,6 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
*/
//-------------------------------------------------------------------------
@ -215,7 +212,7 @@ extern void LoadActor(long sActor);
extern long GetGameVar(const char *szGameLabel, long lDefault, int iActor, int iPlayer);
extern void DumpGameVars(FILE *fp);
extern void AddLog(const char *psz);
// extern void AddLog(const char *psz, ...);
extern void ResetSystemDefaults(void);
extern void InitGameVarPointers(void);

View file

@ -1,13 +1,14 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
This file is part of EDuke32
Duke Nukem 3D is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -18,10 +19,6 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
*/
//-------------------------------------------------------------------------

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32
@ -6552,7 +6554,9 @@ void animatesprites(long x,long y,short a,long smoothratio)
}
}
if ((display_mirror == 1 || screenpeek != p || s->owner == -1) && ud.multimode > 1 && ud.showweapons && sprite[ps[p].i].extra > 0 && ps[p].curr_weapon > 0)
if ((display_mirror == 1 || screenpeek != p || s->owner == -1) && ud.multimode > 1)
{
if (ud.showweapons && sprite[ps[p].i].extra > 0 && ps[p].curr_weapon > 0)
{
memcpy((spritetype *)&tsprite[spritesortcnt],(spritetype *)t,sizeof(spritetype));
@ -6583,7 +6587,7 @@ void animatesprites(long x,long y,short a,long smoothratio)
spritesortcnt++;
}
if ((display_mirror == 1 || screenpeek != p || s->owner == -1) && ud.multimode > 1 && sync[p].extbits & (1<<7) && !ud.pause_on)
if (sync[p].extbits & (1<<7) && !ud.pause_on)
{
memcpy((spritetype *)&tsprite[spritesortcnt],(spritetype *)t,sizeof(spritetype));
@ -6604,6 +6608,7 @@ void animatesprites(long x,long y,short a,long smoothratio)
tsprite[spritesortcnt].pal = 20;
spritesortcnt++;
}
}
if (s->owner == -1)
{

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32
@ -125,7 +127,8 @@ static const char *translatelabeltype(long type)
#define NUMKEYWORDS (signed int)(sizeof(keyw)/sizeof(keyw[0]))
static const char *keyw[] = {
static const char *keyw[] =
{
"definelevelname", // 0 defines level name
"actor", // 1 defines an actor
"addammo", // 2 adds ammo to a weapon
@ -428,10 +431,12 @@ static const char *keyw[] = {
"qstrlen", // 299
"getincangle", // 300
"quake", // 301
"showview", // 302
"<null>"
};
LABELS sectorlabels[]= {
LABELS sectorlabels[]=
{
{ "wallptr", SECTOR_WALLPTR, 0, 0 },
{ "wallnum", SECTOR_WALLNUM, 0, 0 },
{ "ceilingz", SECTOR_CEILINGZ, 0, 0 },
@ -458,7 +463,8 @@ LABELS sectorlabels[]= {
{ "", -1, 0, 0 } // END OF LIST
};
LABELS walllabels[]= {
LABELS walllabels[]=
{
{ "x", WALL_X, 0, 0 },
{ "y", WALL_Y, 0, 0 },
{ "point2", WALL_POINT2, 0, 0 },
@ -479,7 +485,8 @@ LABELS walllabels[]= {
{ "", -1, 0, 0 } // END OF LIST
};
LABELS actorlabels[]= {
LABELS actorlabels[]=
{
{ "x", ACTOR_X, 0, 0 },
{ "y", ACTOR_Y, 0, 0 },
{ "z", ACTOR_Z, 0, 0 },
@ -535,7 +542,8 @@ LABELS actorlabels[]= {
{ "", -1, 0, 0 } // END OF LIST
};
LABELS playerlabels[]= {
LABELS playerlabels[]=
{
{ "zoom", PLAYER_ZOOM, 0, 0 },
{ "exitx", PLAYER_EXITX, 0, 0 },
{ "exity", PLAYER_EXITY, 0, 0 },
@ -681,7 +689,8 @@ LABELS playerlabels[]= {
{ "", -1, 0, 0 } // END OF LIST
};
LABELS projectilelabels[]= {
LABELS projectilelabels[]=
{
{ "workslike", PROJ_WORKSLIKE, 0, 0 },
{ "spawns", PROJ_SPAWNS, 0, 0 },
{ "sxrepeat", PROJ_SXREPEAT, 0, 0 },
@ -713,7 +722,8 @@ LABELS projectilelabels[]= {
{ "", -1, 0, 0 } // END OF LIST
};
LABELS userdefslabels[]= {
LABELS userdefslabels[]=
{
// { "<null>", 1, 0, 0 },
{ "god", USERDEFS_GOD, 0, 0 },
{ "warp_on", USERDEFS_WARP_ON, 0, 0 },
@ -826,7 +836,8 @@ LABELS userdefslabels[]= {
{ "", -1, 0, 0 } // END OF LIST
};
LABELS inputlabels[]= {
LABELS inputlabels[]=
{
{ "avel", INPUT_AVEL, 0, 0 },
{ "horz", INPUT_HORZ, 0, 0 },
{ "fvel", INPUT_FVEL, 0, 0 },
@ -1043,14 +1054,21 @@ char CheckEventSync(int iEventID)
return 1;
}
void AddLog(const char *psz)
#if 0
void AddLog(const char *psz, ...)
{
Bstrcpy(tempbuf,psz);
if (tempbuf[Bstrlen(psz)] != '\n')
va_list va;
va_start(va, psz);
Bvsnprintf(tempbuf, sizeof(tempbuf), psz, va);
va_end(va);
if (tempbuf[Bstrlen(tempbuf)] != '\n')
Bstrcat(tempbuf,"\n");
if (qsetmode == 200) OSD_Printf(tempbuf);
else initprintf(tempbuf);
}
#endif
static long GetDefID(const char *szGameLabel)
{
@ -3373,6 +3391,16 @@ static int parsecommand(void)
transmultvars(12);
break;
case CON_SHOWVIEW:
if (parsing_event == 0 && parsing_state == 0)
{
ReportError(ERROR_EVENTONLY);
error++;
}
transmultvars(10);
break;
case CON_GETZRANGE:
transmultvars(4);
transmultvarstype(GAMEVAR_FLAG_READONLY,4);

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32
@ -776,5 +778,6 @@ enum keywords {
CON_QSTRLEN, // 299
CON_GETINCANGLE, // 300
CON_QUAKE, // 301
CON_SHOWVIEW, // 302
END
};

View file

@ -1,13 +1,14 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
This file is part of EDuke32
Duke Nukem 3D is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -18,10 +19,6 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
*/
//-------------------------------------------------------------------------

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32
@ -28,10 +30,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "osd.h"
static int g_i,g_p;
int g_i,g_p;
static long g_x,*g_t;
static spritetype *g_sp;
int killit_flag;
static int killit_flag;
extern int32 scripthandle;
@ -3016,7 +3018,7 @@ void OnEvent(int iEventID, int iActor, int iPlayer, long lDist)
{
if (iEventID >= MAXGAMEEVENTS)
{
AddLog("Invalid Event ID");
OSD_Printf("OnEvent(): invalid event ID");
return;
}
@ -3588,8 +3590,6 @@ static void parseifelse(long condition)
// long *it = 0x00589a04;
long instruction = 0;
static int parse(void)
{
long j, l, s, tw;
@ -3602,8 +3602,6 @@ static int parse(void)
tw = *insptr;
instruction = tw;
// initprintf("instruction %ld\n",tw);
switch (tw)
{
case CON_REDEFINEQUOTE:
@ -3637,7 +3635,6 @@ static int parse(void)
break;
case CON_IFCANSHOOTTARGET:
if (g_x > 1024)
{
short temphit, sclip = 768, angdif = 16;
@ -4727,14 +4724,46 @@ static int parse(void)
break;
}
case CON_SHOWVIEW:
insptr++;
{
int x=GetGameVarID(*insptr++,g_i,g_p);
int y=GetGameVarID(*insptr++,g_i,g_p);
int z=GetGameVarID(*insptr++,g_i,g_p);
int a=GetGameVarID(*insptr++,g_i,g_p);
int horiz=GetGameVarID(*insptr++,g_i,g_p);
int sect=GetGameVarID(*insptr++,g_i,g_p);
long x1=scale(GetGameVarID(*insptr++,g_i,g_p),xdim,320);
long y1=scale(GetGameVarID(*insptr++,g_i,g_p),ydim,200);
long x2=scale(GetGameVarID(*insptr++,g_i,g_p),xdim,320);
long y2=scale(GetGameVarID(*insptr++,g_i,g_p),ydim,200);
if (x1 > x2) swaplong(&x1,&x2);
if (y1 > y2) swaplong(&y1,&y2);
#if defined(USE_OPENGL) && defined(POLYMOST)
j = glprojectionhacks;
glprojectionhacks = 0;
#endif
setview(x1,y1,x2,y2);
drawrooms(x,y,z,a,horiz,sect);
display_mirror = 1; animatesprites(x,y,a,65536L); display_mirror = 0;
drawmasks();
vscrn();
#if defined(USE_OPENGL) && defined(POLYMOST)
glprojectionhacks = j;
#endif
break;
}
case CON_ROTATESPRITE:
insptr++;
{
int x=GetGameVarID(*insptr++,g_i,g_p), y=GetGameVarID(*insptr++,g_i,g_p), z=GetGameVarID(*insptr++,g_i,g_p);
int a=GetGameVarID(*insptr++,g_i,g_p), tilenum=GetGameVarID(*insptr++,g_i,g_p), shade=GetGameVarID(*insptr++,g_i,g_p);
int pal=GetGameVarID(*insptr++,g_i,g_p), orientation=GetGameVarID(*insptr++,g_i,g_p);
int x1=GetGameVarID(*insptr++,g_i,g_p), y1=GetGameVarID(*insptr++,g_i,g_p);
int x2=GetGameVarID(*insptr++,g_i,g_p), y2=GetGameVarID(*insptr++,g_i,g_p);
long x1=GetGameVarID(*insptr++,g_i,g_p), y1=GetGameVarID(*insptr++,g_i,g_p);
long x2=GetGameVarID(*insptr++,g_i,g_p), y2=GetGameVarID(*insptr++,g_i,g_p);
rotatesprite(x<<16,y<<16,z,a,tilenum,shade,pal,2|orientation,x1,y1,x2,y2);
break;
@ -5414,8 +5443,7 @@ static int parse(void)
case CON_ADDLOG:
{
insptr++;
Bsprintf(g_szBuf,"CONLOG: L=%ld",*insptr++);
AddLog(g_szBuf);
OSD_Printf("CONLOG: L=%ld\n",*insptr++);
break;
}
@ -5439,8 +5467,7 @@ static int parse(void)
{
// invalid varID
insptr++;
Bsprintf(g_szBuf,"CONLOGVAR: L=%ld INVALID VARIABLE",l);
AddLog(g_szBuf);
OSD_Printf("CONLOGVAR: L=%ld INVALID VARIABLE\n",l);
break; // out of switch
}
}
@ -5464,10 +5491,10 @@ static int parse(void)
{
Bsprintf(szBuf," (Global)");
}
strcat(g_szBuf,szBuf);
Bsprintf(szBuf," =%ld", GetGameVarID(lVarID, g_i, g_p)*m);
strcat(g_szBuf,szBuf);
AddLog(g_szBuf);
Bstrcat(g_szBuf,szBuf);
Bsprintf(szBuf," =%ld\n", GetGameVarID(lVarID, g_i, g_p)*m);
Bstrcat(g_szBuf,szBuf);
OSD_Printf(g_szBuf);
insptr++;
break;
}

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32
@ -23,6 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "duke3d.h"
#include "gamedef.h"
extern int g_i,g_p;
static void FreeGameVars(void)
{
// call this function as many times as needed.
@ -139,7 +143,7 @@ int ReadGameVars(long fil)
if (kdfread(&l,sizeof(l),1,fil) != 1) goto corrupt;
if (kdfread(g_szBuf,l,1,fil) != 1) goto corrupt;
g_szBuf[l]=0;
AddLog(g_szBuf);
OSD_Printf("%s\n",g_szBuf);
#if 0
{
@ -424,7 +428,7 @@ long GetGameVarID(int id, int iActor, int iPlayer)
if (!(id&(MAXGAMEVARS<<1)))
{
AddLog("GetGameVarID: Invalid Game ID");
OSD_Printf("GetGameVarID(): invalid gamevar ID (%d)\n",id);
return -1;
}
@ -474,20 +478,30 @@ void SetGameVarID(int id, long lValue, int iActor, int iPlayer)
{
if (id<0 || id >= iGameVarCount)
{
AddLog("Invalid Game ID");
OSD_Printf("SetGameVarID(): tried to set invalid gamevar ID (%d) from sprite %d (%d), player %d\n",id,g_i,sprite[g_i].picnum,g_p);
return;
}
//Bsprintf(g_szBuf,"SGVI: %d ('%s') to %ld for %d %d",id,aGameVars[id].szLabel,lValue,iActor,iPlayer);
//AddLog(g_szBuf);
if ((aGameVars[id].dwFlags & GAMEVAR_FLAG_PERPLAYER) && (iPlayer != -1))
if (aGameVars[id].dwFlags & GAMEVAR_FLAG_PERPLAYER)
{
if (iPlayer < 0 || iPlayer > MAXPLAYERS-1)
{
OSD_Printf("SetGameVarID(): invalid player (%d) for per-player gamevar %s from sprite %d (%d), player %d\n",iPlayer,aGameVars[id].szLabel,g_i,sprite[g_i].picnum,g_p);
return;
}
// for the current player
aGameVars[id].plValues[iPlayer]=lValue;
return;
}
if ((aGameVars[id].dwFlags & GAMEVAR_FLAG_PERACTOR) && (iActor != -1))
if ((aGameVars[id].dwFlags & GAMEVAR_FLAG_PERACTOR))
{
if (iActor < 0 || iActor > MAXSPRITES-1)
{
OSD_Printf("SetGameVarID(): invalid sprite (%d) for per-actor gamevar %s from sprite %d (%d), player %d\n",iActor,aGameVars[id].szLabel,g_i,sprite[g_i].picnum,g_p);
return;
}
// for the current actor
aGameVars[id].plValues[iActor]=lValue;
return;
@ -532,7 +546,7 @@ static long *GetGameValuePtr(const char *szGameLabel)
{
if (!aGameVars[i].plValues)
{
AddLog("INTERNAL ERROR: NULL array !!!");
OSD_Printf("GetGameValuePtr(): INTERNAL ERROR: NULL array !!!\n");
}
return aGameVars[i].plValues;
}
@ -609,7 +623,7 @@ void ResetSystemDefaults(void)
// for(i=0;i<MAXTILES;i++)
// projectile[i] = defaultprojectile[i];
Bmemcpy(&projectile,&defaultprojectile,sizeof(defaultprojectile));
Bmemcpy(&projectile,&defaultprojectile,sizeof(projectile));
//AddLog("EOF:ResetWeaponDefaults");
}

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32
@ -19,7 +21,6 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//-------------------------------------------------------------------------
#include "duke3d.h"
char MusicPtr[72000*2];

View file

@ -1,10 +1,10 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - Richard Gobeille
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of Mapster32
This file is part of EDuke32
Mapster32 is free software; you can redistribute it and/or
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32
@ -90,9 +92,9 @@ void savetemp(char *fn,long daptr,long dasiz)
#define WHEELUP (buttonstat&16)
#define WHEELDOWN (buttonstat&32)
ControlInfo minfo;
static ControlInfo minfo;
short mi, mii;
static short mi, mii;
static int probe_(int type,int x,int y,int i,int n)
{
@ -102,7 +104,7 @@ static int probe_(int type,int x,int y,int i,int n)
{
CONTROL_GetInput(&minfo);
mi += minfo.dz;
mi += (minfo.dpitch+minfo.dz);
mii += minfo.dyaw;
}
@ -123,7 +125,6 @@ static int probe_(int type,int x,int y,int i,int n)
probey--;
if (probey < 0) probey = n-1;
minfo.dz = 0;
}
if (KB_KeyPressed(sc_DownArrow) || KB_KeyPressed(sc_PgDn) || KB_KeyPressed(sc_kpad_2) || mi > 8192 || WHEELDOWN)
{
@ -134,7 +135,6 @@ static int probe_(int type,int x,int y,int i,int n)
MOUSE_ClearButton(WHEELDOWN_MOUSE);
sound(KICK_HIT);
probey++;
minfo.dz = 0;
}
}

View file

@ -29,16 +29,17 @@ BEGIN
#ifdef JFAUD
CONTROL "S&ound driver:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 28, 50, 8
CONTROL "", IDCSOUNDDRV, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 26, 110, 56
#else
CONTROL "S&ound driver:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_DISABLED | WS_VISIBLE, 5, 28, 50, 8
CONTROL "", IDCSOUNDDRV, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_DISABLED | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 26, 110, 56
#endif
CONTROL "&MIDI device:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_DISABLED | WS_VISIBLE, 5, 44, 50, 8
CONTROL "", IDCMIDIDEV, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_DISABLED | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 42, 110, 56
CONTROL "Input devices:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 80, 50, 8
CONTROL "Mo&use", IDCINPUTMOUSE, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 60, 80, 49, 8
CONTROL "&Joystick", IDCINPUTJOY, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 110, 80, 49, 8
#else
CONTROL "Input devices:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 28, 50, 8
CONTROL "Mo&use", IDCINPUTMOUSE, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 60, 28, 49, 8
CONTROL "&Joystick", IDCINPUTJOY, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 110, 28, 49, 8
#endif
CONTROL "&Always show configuration on start", IDCALWAYSSHOW, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 118, 116, 140, 8
END

View file

@ -1,7 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2004, 2005 - Richard Gobeille (EDuke32 functionality)
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32
@ -18,9 +19,6 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
*/
//-------------------------------------------------------------------------

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32
@ -17,10 +19,6 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
*/
//-------------------------------------------------------------------------

View file

@ -1,5 +1,9 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32
EDuke32 is free software; you can redistribute it and/or

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32
@ -2659,6 +2661,7 @@ void getinput(int snum)
if ((p->gm&MODE_MENU) || (p->gm&MODE_TYPE) || (ud.pause_on && !KB_KeyPressed(sc_Pause)) || (numplayers > 1 && totalclock < 10)) // HACK: kill getinput() for the first 10 tics of a new map in multi
{
if (!(p->gm&MODE_MENU))
CONTROL_GetInput(&info);
memset(&lastinfo, 0, sizeof(lastinfo));
loc.fvel = vel = 0;

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32

View file

@ -1,13 +1,14 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
This file is part of EDuke32
Duke Nukem 3D is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -18,10 +19,6 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
*/
//-------------------------------------------------------------------------

View file

@ -1,13 +1,14 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
This file is part of EDuke32
Duke Nukem 3D is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -18,10 +19,6 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
*/
//-------------------------------------------------------------------------

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32

View file

@ -1,6 +1,8 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2005 - EDuke32 team
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32

View file

@ -1,13 +1,14 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
This file is part of EDuke32
Duke Nukem 3D is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -18,10 +19,6 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
*/
//-------------------------------------------------------------------------