mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@910 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9ebad22ac8
commit
61d665e14d
7 changed files with 48 additions and 32 deletions
|
@ -38,6 +38,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "scriptfile.h"
|
||||
#include "crc32.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#define VERSION " 1.2.0devel"
|
||||
|
||||
static int floor_over_floor;
|
||||
|
@ -1163,7 +1168,7 @@ static void ReadHelpFile(const char *name)
|
|||
|
||||
helppage=malloc(IHELP_INITPAGES * sizeof(helppage_t *));
|
||||
numallocpages=IHELP_INITPAGES;
|
||||
if (!helppage) goto ERROR;
|
||||
if (!helppage) goto HELPFILE_ERROR;
|
||||
|
||||
i=0;
|
||||
while (!Bfeof(fp) && !ferror(fp))
|
||||
|
@ -1182,7 +1187,7 @@ static void ReadHelpFile(const char *name)
|
|||
if (Bfeof(fp) || charsread<=0) break;
|
||||
|
||||
hp=Bcalloc(1,sizeof(helppage_t) + IHELP_INITLINES*80);
|
||||
if (!hp) goto ERROR;
|
||||
if (!hp) goto HELPFILE_ERROR;
|
||||
hp->numlines = IHELP_INITLINES;
|
||||
|
||||
if (charsread == 79 && tempbuf[78]!='\n') skip=1;
|
||||
|
@ -1193,7 +1198,7 @@ static void ReadHelpFile(const char *name)
|
|||
if (j >= hp->numlines)
|
||||
{
|
||||
hp=realloc(hp, sizeof(helppage_t) + 2*hp->numlines*80);
|
||||
if (!hp) goto ERROR;
|
||||
if (!hp) goto HELPFILE_ERROR;
|
||||
hp->numlines *= 2;
|
||||
}
|
||||
|
||||
|
@ -1225,27 +1230,27 @@ static void ReadHelpFile(const char *name)
|
|||
while (!newpage(tempbuf) && !Bfeof(fp) && charsread>0);
|
||||
|
||||
hp=realloc(hp, sizeof(helppage_t) + j*80);
|
||||
if (!hp) goto ERROR;
|
||||
if (!hp) goto HELPFILE_ERROR;
|
||||
hp->numlines=j;
|
||||
|
||||
if (i >= numallocpages)
|
||||
{
|
||||
helppage = realloc(helppage, 2*numallocpages*sizeof(helppage_t *));
|
||||
numallocpages *= 2;
|
||||
if (!helppage) goto ERROR;
|
||||
if (!helppage) goto HELPFILE_ERROR;
|
||||
}
|
||||
helppage[i] = hp;
|
||||
i++;
|
||||
}
|
||||
|
||||
helppage = realloc(helppage, i*sizeof(helppage_t *));
|
||||
if (!helppage) goto ERROR;
|
||||
if (!helppage) goto HELPFILE_ERROR;
|
||||
numhelppages = i;
|
||||
|
||||
Bfclose(fp);
|
||||
return;
|
||||
|
||||
ERROR:
|
||||
HELPFILE_ERROR:
|
||||
|
||||
Bfclose(fp);
|
||||
initprintf("ReadHelpFile(): ERROR allocating memory.\n");
|
||||
|
@ -6698,6 +6703,12 @@ static void checkcommandline(int argc, const char **argv)
|
|||
addgroup(argv[i++]);
|
||||
continue;
|
||||
}
|
||||
if (!Bstrcasecmp(k,".def"))
|
||||
{
|
||||
defsfilename = (char *)argv[i++];
|
||||
initprintf("Using DEF file: %s.\n",defsfilename);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
i++;
|
||||
|
@ -6709,6 +6720,12 @@ int ExtPreInit(int argc,const char **argv)
|
|||
{
|
||||
wm_setapptitle("Mapster32"VERSION);
|
||||
|
||||
#ifdef _WIN32
|
||||
tempbuf[GetModuleFileName(NULL,tempbuf,BMAX_PATH)] = 0;
|
||||
Bcorrectfilename(tempbuf,1);
|
||||
chdir(tempbuf);
|
||||
#endif
|
||||
|
||||
OSD_SetLogFile("mapster32.log");
|
||||
OSD_SetVersionString("Mapster32"VERSION,0,2);
|
||||
initprintf("Mapster32"VERSION" ("__DATE__" "__TIME__")\n");
|
||||
|
|
|
@ -9369,6 +9369,12 @@ static void checkcommandline(int argc, const char **argv)
|
|||
initprintf("Using CON file '%s'.\n",confilename);
|
||||
continue;
|
||||
}
|
||||
if (!Bstrcasecmp(k,".def"))
|
||||
{
|
||||
duke3ddef = (char *)argv[i++];
|
||||
initprintf("Using DEF file: %s.\n",duke3ddef);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
i++;
|
||||
|
|
|
@ -3430,6 +3430,7 @@ static int parsecommand(void)
|
|||
case CON_READGAMEVAR:
|
||||
case CON_USERQUOTE:
|
||||
case CON_STARTTRACKVAR:
|
||||
case CON_CLEARMAPSTATE:
|
||||
transvar();
|
||||
return 0;
|
||||
|
||||
|
@ -3594,7 +3595,6 @@ static int parsecommand(void)
|
|||
case CON_FLASH:
|
||||
case CON_SAVEMAPSTATE:
|
||||
case CON_LOADMAPSTATE:
|
||||
case CON_CLEARMAPSTATE:
|
||||
return 0;
|
||||
|
||||
case CON_DRAGPOINT:
|
||||
|
|
|
@ -6504,11 +6504,10 @@ case CON_CHANGESPRITESECT:
|
|||
return 0;
|
||||
|
||||
case CON_CLEARMAPSTATE:
|
||||
if (map[ud.volume_number*MAXLEVELS+ud.level_number].savedstate)
|
||||
{
|
||||
FreeMapState(ud.volume_number*MAXLEVELS+ud.level_number);
|
||||
}
|
||||
insptr++;
|
||||
j = GetGameVarID(*insptr++,g_i,g_p);
|
||||
if (map[j].savedstate)
|
||||
FreeMapState(j);
|
||||
return 0;
|
||||
|
||||
case CON_STOPALLSOUNDS:
|
||||
|
|
|
@ -105,7 +105,6 @@ static inline void SetBOSS1Palette();
|
|||
static inline void SetSLIMEPalette();
|
||||
static inline void SetWATERPalette();
|
||||
static inline void SetGAMEPalette();
|
||||
static void kensetpalette(char *vgapal);
|
||||
|
||||
extern short grid;
|
||||
|
||||
|
|
|
@ -738,7 +738,7 @@ void menus(void)
|
|||
"Switch weapons when empty",
|
||||
"-",
|
||||
"-",
|
||||
"Network packets/sec",
|
||||
"Net packets per second",
|
||||
"-",
|
||||
"-",
|
||||
"Multiplayer macros",
|
||||
|
|
|
@ -548,8 +548,8 @@ int shoot(int i,int atwith)
|
|||
|
||||
if (p >= 0)
|
||||
{
|
||||
int angRange;
|
||||
int zRange;
|
||||
int angRange=32;
|
||||
int zRange=256;
|
||||
|
||||
SetGameVarID(g_iAimAngleVarID,AUTO_AIM_ANGLE,i,p);
|
||||
OnEvent(EVENT_GETAUTOAIMANGLE, i, p, -1);
|
||||
|
@ -560,7 +560,7 @@ int shoot(int i,int atwith)
|
|||
}
|
||||
if (j >= 0)
|
||||
{
|
||||
dal = ((sprite[j].xrepeat*tilesizy[sprite[j].picnum])<<1)+(5<<8);
|
||||
dal = ((sprite[j].yrepeat*tilesizy[sprite[j].picnum])<<1)+(5<<8);
|
||||
if (((sprite[j].picnum >= GREENSLIME)&&(sprite[j].picnum <= GREENSLIME+7))||(sprite[j].picnum ==ROTATEGUN))
|
||||
{
|
||||
dal -= (8<<8);
|
||||
|
@ -570,8 +570,6 @@ int shoot(int i,int atwith)
|
|||
sa = getangle(sprite[j].x-sx,sprite[j].y-sy);
|
||||
}
|
||||
|
||||
angRange=32;
|
||||
zRange=256;
|
||||
SetGameVarID(g_iAngRangeVarID,angRange, i,p);
|
||||
SetGameVarID(g_iZRangeVarID,zRange,i,p);
|
||||
OnEvent(EVENT_GETSHOTRANGE, i,p, -1);
|
||||
|
@ -589,7 +587,7 @@ int shoot(int i,int atwith)
|
|||
if (hitspr != -1)
|
||||
{
|
||||
if (sprite[hitspr].statnum == 1 || sprite[hitspr].statnum == 2 || sprite[hitspr].statnum == 10 || sprite[hitspr].statnum == 13)
|
||||
j = 1;
|
||||
j = hitspr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -885,7 +883,7 @@ DOSKIPBULLETHOLE:
|
|||
}
|
||||
if (j >= 0)
|
||||
{
|
||||
dal = ((sprite[j].xrepeat*tilesizy[sprite[j].picnum])<<1)+(8<<8);
|
||||
dal = ((sprite[j].yrepeat*tilesizy[sprite[j].picnum])<<1)+(8<<8);
|
||||
zvel = ((sprite[j].z-sz-dal)*vel) / ldist(&sprite[g_player[p].ps->i], &sprite[j]);
|
||||
if (sprite[j].picnum != RECON)
|
||||
sa = getangle(sprite[j].x-sx,sprite[j].y-sy);
|
||||
|
@ -1115,8 +1113,8 @@ DOSKIPBULLETHOLE:
|
|||
|
||||
if (p >= 0)
|
||||
{
|
||||
int angRange;
|
||||
int zRange;
|
||||
int angRange=32;
|
||||
int zRange=256;
|
||||
|
||||
SetGameVarID(g_iAimAngleVarID,AUTO_AIM_ANGLE,i,p);
|
||||
OnEvent(EVENT_GETAUTOAIMANGLE, i, p, -1);
|
||||
|
@ -1127,7 +1125,7 @@ DOSKIPBULLETHOLE:
|
|||
}
|
||||
if (j >= 0)
|
||||
{
|
||||
dal = ((sprite[j].xrepeat*tilesizy[sprite[j].picnum])<<1)+(5<<8);
|
||||
dal = ((sprite[j].yrepeat*tilesizy[sprite[j].picnum])<<1)+(5<<8);
|
||||
if (((sprite[j].picnum>=GREENSLIME)&&(sprite[j].picnum<=GREENSLIME+7))||(sprite[j].picnum==ROTATEGUN))
|
||||
{
|
||||
|
||||
|
@ -1138,9 +1136,6 @@ DOSKIPBULLETHOLE:
|
|||
sa = getangle(sprite[j].x-sx,sprite[j].y-sy);
|
||||
}
|
||||
|
||||
angRange=32;
|
||||
zRange=256;
|
||||
|
||||
SetGameVarID(g_iAngRangeVarID,angRange, i,p);
|
||||
SetGameVarID(g_iZRangeVarID,zRange,i,p);
|
||||
|
||||
|
@ -1160,7 +1155,7 @@ DOSKIPBULLETHOLE:
|
|||
if (hitspr != -1)
|
||||
{
|
||||
if (sprite[hitspr].statnum == 1 || sprite[hitspr].statnum == 2 || sprite[hitspr].statnum == 10 || sprite[hitspr].statnum == 13)
|
||||
j = 1;
|
||||
j = hitspr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1419,7 +1414,7 @@ SKIPBULLETHOLE:
|
|||
|
||||
if (j >= 0)
|
||||
{
|
||||
dal = ((sprite[j].xrepeat*tilesizy[sprite[j].picnum])<<1)-(12<<8);
|
||||
dal = ((sprite[j].yrepeat*tilesizy[sprite[j].picnum])<<1)-(12<<8);
|
||||
zvel = ((sprite[j].z-sz-dal)*vel) / ldist(&sprite[g_player[p].ps->i], &sprite[j]) ;
|
||||
sa = getangle(sprite[j].x-sx,sprite[j].y-sy);
|
||||
}
|
||||
|
@ -1519,7 +1514,7 @@ SKIPBULLETHOLE:
|
|||
|
||||
if (j >= 0)
|
||||
{
|
||||
dal = ((sprite[j].xrepeat*tilesizy[sprite[j].picnum])<<1)+(8<<8);
|
||||
dal = ((sprite[j].yrepeat*tilesizy[sprite[j].picnum])<<1)+(8<<8);
|
||||
zvel = ((sprite[j].z-sz-dal)*vel) / ldist(&sprite[g_player[p].ps->i], &sprite[j]);
|
||||
if (sprite[j].picnum != RECON)
|
||||
sa = getangle(sprite[j].x-sx,sprite[j].y-sy);
|
||||
|
@ -1718,7 +1713,7 @@ SKIPBULLETHOLE:
|
|||
|
||||
if (j >= 0)
|
||||
{
|
||||
dal = ((sprite[j].xrepeat*tilesizy[sprite[j].picnum])<<1)+(5<<8);
|
||||
dal = ((sprite[j].yrepeat*tilesizy[sprite[j].picnum])<<1)+(5<<8);
|
||||
if (((sprite[j].picnum >= GREENSLIME)&&(sprite[j].picnum <= GREENSLIME+7))||(sprite[j].picnum ==ROTATEGUN))
|
||||
{
|
||||
dal -= (8<<8);
|
||||
|
@ -1810,7 +1805,7 @@ SKIPBULLETHOLE:
|
|||
|
||||
if (j >= 0)
|
||||
{
|
||||
dal = ((sprite[j].xrepeat*tilesizy[sprite[j].picnum])<<1);
|
||||
dal = ((sprite[j].yrepeat*tilesizy[sprite[j].picnum])<<1);
|
||||
zvel = ((sprite[j].z-sz-dal-(4<<8))*768) / (ldist(&sprite[g_player[p].ps->i], &sprite[j]));
|
||||
sa = getangle(sprite[j].x-sx,sprite[j].y-sy);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue