mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@437 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
879a75817b
commit
d2566913bb
15 changed files with 194 additions and 241 deletions
|
@ -197,7 +197,7 @@ void endanimvol43(long fr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void playanm(char *fn,char t)
|
void playanm(const char *fn,char t)
|
||||||
{
|
{
|
||||||
char *animbuf;
|
char *animbuf;
|
||||||
unsigned char *palptr;
|
unsigned char *palptr;
|
||||||
|
@ -216,7 +216,7 @@ void playanm(char *fn,char t)
|
||||||
goto ENDOFANIMLOOP;
|
goto ENDOFANIMLOOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
handle = kopen4load(fn,0);
|
handle = kopen4load((char *)fn,0);
|
||||||
if (handle == -1) return;
|
if (handle == -1) return;
|
||||||
length = kfilelength(handle);
|
length = kfilelength(handle);
|
||||||
|
|
||||||
|
|
|
@ -142,13 +142,8 @@ int32 CONFIG_FunctionNameToNum(char * func)
|
||||||
char * CONFIG_FunctionNumToName(int32 func)
|
char * CONFIG_FunctionNumToName(int32 func)
|
||||||
{
|
{
|
||||||
if ((unsigned)func >= (unsigned)NUMGAMEFUNCTIONS)
|
if ((unsigned)func >= (unsigned)NUMGAMEFUNCTIONS)
|
||||||
{
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
return gamefunctions[func];
|
||||||
else
|
|
||||||
{
|
|
||||||
return gamefunctions[func];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -30,14 +30,14 @@ Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
|
||||||
|
|
||||||
struct player_struct; // JBF: duke3d.h defines this later
|
struct player_struct; // JBF: duke3d.h defines this later
|
||||||
|
|
||||||
extern void sendscore(char *s);
|
extern void sendscore(const char *s);
|
||||||
extern void SoundStartup(void);
|
extern void SoundStartup(void);
|
||||||
extern void SoundShutdown(void);
|
extern void SoundShutdown(void);
|
||||||
extern void MusicStartup(void);
|
extern void MusicStartup(void);
|
||||||
extern void MusicShutdown(void);
|
extern void MusicShutdown(void);
|
||||||
extern void intomenusounds(void);
|
extern void intomenusounds(void);
|
||||||
extern void playmusic(char *fn);
|
extern void playmusic(const char *fn);
|
||||||
extern char loadsound(unsigned short num);
|
extern int loadsound(unsigned short num);
|
||||||
extern int xyzsound(short num,short i,long x,long y,long z);
|
extern int xyzsound(short num,short i,long x,long y,long z);
|
||||||
extern void sound(short num);
|
extern void sound(short num);
|
||||||
extern int spritesound(unsigned short num,short i);
|
extern int spritesound(unsigned short num,short i);
|
||||||
|
@ -61,26 +61,26 @@ extern int getanimationgoal(long *animptr);
|
||||||
extern int setanimation(short animsect,long *animptr,long thegoal,long thevel);
|
extern int setanimation(short animsect,long *animptr,long thegoal,long thevel);
|
||||||
extern void animatecamsprite(void);
|
extern void animatecamsprite(void);
|
||||||
extern void animatewalls(void);
|
extern void animatewalls(void);
|
||||||
extern char activatewarpelevators(short s,short d);
|
extern int activatewarpelevators(short s,short d);
|
||||||
extern void operatesectors(short sn,short ii);
|
extern void operatesectors(short sn,short ii);
|
||||||
extern void operaterespawns(int low);
|
extern void operaterespawns(int low);
|
||||||
extern void operateactivators(int low,int snum);
|
extern void operateactivators(int low,int snum);
|
||||||
extern void operatemasterswitches(int low);
|
extern void operatemasterswitches(int low);
|
||||||
extern void operateforcefields(short s,int low);
|
extern void operateforcefields(short s,int low);
|
||||||
extern char checkhitswitch(int snum,long w,int switchtype);
|
extern int checkhitswitch(int snum,long w,int switchtype);
|
||||||
extern void activatebysector(short sect,short j);
|
extern void activatebysector(short sect,short j);
|
||||||
extern void checkhitwall(short spr,short dawallnum,long x,long y,long z,short atwith);
|
extern void checkhitwall(short spr,short dawallnum,long x,long y,long z,short atwith);
|
||||||
extern void checkplayerhurt(struct player_struct *p,short j);
|
extern void checkplayerhurt(struct player_struct *p,short j);
|
||||||
extern char checkhitceiling(short sn);
|
extern int checkhitceiling(short sn);
|
||||||
extern void checkhitsprite(short i,short sn);
|
extern void checkhitsprite(short i,short sn);
|
||||||
extern void allignwarpelevators(void);
|
extern void allignwarpelevators(void);
|
||||||
extern void sharedkeys(int snum);
|
extern void sharedkeys(int snum);
|
||||||
extern void checksectors(int snum);
|
extern void checksectors(int snum);
|
||||||
extern int32 RTS_AddFile(char *filename);
|
extern int32 RTS_AddFile(const char *filename);
|
||||||
extern void RTS_Init(char *filename);
|
extern void RTS_Init(const char *filename);
|
||||||
extern int32 RTS_NumSounds(void);
|
extern int32 RTS_NumSounds(void);
|
||||||
extern int32 RTS_SoundLength(int32 lump);
|
extern int32 RTS_SoundLength(int32 lump);
|
||||||
extern char *RTS_GetSoundName(int32 i);
|
extern const char *RTS_GetSoundName(int32 i);
|
||||||
extern void RTS_ReadLump(int32 lump,void *dest);
|
extern void RTS_ReadLump(int32 lump,void *dest);
|
||||||
extern void *RTS_GetSound(int32 lump);
|
extern void *RTS_GetSound(int32 lump);
|
||||||
extern void docacheit(void);
|
extern void docacheit(void);
|
||||||
|
@ -108,25 +108,25 @@ extern void getinput(int snum);
|
||||||
extern void checkweapons(struct player_struct *p);
|
extern void checkweapons(struct player_struct *p);
|
||||||
extern void processinput(int snum);
|
extern void processinput(int snum);
|
||||||
extern void cmenu(int cm);
|
extern void cmenu(int cm);
|
||||||
extern void savetemp(char *fn,long daptr,long dasiz);
|
extern void savetemp(const char *fn,long daptr,long dasiz);
|
||||||
// extern int loadpheader(char spot,int32 *vn,int32 *ln,int32 *psk,int32 *numplr);
|
// extern int loadpheader(char spot,int32 *vn,int32 *ln,int32 *psk,int32 *numplr);
|
||||||
extern int loadplayer(signed char spot);
|
extern int loadplayer(signed char spot);
|
||||||
extern int saveplayer(signed char spot);
|
extern int saveplayer(signed char spot);
|
||||||
extern inline int menutext(int x,int y,short s,short p,char *t);
|
extern inline int menutext(int x,int y,short s,short p,const char *t);
|
||||||
extern int getfilenames(char *path, char kind[]);
|
extern int getfilenames(const char *path, char kind[]);
|
||||||
extern void menus(void);
|
extern void menus(void);
|
||||||
extern void palto(char r,char g,char b,long e);
|
extern void palto(char r,char g,char b,long e);
|
||||||
extern void playanm(char *fn,char);
|
extern void playanm(const char *fn,char);
|
||||||
extern int getincangle(int a,int na);
|
extern int getincangle(int a,int na);
|
||||||
extern void getglobalz(int iActor);
|
extern void getglobalz(int iActor);
|
||||||
extern void makeitfall(int iActor);
|
extern void makeitfall(int iActor);
|
||||||
extern void loadefs(char *fn);
|
extern void loadefs(const char *fn);
|
||||||
extern int furthestangle(int iActor,int angs);
|
extern int furthestangle(int iActor,int angs);
|
||||||
extern void execute(int iActor,int iPlayer,long lDist);
|
extern void execute(int iActor,int iPlayer,long lDist);
|
||||||
extern void overwritesprite(long thex,long they,short tilenum,signed char shade,char stat,char dapalnum);
|
extern void overwritesprite(long thex,long they,short tilenum,signed char shade,char stat,char dapalnum);
|
||||||
extern inline int gametext(int x,int y,char *t,char s,short dabits);
|
extern inline int gametext(int x,int y,const char *t,char s,short dabits);
|
||||||
extern inline int gametextpal(int x,int y,char *t,char s,char p);
|
extern inline int gametextpal(int x,int y,const char *t,char s,char p);
|
||||||
extern inline int minitext(int x,int y,char *t,char p,short sb);
|
extern inline int minitext(int x,int y,const char *t,char p,short sb);
|
||||||
extern void gamenumber(long x,long y,long n,char s);
|
extern void gamenumber(long x,long y,long n,char s);
|
||||||
extern void Shutdown(void);
|
extern void Shutdown(void);
|
||||||
extern void getpackets(void);
|
extern void getpackets(void);
|
||||||
|
@ -138,14 +138,14 @@ extern void myos(long x,long y,int tilenum,int shade,int orientation);
|
||||||
extern void myospal(long x,long y,int tilenum,int shade,int orientation,int p);
|
extern void myospal(long x,long y,int tilenum,int shade,int orientation,int p);
|
||||||
extern void displayfragbar(void);
|
extern void displayfragbar(void);
|
||||||
extern void FTA(short q,struct player_struct *p);
|
extern void FTA(short q,struct player_struct *p);
|
||||||
extern void gameexit(char *t);
|
extern void gameexit(const char *t);
|
||||||
extern inline int strget(short x,short y,char *t,short dalen,short c);
|
extern inline int strget(short x,short y,char *t,short dalen,short c);
|
||||||
extern void displayrest(long smoothratio);
|
extern void displayrest(long smoothratio);
|
||||||
extern void updatesectorz(long x,long y,long z,short *sectnum);
|
extern void updatesectorz(long x,long y,long z,short *sectnum);
|
||||||
extern void drawbackground(void);
|
extern void drawbackground(void);
|
||||||
extern void displayrooms(int snum,long smoothratio);
|
extern void displayrooms(int snum,long smoothratio);
|
||||||
extern int EGS(int whatsect,long s_x,long s_y,long s_z,int s_pn,int s_s,int s_xr,int s_yr,int s_a,int s_ve,long s_zv,int s_ow,int s_ss);
|
extern int EGS(int whatsect,long s_x,long s_y,long s_z,int s_pn,int s_s,int s_xr,int s_yr,int s_a,int s_ve,long s_zv,int s_ow,int s_ss);
|
||||||
extern char wallswitchcheck(short i);
|
extern int wallswitchcheck(short i);
|
||||||
extern int spawn(int j,int pn);
|
extern int spawn(int j,int pn);
|
||||||
extern void animatesprites(long x,long y,short a,long smoothratio);
|
extern void animatesprites(long x,long y,short a,long smoothratio);
|
||||||
extern int main(int argc,char **argv);
|
extern int main(int argc,char **argv);
|
||||||
|
@ -201,8 +201,8 @@ extern inline void setstatusbarscale(long sc);
|
||||||
extern void setgamepalette(struct player_struct *player, char *pal, int set);
|
extern void setgamepalette(struct player_struct *player, char *pal, int set);
|
||||||
extern void fadepal(int r, int g, int b, int start, int end, int step);
|
extern void fadepal(int r, int g, int b, int start, int end, int step);
|
||||||
|
|
||||||
extern inline int minitextshade(int x,int y,char *t,char s,char p,short sb);
|
extern inline int minitextshade(int x,int y,const char *t,char s,char p,short sb);
|
||||||
extern inline int gametext_(int small, int starttile, int x,int y,char *t,char s,char p,short orientation,long x1, long y1, long x2, long y2);
|
extern inline int gametext_(int small, int starttile, int x,int y,const char *t,char s,char p,short orientation,long x1, long y1, long x2, long y2);
|
||||||
extern void txdigitalnumber(short starttile, long x,long y,long n,char s,char pal,char cs,long x1, long y1, long x2, long y2);
|
extern void txdigitalnumber(short starttile, long x,long y,long n,char s,char pal,char cs,long x1, long y1, long x2, long y2);
|
||||||
extern void myosx(long x,long y,int tilenum,int shade,int orientation);
|
extern void myosx(long x,long y,int tilenum,int shade,int orientation);
|
||||||
extern void myospalx(long x,long y,int tilenum,int shade,int orientation,int p);
|
extern void myospalx(long x,long y,int tilenum,int shade,int orientation,int p);
|
||||||
|
@ -210,13 +210,13 @@ extern void ResetGameVars(void);
|
||||||
extern void ResetActorGameVars(int iActor);
|
extern void ResetActorGameVars(int iActor);
|
||||||
|
|
||||||
extern void setupdynamictostatic();
|
extern void setupdynamictostatic();
|
||||||
extern void processnames(char *szLabel, long lValue);
|
extern void processnames(const char *szLabel, long lValue);
|
||||||
|
|
||||||
extern void LoadActor(long sActor);
|
extern void LoadActor(long sActor);
|
||||||
|
|
||||||
extern long GetGameVar(char *szGameLabel, long lDefault, int iActor, int iPlayer);
|
extern long GetGameVar(const char *szGameLabel, long lDefault, int iActor, int iPlayer);
|
||||||
extern void DumpGameVars(FILE *fp);
|
extern void DumpGameVars(FILE *fp);
|
||||||
extern void AddLog(char *psz);
|
extern void AddLog(const char *psz);
|
||||||
|
|
||||||
extern void ResetSystemDefaults(void);
|
extern void ResetSystemDefaults(void);
|
||||||
extern void InitGameVarPointers(void);
|
extern void InitGameVarPointers(void);
|
||||||
|
@ -226,7 +226,7 @@ extern int ReadGameVars(long fil);
|
||||||
|
|
||||||
extern long GetGameVarID(int id, int iActor, int iPlayer);
|
extern long GetGameVarID(int id, int iActor, int iPlayer);
|
||||||
extern void SetGameVarID(int id, long lValue, int iActor, int iPlayer);
|
extern void SetGameVarID(int id, long lValue, int iActor, int iPlayer);
|
||||||
extern char AddGameVar(char *pszLabel, long lValue, unsigned long dwFlags);
|
extern int AddGameVar(const char *pszLabel, long lValue, unsigned long dwFlags);
|
||||||
extern void ReportError(int iError);
|
extern void ReportError(int iError);
|
||||||
|
|
||||||
extern void onvideomodechange(int newmode);
|
extern void onvideomodechange(int newmode);
|
||||||
|
@ -240,8 +240,8 @@ extern void updateplayer(void);
|
||||||
extern void sendboardname(void);
|
extern void sendboardname(void);
|
||||||
extern void sendquit(void);
|
extern void sendquit(void);
|
||||||
|
|
||||||
extern void adduserquote(char *daquote);
|
extern void adduserquote(const char *daquote);
|
||||||
extern char *stripcolorcodes(char *t);
|
extern const char *stripcolorcodes(const char *t);
|
||||||
extern void mpchangemap(char volume, char level);
|
extern void mpchangemap(char volume, char level);
|
||||||
|
|
||||||
extern inline int checkspriteflags(int iActor, int iType);
|
extern inline int checkspriteflags(int iActor, int iType);
|
||||||
|
|
|
@ -134,11 +134,11 @@ long tempwallptr;
|
||||||
long nonsharedtimer;
|
long nonsharedtimer;
|
||||||
|
|
||||||
static void cameratext(short i);
|
static void cameratext(short i);
|
||||||
static char moveloop(void);
|
static int moveloop(void);
|
||||||
static void doorders(void);
|
static void doorders(void);
|
||||||
static void fakedomovethings(void);
|
static void fakedomovethings(void);
|
||||||
static void fakedomovethingscorrect(void);
|
static void fakedomovethingscorrect(void);
|
||||||
static char domovethings(void);
|
static int domovethings(void);
|
||||||
static long playback(void);
|
static long playback(void);
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -258,7 +258,7 @@ void setgamepalette(struct player_struct *player, char *pal, int set)
|
||||||
|
|
||||||
#define TEXTWRAPLEN (scale(35,ScreenWidth,320))
|
#define TEXTWRAPLEN (scale(35,ScreenWidth,320))
|
||||||
|
|
||||||
char *stripcolorcodes(char *t)
|
const char *stripcolorcodes(const char *t)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
@ -278,14 +278,14 @@ char *stripcolorcodes(char *t)
|
||||||
return(colstrip);
|
return(colstrip);
|
||||||
}
|
}
|
||||||
|
|
||||||
int gametext_(int small, int starttile, int x,int y,char *t,char s,char p,short orientation,long x1, long y1, long x2, long y2)
|
int gametext_(int small, int starttile, int x,int y,const char *t,char s,char p,short orientation,long x1, long y1, long x2, long y2)
|
||||||
{
|
{
|
||||||
short ac,newx,oldx=x;
|
short ac,newx,oldx=x;
|
||||||
char centre, *oldt;
|
char centre, *oldt;
|
||||||
|
|
||||||
centre = (x == (320>>1));
|
centre = (x == (320>>1));
|
||||||
newx = 0;
|
newx = 0;
|
||||||
oldt = t;
|
oldt = (char *)t;
|
||||||
|
|
||||||
if (t == NULL)
|
if (t == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -356,31 +356,31 @@ int gametext_(int small, int starttile, int x,int y,char *t,char s,char p,short
|
||||||
if ((*t >= '0' && *t <= '9'))
|
if ((*t >= '0' && *t <= '9'))
|
||||||
x += 8;
|
x += 8;
|
||||||
else x += tilesizx[ac];//(tilesizx[ac]>>small);
|
else x += tilesizx[ac];//(tilesizx[ac]>>small);
|
||||||
if (t-oldt >= (signed)TEXTWRAPLEN-!small) oldt = t, x = oldx, y+=8;
|
if (t-oldt >= (signed)TEXTWRAPLEN-!small) oldt = (char *)t, x = oldx, y+=8;
|
||||||
t++;
|
t++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (x);
|
return (x);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int gametext(int x,int y,char *t,char s,short dabits)
|
inline int gametext(int x,int y,const char *t,char s,short dabits)
|
||||||
{
|
{
|
||||||
return(gametext_(0,STARTALPHANUM, x,y,t,s,0,dabits,0, 0, xdim-1, ydim-1));
|
return(gametext_(0,STARTALPHANUM, x,y,t,s,0,dabits,0, 0, xdim-1, ydim-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int gametextpal(int x,int y,char *t,char s,char p)
|
inline int gametextpal(int x,int y,const char *t,char s,char p)
|
||||||
{
|
{
|
||||||
return(gametext_(0,STARTALPHANUM, x,y,t,s,p,26,0, 0, xdim-1, ydim-1));
|
return(gametext_(0,STARTALPHANUM, x,y,t,s,p,26,0, 0, xdim-1, ydim-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int mpgametext(int y,char *t,char s,short dabits)
|
inline int mpgametext(int y,const char *t,char s,short dabits)
|
||||||
{
|
{
|
||||||
if (xdim >= 640 && ydim >= 480)
|
if (xdim >= 640 && ydim >= 480)
|
||||||
return(gametext_(1,STARTALPHANUM, 5,y,t,s,0,dabits,0, 0, xdim-1, ydim-1));
|
return(gametext_(1,STARTALPHANUM, 5,y,t,s,0,dabits,0, 0, xdim-1, ydim-1));
|
||||||
return(gametext_(0,STARTALPHANUM, 5,y,t,s,0,dabits,0, 0, xdim-1, ydim-1));
|
return(gametext_(0,STARTALPHANUM, 5,y,t,s,0,dabits,0, 0, xdim-1, ydim-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int minitext_(int x,int y,char *t,char s,char p,short sb)
|
static int minitext_(int x,int y,const char *t,char s,char p,short sb)
|
||||||
{
|
{
|
||||||
short ac;
|
short ac;
|
||||||
char ch,cmode;
|
char ch,cmode;
|
||||||
|
@ -408,12 +408,12 @@ static int minitext_(int x,int y,char *t,char s,char p,short sb)
|
||||||
return (x);
|
return (x);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int minitextshade(int x,int y,char *t,char s,char p,short sb)
|
inline int minitextshade(int x,int y,const char *t,char s,char p,short sb)
|
||||||
{
|
{
|
||||||
return (minitext_(x,y,(char *)stripcolorcodes(t),s,p,sb));
|
return (minitext_(x,y,(char *)stripcolorcodes(t),s,p,sb));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int minitext(int x,int y,char *t,char p,short sb)
|
inline int minitext(int x,int y,const char *t,char p,short sb)
|
||||||
{
|
{
|
||||||
return (minitext_(x,y,(char *)stripcolorcodes(t),0,p,sb));
|
return (minitext_(x,y,(char *)stripcolorcodes(t),0,p,sb));
|
||||||
}
|
}
|
||||||
|
@ -455,7 +455,7 @@ static void allowtimetocorrecterrorswhenquitting(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void adduserquote(char *daquote)
|
void adduserquote(const char *daquote)
|
||||||
{
|
{
|
||||||
long i;
|
long i;
|
||||||
|
|
||||||
|
@ -2329,7 +2329,7 @@ static void tics(void)
|
||||||
if (ud.multimode > 4)
|
if (ud.multimode > 4)
|
||||||
k += 8;
|
k += 8;
|
||||||
}
|
}
|
||||||
Bsprintf(b,"%ld",j>0?j:0);
|
Bsprintf(b,"%ld",max(j,0));
|
||||||
minitext(320-strlen(b)*4,k+1,b,(timer*AVERAGEFRAMES)/(i-frameval[framecnt]) < 40?2:0,26);
|
minitext(320-strlen(b)*4,k+1,b,(timer*AVERAGEFRAMES)/(i-frameval[framecnt]) < 40?2:0,26);
|
||||||
|
|
||||||
if (numplayers > 1)
|
if (numplayers > 1)
|
||||||
|
@ -2396,8 +2396,8 @@ static void operatefta(void)
|
||||||
j = quotebot;
|
j = quotebot;
|
||||||
for (i=0;i<MAXUSERQUOTES;i++)
|
for (i=0;i<MAXUSERQUOTES;i++)
|
||||||
{
|
{
|
||||||
|
if (user_quote_time[i] <= 0) break;
|
||||||
k = user_quote_time[i];
|
k = user_quote_time[i];
|
||||||
if (k <= 0) break;
|
|
||||||
l = Bstrlen(user_quote[i]);
|
l = Bstrlen(user_quote[i]);
|
||||||
while (l > TEXTWRAPLEN)
|
while (l > TEXTWRAPLEN)
|
||||||
{
|
{
|
||||||
|
@ -2418,6 +2418,13 @@ static void operatefta(void)
|
||||||
|
|
||||||
if (ps[screenpeek].fta <= 1) return;
|
if (ps[screenpeek].fta <= 1) return;
|
||||||
|
|
||||||
|
if (fta_quotes[ps[screenpeek].ftq] == NULL)
|
||||||
|
{
|
||||||
|
OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,ps[screenpeek].ftq);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
k = 0;
|
||||||
if (GTFLAGS(GAMETYPE_FLAG_FRAGBAR) && ud.screen_size > 0 && ud.multimode > 1)
|
if (GTFLAGS(GAMETYPE_FLAG_FRAGBAR) && ud.screen_size > 0 && ud.multimode > 1)
|
||||||
{
|
{
|
||||||
j = 0;
|
j = 0;
|
||||||
|
@ -2429,11 +2436,10 @@ static void operatefta(void)
|
||||||
else if (j > 8 && j <= 12) k += 16;
|
else if (j > 8 && j <= 12) k += 16;
|
||||||
else if (j > 12) k += 24;
|
else if (j > 12) k += 24;
|
||||||
}
|
}
|
||||||
else k = 0;
|
|
||||||
|
|
||||||
if (ps[screenpeek].ftq == 115 || ps[screenpeek].ftq == 116 || ps[screenpeek].ftq == 117)
|
if (ps[screenpeek].ftq == 115 || ps[screenpeek].ftq == 116 || ps[screenpeek].ftq == 117)
|
||||||
{
|
{
|
||||||
k = quotebot-8;
|
k = quotebot-8-4;
|
||||||
/* for(i=0;i<MAXUSERQUOTES;i++)
|
/* for(i=0;i<MAXUSERQUOTES;i++)
|
||||||
{
|
{
|
||||||
if (user_quote_time[i] <= 0) break;
|
if (user_quote_time[i] <= 0) break;
|
||||||
|
@ -2444,14 +2450,8 @@ static void operatefta(void)
|
||||||
l -= TEXTWRAPLEN;
|
l -= TEXTWRAPLEN;
|
||||||
k -= 8;
|
k -= 8;
|
||||||
}
|
}
|
||||||
} */
|
}
|
||||||
k -= 4;
|
k -= 4; */
|
||||||
}
|
|
||||||
|
|
||||||
if (fta_quotes[ps[screenpeek].ftq] == NULL)
|
|
||||||
{
|
|
||||||
OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,ps[screenpeek].ftq);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
j = ps[screenpeek].fta;
|
j = ps[screenpeek].fta;
|
||||||
|
@ -2465,29 +2465,31 @@ static void operatefta(void)
|
||||||
|
|
||||||
void FTA(short q,struct player_struct *p)
|
void FTA(short q,struct player_struct *p)
|
||||||
{
|
{
|
||||||
if (fta_quotes[p->ftq] != NULL)
|
if (fta_quotes[p->ftq] == NULL)
|
||||||
{
|
{
|
||||||
if (ud.fta_on == 1)
|
OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,p->ftq);
|
||||||
{
|
return;
|
||||||
if (p->fta > 0 && q != 115 && q != 116)
|
}
|
||||||
if (p->ftq == 115 || p->ftq == 116) return;
|
|
||||||
|
if (ud.fta_on == 0)
|
||||||
p->fta = 100;
|
return;
|
||||||
|
|
||||||
// if(p->ftq != q || q == 26)
|
if (p->fta > 0 && q != 115 && q != 116)
|
||||||
// || q == 26 || q == 115 || q ==116 || q == 117 || q == 122)
|
if (p->ftq == 115 || p->ftq == 116) return;
|
||||||
{
|
|
||||||
if (p->ftq != q)
|
p->fta = 100;
|
||||||
if (p == &ps[screenpeek])
|
|
||||||
OSD_Printf("%s\n",stripcolorcodes(fta_quotes[q]));
|
// if(p->ftq != q || q == 26)
|
||||||
|
// || q == 26 || q == 115 || q ==116 || q == 117 || q == 122)
|
||||||
p->ftq = q;
|
{
|
||||||
pub = NUMPAGES;
|
if (p->ftq != q)
|
||||||
pus = NUMPAGES;
|
if (p == &ps[screenpeek])
|
||||||
}
|
OSD_Printf("%s\n",stripcolorcodes(fta_quotes[q]));
|
||||||
}
|
|
||||||
|
p->ftq = q;
|
||||||
|
pub = NUMPAGES;
|
||||||
|
pus = NUMPAGES;
|
||||||
}
|
}
|
||||||
else OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,p->ftq);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void fadepal(int r, int g, int b, int start, int end, int step)
|
void fadepal(int r, int g, int b, int start, int end, int step)
|
||||||
|
@ -2531,7 +2533,7 @@ static void showtwoscreens(void)
|
||||||
|
|
||||||
extern long qsetmode;
|
extern long qsetmode;
|
||||||
|
|
||||||
void gameexit(char *t)
|
void gameexit(const char *t)
|
||||||
{
|
{
|
||||||
if (*t != 0) ps[myconnectindex].palette = (char *) &palette[0];
|
if (*t != 0) ps[myconnectindex].palette = (char *) &palette[0];
|
||||||
|
|
||||||
|
@ -2569,7 +2571,7 @@ void gameexit(char *t)
|
||||||
//printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
|
//printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
|
||||||
if (!(t[0] == ' ' && t[1] == 0))
|
if (!(t[0] == ' ' && t[1] == 0))
|
||||||
{
|
{
|
||||||
wm_msgbox(HEAD2, t);
|
wm_msgbox(HEAD2, (char *)t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3160,12 +3162,10 @@ void displayrest(long smoothratio)
|
||||||
long a, i, j;
|
long a, i, j;
|
||||||
char fader=0,fadeg=0,fadeb=0,fadef=0,tintr=0,tintg=0,tintb=0,tintf=0,dotint=0;
|
char fader=0,fadeg=0,fadeb=0,fadef=0,tintr=0,tintg=0,tintb=0,tintf=0,dotint=0;
|
||||||
|
|
||||||
struct player_struct *pp;
|
struct player_struct *pp = &ps[screenpeek];
|
||||||
walltype *wal;
|
walltype *wal;
|
||||||
long cposx,cposy,cang;
|
long cposx,cposy,cang;
|
||||||
|
|
||||||
pp = &ps[screenpeek];
|
|
||||||
|
|
||||||
#if defined(USE_OPENGL) && defined(POLYMOST)
|
#if defined(USE_OPENGL) && defined(POLYMOST)
|
||||||
// this takes care of fullscreen tint for OpenGL
|
// this takes care of fullscreen tint for OpenGL
|
||||||
if (getrendermode() >= 3)
|
if (getrendermode() >= 3)
|
||||||
|
@ -3467,17 +3467,14 @@ void displayrest(long smoothratio)
|
||||||
|
|
||||||
static void view(struct player_struct *pp, long *vx, long *vy,long *vz,short *vsectnum, short ang, short horiz)
|
static void view(struct player_struct *pp, long *vx, long *vy,long *vz,short *vsectnum, short ang, short horiz)
|
||||||
{
|
{
|
||||||
spritetype *sp;
|
spritetype *sp = &sprite[pp->i];
|
||||||
long i, nx, ny, nz, hx, hy, hitx, hity, hitz;
|
long i, hx, hy, hitx, hity, hitz;
|
||||||
short bakcstat, hitsect, hitwall, hitsprite, daang;
|
long nx = (sintable[(ang+1536)&2047]>>4);
|
||||||
|
long ny = (sintable[(ang+1024)&2047]>>4);
|
||||||
|
long nz = (horiz-100)*128;
|
||||||
|
short hitsect, hitwall, hitsprite, daang;
|
||||||
|
short bakcstat = sp->cstat;
|
||||||
|
|
||||||
nx = (sintable[(ang+1536)&2047]>>4);
|
|
||||||
ny = (sintable[(ang+1024)&2047]>>4);
|
|
||||||
nz = (horiz-100)*128;
|
|
||||||
|
|
||||||
sp = &sprite[pp->i];
|
|
||||||
|
|
||||||
bakcstat = sp->cstat;
|
|
||||||
sp->cstat &= (short)~0x101;
|
sp->cstat &= (short)~0x101;
|
||||||
|
|
||||||
updatesectorz(*vx,*vy,*vz,vsectnum);
|
updatesectorz(*vx,*vy,*vz,vsectnum);
|
||||||
|
@ -4162,7 +4159,7 @@ int EGS(int whatsect,long s_x,long s_y,long s_z,int s_pn,int s_s,int s_xr,int s_
|
||||||
{
|
{
|
||||||
int i = insertsprite(whatsect,s_ss);
|
int i = insertsprite(whatsect,s_ss);
|
||||||
long p;
|
long p;
|
||||||
spritetype *s;
|
spritetype *s = &sprite[i];
|
||||||
|
|
||||||
if (i < 0)
|
if (i < 0)
|
||||||
{
|
{
|
||||||
|
@ -4175,8 +4172,6 @@ int EGS(int whatsect,long s_x,long s_y,long s_z,int s_pn,int s_s,int s_xr,int s_
|
||||||
hittype[i].bposy = s_y;
|
hittype[i].bposy = s_y;
|
||||||
hittype[i].bposz = s_z;
|
hittype[i].bposz = s_z;
|
||||||
|
|
||||||
s = &sprite[i];
|
|
||||||
|
|
||||||
s->x = s_x;
|
s->x = s_x;
|
||||||
s->y = s_y;
|
s->y = s_y;
|
||||||
s->z = s_z;
|
s->z = s_z;
|
||||||
|
@ -4250,7 +4245,7 @@ int EGS(int whatsect,long s_x,long s_y,long s_z,int s_pn,int s_s,int s_xr,int s_
|
||||||
return(i);
|
return(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
char wallswitchcheck(short i)
|
int wallswitchcheck(short i)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
//MULTISWITCH has 4 states so deal with it separately
|
//MULTISWITCH has 4 states so deal with it separately
|
||||||
|
@ -7128,7 +7123,7 @@ signed char cheatbuf[MAXCHEATLEN],cheatbuflen;
|
||||||
static void cheats(void)
|
static void cheats(void)
|
||||||
{
|
{
|
||||||
short ch, i, j, k=0, weapon;
|
short ch, i, j, k=0, weapon;
|
||||||
static char z=0;
|
static int z=0;
|
||||||
char consolecheat = 0; // JBF 20030914
|
char consolecheat = 0; // JBF 20030914
|
||||||
|
|
||||||
if (osdcmd_cheatsinfo_stat.cheatnum != -1)
|
if (osdcmd_cheatsinfo_stat.cheatnum != -1)
|
||||||
|
@ -8097,17 +8092,17 @@ FAKE_F3:
|
||||||
if (KB_KeyPressed(sc_F11))
|
if (KB_KeyPressed(sc_F11))
|
||||||
{
|
{
|
||||||
KB_ClearKeyDown(sc_F11);
|
KB_ClearKeyDown(sc_F11);
|
||||||
if (SHIFTS_IS_PRESSED) ud.brightness-=4;
|
if (SHIFTS_IS_PRESSED) ud.brightness-=8;
|
||||||
else ud.brightness+=4;
|
else ud.brightness+=8;
|
||||||
|
|
||||||
if (ud.brightness > (7<<2))
|
if (ud.brightness > (7<<3))
|
||||||
ud.brightness = 0;
|
ud.brightness = 0;
|
||||||
else if (ud.brightness < 0)
|
else if (ud.brightness < 0)
|
||||||
ud.brightness = (7<<2);
|
ud.brightness = (7<<3);
|
||||||
|
|
||||||
setbrightness(ud.brightness>>2,&ps[myconnectindex].palette[0],0);
|
setbrightness(ud.brightness>>2,&ps[myconnectindex].palette[0],0);
|
||||||
if (ud.brightness < 20) FTA(29 + (ud.brightness>>2) ,&ps[myconnectindex]);
|
if (ud.brightness < 40) FTA(29 + (ud.brightness>>3) ,&ps[myconnectindex]);
|
||||||
else if (ud.brightness < 40) FTA(96 + (ud.brightness>>2) - 5,&ps[myconnectindex]);
|
else if (ud.brightness < 80) FTA(96 + (ud.brightness>>3) - 5,&ps[myconnectindex]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9349,10 +9344,10 @@ static void Startup(long argc, char **argv)
|
||||||
networkmode = 1;
|
networkmode = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendscore(char *s)
|
void sendscore(const char *s)
|
||||||
{
|
{
|
||||||
if (numplayers > 1)
|
if (numplayers > 1)
|
||||||
genericmultifunction(-1,s,strlen(s)+1,5);
|
genericmultifunction(-1,(char *)s,strlen(s)+1,5);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendwchoice(void)
|
void sendwchoice(void)
|
||||||
|
@ -10177,7 +10172,7 @@ MAIN_LOOP_RESTART:
|
||||||
|
|
||||||
char demo_version;
|
char demo_version;
|
||||||
|
|
||||||
static char opendemoread(char which_demo) // 0 = mine
|
static int opendemoread(char which_demo) // 0 = mine
|
||||||
{
|
{
|
||||||
char d[13];
|
char d[13];
|
||||||
char ver;
|
char ver;
|
||||||
|
@ -10600,7 +10595,7 @@ RECHECK:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char moveloop()
|
static int moveloop()
|
||||||
{
|
{
|
||||||
long i;
|
long i;
|
||||||
|
|
||||||
|
@ -11099,7 +11094,7 @@ ENDFAKEPROCESSINPUT:
|
||||||
sprite[p->i].cstat = backcstat;
|
sprite[p->i].cstat = backcstat;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char domovethings(void)
|
static int domovethings(void)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
char ch;
|
char ch;
|
||||||
|
|
|
@ -98,7 +98,7 @@ enum labeltypes
|
||||||
LABEL_MOVE = 32,
|
LABEL_MOVE = 32,
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *labeltypenames[] =
|
static const char *labeltypenames[] =
|
||||||
{
|
{
|
||||||
"define",
|
"define",
|
||||||
"state",
|
"state",
|
||||||
|
@ -108,7 +108,7 @@ static char *labeltypenames[] =
|
||||||
"move"
|
"move"
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *translatelabeltype(long type)
|
static const char *translatelabeltype(long type)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char x[64];
|
char x[64];
|
||||||
|
@ -125,7 +125,7 @@ static char *translatelabeltype(long type)
|
||||||
|
|
||||||
#define NUMKEYWORDS (signed int)(sizeof(keyw)/sizeof(keyw[0]))
|
#define NUMKEYWORDS (signed int)(sizeof(keyw)/sizeof(keyw[0]))
|
||||||
|
|
||||||
char *keyw[] = {
|
static const char *keyw[] = {
|
||||||
"definelevelname", // 0 defines level name
|
"definelevelname", // 0 defines level name
|
||||||
"actor", // 1 defines an actor
|
"actor", // 1 defines an actor
|
||||||
"addammo", // 2 adds ammo to a weapon
|
"addammo", // 2 adds ammo to a weapon
|
||||||
|
@ -838,6 +838,7 @@ LABELS inputlabels[]= {
|
||||||
static void skipcomments(void)
|
static void skipcomments(void)
|
||||||
{
|
{
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
while ((c = *textptr))
|
while ((c = *textptr))
|
||||||
{
|
{
|
||||||
if (c == ' ' || c == '\t' || c == '\r')
|
if (c == ' ' || c == '\t' || c == '\r')
|
||||||
|
@ -1041,7 +1042,7 @@ char CheckEventSync(int iEventID)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddLog(char *psz)
|
void AddLog(const char *psz)
|
||||||
{
|
{
|
||||||
Bstrcpy(tempbuf,psz);
|
Bstrcpy(tempbuf,psz);
|
||||||
if (tempbuf[Bstrlen(psz)] != '\n')
|
if (tempbuf[Bstrlen(psz)] != '\n')
|
||||||
|
@ -1050,7 +1051,7 @@ void AddLog(char *psz)
|
||||||
else initprintf(tempbuf);
|
else initprintf(tempbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static long GetDefID(char *szGameLabel)
|
static long GetDefID(const char *szGameLabel)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i=0;i<iGameVarCount;i++)
|
for (i=0;i<iGameVarCount;i++)
|
||||||
|
@ -1066,7 +1067,7 @@ static long GetDefID(char *szGameLabel)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char ispecial(char c)
|
static int ispecial(char c)
|
||||||
{
|
{
|
||||||
if (c == 0x0a)
|
if (c == 0x0a)
|
||||||
{
|
{
|
||||||
|
@ -1085,7 +1086,7 @@ static inline int isaltok(char c)
|
||||||
return (isalnum(c) || c == '{' || c == '}' || c == '/' || c == '*' || c == '-' || c == '_' || c == '.');
|
return (isalnum(c) || c == '{' || c == '}' || c == '/' || c == '*' || c == '-' || c == '_' || c == '.');
|
||||||
}
|
}
|
||||||
|
|
||||||
static long getlabelid(LABELS *pLabel, char *psz)
|
static long getlabelid(LABELS *pLabel, const char *psz)
|
||||||
{
|
{
|
||||||
// find the label psz in the table pLabel.
|
// find the label psz in the table pLabel.
|
||||||
// returns the ID for the label, or -1
|
// returns the ID for the label, or -1
|
||||||
|
@ -1104,7 +1105,7 @@ static long getlabelid(LABELS *pLabel, char *psz)
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
static long getlabeloffset(LABELS *pLabel, char *psz)
|
static long getlabeloffset(LABELS *pLabel, const char *psz)
|
||||||
{
|
{
|
||||||
// find the label psz in the table pLabel.
|
// find the label psz in the table pLabel.
|
||||||
// returns the offset in the array for the label, or -1
|
// returns the offset in the array for the label, or -1
|
||||||
|
@ -1293,13 +1294,10 @@ static void transvartype(int type)
|
||||||
textptr++;
|
textptr++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
error++;
|
||||||
{
|
ReportError(ERROR_NOTAGAMEVAR);
|
||||||
error++;
|
textptr++;
|
||||||
ReportError(ERROR_NOTAGAMEVAR);
|
return;
|
||||||
textptr++;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (type == GAMEVAR_FLAG_READONLY && aGameVars[i].dwFlags & GAMEVAR_FLAG_READONLY)
|
if (type == GAMEVAR_FLAG_READONLY && aGameVars[i].dwFlags & GAMEVAR_FLAG_READONLY)
|
||||||
{
|
{
|
||||||
|
@ -1329,14 +1327,14 @@ static inline void transvar(void)
|
||||||
transvartype(0);
|
transvartype(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void transmultvarstype(int type, char num)
|
static inline void transmultvarstype(int type, int num)
|
||||||
{
|
{
|
||||||
char i;
|
int i;
|
||||||
for (i=0;i<num;i++)
|
for (i=0;i<num;i++)
|
||||||
transvartype(type);
|
transvartype(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void transmultvars(char num)
|
static inline void transmultvars(int num)
|
||||||
{
|
{
|
||||||
transmultvarstype(0,num);
|
transmultvarstype(0,num);
|
||||||
}
|
}
|
||||||
|
@ -1382,7 +1380,7 @@ static long transnum(long type)
|
||||||
{
|
{
|
||||||
if (!(error || warning) && condebug > 1)
|
if (!(error || warning) && condebug > 1)
|
||||||
{
|
{
|
||||||
gl = translatelabeltype(labeltype[i]);
|
gl = (char *)translatelabeltype(labeltype[i]);
|
||||||
initprintf("%s:%ld: debug: accepted %s label `%s'.\n",compilefile,line_number,gl,label+(i<<6));
|
initprintf("%s:%ld: debug: accepted %s label `%s'.\n",compilefile,line_number,gl,label+(i<<6));
|
||||||
Bfree(gl);
|
Bfree(gl);
|
||||||
}
|
}
|
||||||
|
@ -1392,8 +1390,8 @@ static long transnum(long type)
|
||||||
}
|
}
|
||||||
*(scriptptr++) = 0;
|
*(scriptptr++) = 0;
|
||||||
textptr += l;
|
textptr += l;
|
||||||
el = translatelabeltype(type);
|
el = (char *)translatelabeltype(type);
|
||||||
gl = translatelabeltype(labeltype[i]);
|
gl = (char *)translatelabeltype(labeltype[i]);
|
||||||
ReportError(-1);
|
ReportError(-1);
|
||||||
initprintf("%s:%ld: warning: expected a %s, found a %s.\n",compilefile,line_number,el,gl);
|
initprintf("%s:%ld: warning: expected a %s, found a %s.\n",compilefile,line_number,el,gl);
|
||||||
Bfree(el);
|
Bfree(el);
|
||||||
|
@ -1425,22 +1423,17 @@ static long transnum(long type)
|
||||||
return 0; // literal value
|
return 0; // literal value
|
||||||
}
|
}
|
||||||
|
|
||||||
static char parsecommand(void);
|
static int parsecommand(void);
|
||||||
|
|
||||||
static long CountCaseStatements()
|
static long CountCaseStatements()
|
||||||
{
|
{
|
||||||
long lCount;
|
long lCount;
|
||||||
char *temptextptr;
|
char *temptextptr = textptr;
|
||||||
long *savescript;
|
long *savescript = scriptptr;
|
||||||
long *savecase;
|
long *savecase = casescriptptr;
|
||||||
short temp_line_number;
|
int temp_line_number = line_number;
|
||||||
|
|
||||||
temp_line_number=line_number;
|
|
||||||
|
|
||||||
casecount=0;
|
casecount=0;
|
||||||
temptextptr=textptr;
|
|
||||||
savescript=scriptptr;
|
|
||||||
savecase=casescriptptr;
|
|
||||||
casescriptptr=NULL;
|
casescriptptr=NULL;
|
||||||
//Bsprintf(g_szBuf,"CSS: %.12s",textptr);
|
//Bsprintf(g_szBuf,"CSS: %.12s",textptr);
|
||||||
//AddLog(g_szBuf);
|
//AddLog(g_szBuf);
|
||||||
|
@ -1464,12 +1457,10 @@ static long CountCaseStatements()
|
||||||
return lCount;
|
return lCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char parsecommand(void)
|
static int parsecommand(void)
|
||||||
{
|
{
|
||||||
long i, j=0, k=0, *tempscrptr;
|
long i, j=0, k=0, *tempscrptr, done, tw;
|
||||||
char done, *temptextptr;
|
char *temptextptr;
|
||||||
|
|
||||||
long tw;
|
|
||||||
|
|
||||||
if (((unsigned)(scriptptr-script) > MAXSCRIPTSIZE) && error == 0)
|
if (((unsigned)(scriptptr-script) > MAXSCRIPTSIZE) && error == 0)
|
||||||
{
|
{
|
||||||
|
@ -1538,7 +1529,7 @@ static char parsecommand(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *gl;
|
char *gl;
|
||||||
gl = translatelabeltype(labeltype[j]);
|
gl = (char *)translatelabeltype(labeltype[j]);
|
||||||
ReportError(-1);
|
ReportError(-1);
|
||||||
initprintf("%s:%ld: warning: expected a state, found a %s.\n",compilefile,line_number,gl);
|
initprintf("%s:%ld: warning: expected a state, found a %s.\n",compilefile,line_number,gl);
|
||||||
Bfree(gl);
|
Bfree(gl);
|
||||||
|
@ -1936,8 +1927,8 @@ static char parsecommand(void)
|
||||||
tempbuf[j] = '\0';
|
tempbuf[j] = '\0';
|
||||||
|
|
||||||
{
|
{
|
||||||
short temp_line_number;
|
int temp_line_number;
|
||||||
char temp_ifelse_check;
|
int temp_ifelse_check;
|
||||||
char *origtptr, *mptr;
|
char *origtptr, *mptr;
|
||||||
char parentcompilefile[255];
|
char parentcompilefile[255];
|
||||||
int fp;
|
int fp;
|
||||||
|
@ -3186,7 +3177,7 @@ static char parsecommand(void)
|
||||||
|
|
||||||
case CON_DEFINEPROJECTILE:
|
case CON_DEFINEPROJECTILE:
|
||||||
{
|
{
|
||||||
short y;
|
int y;
|
||||||
signed long z;
|
signed long z;
|
||||||
|
|
||||||
if (parsing_state || parsing_actor)
|
if (parsing_state || parsing_actor)
|
||||||
|
@ -4455,7 +4446,7 @@ static void passone(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#define NUM_DEFAULT_CONS 4
|
#define NUM_DEFAULT_CONS 4
|
||||||
static char *defaultcons[NUM_DEFAULT_CONS] =
|
static const char *defaultcons[NUM_DEFAULT_CONS] =
|
||||||
{
|
{
|
||||||
"EDUKE.CON",
|
"EDUKE.CON",
|
||||||
"GAME.CON",
|
"GAME.CON",
|
||||||
|
@ -4470,10 +4461,10 @@ void copydefaultcons(void)
|
||||||
|
|
||||||
for (i=0;i<NUM_DEFAULT_CONS;i++)
|
for (i=0;i<NUM_DEFAULT_CONS;i++)
|
||||||
{
|
{
|
||||||
fpi = kopen4load(defaultcons[i] , 1);
|
fpi = kopen4load((char *)defaultcons[i] , 1);
|
||||||
if (fpi < 0) continue;
|
if (fpi < 0) continue;
|
||||||
|
|
||||||
fpo = fopenfrompath(defaultcons[i],"wb");
|
fpo = fopenfrompath((char *)defaultcons[i],"wb");
|
||||||
|
|
||||||
if (fpo == NULL)
|
if (fpo == NULL)
|
||||||
{
|
{
|
||||||
|
@ -4493,7 +4484,7 @@ void copydefaultcons(void)
|
||||||
|
|
||||||
/* Anything added with AddDefinition cannot be overwritten in the CONs */
|
/* Anything added with AddDefinition cannot be overwritten in the CONs */
|
||||||
|
|
||||||
static void AddDefinition(char *lLabel,long lValue,long lType)
|
static void AddDefinition(const char *lLabel,long lValue,long lType)
|
||||||
{
|
{
|
||||||
Bstrcpy(label+(labelcnt<<6),lLabel);
|
Bstrcpy(label+(labelcnt<<6),lLabel);
|
||||||
labeltype[labelcnt] = lType;
|
labeltype[labelcnt] = lType;
|
||||||
|
@ -4647,7 +4638,7 @@ static void InitProjectiles(void)
|
||||||
Bmemcpy(&defaultprojectile, &projectile, sizeof(projectile));
|
Bmemcpy(&defaultprojectile, &projectile, sizeof(projectile));
|
||||||
}
|
}
|
||||||
|
|
||||||
void loadefs(char *filenam)
|
void loadefs(const char *filenam)
|
||||||
{
|
{
|
||||||
char *mptr;
|
char *mptr;
|
||||||
int i;
|
int i;
|
||||||
|
@ -4675,7 +4666,7 @@ void loadefs(char *filenam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
fp = kopen4load(filenam,loadfromgrouponly);
|
fp = kopen4load((char *)filenam,loadfromgrouponly);
|
||||||
if (fp == -1) // JBF: was 0
|
if (fp == -1) // JBF: was 0
|
||||||
{
|
{
|
||||||
if (loadfromgrouponly == 1)
|
if (loadfromgrouponly == 1)
|
||||||
|
|
|
@ -50,7 +50,6 @@ extern long g_kb;
|
||||||
extern long g_looking_angSR1;
|
extern long g_looking_angSR1;
|
||||||
extern int display_bonus_screen;
|
extern int display_bonus_screen;
|
||||||
extern long lastvisinc;
|
extern long lastvisinc;
|
||||||
extern void adduserquote(char *daquote);
|
|
||||||
extern char cheatquotes[][MAXCHEATLEN];
|
extern char cheatquotes[][MAXCHEATLEN];
|
||||||
extern char compilefile[BMAX_PATH];
|
extern char compilefile[BMAX_PATH];
|
||||||
extern int total_lines,line_number;
|
extern int total_lines,line_number;
|
||||||
|
|
|
@ -2450,7 +2450,7 @@ static void DoActor(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2)
|
||||||
|
|
||||||
if (iActor < 0 || iActor >= MAXSPRITES)
|
if (iActor < 0 || iActor >= MAXSPRITES)
|
||||||
{
|
{
|
||||||
OSD_Printf("DoActor(): invalid sprite (%d)\n",iActor);
|
OSD_Printf("DoActor(): invalid target sprite (%d) %d %d\n",iActor,g_i,g_sp->picnum);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3014,6 +3014,12 @@ static int parse(void);
|
||||||
|
|
||||||
void OnEvent(int iEventID, int iActor, int iPlayer, long lDist)
|
void OnEvent(int iEventID, int iActor, int iPlayer, long lDist)
|
||||||
{
|
{
|
||||||
|
if (iEventID >= MAXGAMEEVENTS)
|
||||||
|
{
|
||||||
|
AddLog("Invalid Event ID");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (apScriptGameEvent[iEventID] == 0)
|
if (apScriptGameEvent[iEventID] == 0)
|
||||||
{
|
{
|
||||||
//Bsprintf(g_szBuf,"No event found for %d",iEventID);
|
//Bsprintf(g_szBuf,"No event found for %d",iEventID);
|
||||||
|
@ -3021,12 +3027,6 @@ void OnEvent(int iEventID, int iActor, int iPlayer, long lDist)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iEventID >= MAXGAMEEVENTS)
|
|
||||||
{
|
|
||||||
AddLog("Invalid Event ID");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
int og_i=g_i, og_p=g_p, okillit_flag=killit_flag;
|
int og_i=g_i, og_p=g_p, okillit_flag=killit_flag;
|
||||||
long og_x=g_x, *og_t=g_t, *oinsptr=insptr;
|
long og_x=g_x, *og_t=g_t, *oinsptr=insptr;
|
||||||
|
@ -3070,21 +3070,20 @@ void OnEvent(int iEventID, int iActor, int iPlayer, long lDist)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static long ifsquished(int i, int p)
|
static int ifsquished(int i, int p)
|
||||||
{
|
{
|
||||||
sectortype *sc = §or[SECT];
|
sectortype *sc = §or[SECT];
|
||||||
int squishme;
|
int squishme;
|
||||||
long floorceildist = sc->floorz - sc->ceilingz;
|
|
||||||
|
|
||||||
if (PN == APLAYER && ud.clipping)
|
if (PN == APLAYER && ud.clipping)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (sc->lotag != 23)
|
if (sc->lotag != 23)
|
||||||
{
|
{
|
||||||
squishme = floorceildist < (12<<8); // && (sc->lotag&32768) == 0;
|
squishme = (sc->floorz - sc->ceilingz < (12<<8)); // && (sc->lotag&32768) == 0;
|
||||||
|
|
||||||
if (sprite[i].pal == 1)
|
if (sprite[i].pal == 1)
|
||||||
squishme = floorceildist < (32<<8) && (sc->lotag&32768) == 0;
|
squishme = (sc->floorz - sc->ceilingz < (32<<8) && (sc->lotag&32768) == 0);
|
||||||
}
|
}
|
||||||
else squishme = 0;
|
else squishme = 0;
|
||||||
|
|
||||||
|
@ -3212,13 +3211,11 @@ int furthestcanseepoint(int iActor,spritetype *ts,long *dax,long *day)
|
||||||
|
|
||||||
void getglobalz(int iActor)
|
void getglobalz(int iActor)
|
||||||
{
|
{
|
||||||
long hz,lz,zr;
|
|
||||||
|
|
||||||
spritetype *s = &sprite[iActor];
|
spritetype *s = &sprite[iActor];
|
||||||
|
|
||||||
if (s->statnum == 10 || s->statnum == 6 || s->statnum == 2 || s->statnum == 1 || s->statnum == 4)
|
if (s->statnum == 10 || s->statnum == 6 || s->statnum == 2 || s->statnum == 1 || s->statnum == 4)
|
||||||
{
|
{
|
||||||
zr = 127L;
|
long hz,lz,zr = 127L;
|
||||||
|
|
||||||
if (s->statnum == 4)
|
if (s->statnum == 4)
|
||||||
zr = 4L;
|
zr = 4L;
|
||||||
|
@ -3261,7 +3258,7 @@ void getglobalz(int iActor)
|
||||||
void makeitfall(int iActor)
|
void makeitfall(int iActor)
|
||||||
{
|
{
|
||||||
spritetype *s = &sprite[iActor];
|
spritetype *s = &sprite[iActor];
|
||||||
long hz,lz,c;
|
long hz,lz,c = gc;
|
||||||
|
|
||||||
if (floorspace(s->sectnum))
|
if (floorspace(s->sectnum))
|
||||||
c = 0;
|
c = 0;
|
||||||
|
@ -3269,7 +3266,6 @@ void makeitfall(int iActor)
|
||||||
{
|
{
|
||||||
if (ceilingspace(s->sectnum) || sector[s->sectnum].lotag == 2)
|
if (ceilingspace(s->sectnum) || sector[s->sectnum].lotag == 2)
|
||||||
c = gc/6;
|
c = gc/6;
|
||||||
else c = gc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((s->statnum == 1 || s->statnum == 10 || s->statnum == 2 || s->statnum == 6))
|
if ((s->statnum == 1 || s->statnum == 10 || s->statnum == 2 || s->statnum == 6))
|
||||||
|
@ -3314,23 +3310,15 @@ int getincangle(int a,int na)
|
||||||
|
|
||||||
static void alterang(int a)
|
static void alterang(int a)
|
||||||
{
|
{
|
||||||
short aang, angdif, goalang;
|
int aang = g_sp->ang, angdif, goalang;
|
||||||
long ticselapsed, *moveptr;
|
long ticselapsed = (g_t[0])&31, *moveptr = (long *)g_t[1];
|
||||||
int j;
|
int j = ps[g_p].holoduke_on;
|
||||||
|
|
||||||
moveptr = (long *)g_t[1];
|
|
||||||
|
|
||||||
ticselapsed = (g_t[0])&31;
|
|
||||||
|
|
||||||
aang = g_sp->ang;
|
|
||||||
|
|
||||||
g_sp->xvel += (*moveptr-g_sp->xvel)/5;
|
g_sp->xvel += (*moveptr-g_sp->xvel)/5;
|
||||||
if (g_sp->zvel < 648) g_sp->zvel += ((*(moveptr+1)<<4)-g_sp->zvel)/5;
|
if (g_sp->zvel < 648) g_sp->zvel += ((*(moveptr+1)<<4)-g_sp->zvel)/5;
|
||||||
|
|
||||||
if (a&seekplayer)
|
if (a&seekplayer)
|
||||||
{
|
{
|
||||||
j = ps[g_p].holoduke_on;
|
|
||||||
|
|
||||||
// NOTE: looks like 'owner' is set to target sprite ID...
|
// NOTE: looks like 'owner' is set to target sprite ID...
|
||||||
|
|
||||||
if (j >= 0 && cansee(sprite[j].x,sprite[j].y,sprite[j].z,sprite[j].sectnum,g_sp->x,g_sp->y,g_sp->z,g_sp->sectnum))
|
if (j >= 0 && cansee(sprite[j].x,sprite[j].y,sprite[j].z,sprite[j].sectnum,g_sp->x,g_sp->y,g_sp->z,g_sp->sectnum))
|
||||||
|
@ -3386,11 +3374,9 @@ static void alterang(int a)
|
||||||
static void move(void)
|
static void move(void)
|
||||||
{
|
{
|
||||||
long l, *moveptr;
|
long l, *moveptr;
|
||||||
short a, goalang, angdif;
|
int a = g_sp->hitag, goalang, angdif;
|
||||||
long daxvel;
|
long daxvel;
|
||||||
|
|
||||||
a = g_sp->hitag;
|
|
||||||
|
|
||||||
if (a == -1) a = 0;
|
if (a == -1) a = 0;
|
||||||
|
|
||||||
g_t[0]++;
|
g_t[0]++;
|
||||||
|
@ -3617,7 +3603,7 @@ static int parse(void)
|
||||||
tw = *insptr;
|
tw = *insptr;
|
||||||
|
|
||||||
instruction = tw;
|
instruction = tw;
|
||||||
|
// initprintf("instruction %ld\n",tw);
|
||||||
switch (tw)
|
switch (tw)
|
||||||
{
|
{
|
||||||
case CON_REDEFINEQUOTE:
|
case CON_REDEFINEQUOTE:
|
||||||
|
@ -4971,11 +4957,9 @@ static int parse(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CON_DEBRIS:
|
case CON_DEBRIS:
|
||||||
|
insptr++;
|
||||||
{
|
{
|
||||||
short dnum;
|
int dnum = *insptr++;
|
||||||
|
|
||||||
insptr++;
|
|
||||||
dnum = *insptr++;
|
|
||||||
|
|
||||||
if (g_sp->sectnum >= 0 && g_sp->sectnum < MAXSECTORS)
|
if (g_sp->sectnum >= 0 && g_sp->sectnum < MAXSECTORS)
|
||||||
for (j=(*insptr)-1;j>=0;j--)
|
for (j=(*insptr)-1;j>=0;j--)
|
||||||
|
@ -5674,7 +5658,6 @@ static int parse(void)
|
||||||
// that is of <type> into <getvar>
|
// that is of <type> into <getvar>
|
||||||
// -1 for none found
|
// -1 for none found
|
||||||
// <type> <maxdistvarid> <varid>
|
// <type> <maxdistvarid> <varid>
|
||||||
short j=0;
|
|
||||||
long var1 = *insptr++, d;
|
long var1 = *insptr++, d;
|
||||||
|
|
||||||
if (tw == CON_FINDPLAYER) j=findplayer(&sprite[g_i],&d);
|
if (tw == CON_FINDPLAYER) j=findplayer(&sprite[g_i],&d);
|
||||||
|
@ -5844,8 +5827,10 @@ static int parse(void)
|
||||||
j = g_p;
|
j = g_p;
|
||||||
|
|
||||||
if (*insptr != g_iThisActorID)
|
if (*insptr != g_iThisActorID)
|
||||||
j=GetGameVarID(*insptr++, g_i, g_p);
|
j=GetGameVarID(*insptr, g_i, g_p);
|
||||||
|
|
||||||
|
insptr++;
|
||||||
|
|
||||||
if (j < MAXPLAYERS)
|
if (j < MAXPLAYERS)
|
||||||
{
|
{
|
||||||
if (tw == CON_CHECKAVAILWEAPON)
|
if (tw == CON_CHECKAVAILWEAPON)
|
||||||
|
@ -6302,24 +6287,25 @@ static int parse(void)
|
||||||
|
|
||||||
case CON_QUOTE:
|
case CON_QUOTE:
|
||||||
insptr++;
|
insptr++;
|
||||||
if (fta_quotes[*insptr] != NULL)
|
|
||||||
FTA(*insptr++,&ps[g_p]);
|
if (fta_quotes[*insptr] == NULL)
|
||||||
else
|
|
||||||
{
|
{
|
||||||
OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,*insptr);
|
OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,*insptr);
|
||||||
insptr++;
|
insptr++;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
FTA(*insptr++,&ps[g_p]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CON_USERQUOTE:
|
case CON_USERQUOTE:
|
||||||
insptr++;
|
insptr++;
|
||||||
if (fta_quotes[*insptr] != NULL)
|
if (fta_quotes[*insptr] == NULL)
|
||||||
adduserquote(fta_quotes[*insptr++]);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,*insptr);
|
OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,*insptr);
|
||||||
insptr++;
|
insptr++;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
adduserquote(fta_quotes[*insptr++]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CON_IFINOUTERSPACE:
|
case CON_IFINOUTERSPACE:
|
||||||
|
|
|
@ -271,10 +271,9 @@ void ResetGameVars(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char AddGameVar(char *pszLabel, long lValue, unsigned long dwFlags)
|
int AddGameVar(const char *pszLabel, long lValue, unsigned long dwFlags)
|
||||||
{
|
{
|
||||||
int i;
|
int i, j;
|
||||||
int j;
|
|
||||||
|
|
||||||
//Bsprintf(g_szBuf,"AddGameVar(%s, %d, %X)",pszLabel, lValue, dwFlags);
|
//Bsprintf(g_szBuf,"AddGameVar(%s, %d, %X)",pszLabel, lValue, dwFlags);
|
||||||
//AddLog(g_szBuf);
|
//AddLog(g_szBuf);
|
||||||
|
@ -394,7 +393,7 @@ void ResetActorGameVars(int iActor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int GetGameID(char *szGameLabel)
|
static int GetGameID(const char *szGameLabel)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -463,7 +462,7 @@ long GetGameVarID(int id, int iActor, int iPlayer)
|
||||||
|
|
||||||
if (aGameVars[id].dwFlags & GAMEVAR_FLAG_PLONG)
|
if (aGameVars[id].dwFlags & GAMEVAR_FLAG_PLONG)
|
||||||
{
|
{
|
||||||
if (inv) return -(*((long*)aGameVars[id].lValue));
|
if (inv) return (-(*((long*)aGameVars[id].lValue)));
|
||||||
return(*((long*)aGameVars[id].lValue));
|
return(*((long*)aGameVars[id].lValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -504,7 +503,7 @@ void SetGameVarID(int id, long lValue, int iActor, int iPlayer)
|
||||||
aGameVars[id].lValue=lValue;
|
aGameVars[id].lValue=lValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
long GetGameVar(char *szGameLabel, long lDefault, int iActor, int iPlayer)
|
long GetGameVar(const char *szGameLabel, long lDefault, int iActor, int iPlayer)
|
||||||
{
|
{
|
||||||
int i=0;
|
int i=0;
|
||||||
for (;i<iGameVarCount;i++)
|
for (;i<iGameVarCount;i++)
|
||||||
|
@ -520,7 +519,7 @@ long GetGameVar(char *szGameLabel, long lDefault, int iActor, int iPlayer)
|
||||||
return lDefault;
|
return lDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
static long *GetGameValuePtr(char *szGameLabel)
|
static long *GetGameValuePtr(const char *szGameLabel)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i=0;i<iGameVarCount;i++)
|
for (i=0;i<iGameVarCount;i++)
|
||||||
|
|
|
@ -309,9 +309,9 @@ static int menutext_(int x,int y,short s,short p,char *t)
|
||||||
return (x);
|
return (x);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int menutext(int x,int y,short s,short p,char *t)
|
inline int menutext(int x,int y,short s,short p,const char *t)
|
||||||
{
|
{
|
||||||
return(menutext_(x,y,s,p,stripcolorcodes(t)));
|
return(menutext_(x,y,s,p,(char *)stripcolorcodes(t)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bar_(int type, int x,int y,short *p,short dainc,char damodify,short s, short pa)
|
static void bar_(int type, int x,int y,short *p,short dainc,char damodify,short s, short pa)
|
||||||
|
@ -501,7 +501,7 @@ static void clearfilenames(void)
|
||||||
numfiles = numdirs = 0;
|
numfiles = numdirs = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int getfilenames(char *path, char kind[])
|
int getfilenames(const char *path, char kind[])
|
||||||
{
|
{
|
||||||
CACHE1D_FIND_REC *r;
|
CACHE1D_FIND_REC *r;
|
||||||
|
|
||||||
|
|
|
@ -766,7 +766,7 @@ unsigned short RESERVEDSLOT12 = 6143;
|
||||||
|
|
||||||
unsigned short dynamictostatic[MAXTILES];
|
unsigned short dynamictostatic[MAXTILES];
|
||||||
|
|
||||||
void processnames(char *szLabel, long lValue)
|
void processnames(const char *szLabel, long lValue)
|
||||||
{
|
{
|
||||||
switch (szLabel[0])
|
switch (szLabel[0])
|
||||||
{
|
{
|
||||||
|
|
|
@ -1521,8 +1521,6 @@ void resetmys(void)
|
||||||
myreturntocenter = ps[myconnectindex].return_to_center;
|
myreturntocenter = ps[myconnectindex].return_to_center;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void adduserquote(char *daquote);
|
|
||||||
|
|
||||||
extern int gotvote[MAXPLAYERS], votes[MAXPLAYERS], voting, vote_map, vote_episode;
|
extern int gotvote[MAXPLAYERS], votes[MAXPLAYERS], voting, vote_map, vote_episode;
|
||||||
|
|
||||||
static void getlevelfromfilename(const char *fn, char *volume, char *level)
|
static void getlevelfromfilename(const char *fn, char *volume, char *level)
|
||||||
|
|
|
@ -58,7 +58,7 @@ char lumplockbyte[11];
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int32 RTS_AddFile(char *filename)
|
int32 RTS_AddFile(const char *filename)
|
||||||
{
|
{
|
||||||
wadinfo_t header;
|
wadinfo_t header;
|
||||||
lumpinfo_t *lump_p;
|
lumpinfo_t *lump_p;
|
||||||
|
@ -140,7 +140,7 @@ int32 RTS_AddFile(char *filename)
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void RTS_Init(char *filename)
|
void RTS_Init(const char *filename)
|
||||||
{
|
{
|
||||||
int32 length;
|
int32 length;
|
||||||
//
|
//
|
||||||
|
@ -203,7 +203,7 @@ int32 RTS_SoundLength(int32 lump)
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char * RTS_GetSoundName(int32 i)
|
const char * RTS_GetSoundName(int32 i)
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
if (i>=numlumps)
|
if (i>=numlumps)
|
||||||
|
|
|
@ -44,7 +44,7 @@ Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void RTS_Init (char *filename);
|
void RTS_Init (const char *filename);
|
||||||
/*
|
/*
|
||||||
====================
|
====================
|
||||||
=
|
=
|
||||||
|
@ -73,7 +73,7 @@ int32 RTS_SoundLength (int32 lump);
|
||||||
====================
|
====================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char * RTS_GetSoundName (int32 i);
|
const char * RTS_GetSoundName (int32 i);
|
||||||
/*
|
/*
|
||||||
====================
|
====================
|
||||||
=
|
=
|
||||||
|
|
|
@ -491,15 +491,10 @@ void animatewalls(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char activatewarpelevators(short s,short d) //Parm = sectoreffectornum
|
int activatewarpelevators(short s,short d) //Parm = sectoreffectornum
|
||||||
{
|
{
|
||||||
short i, sn;
|
int i = headspritestat[3], sn = sprite[s].sectnum;
|
||||||
|
|
||||||
sn = sprite[s].sectnum;
|
|
||||||
|
|
||||||
// See if the sector exists
|
|
||||||
|
|
||||||
i = headspritestat[3];
|
|
||||||
while (i >= 0)
|
while (i >= 0)
|
||||||
{
|
{
|
||||||
if (SLT == 17)
|
if (SLT == 17)
|
||||||
|
@ -540,12 +535,8 @@ char activatewarpelevators(short s,short d) //Parm = sectoreffectornum
|
||||||
void operatesectors(short sn,short ii)
|
void operatesectors(short sn,short ii)
|
||||||
{
|
{
|
||||||
long j=0, l, q, startwall, endwall;
|
long j=0, l, q, startwall, endwall;
|
||||||
short i;
|
int i;
|
||||||
char sect_error;
|
sectortype *sptr = §or[sn];
|
||||||
sectortype *sptr;
|
|
||||||
|
|
||||||
sect_error = 0;
|
|
||||||
sptr = §or[sn];
|
|
||||||
|
|
||||||
switch (sptr->lotag&(0xffff-49152))
|
switch (sptr->lotag&(0xffff-49152))
|
||||||
{
|
{
|
||||||
|
@ -1136,12 +1127,11 @@ void operateforcefields(short s, int low)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char checkhitswitch(int snum,long w,int switchtype)
|
int checkhitswitch(int snum,long w,int switchtype)
|
||||||
{
|
{
|
||||||
char switchpal;
|
int switchpal, switchpicnum;
|
||||||
int i, x, lotag,hitag,picnum,correctdips,numdips;
|
int i, x, lotag,hitag,picnum,correctdips,numdips;
|
||||||
long sx,sy;
|
long sx,sy;
|
||||||
int switchpicnum;
|
|
||||||
|
|
||||||
if (w < 0) return 0;
|
if (w < 0) return 0;
|
||||||
correctdips = 1;
|
correctdips = 1;
|
||||||
|
@ -1947,9 +1937,9 @@ void checkplayerhurt(struct player_struct *p,short j)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char checkhitceiling(short sn)
|
int checkhitceiling(short sn)
|
||||||
{
|
{
|
||||||
short i, j;
|
int i, j;
|
||||||
|
|
||||||
switch (dynamictostatic[sector[sn].ceilingpicnum])
|
switch (dynamictostatic[sector[sn].ceilingpicnum])
|
||||||
{
|
{
|
||||||
|
|
|
@ -185,7 +185,7 @@ void intomenusounds(void)
|
||||||
menunum %= 17;
|
menunum %= 17;
|
||||||
}
|
}
|
||||||
|
|
||||||
void playmusic(char *fn)
|
void playmusic(const char *fn)
|
||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
short fp;
|
short fp;
|
||||||
|
@ -196,7 +196,7 @@ void playmusic(char *fn)
|
||||||
if (MusicToggle == 0) return;
|
if (MusicToggle == 0) return;
|
||||||
if (MusicDevice < 0) return;
|
if (MusicDevice < 0) return;
|
||||||
|
|
||||||
fp = kopen4load(fn,0);
|
fp = kopen4load((char *)fn,0);
|
||||||
|
|
||||||
if (fp == -1) return;
|
if (fp == -1) return;
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ void playmusic(char *fn)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
char loadsound(unsigned short num)
|
int loadsound(unsigned short num)
|
||||||
{
|
{
|
||||||
long fp, l;
|
long fp, l;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue