mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@1188 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
45761cb6bc
commit
da8e368104
17 changed files with 168 additions and 125 deletions
|
@ -73,7 +73,7 @@ endif
|
|||
|
||||
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
|
||||
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -DNOCOPYPROTECT \
|
||||
-I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(SRC)/jaudiolib \
|
||||
-I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(SRC)/jaudiolib -D_FORTIFY_SOURCE=2 \
|
||||
# -march=pentium3 -mtune=generic -mmmx -m3dnow -msse -mfpmath=sse
|
||||
OURCXXFLAGS=-fno-exceptions -fno-rtti
|
||||
LIBS=-lm
|
||||
|
@ -166,9 +166,6 @@ ifeq ($(PLATFORM),LINUX)
|
|||
NASMFLAGS += -f elf
|
||||
LIBS += -lvorbisfile -lvorbis -logg
|
||||
USE_OPENAL = 0
|
||||
ifeq ($(RELEASE),0)
|
||||
OURCFLAGS += -D_FORTIFY_SOURCE=2
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
|
|
|
@ -92,7 +92,7 @@ endif
|
|||
|
||||
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts \
|
||||
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS \
|
||||
-DKSFORBUILD -I$(INC) \
|
||||
-DKSFORBUILD -I$(INC) -D_FORTIFY_SOURCE=2 \
|
||||
# -march=pentium3 -mtune=generic -mmmx -m3dnow -msse -mfpmath=sse
|
||||
OURCXXFLAGS=-fno-exceptions -fno-rtti
|
||||
LIBS=
|
||||
|
@ -146,9 +146,6 @@ EDITOROBJS=$(OBJ)/build.$o \
|
|||
ifeq ($(PLATFORM),LINUX)
|
||||
ASFLAGS+= -f elf
|
||||
LIBS+= -lm
|
||||
ifeq ($(RELEASE),0)
|
||||
OURCFLAGS += -D_FORTIFY_SOURCE=2
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
ENGINEOBJS += $(OBJ)/StartupWinController.editor.$o \
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#define UNREFERENCED_PARAMETER(x) x=x
|
||||
#endif
|
||||
|
||||
#define clamp(in, min, max) ((in) <= (min) ? (min) : (in) >= (max) ? (max) : (in))
|
||||
|
||||
// This gives us access to 'intptr_t' and 'uintptr_t', which are
|
||||
// abstractions to the size of a pointer on a given platform
|
||||
// (ie, they're guaranteed to be the same size as a pointer)
|
||||
|
|
|
@ -1611,8 +1611,11 @@ void overheadeditor(void)
|
|||
if (numwalls < 0) numwalls = tempint;
|
||||
|
||||
clear2dscreen();
|
||||
|
||||
draw2dgrid(posx,posy,ang,zoom,grid);
|
||||
|
||||
ExtPreCheckKeys();
|
||||
|
||||
x2 = mulscale14(startposx-posx,zoom); //Draw brown arrow (start)
|
||||
y2 = mulscale14(startposy-posy,zoom);
|
||||
if (((halfxdim16+x2) >= 2) && ((halfxdim16+x2) <= xdim-3))
|
||||
|
|
|
@ -75,7 +75,7 @@ enum
|
|||
T_IMPORTTILE,
|
||||
T_MUSIC,T_ID,T_SOUND,
|
||||
T_REDPAL,T_BLUEPAL,T_BROWNPAL,T_GREYPAL,T_GREENPAL,T_SPECPAL,
|
||||
T_TILEFROMTEXTURE,
|
||||
T_TILEFROMTEXTURE, T_XOFFSET, T_YOFFSET
|
||||
};
|
||||
|
||||
typedef struct { char *text; int tokenid; } tokenlist;
|
||||
|
@ -260,6 +260,10 @@ static tokenlist tilefromtexturetokens[] =
|
|||
{ "file", T_FILE },
|
||||
{ "name", T_FILE },
|
||||
{ "alphacut", T_ALPHACUT },
|
||||
{ "xoffset", T_XOFFSET },
|
||||
{ "xoff", T_XOFFSET },
|
||||
{ "yoffset", T_YOFFSET },
|
||||
{ "yoff", T_YOFFSET },
|
||||
};
|
||||
|
||||
static int getatoken(scriptfile *sf, tokenlist *tl, int ntokens)
|
||||
|
@ -602,7 +606,7 @@ static int defsparser(scriptfile *script)
|
|||
tile2 = tile1;
|
||||
tile1 = i;
|
||||
}
|
||||
picanm[tile1]=(spd<<24)+(type<<6)+tile2-tile1;
|
||||
picanm[tile1]=(picanm[tile1]&0xffffff3f)+(spd<<24)+(type<<6)+tile2-tile1;
|
||||
break;
|
||||
}
|
||||
case T_TILEFROMTEXTURE:
|
||||
|
@ -610,6 +614,7 @@ static int defsparser(scriptfile *script)
|
|||
char *texturetokptr = script->ltextptr, *textureend, *fn, *tfn = NULL;
|
||||
int tile=-1, token, i;
|
||||
int alphacut = 255;
|
||||
int xoffset = 0, yoffset = 0;
|
||||
|
||||
if (scriptfile_getsymbol(script,&tile)) break;
|
||||
if (scriptfile_getbraces(script,&textureend)) break;
|
||||
|
@ -622,6 +627,10 @@ static int defsparser(scriptfile *script)
|
|||
scriptfile_getstring(script,&fn); break;
|
||||
case T_ALPHACUT:
|
||||
scriptfile_getsymbol(script,&alphacut); break;
|
||||
case T_XOFFSET:
|
||||
scriptfile_getsymbol(script,&xoffset); break;
|
||||
case T_YOFFSET:
|
||||
scriptfile_getsymbol(script,&yoffset); break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -689,7 +698,11 @@ static int defsparser(scriptfile *script)
|
|||
tilesizx[tile] = xsiz;
|
||||
tilesizy[tile] = ysiz;
|
||||
faketile[tile] = 2;
|
||||
picanm[tile] = 0;
|
||||
|
||||
xoffset = clamp(xoffset, -128, 127);
|
||||
picanm[tile] = (picanm[tile]&0xffff00ff)+((xoffset&255)<<8);
|
||||
yoffset = clamp(yoffset, -128, 127);
|
||||
picanm[tile] = (picanm[tile]&0xff00ffff)+((yoffset&255)<<16);
|
||||
|
||||
j = 15; while ((j > 1) && (pow2long[j] > xsiz)) j--;
|
||||
picsiz[tile] = ((char)j);
|
||||
|
|
|
@ -4731,7 +4731,17 @@ int lastcullcheck = 0;
|
|||
char cullmodel[MAXSPRITES];
|
||||
int cullcheckcnt = 0;
|
||||
|
||||
int polymost_checkcoordinates(int x, int y, spritetype *tspr)
|
||||
#ifndef _MSC_VER
|
||||
#ifdef __GNUC__
|
||||
#ifndef __fastcall
|
||||
#define __fastcall __attribute__((fastcall))
|
||||
#endif
|
||||
#else
|
||||
#define __fastcall
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int __fastcall polymost_checkcoordinates(int x, int y, spritetype *tspr)
|
||||
{
|
||||
short datempsectnum = tspr->sectnum;
|
||||
int oldx = x, i, j = (tilesizy[tspr->picnum]*tspr->yrepeat);
|
||||
|
|
|
@ -234,10 +234,10 @@ static INT_PTR CALLBACK startup_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
|
|||
|
||||
ZeroMemory(&tab, sizeof(tab));
|
||||
tab.mask = TCIF_TEXT;
|
||||
tab.pszText = TEXT("Configuration");
|
||||
tab.pszText = TEXT("Setup");
|
||||
SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)0, (LPARAM)&tab);
|
||||
tab.mask = TCIF_TEXT;
|
||||
tab.pszText = TEXT("Messages");
|
||||
tab.pszText = TEXT("Message Log");
|
||||
SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)1, (LPARAM)&tab);
|
||||
|
||||
// Work out the position and size of the area inside the tab control for the pages
|
||||
|
|
|
@ -178,6 +178,8 @@ extern short capturecount;
|
|||
extern int editorgridextent; // in engine.c
|
||||
extern char game_executable[BMAX_PATH];
|
||||
|
||||
extern int fillsector(short sectnum, char fillcolor);
|
||||
|
||||
static void clearfilenames(void)
|
||||
{
|
||||
klistfree(finddirs);
|
||||
|
@ -6572,9 +6574,6 @@ static void Keys2d(void)
|
|||
{
|
||||
short temp=0;
|
||||
int i=0, j,k;
|
||||
int radius, xp1, yp1;
|
||||
char col;
|
||||
|
||||
int repeatcountx=0,repeatcounty=0,smooshyalign,changedir;
|
||||
static int opointhighlight=-1, olinehighlight=-1, ocursectornum=-1;
|
||||
/*
|
||||
|
@ -6645,28 +6644,6 @@ static void Keys2d(void)
|
|||
ocursectornum = cursectornum;
|
||||
}
|
||||
|
||||
begindrawing();
|
||||
|
||||
for (i=0;i<numsprites;i++) // Game specific 2D sprite stuff goes here. Drawn on top of everything else.
|
||||
{
|
||||
xp1 = mulscale14(sprite[i].x-posx,zoom);
|
||||
yp1 = mulscale14(sprite[i].y-posy,zoom);
|
||||
|
||||
if (sprite[i].picnum == 5 /*&& zoom >= 256*/ && sprite[i].sectnum != MAXSECTORS)
|
||||
{
|
||||
radius = mulscale14(sprite[i].hitag,zoom);
|
||||
col = 6;
|
||||
if (i+16384 == pointhighlight)
|
||||
if (totalclock & 32) col += (2<<2);
|
||||
drawlinepat = 0xf0f0f0f0;
|
||||
drawcircle16(halfxdim16+xp1, midydim16+yp1, radius, col);
|
||||
drawlinepat = 0xffffffff;
|
||||
// radius = mulscale15(sprite[i].hitag,zoom);
|
||||
// drawcircle16(halfxdim16+xp1, midydim16+yp1, radius, col);
|
||||
}
|
||||
}
|
||||
enddrawing();
|
||||
|
||||
if (keystatus[KEYSC_QUOTE] && keystatus[KEYSC_Z]) // ' z
|
||||
{
|
||||
keystatus[KEYSC_Z] = 0;
|
||||
|
@ -8698,6 +8675,10 @@ static char wallflag[MAXWALLS];
|
|||
|
||||
void ExtPreCheckKeys(void) // just before drawrooms
|
||||
{
|
||||
int i = 0;
|
||||
int radius, xp1, yp1;
|
||||
char col;
|
||||
|
||||
if (qsetmode == 200) //In 3D mode
|
||||
{
|
||||
if (shadepreview)
|
||||
|
@ -8765,7 +8746,33 @@ void ExtPreCheckKeys(void) // just before drawrooms
|
|||
searchx ^= searchy;
|
||||
searchx = ydim-1-searchx;
|
||||
}
|
||||
return;
|
||||
}
|
||||
begindrawing();
|
||||
|
||||
// if (cursectornum >= 0)
|
||||
// fillsector(cursectornum, 31);
|
||||
|
||||
for (i=0;i<numsprites;i++) // Game specific 2D sprite stuff goes here. Drawn below everything else.
|
||||
{
|
||||
xp1 = mulscale14(sprite[i].x-posx,zoom);
|
||||
yp1 = mulscale14(sprite[i].y-posy,zoom);
|
||||
|
||||
if (sprite[i].picnum == 5 /*&& zoom >= 256*/ && sprite[i].sectnum != MAXSECTORS)
|
||||
{
|
||||
radius = mulscale14(sprite[i].hitag,zoom);
|
||||
col = 6;
|
||||
if (i+16384 == pointhighlight)
|
||||
if (totalclock & 32) col += (2<<2);
|
||||
drawlinepat = 0xf0f0f0f0;
|
||||
drawcircle16(halfxdim16+xp1, midydim16+yp1, radius, col);
|
||||
drawlinepat = 0xffffffff;
|
||||
// radius = mulscale15(sprite[i].hitag,zoom);
|
||||
// drawcircle16(halfxdim16+xp1, midydim16+yp1, radius, col);
|
||||
}
|
||||
}
|
||||
|
||||
enddrawing();
|
||||
}
|
||||
|
||||
void ExtAnalyzeSprites(void)
|
||||
|
|
|
@ -22,6 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifndef _duke3d_h_
|
||||
# define _duke3d_h_
|
||||
#define APPNAME "EDuke32"
|
||||
#define VERSION " 1.5.0devel"
|
||||
// this is checked against http://eduke32.com/VERSION
|
||||
|
@ -1088,3 +1090,4 @@ enum DukePacket_t
|
|||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -140,7 +140,6 @@ extern void G_DrawTilePal(int x,int y,int tilenum,int shade,int orientation,int
|
|||
extern void G_DrawFrags(void);
|
||||
extern void P_DoQuote(int q,DukePlayer_t *p);
|
||||
extern void G_GameExit(const char *t);
|
||||
extern inline int G_EnterText(int x,int y,char *t,int dalen,int c);
|
||||
extern void G_DisplayRest(int smoothratio);
|
||||
extern void updatesectorz(int x,int y,int z,short *sectnum);
|
||||
extern void G_DrawBackground(void);
|
||||
|
@ -199,7 +198,7 @@ extern inline void G_SetStatusBarScale(int sc);
|
|||
extern void P_SetGamePalette(DukePlayer_t *player, char *pal, int set);
|
||||
extern void fadepal(int r, int g, int b, int start, int end, int step);
|
||||
|
||||
extern inline int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,int orientation,int x1, int y1, int x2, int y2,int z);
|
||||
extern int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,int orientation,int x1, int y1, int x2, int y2,int z);
|
||||
extern void G_DrawTXDigiNumZ(int starttile, int x,int y,int n,int s,int pal,int cs,int x1, int y1, int x2, int y2, int z);
|
||||
extern void G_DrawTileSmall(int x,int y,int tilenum,int shade,int orientation);
|
||||
extern void G_DrawTilePalSmall(int x,int y,int tilenum,int shade,int orientation,int p);
|
||||
|
@ -267,4 +266,10 @@ extern void G_FindLevelForFilename(const char *fn, char *volume, char *level);
|
|||
extern void G_GetCrosshairColor(void);
|
||||
extern void G_SetCrosshairColor(int r, int g, int b);
|
||||
extern int kopen4loadfrommod(char *filename, char searchfirst);
|
||||
|
||||
extern int _EnterText(int small,int x,int y,char *t,int dalen,int c);
|
||||
|
||||
#define G_EnterText(x, y, t, dalen, c) _EnterText(0,x,y,t,dalen,c)
|
||||
#define Net_EnterText(x, y, t, dalen, c) _EnterText(1,x,y,t,dalen,c)
|
||||
|
||||
#endif // __funct_h__
|
||||
|
|
|
@ -2895,7 +2895,7 @@ void G_GameExit(const char *t)
|
|||
|
||||
char inputloc = 0;
|
||||
|
||||
static int _EnterText(int small,int x,int y,char *t,int dalen,int c)
|
||||
int _EnterText(int small,int x,int y,char *t,int dalen,int c)
|
||||
{
|
||||
char ch;
|
||||
int i;
|
||||
|
@ -2972,16 +2972,6 @@ static int _EnterText(int small,int x,int y,char *t,int dalen,int c)
|
|||
return (0);
|
||||
}
|
||||
|
||||
inline int G_EnterText(int x,int y,char *t,int dalen,int c)
|
||||
{
|
||||
return(_EnterText(0,x,y,t,dalen,c));
|
||||
}
|
||||
|
||||
inline int Net_EnterText(int x,int y,char *t,int dalen,int c)
|
||||
{
|
||||
return(_EnterText(1,x,y,t,dalen,c));
|
||||
}
|
||||
|
||||
static void Net_EnterMessage(void)
|
||||
{
|
||||
short ch, hitstate, i, j, l;
|
||||
|
@ -8117,13 +8107,13 @@ static void G_ShowScores(void)
|
|||
|
||||
t = 0;
|
||||
minitext(23,80," NAME KILLS",8,2+8+16+128);
|
||||
for (i=0;i<playerswhenstarted;i++)
|
||||
for (i=playerswhenstarted-1;i>=0;i--)
|
||||
{
|
||||
Bsprintf(tempbuf,"%-4d",i+1);
|
||||
minitext(92+(i*23),80,tempbuf,3,2+8+16+128);
|
||||
}
|
||||
|
||||
for (i=0;i<playerswhenstarted;i++)
|
||||
for (i=playerswhenstarted-1;i>=0;i--)
|
||||
{
|
||||
xfragtotal = 0;
|
||||
Bsprintf(tempbuf,"%d",i+1);
|
||||
|
@ -8131,7 +8121,7 @@ static void G_ShowScores(void)
|
|||
minitext(30,90+t,tempbuf,0,2+8+16+128);
|
||||
minitext(38,90+t,g_player[i].user_name,g_player[i].ps->palookup,2+8+16+128);
|
||||
|
||||
for (y=0;y<playerswhenstarted;y++)
|
||||
for (y=playerswhenstarted-1;y>=0;y--)
|
||||
{
|
||||
if (i == y)
|
||||
{
|
||||
|
@ -8159,10 +8149,10 @@ static void G_ShowScores(void)
|
|||
t += 7;
|
||||
}
|
||||
|
||||
for (y=0;y<playerswhenstarted;y++)
|
||||
for (y=playerswhenstarted-1;y>=0;y--)
|
||||
{
|
||||
yfragtotal = 0;
|
||||
for (i=0;i<playerswhenstarted;i++)
|
||||
for (i=playerswhenstarted-1;i>=0;i--)
|
||||
{
|
||||
if (i == y)
|
||||
yfragtotal += g_player[i].ps->fraggedself;
|
||||
|
@ -8747,34 +8737,31 @@ static void G_ShowParameterHelp(void)
|
|||
"Example: eduke32 -q4 -a -m -tx -map nukeland.map\n\n"
|
||||
"Files can be *.grp/zip/con/def\n"
|
||||
"\n"
|
||||
"-#\t\tLoad and run a game from slot # (0-9)\n"
|
||||
"-a\t\tUse fake player AI (fake multiplayer only)\n"
|
||||
"-c#\t\tUse MP mode #, 1 = Dukematch, 2 = Coop, 3 = Dukematch(no spawn)\n"
|
||||
"-cfg [file.cfg]\tUse an alternate configuration file\n"
|
||||
"-c#\t\tUse MP mode #, 1 = Dukematch, 2 = Coop, 3 = Dukematch(no spawn)\n"
|
||||
"-d[file.dmo]\tPlay a demo\n"
|
||||
"-g[file.grp]\tUse an extra group file\n"
|
||||
"-nam/-ww2gi\tRun in NAM or WW2GI-compatible mode\n"
|
||||
"-h[file.def]\tUse an alternate def\n"
|
||||
"-j[dir]\t\tAdds a directory to EDuke32's search list\n"
|
||||
"-l#\t\tWarp to level #, see -v\n"
|
||||
"-m\t\tDisable monsters\n"
|
||||
"-map [file.map]\tLoads a map\n"
|
||||
"-m\t\tDisable monsters\n"
|
||||
"-nam/-ww2gi\tRun in NAM or WW2GI-compatible mode\n"
|
||||
"-net\t\tEnable multiplayer (see documentation)\n"
|
||||
"-ns/-nm\t\tDisable sound or music\n"
|
||||
"-r\t\tRecord demo\n"
|
||||
"-noautoload\tDisable loading content from autoload\n"
|
||||
"-s#\t\tSet skill level (1-4)\n"
|
||||
#if defined RENDERTYPEWIN || (defined RENDERTYPESDL && !defined __APPLE__ && defined HAVE_GTK2)
|
||||
"-setup/nosetup\tEnables/disables startup window\n"
|
||||
#endif
|
||||
"-t#\t\tSet respawn mode: 1 = Monsters, 2 = Items, 3 = Inventory, x = All\n"
|
||||
"-u#########\tUser's favorite weapon order (default: 3425689071)\n"
|
||||
#if !defined(_WIN32)
|
||||
"-usecwd\t\tRead game data and configuration file from working directory\n"
|
||||
#endif
|
||||
"-u#########\tUser's favorite weapon order (default: 3425689071)\n"
|
||||
"-v#\t\tWarp to volume #, see -l\n"
|
||||
"-x[game.con]\tLoad custom CON script\n"
|
||||
"\n-?/--help\tDisplay this help message and exit\n"
|
||||
"-#\t\tLoad and run a game from slot # (0-9)\n"
|
||||
// "\n-?/--help\tDisplay this help message and exit\n"
|
||||
"\nSee eduke32 -debughelp for debug parameters"
|
||||
;
|
||||
#if defined RENDERTYPEWIN
|
||||
|
@ -8789,22 +8776,22 @@ static void G_ShowDebugHelp(void)
|
|||
{
|
||||
char *s = "Usage: eduke32 [files] [options]\n"
|
||||
"\n"
|
||||
"-a\t\tUse fake player AI (fake multiplayer only)\n"
|
||||
"-cachesize #\tSets cache size, in Kb\n"
|
||||
"-fNUM\t\tSend fewer packets in multiplayer (1, 2, 4) (deprecated)\n"
|
||||
"-game_dir [dir]\tDuke3d_w32 compatibility option, see -j\n"
|
||||
"-gamegrp \tSelects which file to use as main grp\n"
|
||||
"-i#\t\tUse networking mode (1/0)\n"
|
||||
"-name [name]\tPlayer name in multiplay\n"
|
||||
"-nD\t\tDump default gamevars to gamevars.txt\n"
|
||||
"-q#\t\tFake multiplayer with (2-8) players\n"
|
||||
"-rmnet\t\tUse network config file (OBSOLETE, see -net)\n"
|
||||
#ifndef RANCID_NETWORKING
|
||||
"-keepaddr\n"
|
||||
#endif
|
||||
"-stun\t\tUse UDP hole punching in multiplayer\n"
|
||||
"-w\t\tShow coordinates\n"
|
||||
"-noautoload\tDisable loading content from autoload dir\n"
|
||||
"-nologo\t\tSkip the logo anim\n"
|
||||
"-cachesize #\tSets cache size, in Kb\n"
|
||||
"-unstable \tAllow EDuke32 to execute unsafe CON commands\n"
|
||||
"-ns/-nm\t\tDisable sound or music\n"
|
||||
"-q#\t\tFake multiplayer with # (2-8) players\n"
|
||||
"-rmnet\t\tUse network config file (OBSOLETE, see -net)\n"
|
||||
"-stun\t\tUse UDP hole punching for multiplayer connections\n"
|
||||
"-unstable \tForce EDuke32 to execute unsafe CON commands (and crash)\n"
|
||||
"-w\t\tShow coordinates\n"
|
||||
"-z#/-condebug\tEnable line-by-line CON compile debugging at level #\n"
|
||||
;
|
||||
#if defined RENDERTYPEWIN
|
||||
|
@ -9588,8 +9575,14 @@ static void G_CheckCommandLine(int argc, const char **argv)
|
|||
continue;
|
||||
}
|
||||
#endif
|
||||
if (!Bstrcasecmp(c+1,"sloppycmd"))
|
||||
if (!Bstrcasecmp(c+1,"unstable"))
|
||||
{
|
||||
initprintf("WARNING WARNING WARNING WARNING\n"
|
||||
"EDuke32's runtime script error detection has been disabled via "
|
||||
"the '-unstable' command line parameter. Bug reports from this "
|
||||
"mode are NOT welcome and you should expect crashes in certain "
|
||||
"mods. Please run EDuke32 without '-unstable' before sending "
|
||||
"any bug reports.\n");
|
||||
g_scriptSanityChecks = 0;
|
||||
i++;
|
||||
continue;
|
||||
|
@ -11068,12 +11061,12 @@ void app_main(int argc,const char **argv)
|
|||
|
||||
if (wm_ynbox("Obsolete Texture Cache Detected",tempbuf))
|
||||
{
|
||||
int ii = 0;
|
||||
int recursion = 0;
|
||||
|
||||
Bsprintf(tempbuf,"%stexcache",dir);
|
||||
getfilenames(tempbuf,"*");
|
||||
RECURSE:
|
||||
// initprintf("Cleaning %s\n",tempbuf);
|
||||
CLEAN_DIRECTORY:
|
||||
// initprintf("Cleaning '%s'\n",tempbuf);
|
||||
while (findfiles)
|
||||
{
|
||||
Bsprintf(g_szBuf,"%s/%s",tempbuf,findfiles->name);
|
||||
|
@ -11093,10 +11086,10 @@ RECURSE:
|
|||
{
|
||||
if (errno == EEXIST || errno == ENOTEMPTY)
|
||||
{
|
||||
ii = 1;
|
||||
recursion = 1;
|
||||
Bstrcpy(tempbuf,g_szBuf);
|
||||
getfilenames(tempbuf,"*");
|
||||
goto RECURSE;
|
||||
goto CLEAN_DIRECTORY;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -11110,12 +11103,12 @@ RECURSE:
|
|||
}
|
||||
}
|
||||
|
||||
if (ii)
|
||||
if (recursion)
|
||||
{
|
||||
Bsprintf(tempbuf,"%stexcache",dir);
|
||||
getfilenames(tempbuf,"*");
|
||||
ii = 0;
|
||||
goto RECURSE;
|
||||
recursion = 0;
|
||||
goto CLEAN_DIRECTORY;
|
||||
}
|
||||
|
||||
Bsprintf(tempbuf,"%stexcache",dir);
|
||||
|
|
|
@ -22,6 +22,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifndef _gamedef_h_
|
||||
#define _gamedef_h_
|
||||
|
||||
#define MAXGAMEEVENTS 128
|
||||
#define LABEL_HASPARM2 1
|
||||
#define LABEL_ISSTRING 2
|
||||
|
@ -877,3 +880,4 @@ enum ScriptKeywords_t
|
|||
CON_SAVENN, // 344
|
||||
CON_END
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -1577,7 +1577,6 @@ static int X_DoExecute(void)
|
|||
case CON_QSTRCAT:
|
||||
case CON_QSTRCPY:
|
||||
case CON_QGETSYSSTR:
|
||||
case CON_CHANGESPRITESTAT:
|
||||
case CON_CHANGESPRITESECT:
|
||||
insptr++;
|
||||
{
|
||||
|
@ -1645,7 +1644,21 @@ static int X_DoExecute(void)
|
|||
}
|
||||
Bstrcpy(ScriptQuotes[i],ScriptQuotes[j]);
|
||||
break;
|
||||
case CON_CHANGESPRITESECT:
|
||||
if ((i<0 || i>=MAXSPRITES) && g_scriptSanityChecks) {OSD_Printf(CON_ERROR "Invalid sprite %d\n",g_errorLineNum,keyw[g_tw],i);break;}
|
||||
if ((j<0 || j>=numsectors) && g_scriptSanityChecks) {OSD_Printf(CON_ERROR "Invalid sector %d\n",g_errorLineNum,keyw[g_tw],j);break;}
|
||||
changespritesect(i,j);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case CON_CHANGESPRITESTAT:
|
||||
insptr++;
|
||||
{
|
||||
int i = Gv_GetVar(*insptr++, g_i, g_p);
|
||||
j = Gv_GetVar(*insptr++, g_i, g_p);
|
||||
|
||||
if ((i<0 || i>=MAXSPRITES) && g_scriptSanityChecks)
|
||||
{
|
||||
OSD_Printf(CON_ERROR "Invalid sprite: %d\n",g_errorLineNum,keyw[g_tw],i);
|
||||
|
@ -1661,7 +1674,7 @@ static int X_DoExecute(void)
|
|||
/* initialize actor data when changing to an actor statnum because there's usually
|
||||
garbage left over from being handled as a hard coded object */
|
||||
|
||||
if (j == 1 || j == 2)
|
||||
if (sprite[i].statnum > STAT_ZOMBIEACTOR && (j == STAT_ACTOR || j == STAT_ZOMBIEACTOR))
|
||||
{
|
||||
ActorExtra[i].lastvx = 0;
|
||||
ActorExtra[i].lastvy = 0;
|
||||
|
@ -1684,13 +1697,6 @@ static int X_DoExecute(void)
|
|||
}
|
||||
changespritestat(i,j);
|
||||
break;
|
||||
case CON_CHANGESPRITESECT:
|
||||
if ((i<0 || i>=MAXSPRITES) && g_scriptSanityChecks) {OSD_Printf(CON_ERROR "Invalid sprite %d\n",g_errorLineNum,keyw[g_tw],i);break;}
|
||||
if ((j<0 || j>=numsectors) && g_scriptSanityChecks) {OSD_Printf(CON_ERROR "Invalid sector %d\n",g_errorLineNum,keyw[g_tw],j);break;}
|
||||
changespritesect(i,j);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case CON_STARTLEVEL:
|
||||
|
@ -3134,9 +3140,11 @@ static int X_DoExecute(void)
|
|||
}
|
||||
j = nextspritestat[j];
|
||||
}
|
||||
if (j == MAXSPRITES || tw == CON_FINDNEARACTOR3D)
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
while (j>=0)
|
||||
{
|
||||
if (sprite[j].picnum == lType && j != g_i && ldist(&sprite[g_i], &sprite[j]) < lMaxDist)
|
||||
|
@ -3147,8 +3155,8 @@ static int X_DoExecute(void)
|
|||
}
|
||||
j = nextspritestat[j];
|
||||
}
|
||||
}
|
||||
if (j == MAXSPRITES || tw == CON_FINDNEARACTOR || tw == CON_FINDNEARACTOR3D)
|
||||
|
||||
if (j == MAXSPRITES || tw == CON_FINDNEARACTOR)
|
||||
break;
|
||||
}
|
||||
while (k--);
|
||||
|
@ -3168,10 +3176,10 @@ static int X_DoExecute(void)
|
|||
// -1 for none found
|
||||
// <type> <maxdistvarid> <varid>
|
||||
int lType=*insptr++, lMaxDist=Gv_GetVar(*insptr++, g_i, g_p), lVarID=*insptr++;
|
||||
int lFound=-1, j, k = MAXSTATUS-1;
|
||||
int lFound=-1, j, k = 1;
|
||||
|
||||
if (tw == CON_FINDNEARACTORVAR || tw == CON_FINDNEARACTOR3DVAR)
|
||||
k = 1;
|
||||
if (tw == CON_FINDNEARSPRITEVAR || tw == CON_FINDNEARSPRITE3DVAR)
|
||||
k = MAXSTATUS-1;
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -3188,9 +3196,11 @@ static int X_DoExecute(void)
|
|||
}
|
||||
j = nextspritestat[j];
|
||||
}
|
||||
if (j == MAXSPRITES || tw==CON_FINDNEARACTOR3DVAR)
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
while (j >= 0)
|
||||
{
|
||||
if (sprite[j].picnum == lType && j != g_i && ldist(&sprite[g_i], &sprite[j]) < lMaxDist)
|
||||
|
@ -3201,8 +3211,8 @@ static int X_DoExecute(void)
|
|||
}
|
||||
j = nextspritestat[j];
|
||||
}
|
||||
}
|
||||
if (j == MAXSPRITES || tw==CON_FINDNEARACTORVAR || tw==CON_FINDNEARACTOR3DVAR)
|
||||
|
||||
if (j == MAXSPRITES || tw==CON_FINDNEARACTORVAR)
|
||||
break;
|
||||
}
|
||||
while (k--);
|
||||
|
@ -3219,7 +3229,8 @@ static int X_DoExecute(void)
|
|||
// that is of <type> into <getvar>
|
||||
// -1 for none found
|
||||
// <type> <maxdistvarid> <varid>
|
||||
int lType=*insptr++, lMaxDist=Gv_GetVar(*insptr++, g_i, g_p), lMaxZDist=Gv_GetVar(*insptr++, g_i, g_p);
|
||||
int lType=*insptr++, lMaxDist=Gv_GetVar(*insptr++, g_i, g_p);
|
||||
int lMaxZDist=Gv_GetVar(*insptr++, g_i, g_p);
|
||||
int lVarID=*insptr++, lFound=-1, lTemp, lTemp2, j, k=MAXSTATUS-1;
|
||||
do
|
||||
{
|
||||
|
@ -4231,7 +4242,7 @@ void A_LoadActor(int iActor)
|
|||
|
||||
void A_Execute(int iActor,int iPlayer,int lDist)
|
||||
{
|
||||
int temp, temp2;
|
||||
// int temp, temp2;
|
||||
|
||||
// if (actorscrptr[sprite[iActor].picnum] == 0) return;
|
||||
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
#define AFLAMABLE(X) (X==BOX||X==TREE1||X==TREE2||X==TIRE||X==CONE)
|
||||
#define rnd(X) ((krand()>>8)>=(255-(X)))
|
||||
|
||||
#define clamp(in, min, max) ((in) <= (min) ? (min) : (in) >= (max) ? (max) : (in))
|
||||
|
||||
//
|
||||
// NETWORK - REDEFINABLE SHARED (SYNC) KEYS BIT POSITIONS
|
||||
//
|
||||
|
|
|
@ -28,7 +28,7 @@ BEGIN
|
|||
CONTROL "&Fullscreen", IDCFULLSCREEN, "BUTTON", BS_CHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 148, 8, 49, 10
|
||||
CONTROL "&3D Video mode:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 24, 50, 8
|
||||
CONTROL "", IDC3DVMODE, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 60, 22, 80, 56
|
||||
CONTROL "&Always show configuration on start", IDCALWAYSSHOW, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 118, 116, 140, 8
|
||||
CONTROL "&Always show this window at startup", IDCALWAYSSHOW, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 118, 116, 140, 8
|
||||
END
|
||||
|
||||
#define FILEVER 1,1,9,9
|
||||
|
|
|
@ -36,7 +36,7 @@ BEGIN
|
|||
CONTROL "Custom game content &directory:", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 5, 90, 160, 8
|
||||
CONTROL "", IDCGAMEDIR, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 10, 99, 226, 156
|
||||
|
||||
CONTROL "&Always show configuration on start", IDCALWAYSSHOW, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 118, 116, 140, 8
|
||||
CONTROL "&Always show this window at startup", IDCALWAYSSHOW, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 118, 116, 140, 8
|
||||
END
|
||||
|
||||
#define FILEVER 1,4,9,9
|
||||
|
|
|
@ -400,10 +400,10 @@ static INT_PTR CALLBACK startup_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
|
|||
|
||||
ZeroMemory(&tab, sizeof(tab));
|
||||
tab.mask = TCIF_TEXT;
|
||||
tab.pszText = TEXT("Configuration");
|
||||
tab.pszText = TEXT("Setup");
|
||||
SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)TAB_CONFIG, (LPARAM)&tab);
|
||||
tab.mask = TCIF_TEXT;
|
||||
tab.pszText = TEXT("Messages");
|
||||
tab.pszText = TEXT("Message Log");
|
||||
SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)TAB_MESSAGES, (LPARAM)&tab);
|
||||
|
||||
// Work out the position and size of the area inside the tab control for the pages
|
||||
|
|
Loading…
Reference in a new issue