mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
This adds a menu option for network packet rate, and more conversion of passing things as char or short to passing things as int
git-svn-id: https://svn.eduke32.com/eduke32@509 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
23dbb55689
commit
33985f1650
14 changed files with 236 additions and 180 deletions
|
@ -81,7 +81,7 @@ void restoreinterpolations() //Stick at end of drawscreen
|
|||
for (i=numinterpolations-1;i>=0;i--) *curipos[i] = bakipos[i];
|
||||
}
|
||||
|
||||
long ceilingspace(short sectnum)
|
||||
long ceilingspace(int sectnum)
|
||||
{
|
||||
if ((sector[sectnum].ceilingstat&1) && sector[sectnum].ceilingpal == 0)
|
||||
{
|
||||
|
@ -91,7 +91,7 @@ long ceilingspace(short sectnum)
|
|||
return 0;
|
||||
}
|
||||
|
||||
long floorspace(short sectnum)
|
||||
long floorspace(int sectnum)
|
||||
{
|
||||
if ((sector[sectnum].floorstat&1) && sector[sectnum].ceilingpal == 0)
|
||||
{
|
||||
|
@ -100,7 +100,7 @@ long floorspace(short sectnum)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void addammo(short weapon,struct player_struct *p,short amount)
|
||||
void addammo(int weapon,struct player_struct *p,int amount)
|
||||
{
|
||||
p->ammo_amount[weapon] += amount;
|
||||
|
||||
|
@ -108,7 +108,7 @@ void addammo(short weapon,struct player_struct *p,short amount)
|
|||
p->ammo_amount[weapon] = max_ammo_amount[weapon];
|
||||
}
|
||||
|
||||
void addweaponnoswitch(struct player_struct *p, short weapon)
|
||||
void addweaponnoswitch(struct player_struct *p, int weapon)
|
||||
{
|
||||
if (p->gotweapon[weapon] == 0)
|
||||
{
|
||||
|
@ -152,7 +152,7 @@ void addweaponnoswitch(struct player_struct *p, short weapon)
|
|||
}
|
||||
}
|
||||
|
||||
void addweapon(struct player_struct *p,short weapon)
|
||||
void addweapon(struct player_struct *p,int weapon)
|
||||
{
|
||||
int snum = sprite[p->i].yvel;
|
||||
|
||||
|
@ -280,13 +280,14 @@ void checkavailweapon(struct player_struct *p)
|
|||
else p->weapon_pos = -1;
|
||||
}
|
||||
|
||||
void hitradius(short i, long r, long hp1, long hp2, long hp3, long hp4)
|
||||
void hitradius(int i, long r, long hp1, long hp2, long hp3, long hp4)
|
||||
{
|
||||
spritetype *s,*sj;
|
||||
walltype *wal;
|
||||
long d, q, x1, y1;
|
||||
long sectcnt, sectend, dasect, startwall, endwall, nextsect;
|
||||
short j,k,p,x,nextj,sect=-1;
|
||||
int j,k,p,x,nextj;
|
||||
short sect=-1;
|
||||
char statlist[] = {0,1,6,10,12,2,5};
|
||||
short *tempshort = (short *)tempbuf;
|
||||
|
||||
|
@ -463,7 +464,7 @@ BOLT:
|
|||
}
|
||||
}
|
||||
|
||||
int movesprite(short spritenum, long xchange, long ychange, long zchange, unsigned long cliptype)
|
||||
int movesprite(int spritenum, long xchange, long ychange, long zchange, unsigned long cliptype)
|
||||
{
|
||||
long daz,h, oldx, oldy;
|
||||
short retval, dasectnum, cd;
|
||||
|
@ -564,7 +565,7 @@ int ssp(int i,unsigned long cliptype) //The set sprite function
|
|||
return (movetype==0);
|
||||
}
|
||||
|
||||
void insertspriteq(short i)
|
||||
void insertspriteq(int i)
|
||||
{
|
||||
if (spriteqamount > 0)
|
||||
{
|
||||
|
@ -577,7 +578,7 @@ void insertspriteq(short i)
|
|||
else deletesprite(i);
|
||||
}
|
||||
|
||||
void lotsofmoney(spritetype *s, short n)
|
||||
void lotsofmoney(spritetype *s, int n)
|
||||
{
|
||||
short i ,j;
|
||||
for (i=n;i>0;i--)
|
||||
|
@ -587,7 +588,7 @@ void lotsofmoney(spritetype *s, short n)
|
|||
}
|
||||
}
|
||||
|
||||
void lotsofmail(spritetype *s, short n)
|
||||
void lotsofmail(spritetype *s, int n)
|
||||
{
|
||||
short i ,j;
|
||||
for (i=n;i>0;i--)
|
||||
|
@ -597,7 +598,7 @@ void lotsofmail(spritetype *s, short n)
|
|||
}
|
||||
}
|
||||
|
||||
void lotsofpaper(spritetype *s, short n)
|
||||
void lotsofpaper(spritetype *s, int n)
|
||||
{
|
||||
short i ,j;
|
||||
for (i=n;i>0;i--)
|
||||
|
@ -607,7 +608,7 @@ void lotsofpaper(spritetype *s, short n)
|
|||
}
|
||||
}
|
||||
|
||||
void guts(spritetype *s,short gtype, short n, short p)
|
||||
void guts(spritetype *s,int gtype, int n, int p)
|
||||
{
|
||||
long gutz,floorz;
|
||||
short i,a,j;
|
||||
|
@ -645,7 +646,7 @@ void guts(spritetype *s,short gtype, short n, short p)
|
|||
}
|
||||
}
|
||||
|
||||
void gutsdir(spritetype *s,short gtype, short n, short p)
|
||||
void gutsdir(spritetype *s,int gtype, int n, int p)
|
||||
{
|
||||
long gutz,floorz;
|
||||
short i,a,j;
|
||||
|
@ -671,7 +672,7 @@ void gutsdir(spritetype *s,short gtype, short n, short p)
|
|||
}
|
||||
}
|
||||
|
||||
void setsectinterpolate(short i)
|
||||
void setsectinterpolate(int i)
|
||||
{
|
||||
long j, k, startwall,endwall;
|
||||
|
||||
|
@ -694,7 +695,7 @@ void setsectinterpolate(short i)
|
|||
}
|
||||
}
|
||||
|
||||
void clearsectinterpolate(short i)
|
||||
void clearsectinterpolate(int i)
|
||||
{
|
||||
short j,startwall,endwall;
|
||||
|
||||
|
@ -712,7 +713,7 @@ void clearsectinterpolate(short i)
|
|||
}
|
||||
}
|
||||
|
||||
static void ms(short i)
|
||||
static void ms(int i)
|
||||
{
|
||||
//T1,T2 and T3 are used for all the sector moving stuff!!!
|
||||
|
||||
|
|
|
@ -4388,7 +4388,7 @@ int ExtPreInit(int argc,char **argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int osdcmd_quit(const osdfuncparm_t *parm)
|
||||
static int osdcmd_quit(const osdfuncparm_t *parm)
|
||||
{
|
||||
clearfilenames();
|
||||
ExtUnInit();
|
||||
|
@ -4399,6 +4399,29 @@ int osdcmd_quit(const osdfuncparm_t *parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int osdcmd_editorgridextent(const osdfuncparm_t *parm)
|
||||
{
|
||||
int i;
|
||||
extern int editorgridextent;
|
||||
|
||||
if (parm->numparms == 0)
|
||||
{
|
||||
OSD_Printf("\"editorgridextent\" is \"%ld\"\n", editorgridextent);
|
||||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
else if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
||||
|
||||
i = Batol(parm->parms[0]);
|
||||
|
||||
if (i >= 65536 && i <= 524288)
|
||||
{
|
||||
editorgridextent = i;
|
||||
OSD_Printf("editorgridextent %ld\n", editorgridextent);
|
||||
}
|
||||
else OSD_Printf("editorgridextent: value out of range\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
enum {
|
||||
T_EOF = -2,
|
||||
T_ERROR = -1,
|
||||
|
@ -4646,6 +4669,7 @@ int ExtInit(void)
|
|||
autosavetimer = totalclock+120*180;
|
||||
|
||||
OSD_RegisterFunction("quit","you tried to get help on quit?",osdcmd_quit);
|
||||
OSD_RegisterFunction("editorgridextent","editorgridextent: sets the size of the 2D mode editing grid",osdcmd_editorgridextent);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -632,12 +632,8 @@ int32 CONFIG_ReadSetup(void)
|
|||
|
||||
SCRIPT_GetString(scripthandle, "Comm Setup","RTSName",&ud.rtsname[0]);
|
||||
|
||||
{
|
||||
extern int packetrate;
|
||||
SCRIPT_GetNumber(scripthandle, "Comm Setup", "Rate",(int32 *)&packetrate);
|
||||
if (packetrate < 40) packetrate = 40;
|
||||
if (packetrate > 1000) packetrate = 1000;
|
||||
}
|
||||
SCRIPT_GetNumber(scripthandle, "Comm Setup", "Rate",(int32 *)&packetrate);
|
||||
packetrate = min(max(packetrate,50),1000);
|
||||
|
||||
{
|
||||
extern char defaultduke3dgrp[BMAX_PATH];
|
||||
|
@ -955,10 +951,7 @@ void CONFIG_WriteSetup(void)
|
|||
SCRIPT_PutString(scripthandle, "Comm Setup","PlayerName",&myname[0]);
|
||||
SCRIPT_PutString(scripthandle, "Comm Setup","RTSName",&ud.rtsname[0]);
|
||||
|
||||
{
|
||||
extern int packetrate;
|
||||
SCRIPT_PutNumber(scripthandle, "Comm Setup", "Rate", packetrate, false, false);
|
||||
}
|
||||
SCRIPT_PutNumber(scripthandle, "Comm Setup", "Rate", packetrate, false, false);
|
||||
|
||||
|
||||
SCRIPT_PutString(scripthandle, "Misc","SelectedGRP",&duke3dgrp[0]);
|
||||
|
|
|
@ -573,6 +573,7 @@ extern char num_volumes;
|
|||
extern int32 SoundToggle,MusicToggle;
|
||||
extern int lastsavedpos;
|
||||
extern int restorepalette;
|
||||
extern int packetrate;
|
||||
|
||||
extern long cachecount;
|
||||
extern char boardfilename[BMAX_PATH],waterpal[768],slimepal[768],titlepal[768],drealms[768],endingpal[768],animpal[768];
|
||||
|
|
|
@ -34,12 +34,12 @@ extern void MusicStartup(void);
|
|||
extern void MusicShutdown(void);
|
||||
extern void intomenusounds(void);
|
||||
extern void playmusic(const char *fn);
|
||||
extern int loadsound(unsigned short num);
|
||||
extern int xyzsound(short num,short i,long x,long y,long z);
|
||||
extern void sound(short num);
|
||||
extern int spritesound(unsigned short num,short i);
|
||||
extern void stopsound(short num);
|
||||
extern void stopenvsound(short num,short i);
|
||||
extern int loadsound(unsigned num);
|
||||
extern int xyzsound(int num,int i,long x,long y,long z);
|
||||
extern void sound(int num);
|
||||
extern int spritesound(unsigned int num,int i);
|
||||
extern void stopsound(int num);
|
||||
extern void stopenvsound(int num,int i);
|
||||
extern void pan3dsound(void);
|
||||
extern void testcallback(unsigned long num);
|
||||
extern void clearsoundlocks(void);
|
||||
|
@ -55,21 +55,21 @@ extern int findplayer(spritetype *s,long *d);
|
|||
extern int findotherplayer(int p,long *d);
|
||||
extern void doanimations(void);
|
||||
extern int getanimationgoal(long *animptr);
|
||||
extern int setanimation(short animsect,long *animptr,long thegoal,long thevel);
|
||||
extern int setanimation(int animsect,long *animptr,long thegoal,long thevel);
|
||||
extern void animatecamsprite(void);
|
||||
extern void animatewalls(void);
|
||||
extern int activatewarpelevators(short s,short d);
|
||||
extern void operatesectors(short sn,short ii);
|
||||
extern int activatewarpelevators(int s,int d);
|
||||
extern void operatesectors(int sn,int ii);
|
||||
extern void operaterespawns(int low);
|
||||
extern void operateactivators(int low,int snum);
|
||||
extern void operatemasterswitches(int low);
|
||||
extern void operateforcefields(short s,int low);
|
||||
extern void operateforcefields(int s,int low);
|
||||
extern int checkhitswitch(int snum,long w,int switchtype);
|
||||
extern void activatebysector(short sect,short j);
|
||||
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 int checkhitceiling(short sn);
|
||||
extern void checkhitsprite(short i,short sn);
|
||||
extern void activatebysector(int sect,int j);
|
||||
extern void checkhitwall(int spr,int dawallnum,long x,long y,long z,int atwith);
|
||||
extern void checkplayerhurt(struct player_struct *p,int j);
|
||||
extern int checkhitceiling(int sn);
|
||||
extern void checkhitsprite(int i,int sn);
|
||||
extern void allignwarpelevators(void);
|
||||
extern void sharedkeys(int snum);
|
||||
extern void checksectors(int snum);
|
||||
|
@ -81,23 +81,23 @@ extern const char *RTS_GetSoundName(int32 i);
|
|||
extern void RTS_ReadLump(int32 lump,void *dest);
|
||||
extern void *RTS_GetSound(int32 lump);
|
||||
extern void docacheit(void);
|
||||
extern void xyzmirror(short i,short wn);
|
||||
extern void xyzmirror(int i,int wn);
|
||||
extern void vscrn(void);
|
||||
extern void pickrandomspot(int snum);
|
||||
extern void resetweapons(int snum);
|
||||
extern void resetinventory(int snum);
|
||||
extern void newgame(char vn,char ln,char sk);
|
||||
extern void newgame(int vn,int ln,int sk);
|
||||
extern void resettimevars(void);
|
||||
extern void waitforeverybody(void);
|
||||
extern void cacheit(void);
|
||||
extern void clearfifo(void);
|
||||
extern void resetmys(void);
|
||||
extern int enterlevel(char g);
|
||||
extern int enterlevel(int g);
|
||||
extern void backtomenu(void);
|
||||
extern void setpal(struct player_struct *p);
|
||||
extern void quickkill(struct player_struct *p);
|
||||
extern long hits(short i);
|
||||
extern long hitasprite(short i,short *hitsp);
|
||||
extern long hits(int i);
|
||||
extern long hitasprite(int i,short *hitsp);
|
||||
extern int shoot(int i,int atwith);
|
||||
extern void displaymasks(int snum);
|
||||
extern void displayweapon(int snum);
|
||||
|
@ -107,11 +107,11 @@ extern void processinput(int snum);
|
|||
extern void cmenu(int cm);
|
||||
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 loadplayer(signed char spot);
|
||||
extern int saveplayer(signed char spot);
|
||||
extern inline int menutext(int x,int y,short s,short p,const char *t);
|
||||
extern int loadplayer(int spot);
|
||||
extern int saveplayer(int spot);
|
||||
extern inline int menutext(int x,int y,int s,int p,const char *t);
|
||||
extern void menus(void);
|
||||
extern void palto(char r,char g,char b,long e);
|
||||
extern void palto(int r,int g,int b,long e);
|
||||
extern void playanm(const char *fn,char);
|
||||
extern int getincangle(int a,int na);
|
||||
extern void getglobalz(int iActor);
|
||||
|
@ -119,39 +119,39 @@ extern void makeitfall(int iActor);
|
|||
extern void loadefs(const char *fn);
|
||||
extern int furthestangle(int iActor,int angs);
|
||||
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 inline int gametext(int x,int y,const char *t,char s,short dabits);
|
||||
extern inline int gametextpal(int x,int y,const char *t,char s,char p);
|
||||
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 overwritesprite(long thex,long they,int tilenum,int shade,int stat,int dapalnum);
|
||||
extern inline int gametext(int x,int y,const char *t,int s,int dabits);
|
||||
extern inline int gametextpal(int x,int y,const char *t,int s,int p);
|
||||
extern inline int minitext(int x,int y,const char *t,int p,int sb);
|
||||
extern void gamenumber(long x,long y,long n,int s);
|
||||
extern void Shutdown(void);
|
||||
extern void getpackets(void);
|
||||
extern void check_fta_sounds(short i);
|
||||
extern inline short inventory(spritetype *s);
|
||||
extern void check_fta_sounds(int i);
|
||||
extern inline int inventory(spritetype *s);
|
||||
extern inline int badguy(spritetype *s);
|
||||
extern int badguypic(int pn);
|
||||
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 displayfragbar(void);
|
||||
extern void FTA(short q,struct player_struct *p);
|
||||
extern void FTA(int q,struct player_struct *p);
|
||||
extern void gameexit(const char *t);
|
||||
extern inline int strget(short x,short y,char *t,short dalen,short c);
|
||||
extern inline int strget(int x,int y,char *t,int dalen,int c);
|
||||
extern void displayrest(long smoothratio);
|
||||
extern void updatesectorz(long x,long y,long z,short *sectnum);
|
||||
extern void drawbackground(void);
|
||||
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 wallswitchcheck(short i);
|
||||
extern int wallswitchcheck(int i);
|
||||
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,int a,long smoothratio);
|
||||
extern int main(int argc,char **argv);
|
||||
extern void opendemowrite(void);
|
||||
extern void closedemowrite(void);
|
||||
extern void dobonus(char bonusonly);
|
||||
extern void lotsofglass(short i,short wallnum,short n);
|
||||
extern void spriteglass(short i,short n);
|
||||
extern void ceilingglass(short i,short sectnum,short n);
|
||||
extern void lotsofcolourglass(short i,short wallnum,short n);
|
||||
extern void dobonus(int bonusonly);
|
||||
extern void lotsofglass(int i,int wallnum,int n);
|
||||
extern void spriteglass(int i,int n);
|
||||
extern void ceilingglass(int i,int sectnum,int n);
|
||||
extern void lotsofcolourglass(int i,int wallnum,int n);
|
||||
extern long GetTime(void);
|
||||
extern void CONFIG_GetSetupFilename(void);
|
||||
extern int32 CONFIG_FunctionNameToNum(char *func);
|
||||
|
@ -168,23 +168,23 @@ extern void setinterpolation(long *posptr);
|
|||
extern void stopinterpolation(long *posptr);
|
||||
extern void dointerpolations(long smoothratio);
|
||||
extern void restoreinterpolations(void);
|
||||
extern long ceilingspace(short sectnum);
|
||||
extern long floorspace(short sectnum);
|
||||
extern void addammo(short weapon,struct player_struct *p,short amount);
|
||||
extern void addweaponnoswitch(struct player_struct *p,short weapon);
|
||||
extern void addweapon(struct player_struct *p,short weapon);
|
||||
extern long ceilingspace(int sectnum);
|
||||
extern long floorspace(int sectnum);
|
||||
extern void addammo(int weapon,struct player_struct *p,int amount);
|
||||
extern void addweaponnoswitch(struct player_struct *p,int weapon);
|
||||
extern void addweapon(struct player_struct *p,int weapon);
|
||||
extern void checkavailinven(struct player_struct *p);
|
||||
extern void checkavailweapon(struct player_struct *p);
|
||||
extern void hitradius(short i,long r,long hp1,long hp2,long hp3,long hp4);
|
||||
extern int movesprite(short spritenum,long xchange,long ychange,long zchange,unsigned long cliptype);
|
||||
extern void hitradius(int i,long r,long hp1,long hp2,long hp3,long hp4);
|
||||
extern int movesprite(int spritenum,long xchange,long ychange,long zchange,unsigned long cliptype);
|
||||
extern int ssp(int i,unsigned long cliptype);
|
||||
extern void insertspriteq(short i);
|
||||
extern void lotsofmoney(spritetype *s,short n);
|
||||
extern void lotsofmail(spritetype *s, short n);
|
||||
extern void lotsofpaper(spritetype *s, short n);
|
||||
extern void guts(spritetype *s,short gtype,short n,short p);
|
||||
extern void setsectinterpolate(short i);
|
||||
extern void clearsectinterpolate(short i);
|
||||
extern void insertspriteq(int i);
|
||||
extern void lotsofmoney(spritetype *s,int n);
|
||||
extern void lotsofmail(spritetype *s, int n);
|
||||
extern void lotsofpaper(spritetype *s, int n);
|
||||
extern void guts(spritetype *s,int gtype,int n,int p);
|
||||
extern void setsectinterpolate(int i);
|
||||
extern void clearsectinterpolate(int i);
|
||||
extern int ifhitsectors(int sectnum);
|
||||
extern int ifhitbyweapon(int sn);
|
||||
extern void moveobjects(void);
|
||||
|
@ -197,9 +197,9 @@ extern inline void setstatusbarscale(long sc);
|
|||
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 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,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 inline int minitextshade(int x,int y,const char *t,int s,int p,int sb);
|
||||
extern inline int gametext_(int small, int starttile, int x,int y,const char *t,int s,int p,int orientation,long x1, long y1, long x2, long y2);
|
||||
extern void txdigitalnumber(int starttile, long x,long y,long n,int s,int pal,int cs,long x1, long y1, long x2, long y2);
|
||||
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 ResetGameVars(void);
|
||||
|
@ -229,16 +229,16 @@ extern void onvideomodechange(int newmode);
|
|||
|
||||
extern void OnEvent(int iEventID, int sActor, int sPlayer, long lDist);
|
||||
|
||||
extern int isspritemakingsound(short i, int num);
|
||||
extern int issoundplaying(short i, int num);
|
||||
extern void stopspritesound(short num, short i);
|
||||
extern int isspritemakingsound(int i, int num);
|
||||
extern int issoundplaying(int i, int num);
|
||||
extern void stopspritesound(int num, int i);
|
||||
extern void updateplayer(void);
|
||||
extern void sendboardname(void);
|
||||
extern void sendquit(void);
|
||||
|
||||
extern void adduserquote(const char *daquote);
|
||||
extern const char *stripcolorcodes(const char *t);
|
||||
extern void mpchangemap(char volume, char level);
|
||||
extern void mpchangemap(int volume, int level);
|
||||
|
||||
extern inline int checkspriteflags(int iActor, int iType);
|
||||
extern inline int checkspriteflagsp(int iPicnum, int iType);
|
||||
|
|
|
@ -78,7 +78,7 @@ static struct strllist
|
|||
}
|
||||
*CommandPaths = NULL, *CommandGrps = NULL;
|
||||
|
||||
char confilename[BMAX_PATH] = {"EDUKE.CON"}, boardfilename[BMAX_PATH] = {0};
|
||||
char boardfilename[BMAX_PATH] = {0};
|
||||
char waterpal[768], slimepal[768], titlepal[768], drealms[768], endingpal[768], animpal[768];
|
||||
char firstdemofile[80] = { '\0' };
|
||||
int display_bonus_screen = 1, userconfiles = 0;
|
||||
|
@ -102,7 +102,9 @@ static int nomorelogohack;
|
|||
static int sendmessagecommand = -1;
|
||||
|
||||
char defaultduke3dgrp[BMAX_PATH] = "duke3d.grp";
|
||||
char defaultconfilename[BMAX_PATH] = {"EDUKE.CON"};
|
||||
char *duke3dgrp = defaultduke3dgrp;
|
||||
char *confilename = defaultconfilename;
|
||||
static char *duke3ddef = "duke3d.def";
|
||||
|
||||
extern long lastvisinc;
|
||||
|
@ -277,9 +279,9 @@ const char *stripcolorcodes(const char *t)
|
|||
return(colstrip);
|
||||
}
|
||||
|
||||
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)
|
||||
int gametext_(int small, int starttile, int x,int y,const char *t,int s,int p,int orientation,long x1, long y1, long x2, long y2)
|
||||
{
|
||||
short ac,newx,oldx=x;
|
||||
int ac,newx,oldx=x;
|
||||
char centre, *oldt;
|
||||
|
||||
centre = (x == (320>>1));
|
||||
|
@ -362,26 +364,26 @@ int gametext_(int small, int starttile, int x,int y,const char *t,char s,char p,
|
|||
return (x);
|
||||
}
|
||||
|
||||
inline int gametext(int x,int y,const char *t,char s,short dabits)
|
||||
inline int gametext(int x,int y,const char *t,int s,int dabits)
|
||||
{
|
||||
return(gametext_(0,STARTALPHANUM, x,y,t,s,0,dabits,0, 0, xdim-1, ydim-1));
|
||||
}
|
||||
|
||||
inline int gametextpal(int x,int y,const char *t,char s,char p)
|
||||
inline int gametextpal(int x,int y,const char *t,int s,int p)
|
||||
{
|
||||
return(gametext_(0,STARTALPHANUM, x,y,t,s,p,26,0, 0, xdim-1, ydim-1));
|
||||
}
|
||||
|
||||
inline int mpgametext(int y,const char *t,char s,short dabits)
|
||||
inline int mpgametext(int y,const char *t,int s,int dabits)
|
||||
{
|
||||
if (xdim >= 640 && ydim >= 480)
|
||||
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));
|
||||
}
|
||||
|
||||
static int minitext_(int x,int y,const char *t,char s,char p,short sb)
|
||||
static int minitext_(int x,int y,const char *t,int s,int p,int sb)
|
||||
{
|
||||
short ac;
|
||||
int ac;
|
||||
char ch,cmode;
|
||||
|
||||
cmode = (sb&256)!=0;
|
||||
|
@ -407,12 +409,12 @@ static int minitext_(int x,int y,const char *t,char s,char p,short sb)
|
|||
return (x);
|
||||
}
|
||||
|
||||
inline int minitextshade(int x,int y,const char *t,char s,char p,short sb)
|
||||
inline int minitextshade(int x,int y,const char *t,int s,int p,int sb)
|
||||
{
|
||||
return (minitext_(x,y,(char *)stripcolorcodes(t),s,p,sb));
|
||||
}
|
||||
|
||||
inline int minitext(int x,int y,const char *t,char p,short sb)
|
||||
inline int minitext(int x,int y,const char *t,int p,int sb)
|
||||
{
|
||||
return (minitext_(x,y,(char *)stripcolorcodes(t),0,p,sb));
|
||||
}
|
||||
|
@ -1356,7 +1358,7 @@ static void checksync(void)
|
|||
}
|
||||
}
|
||||
|
||||
void check_fta_sounds(short i)
|
||||
void check_fta_sounds(int i)
|
||||
{
|
||||
if (sprite[i].extra > 0)
|
||||
switch (dynamictostatic[PN])
|
||||
|
@ -1422,7 +1424,7 @@ void check_fta_sounds(short i)
|
|||
}
|
||||
}
|
||||
|
||||
short inventory(spritetype *s)
|
||||
int inventory(spritetype *s)
|
||||
{
|
||||
switch (dynamictostatic[s->picnum])
|
||||
{
|
||||
|
@ -1761,9 +1763,9 @@ static void digitalnumber(long x,long y,long n,char s,char cs)
|
|||
}
|
||||
}
|
||||
|
||||
void txdigitalnumber(short starttile, long x,long y,long n,char s,char pal,char cs,long x1, long y1, long x2, long y2)
|
||||
void txdigitalnumber(int starttile, long x,long y,long n,int s,int pal,int cs,long x1, long y1, long x2, long y2)
|
||||
{
|
||||
short i, j, k, p, c;
|
||||
int i, j, k, p, c;
|
||||
char b[10];
|
||||
|
||||
//ltoa(n,b,10);
|
||||
|
@ -2477,7 +2479,7 @@ static void operatefta(void)
|
|||
gametext(320>>1,k,fta_quotes[ps[screenpeek].ftq],0,2+8+16+1+32);
|
||||
}
|
||||
|
||||
void FTA(short q,struct player_struct *p)
|
||||
void FTA(int q,struct player_struct *p)
|
||||
{
|
||||
if (fta_quotes[p->ftq] == NULL)
|
||||
{
|
||||
|
@ -2598,7 +2600,7 @@ void gameexit(const char *t)
|
|||
|
||||
char inputloc = 0;
|
||||
|
||||
static int strget_(int small,short x,short y,char *t,short dalen,short c)
|
||||
static int strget_(int small,int x,int y,char *t,int dalen,int c)
|
||||
{
|
||||
short ch;
|
||||
int i;
|
||||
|
@ -2670,17 +2672,17 @@ static int strget_(int small,short x,short y,char *t,short dalen,short c)
|
|||
return (0);
|
||||
}
|
||||
|
||||
inline int strget(short x,short y,char *t,short dalen,short c)
|
||||
inline int strget(int x,int y,char *t,int dalen,int c)
|
||||
{
|
||||
return(strget_(0,x,y,t,dalen,c));
|
||||
}
|
||||
|
||||
inline int strgetsm(short x,short y,char *t,short dalen,short c)
|
||||
inline int strgetsm(int x,int y,char *t,int dalen,int c)
|
||||
{
|
||||
return(strget_(1,x,y,t,dalen,c));
|
||||
}
|
||||
|
||||
inline int mpstrget(short x,short y,char *t,short dalen,short c)
|
||||
inline int mpstrget(int x,int y,char *t,int dalen,int c)
|
||||
{
|
||||
if (xdim >= 640 && ydim >= 480)
|
||||
return(strgetsm(x,y,t,dalen,c));
|
||||
|
@ -3146,7 +3148,7 @@ static void drawoverheadmap(long cposx, long cposy, long czoom, short cang)
|
|||
}
|
||||
}
|
||||
|
||||
void palto(char r,char g,char b,long e)
|
||||
void palto(int r,int g,int b,long e)
|
||||
{
|
||||
long tc;
|
||||
/*
|
||||
|
@ -3485,7 +3487,7 @@ void displayrest(long smoothratio)
|
|||
if (tintf > 0 || dotint) palto(tintr,tintg,tintb,tintf|128);
|
||||
}
|
||||
|
||||
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, int ang, int horiz)
|
||||
{
|
||||
spritetype *sp = &sprite[pp->i];
|
||||
long i, hx, hy, hitx, hity, hitz;
|
||||
|
@ -3681,7 +3683,7 @@ void drawbackground(void)
|
|||
// If standing in sector with SE43 or SE45
|
||||
// then draw viewing to SE40 and lower all =hi SE42 floors.
|
||||
|
||||
static void SE40_Draw(int spnum,long x,long y,long z,short a,short h,long smoothratio)
|
||||
static void SE40_Draw(int spnum,long x,long y,long z,int a,int h,long smoothratio)
|
||||
{
|
||||
static long tempsectorz[MAXSECTORS];
|
||||
static long tempsectorpicnum[MAXSECTORS];
|
||||
|
@ -4272,7 +4274,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);
|
||||
}
|
||||
|
||||
int wallswitchcheck(short i)
|
||||
int wallswitchcheck(int i)
|
||||
{
|
||||
int j;
|
||||
//MULTISWITCH has 4 states so deal with it separately
|
||||
|
@ -6202,9 +6204,9 @@ int spawn(int j, int pn)
|
|||
//#pragma auto_inline(off)
|
||||
#pragma optimize("g",off)
|
||||
#endif
|
||||
void animatesprites(long x,long y,short a,long smoothratio)
|
||||
void animatesprites(long x,long y,int a,long smoothratio)
|
||||
{
|
||||
short i, j, k, p, sect;
|
||||
int i, j, k, p, sect;
|
||||
long l, t1,t3,t4;
|
||||
spritetype *s,*t;
|
||||
int switchpic;
|
||||
|
@ -7582,7 +7584,10 @@ FOUNDCHEAT:
|
|||
if (KB_KeyPressed((unsigned char)cheatkey[0]))
|
||||
{
|
||||
if (ps[myconnectindex].cheat_phase >= 0 && numplayers < 2 && ud.recstat == 0)
|
||||
{
|
||||
KB_ClearKeyDown((unsigned char)cheatkey[0]);
|
||||
ps[myconnectindex].cheat_phase = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (KB_KeyPressed((unsigned char)cheatkey[1]))
|
||||
|
@ -8565,14 +8570,16 @@ static void checkcommandline(int argc,char **argv)
|
|||
if (!Bstrcasecmp(c+1,"nam"))
|
||||
{
|
||||
strcpy(defaultduke3dgrp, "nam.grp");
|
||||
strcpy(confilename, "nam.con");
|
||||
strcpy(defaultconfilename, "nam.con");
|
||||
gametype = 1;
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if (!Bstrcasecmp(c+1,"ww2gi"))
|
||||
{
|
||||
strcpy(defaultduke3dgrp, "ww2gi.grp");
|
||||
strcpy(confilename, "ww2gi.con");
|
||||
strcpy(defaultconfilename, "ww2gi.con");
|
||||
gametype = 3;
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
@ -8894,9 +8901,9 @@ static void checkcommandline(int argc,char **argv)
|
|||
c++;
|
||||
if (*c)
|
||||
{
|
||||
Bstrcpy(confilename,c);
|
||||
confilename = c;
|
||||
userconfiles = 1;
|
||||
initprintf("Using CON file: %s.\n",confilename);
|
||||
initprintf("Using CON file '%s'.\n",confilename);
|
||||
}
|
||||
break;
|
||||
case '0':
|
||||
|
@ -9535,7 +9542,7 @@ void sendboardname(void)
|
|||
}
|
||||
}
|
||||
|
||||
void mpchangemap(char volume, char level)
|
||||
void mpchangemap(int volume, int level)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -9902,7 +9909,7 @@ void app_main(int argc,char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined RENDERTYPEWIN || (defined RENDERTYPESDL && !defined __APPLE__ && defined HAVE_GTK2)
|
||||
#if (defined RENDERTYPEWIN || (defined RENDERTYPESDL && !defined __APPLE__ && defined HAVE_GTK2))
|
||||
if (i < 0 || (!NoSetup && ForceSetup) || CommandSetup)
|
||||
{
|
||||
if (quitevent || !startwin_run())
|
||||
|
@ -9920,7 +9927,7 @@ void app_main(int argc,char **argv)
|
|||
// overwrite the default GRP and CON so that if the user chooses
|
||||
// something different, they get what they asked for
|
||||
Bsprintf(defaultduke3dgrp,"ww2gi.grp");
|
||||
Bsprintf(confilename, "ww2gi.con");
|
||||
Bsprintf(defaultconfilename, "ww2gi.con");
|
||||
Bsprintf(gametype_names[0],"GRUNTMATCH (SPAWN)");
|
||||
Bsprintf(gametype_names[2],"GRUNTMATCH (NO SPAWN)");
|
||||
}
|
||||
|
@ -9929,7 +9936,7 @@ void app_main(int argc,char **argv)
|
|||
// overwrite the default GRP and CON so that if the user chooses
|
||||
// something different, they get what they asked for
|
||||
Bsprintf(defaultduke3dgrp,"nam.grp");
|
||||
Bsprintf(confilename, "nam.con");
|
||||
Bsprintf(defaultconfilename, "nam.con");
|
||||
Bsprintf(gametype_names[0],"GRUNTMATCH (SPAWN)");
|
||||
Bsprintf(gametype_names[2],"GRUNTMATCH (NO SPAWN)");
|
||||
}
|
||||
|
@ -11474,7 +11481,7 @@ static void doorders(void)
|
|||
}
|
||||
}
|
||||
|
||||
void dobonus(char bonusonly)
|
||||
void dobonus(int bonusonly)
|
||||
{
|
||||
int t, tinc,gfx_offset;
|
||||
int i, y,xfragtotal,yfragtotal;
|
||||
|
@ -12223,11 +12230,12 @@ void vglass(long x,long y,short a,short wn,short n)
|
|||
}
|
||||
#endif
|
||||
|
||||
void lotsofglass(short i,short wallnum,short n)
|
||||
void lotsofglass(int i,int wallnum,int n)
|
||||
{
|
||||
long j, xv, yv, z, x1, y1;
|
||||
short sect, a;
|
||||
|
||||
short sect;
|
||||
int a;
|
||||
|
||||
sect = -1;
|
||||
|
||||
if (wallnum < 0)
|
||||
|
@ -12271,7 +12279,7 @@ void lotsofglass(short i,short wallnum,short n)
|
|||
}
|
||||
}
|
||||
|
||||
void spriteglass(short i,short n)
|
||||
void spriteglass(int i,int n)
|
||||
{
|
||||
long j, k, a, z;
|
||||
|
||||
|
@ -12284,10 +12292,10 @@ void spriteglass(short i,short n)
|
|||
}
|
||||
}
|
||||
|
||||
void ceilingglass(short i,short sectnum,short n)
|
||||
void ceilingglass(int i,int sectnum,int n)
|
||||
{
|
||||
long j, xv, yv, z, x1, y1;
|
||||
short a,s, startwall,endwall;
|
||||
int a,s, startwall,endwall;
|
||||
|
||||
startwall = sector[sectnum].wallptr;
|
||||
endwall = startwall+sector[sectnum].wallnum;
|
||||
|
@ -12311,10 +12319,11 @@ void ceilingglass(short i,short sectnum,short n)
|
|||
}
|
||||
}
|
||||
|
||||
void lotsofcolourglass(short i,short wallnum,short n)
|
||||
void lotsofcolourglass(int i,int wallnum,int n)
|
||||
{
|
||||
long j, xv, yv, z, x1, y1;
|
||||
short sect = -1, a, k;
|
||||
short sect = -1;
|
||||
int a, k;
|
||||
|
||||
if (wallnum < 0)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@ struct grpfile grpfiles[numgrpfiles] =
|
|||
{ "Duke Nukem 3D Mac", 0x00000000, 0, GAMEDUKE, NULL },
|
||||
{ "NAM", 0x75C1F07B, 43448927, GAMENAM, NULL },
|
||||
{ "Napalm", 0x3DE1589A, 44365728, GAMENAM, NULL },
|
||||
{ "WW2GI (limited support)", 0x907B82BF, 77939508, GAMEWW2, NULL },
|
||||
{ "WW2GI", 0x907B82BF, 77939508, GAMEWW2, NULL },
|
||||
};
|
||||
struct grpfile *foundgrps = NULL;
|
||||
|
||||
|
|
|
@ -310,12 +310,12 @@ static int menutext_(int x,int y,short s,short p,char *t)
|
|||
return (x);
|
||||
}
|
||||
|
||||
inline int menutext(int x,int y,short s,short p,const char *t)
|
||||
inline int menutext(int x,int y,int s,int p,const char *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,int dainc,int damodify,int s, int pa)
|
||||
{
|
||||
short xloc;
|
||||
char rev;
|
||||
|
@ -389,16 +389,16 @@ static void bar_(int type, int x,int y,short *p,short dainc,char damodify,short
|
|||
rotatesprite((x<<16)+((65-xloc)<<(16-type)),(y<<16)+(1<<(16-type)),65536L>>type,0,SLIDEBAR+1,s,pa,10,0,0,xdim-1,ydim-1);
|
||||
}
|
||||
|
||||
static inline void bar(int x,int y,short *p,short dainc,char damodify,short s, short pa)
|
||||
static inline void bar(int x,int y,short *p,int dainc,int damodify,int s, int pa)
|
||||
{
|
||||
bar_(0,x,y,p,dainc,damodify,s,pa);
|
||||
}
|
||||
static inline void barsm(int x,int y,short *p,short dainc,char damodify,short s, short pa)
|
||||
static inline void barsm(int x,int y,short *p,int dainc,int damodify,int s, int pa)
|
||||
{
|
||||
bar_(1,x,y,p,dainc,damodify,s,pa);
|
||||
}
|
||||
|
||||
static void modval(int min, int max,int *p,short dainc,char damodify)
|
||||
static void modval(int min, int max,int *p,int dainc,int damodify)
|
||||
{
|
||||
char rev;
|
||||
|
||||
|
@ -420,7 +420,11 @@ static void modval(int min, int max,int *p,short dainc,char damodify)
|
|||
|
||||
*p -= dainc;
|
||||
if (*p < min)
|
||||
*p = max;
|
||||
{
|
||||
*p = max;
|
||||
if (damodify == 2)
|
||||
*p = min;
|
||||
}
|
||||
sound(PISTOL_BODYHIT);
|
||||
}
|
||||
if (KB_KeyPressed(sc_RightArrow) || KB_KeyPressed(sc_kpad_6) || ((buttonstat&1) && minfo.dyaw > 256)) //&& onbar) )
|
||||
|
@ -430,7 +434,11 @@ static void modval(int min, int max,int *p,short dainc,char damodify)
|
|||
|
||||
*p += dainc;
|
||||
if (*p > max)
|
||||
*p = min;
|
||||
{
|
||||
*p = min;
|
||||
if (damodify == 2)
|
||||
*p = max;
|
||||
}
|
||||
sound(PISTOL_BODYHIT);
|
||||
}
|
||||
}
|
||||
|
@ -443,7 +451,11 @@ static void modval(int min, int max,int *p,short dainc,char damodify)
|
|||
|
||||
*p -= dainc;
|
||||
if (*p < min)
|
||||
*p = max;
|
||||
{
|
||||
*p = max;
|
||||
if (damodify == 2)
|
||||
*p = min;
|
||||
}
|
||||
sound(PISTOL_BODYHIT);
|
||||
}
|
||||
if (KB_KeyPressed(sc_LeftArrow) || KB_KeyPressed(sc_kpad_4) || ((buttonstat&1) && minfo.dyaw < -256)) // && onbar) )
|
||||
|
@ -453,7 +465,11 @@ static void modval(int min, int max,int *p,short dainc,char damodify)
|
|||
|
||||
*p += dainc;
|
||||
if (*p > max)
|
||||
*p = min;
|
||||
{
|
||||
*p = min;
|
||||
if (damodify == 2)
|
||||
*p = max;
|
||||
}
|
||||
sound(PISTOL_BODYHIT);
|
||||
}
|
||||
}
|
||||
|
@ -726,6 +742,9 @@ void menus(void)
|
|||
"Switch weapon when empty",
|
||||
"-",
|
||||
"-",
|
||||
"Network packets/sec",
|
||||
"-",
|
||||
"-",
|
||||
"Multiplayer macros",
|
||||
NULL
|
||||
};
|
||||
|
@ -853,6 +872,11 @@ void menus(void)
|
|||
}
|
||||
break;
|
||||
case 7:
|
||||
if (x == io)
|
||||
packetrate = min(max(((packetrate/50)*50)+50,50),1000);
|
||||
modval(50,1000,(int *)&packetrate,10,probey==7?2:0);
|
||||
break;
|
||||
case 8:
|
||||
if (x == io)
|
||||
{
|
||||
cmenu(20004);
|
||||
|
@ -946,7 +970,10 @@ void menus(void)
|
|||
case 6:
|
||||
gametext(d+70,yy,ud.weaponswitch&2?"On":"Off",MENUHIGHLIGHT(io),2+8+16);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
Bsprintf(tempbuf,"%d",packetrate);
|
||||
gametext(d+70,yy,tempbuf,MENUHIGHLIGHT(io),2+8+16);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -969,7 +996,7 @@ void menus(void)
|
|||
if (x == -1)
|
||||
{
|
||||
cmenu(20002);
|
||||
probey = 7;
|
||||
probey = 8;
|
||||
}
|
||||
else if (x >= 0 && x <= 9)
|
||||
{
|
||||
|
|
|
@ -326,7 +326,6 @@ static int osdcmd_fileinfo(const osdfuncparm_t *parm)
|
|||
|
||||
static int osdcmd_rate(const osdfuncparm_t *parm)
|
||||
{
|
||||
extern int packetrate;
|
||||
int i;
|
||||
|
||||
if (parm->numparms == 0)
|
||||
|
|
|
@ -174,7 +174,7 @@ static void hitscantrail(long x1, long y1, long z1, long x2, long y2, long z2, i
|
|||
}
|
||||
}
|
||||
|
||||
long hits(short i)
|
||||
long hits(int i)
|
||||
{
|
||||
long sx,sy,sz;
|
||||
short sect,hw,hs;
|
||||
|
|
|
@ -470,7 +470,7 @@ void cacheit(void)
|
|||
OSD_Printf("Cache time: %dms\n", endtime-starttime);
|
||||
}
|
||||
|
||||
void xyzmirror(short i,short wn)
|
||||
void xyzmirror(int i,int wn)
|
||||
{
|
||||
//if (waloff[wn] == 0) loadtile(wn);
|
||||
setviewtotile(wn,tilesizy[wn],tilesizx[wn]);
|
||||
|
@ -1137,10 +1137,10 @@ static void prelevel(char g)
|
|||
}
|
||||
}
|
||||
|
||||
void newgame(char vn,char ln,char sk)
|
||||
void newgame(int vn,int ln,int sk)
|
||||
{
|
||||
struct player_struct *p = &ps[0];
|
||||
short i;
|
||||
int i;
|
||||
|
||||
handleevents();
|
||||
getpackets();
|
||||
|
@ -1548,7 +1548,7 @@ static void getlevelfromfilename(const char *fn, char *volume, char *level)
|
|||
}
|
||||
}
|
||||
|
||||
int enterlevel(char g)
|
||||
int enterlevel(int g)
|
||||
{
|
||||
int i;
|
||||
char levname[BMAX_PATH];
|
||||
|
|
|
@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
void readsavenames(void)
|
||||
{
|
||||
long dummy,j;
|
||||
short i;
|
||||
int i;
|
||||
char fn[13];
|
||||
BFILE *fil;
|
||||
|
||||
|
@ -120,9 +120,9 @@ corrupt:
|
|||
return 1;
|
||||
}
|
||||
|
||||
int loadplayer(signed char spot)
|
||||
int loadplayer(int spot)
|
||||
{
|
||||
short k;
|
||||
int k;
|
||||
char fn[13];
|
||||
char mpfn[13];
|
||||
char *fnptr, scriptptrs[MAXSCRIPTSIZE];
|
||||
|
@ -504,7 +504,7 @@ corrupt:
|
|||
return -1;
|
||||
}
|
||||
|
||||
int saveplayer(signed char spot)
|
||||
int saveplayer(int spot)
|
||||
{
|
||||
long i, j;
|
||||
char fn[13];
|
||||
|
|
|
@ -347,7 +347,7 @@ int getanimationgoal(long *animptr)
|
|||
return(j);
|
||||
}
|
||||
|
||||
int setanimation(short animsect,long *animptr, long thegoal, long thevel)
|
||||
int setanimation(int animsect,long *animptr, long thegoal, long thevel)
|
||||
{
|
||||
long i, j;
|
||||
|
||||
|
@ -494,7 +494,7 @@ void animatewalls(void)
|
|||
}
|
||||
}
|
||||
|
||||
int activatewarpelevators(short s,short d) //Parm = sectoreffectornum
|
||||
int activatewarpelevators(int s,int d) //Parm = sectoreffectornum
|
||||
{
|
||||
int i = headspritestat[3], sn = sprite[s].sectnum;
|
||||
|
||||
|
@ -535,7 +535,7 @@ int activatewarpelevators(short s,short d) //Parm = sectoreffectornum
|
|||
return 0;
|
||||
}
|
||||
|
||||
void operatesectors(short sn,short ii)
|
||||
void operatesectors(int sn,int ii)
|
||||
{
|
||||
long j=0, l, q, startwall, endwall;
|
||||
int i;
|
||||
|
@ -1101,7 +1101,7 @@ void operatemasterswitches(int low)
|
|||
}
|
||||
}
|
||||
|
||||
void operateforcefields(short s, int low)
|
||||
void operateforcefields(int s, int low)
|
||||
{
|
||||
int i, p;
|
||||
|
||||
|
@ -1586,7 +1586,7 @@ int checkhitswitch(int snum,long w,int switchtype)
|
|||
|
||||
}
|
||||
|
||||
void activatebysector(short sect,short j)
|
||||
void activatebysector(int sect,int j)
|
||||
{
|
||||
int i = headspritesect[sect];
|
||||
int didit = 0;
|
||||
|
@ -1606,7 +1606,7 @@ void activatebysector(short sect,short j)
|
|||
operatesectors(sect,j);
|
||||
}
|
||||
|
||||
static void breakwall(short newpn,short spr,short dawallnum)
|
||||
static void breakwall(int newpn,int spr,int dawallnum)
|
||||
{
|
||||
wall[dawallnum].picnum = newpn;
|
||||
spritesound(VENT_BUST,spr);
|
||||
|
@ -1614,9 +1614,10 @@ static void breakwall(short newpn,short spr,short dawallnum)
|
|||
lotsofglass(spr,dawallnum,10);
|
||||
}
|
||||
|
||||
void checkhitwall(short spr,short dawallnum,long x,long y,long z,short atwith)
|
||||
void checkhitwall(int spr,int dawallnum,long x,long y,long z,int atwith)
|
||||
{
|
||||
short j, i, sn = -1, darkestwall;
|
||||
short sn = -1;
|
||||
int j, i, darkestwall;
|
||||
walltype *wal;
|
||||
|
||||
wal = &wall[dawallnum];
|
||||
|
@ -1869,7 +1870,7 @@ void checkhitwall(short spr,short dawallnum,long x,long y,long z,short atwith)
|
|||
}
|
||||
}
|
||||
|
||||
void checkplayerhurt(struct player_struct *p,short j)
|
||||
void checkplayerhurt(struct player_struct *p,int j)
|
||||
{
|
||||
if ((j&49152) == 49152)
|
||||
{
|
||||
|
@ -1940,7 +1941,7 @@ void checkplayerhurt(struct player_struct *p,short j)
|
|||
}
|
||||
}
|
||||
|
||||
int checkhitceiling(short sn)
|
||||
int checkhitceiling(int sn)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
|
@ -2013,9 +2014,10 @@ int checkhitceiling(short sn)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void checkhitsprite(short i,short sn)
|
||||
void checkhitsprite(int i,int sn)
|
||||
{
|
||||
short j, k, p, rpg=0;
|
||||
short j;
|
||||
int k, p, rpg=0;
|
||||
spritetype *s;
|
||||
int switchpicnum;
|
||||
|
||||
|
@ -3164,7 +3166,7 @@ CHECKINV1:
|
|||
}
|
||||
}
|
||||
|
||||
long hitasprite(short i,short *hitsp)
|
||||
long hitasprite(int i,short *hitsp)
|
||||
{
|
||||
long sx,sy,sz,zoff;
|
||||
short sect,hw;
|
||||
|
|
|
@ -226,7 +226,7 @@ void playmusic(const char *fn)
|
|||
#endif
|
||||
}
|
||||
|
||||
int loadsound(unsigned short num)
|
||||
int loadsound(unsigned int num)
|
||||
{
|
||||
long fp, l;
|
||||
|
||||
|
@ -253,10 +253,10 @@ int loadsound(unsigned short num)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int xyzsound(short num,short i,long x,long y,long z)
|
||||
int xyzsound(int num,int i,long x,long y,long z)
|
||||
{
|
||||
long sndist, cx, cy, cz, j,k;
|
||||
short pitche,pitchs,cs;
|
||||
int pitche,pitchs,cs;
|
||||
int voice, sndang, ca, pitch;
|
||||
|
||||
// if(num != 358) return 0;
|
||||
|
@ -403,9 +403,9 @@ int xyzsound(short num,short i,long x,long y,long z)
|
|||
return (voice);
|
||||
}
|
||||
|
||||
void sound(short num)
|
||||
void sound(int num)
|
||||
{
|
||||
short pitch,pitche,pitchs,cx;
|
||||
int pitch,pitche,pitchs,cx;
|
||||
int voice;
|
||||
long start;
|
||||
|
||||
|
@ -465,18 +465,18 @@ void sound(short num)
|
|||
Sound[num].lock--;
|
||||
}
|
||||
|
||||
int spritesound(unsigned short num, short i)
|
||||
int spritesound(unsigned int num, int i)
|
||||
{
|
||||
if (num >= NUM_SOUNDS) return -1;
|
||||
return xyzsound(num,i,SX,SY,SZ);
|
||||
}
|
||||
|
||||
void stopspritesound(short num, short i)
|
||||
void stopspritesound(int num, int i)
|
||||
{
|
||||
stopsound(num);
|
||||
}
|
||||
|
||||
void stopsound(short num)
|
||||
void stopsound(int num)
|
||||
{
|
||||
if (Sound[num].num > 0)
|
||||
{
|
||||
|
@ -485,9 +485,9 @@ void stopsound(short num)
|
|||
}
|
||||
}
|
||||
|
||||
void stopenvsound(short num,short i)
|
||||
void stopenvsound(int num,int i)
|
||||
{
|
||||
short j, k;
|
||||
int j, k;
|
||||
|
||||
if (Sound[num].num > 0)
|
||||
{
|
||||
|
@ -504,7 +504,7 @@ void stopenvsound(short num,short i)
|
|||
void pan3dsound(void)
|
||||
{
|
||||
long sndist, sx, sy, sz, cx, cy, cz;
|
||||
short sndang,ca,j,k,i,cs;
|
||||
int sndang,ca,j,k,i,cs;
|
||||
|
||||
numenvsnds = 0;
|
||||
|
||||
|
@ -583,7 +583,7 @@ void pan3dsound(void)
|
|||
|
||||
void testcallback(unsigned long num)
|
||||
{
|
||||
short tempi,tempj,tempk;
|
||||
int tempi,tempj,tempk;
|
||||
|
||||
if ((long)num < 0)
|
||||
{
|
||||
|
@ -632,13 +632,13 @@ void clearsoundlocks(void)
|
|||
lumplockbyte[i] = 199;
|
||||
}
|
||||
|
||||
int isspritemakingsound(short i, int num)
|
||||
int isspritemakingsound(int i, int num)
|
||||
{
|
||||
if (num < 0) num=0; // FIXME
|
||||
return (Sound[num].num > 0);
|
||||
}
|
||||
|
||||
int issoundplaying(short i, int num)
|
||||
int issoundplaying(int i, int num)
|
||||
{
|
||||
if (i == -1)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue