mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Uhh.. yeah
git-svn-id: https://svn.eduke32.com/eduke32@395 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
d48c66b7ad
commit
0bd5f4a9e5
5 changed files with 209 additions and 243 deletions
|
@ -280,45 +280,6 @@ void checkavailweapon(struct player_struct *p)
|
|||
else p->weapon_pos = -1;
|
||||
}
|
||||
|
||||
long ifsquished(short i, short p)
|
||||
{
|
||||
sectortype *sc;
|
||||
char squishme;
|
||||
long floorceildist;
|
||||
|
||||
if (PN == APLAYER && ud.clipping)
|
||||
return 0;
|
||||
|
||||
sc = §or[SECT];
|
||||
floorceildist = sc->floorz - sc->ceilingz;
|
||||
|
||||
if (sc->lotag != 23)
|
||||
{
|
||||
if (sprite[i].pal == 1)
|
||||
squishme = floorceildist < (32<<8) && (sc->lotag&32768) == 0;
|
||||
else
|
||||
squishme = floorceildist < (12<<8); // && (sc->lotag&32768) == 0;
|
||||
}
|
||||
else squishme = 0;
|
||||
|
||||
if (squishme)
|
||||
{
|
||||
FTA(10,&ps[p]);
|
||||
|
||||
if (badguy(&sprite[i])) sprite[i].xvel = 0;
|
||||
|
||||
if (sprite[i].pal == 1)
|
||||
{
|
||||
hittype[i].picnum = SHOTSPARK1;
|
||||
hittype[i].extra = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void hitradius(short i, long r, long hp1, long hp2, long hp3, long hp4)
|
||||
{
|
||||
spritetype *s,*sj;
|
||||
|
@ -751,7 +712,7 @@ void clearsectinterpolate(short i)
|
|||
}
|
||||
}
|
||||
|
||||
void ms(short i)
|
||||
static void ms(short i)
|
||||
{
|
||||
//T1,T2 and T3 are used for all the sector moving stuff!!!
|
||||
|
||||
|
@ -782,7 +743,7 @@ void ms(short i)
|
|||
}
|
||||
}
|
||||
|
||||
void movefta(void)
|
||||
static void movefta(void)
|
||||
{
|
||||
long x, px, py, sx, sy;
|
||||
short i, j, p, psect, ssect, nexti;
|
||||
|
@ -1074,7 +1035,7 @@ BOLT:
|
|||
}
|
||||
|
||||
short otherp;
|
||||
void moveplayers(void) //Players
|
||||
static void moveplayers(void) //Players
|
||||
{
|
||||
short i , nexti;
|
||||
long otherx;
|
||||
|
@ -1210,7 +1171,7 @@ BOLT:
|
|||
}
|
||||
}
|
||||
|
||||
void movefx(void)
|
||||
static void movefx(void)
|
||||
{
|
||||
short i, j, nexti, p;
|
||||
long x, ht;
|
||||
|
@ -1310,7 +1271,7 @@ BOLT:
|
|||
}
|
||||
}
|
||||
|
||||
void movefallers(void)
|
||||
static void movefallers(void)
|
||||
{
|
||||
short i, nexti, sect, j;
|
||||
spritetype *s;
|
||||
|
@ -1408,7 +1369,7 @@ BOLT:
|
|||
}
|
||||
}
|
||||
|
||||
void movestandables(void)
|
||||
static void movestandables(void)
|
||||
{
|
||||
short i, j, k, m, nexti, nextj, p=0, sect;
|
||||
long l=0, x, *t;
|
||||
|
@ -2354,7 +2315,7 @@ BOLT:
|
|||
}
|
||||
}
|
||||
|
||||
void bounce(short i)
|
||||
static void bounce(short i)
|
||||
{
|
||||
long k, l, daang, dax, day, daz, xvect, yvect, zvect;
|
||||
short hitsect;
|
||||
|
@ -2394,7 +2355,7 @@ void bounce(short i)
|
|||
s->ang = getangle(xvect,yvect);
|
||||
}
|
||||
|
||||
void moveweapons(void)
|
||||
static void moveweapons(void)
|
||||
{
|
||||
short i, j=0, k, f, nexti, p, q;
|
||||
long dax,day,daz, x, ll;
|
||||
|
@ -3192,7 +3153,7 @@ BOLT:
|
|||
}
|
||||
}
|
||||
|
||||
void movetransports(void)
|
||||
static void movetransports(void)
|
||||
{
|
||||
char warpspriteto;
|
||||
short i, j, k, l, p, sect, sectlotag, nexti, nextj;
|
||||
|
@ -3528,7 +3489,7 @@ BOLT:
|
|||
}
|
||||
}
|
||||
|
||||
void moveactors(void)
|
||||
static void moveactors(void)
|
||||
{
|
||||
long x, m, l, *t;
|
||||
short a, i, j, nexti, nextj, sect, p;
|
||||
|
@ -4851,7 +4812,7 @@ BOLT:
|
|||
|
||||
}
|
||||
|
||||
void moveexplosions(void) // STATNUM 5
|
||||
static void moveexplosions(void) // STATNUM 5
|
||||
{
|
||||
short i, j, nexti, sect, p;
|
||||
long l, x, *t;
|
||||
|
@ -5415,7 +5376,7 @@ BOLT:
|
|||
}
|
||||
}
|
||||
|
||||
void moveeffectors(void) //STATNUM 3
|
||||
static void moveeffectors(void) //STATNUM 3
|
||||
{
|
||||
long q=0, l, m, x, st, j, *t;
|
||||
short i, k, nexti, nextk, p, sh, nextj;
|
||||
|
@ -7651,3 +7612,35 @@ BOLT:
|
|||
}
|
||||
}
|
||||
|
||||
void moveobjects(void)
|
||||
{
|
||||
int k;
|
||||
|
||||
movefta(); //ST 2
|
||||
moveweapons(); //ST 5 (must be last)
|
||||
movetransports(); //ST 9
|
||||
|
||||
moveplayers(); //ST 10
|
||||
movefallers(); //ST 12
|
||||
moveexplosions(); //ST 4
|
||||
|
||||
moveactors(); //ST 1
|
||||
moveeffectors(); //ST 3
|
||||
|
||||
movestandables(); //ST 6
|
||||
|
||||
for (k=0;k<MAXSTATUS;k++)
|
||||
{
|
||||
int i = headspritestat[k];
|
||||
while (i >= 0)
|
||||
{
|
||||
int p, j = nextspritestat[i];
|
||||
OnEvent(EVENT_GAME,i, findplayer(&sprite[i],(long *)&p), p);
|
||||
i = j;
|
||||
}
|
||||
}
|
||||
|
||||
doanimations();
|
||||
movefx(); //ST 11
|
||||
}
|
||||
|
||||
|
|
|
@ -89,22 +89,14 @@ extern void docacheit(void);
|
|||
extern void xyzmirror(short i,short wn);
|
||||
extern void vscrn(void);
|
||||
extern void pickrandomspot(short snum);
|
||||
extern void resetplayerstats(short snum);
|
||||
extern void resetweapons(short snum);
|
||||
extern void resetinventory(short snum);
|
||||
extern void resetprestat(short snum,char g);
|
||||
extern void setupbackdrop(short backpicnum);
|
||||
extern void cachespritenum(short i);
|
||||
extern void cachegoodsprites(void);
|
||||
extern void prelevel(char g);
|
||||
extern void newgame(char vn,char ln,char sk);
|
||||
extern void resetpspritevars(char g);
|
||||
extern void resettimevars(void);
|
||||
extern void genspriteremaps(void);
|
||||
extern void waitforeverybody(void);
|
||||
extern char checksum(long sum);
|
||||
extern char getsound(unsigned short num);
|
||||
extern void precachenecessarysounds(void);
|
||||
extern void cacheit(void);
|
||||
extern void dofrontscreens(char *);
|
||||
extern void clearfifo(void);
|
||||
|
@ -149,7 +141,6 @@ extern int getfilenames(char *path, char kind[]);
|
|||
extern void sortfilenames(void);
|
||||
extern void menus(void);
|
||||
extern void palto(char r,char g,char b,long e);
|
||||
extern void drawoverheadmap(long cposx,long cposy,long czoom,short cang);
|
||||
extern void playanm(char *fn,char);
|
||||
extern short getincangle(short a,short na);
|
||||
extern char ispecial(char c);
|
||||
|
@ -163,13 +154,7 @@ extern long transnum(long type);
|
|||
extern char parsecommand(void);
|
||||
extern void passone(void);
|
||||
extern void loadefs(char *fn);
|
||||
extern char dodge(spritetype *s);
|
||||
extern short furthestangle(short sActor,short angs);
|
||||
extern short furthestcanseepoint(short sActor,spritetype *ts,long *dax,long *day);
|
||||
extern void alterang(short a);
|
||||
extern void move(void);
|
||||
extern void parseifelse(long condition);
|
||||
extern char parse(void);
|
||||
extern void execute(const short *sActor,const short *sPlayer,const long *lDist);
|
||||
extern void overwritesprite(long thex,long they,short tilenum,signed char shade,char stat,char dapalnum);
|
||||
extern void timerhandler(void);
|
||||
|
@ -178,37 +163,22 @@ extern int gametextpal(int x,int y,char *t,char s,char p);
|
|||
extern int minitext(int x,int y,char *t,char p,short sb);
|
||||
extern void gamenumber(long x,long y,long n,char s);
|
||||
extern void Shutdown(void);
|
||||
extern void allowtimetocorrecterrorswhenquitting(void);
|
||||
extern void getpackets(void);
|
||||
extern void faketimerhandler(void);
|
||||
extern void checksync(void);
|
||||
extern void check_fta_sounds(short i);
|
||||
extern inline short inventory(spritetype *s);
|
||||
extern short badguy(spritetype *s);
|
||||
extern short badguypic(short pn);
|
||||
extern void myos(long x,long y,short tilenum,signed char shade,char orientation);
|
||||
extern void myospal(long x,long y,short tilenum,signed char shade,char orientation,char p);
|
||||
extern void invennum(long x,long y,char num1,char ha,char sbits);
|
||||
extern void weaponnum(short ind,long x,long y,long num1,long num2,char ha);
|
||||
extern void weaponnum999(char ind,long x,long y,long num1,long num2,char ha);
|
||||
extern void weapon_amounts(struct player_struct *p,long x,long y,long u);
|
||||
extern void digitalnumber(long x,long y,long n,char s,char cs);
|
||||
extern void scratchmarks(long x,long y,long n,char s,char p);
|
||||
extern void displayinventory(struct player_struct *p);
|
||||
extern void displayfragbar(void);
|
||||
extern void coolgaugetext(short snum);
|
||||
extern void tics(void);
|
||||
extern void clocks(void);
|
||||
extern void coords(short snum);
|
||||
extern void operatefta(void);
|
||||
extern void displayfragbar(void);
|
||||
extern void FTA(short q,struct player_struct *p);
|
||||
extern void showtwoscreens(void);
|
||||
extern void binscreen(void);
|
||||
extern void gameexit(char *t);
|
||||
extern short strget(short x,short y,char *t,short dalen,short c);
|
||||
extern void displayrest(long smoothratio);
|
||||
extern void updatesectorz(long x,long y,long z,short *sectnum);
|
||||
extern void view(struct player_struct *pp,long *vx,long *vy,long *vz,short *vsectnum,short ang,short horiz);
|
||||
extern void drawbackground(void);
|
||||
extern void displayrooms(short snum,long smoothratio);
|
||||
extern short LocateTheLocator(short n,short sn);
|
||||
|
@ -227,25 +197,13 @@ extern void compilecons(void);
|
|||
extern void Startup(long argc, char **argv);
|
||||
extern void getnames(void);
|
||||
extern int main(int argc,char **argv);
|
||||
extern char opendemoread(char which_demo);
|
||||
extern void opendemowrite(void);
|
||||
extern void record(void);
|
||||
extern void closedemowrite(void);
|
||||
extern long playback(void);
|
||||
extern char moveloop(void);
|
||||
extern void fakedomovethingscorrect(void);
|
||||
extern void fakedomovethings(void);
|
||||
extern char domovethings(void);
|
||||
extern void displaybonuspics(short x,short y,short p);
|
||||
extern void doorders(void);
|
||||
extern void dobonus(char bonusonly);
|
||||
extern void cameratext(short i);
|
||||
extern void vglass(long x,long y,short a,short wn,short n);
|
||||
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 SetupGameButtons(void);
|
||||
extern long GetTime(void);
|
||||
extern void CenterCenter(void);
|
||||
extern void UpperLeft(void);
|
||||
|
@ -280,7 +238,6 @@ extern void addweaponnoswitch(struct player_struct *p,short weapon);
|
|||
extern void addweapon(struct player_struct *p,short weapon);
|
||||
extern void checkavailinven(struct player_struct *p);
|
||||
extern void checkavailweapon(struct player_struct *p);
|
||||
extern long ifsquished(short i,short 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 short ssp(short i,unsigned long cliptype);
|
||||
|
@ -291,22 +248,11 @@ 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 ms(short i);
|
||||
extern void movefta(void);
|
||||
extern short ifhitsectors(short sectnum);
|
||||
extern short ifhitbyweapon(short sn);
|
||||
extern void moveobjects(void);
|
||||
extern void movecyclers(void);
|
||||
extern void movedummyplayers(void);
|
||||
extern void moveplayers(void);
|
||||
extern void movefx(void);
|
||||
extern void movefallers(void);
|
||||
extern void movestandables(void);
|
||||
extern void bounce(short i);
|
||||
extern void moveweapons(void);
|
||||
extern void movetransports(void);
|
||||
extern void moveeffectors(void);
|
||||
extern void moveactors(void);
|
||||
extern void moveexplosions(void);
|
||||
|
||||
// game.c
|
||||
extern void setstatusbarscale(long sc);
|
||||
|
|
|
@ -126,6 +126,14 @@ long tempwallptr;
|
|||
|
||||
long nonsharedtimer;
|
||||
|
||||
static void cameratext(short i);
|
||||
static char moveloop(void);
|
||||
static void doorders(void);
|
||||
static void fakedomovethings(void);
|
||||
static void fakedomovethingscorrect(void);
|
||||
static char domovethings(void);
|
||||
static long playback(void);
|
||||
|
||||
enum
|
||||
{
|
||||
T_EOF = -2,
|
||||
|
@ -182,7 +190,7 @@ static inline long sbarsc(long sc)
|
|||
return scale(sc,ud.statusbarscale,100);
|
||||
}
|
||||
|
||||
void patchstatusbar(long x1, long y1, long x2, long y2)
|
||||
static void patchstatusbar(long x1, long y1, long x2, long y2)
|
||||
{
|
||||
long scl, tx, ty;
|
||||
long clx1,cly1,clx2,cly2,clofx,clofy;
|
||||
|
@ -365,7 +373,7 @@ inline int mpgametext(int y,char *t,char s,short dabits)
|
|||
else return(gametext_(0,STARTALPHANUM, 5,y,t,s,0,dabits,0, 0, xdim-1, ydim-1));
|
||||
}
|
||||
|
||||
int minitext_(int x,int y,char *t,char s,char p,short sb)
|
||||
static int minitext_(int x,int y,char *t,char s,char p,short sb)
|
||||
{
|
||||
short ac;
|
||||
char ch,cmode;
|
||||
|
@ -403,16 +411,18 @@ inline int minitext(int x,int y,char *t,char p,short sb)
|
|||
return (minitext_(x,y,(char *)strip_color_codes(t),0,p,sb));
|
||||
}
|
||||
|
||||
void gamenumber(long x,long y,long n,char s)
|
||||
#if 0
|
||||
static void gamenumber(long x,long y,long n,char s)
|
||||
{
|
||||
char b[10];
|
||||
//ltoa(n,b,10);
|
||||
Bsnprintf(b,10,"%ld",n);
|
||||
gametext(x,y,b,s,2+8+16);
|
||||
}
|
||||
#endif
|
||||
|
||||
char recbuf[180];
|
||||
void allowtimetocorrecterrorswhenquitting(void)
|
||||
static void allowtimetocorrecterrorswhenquitting(void)
|
||||
{
|
||||
long i, j, oldtotalclock;
|
||||
|
||||
|
@ -935,7 +945,7 @@ void getpackets(void)
|
|||
|
||||
extern void computergetinput(long snum, input *syn);
|
||||
|
||||
void faketimerhandler()
|
||||
void faketimerhandler(void)
|
||||
{
|
||||
long i, j, k;
|
||||
// short who;
|
||||
|
@ -1267,7 +1277,7 @@ typedef struct
|
|||
cactype;
|
||||
extern cactype cac[];
|
||||
|
||||
void caches(void)
|
||||
static void caches(void)
|
||||
{
|
||||
short i,k;
|
||||
|
||||
|
@ -1291,7 +1301,7 @@ void caches(void)
|
|||
}
|
||||
}
|
||||
|
||||
void checksync(void)
|
||||
static void checksync(void)
|
||||
{
|
||||
long i;
|
||||
|
||||
|
@ -1532,7 +1542,7 @@ void myospalx(long x, long y, short tilenum, signed char shade, char orientation
|
|||
rotatesprite(x<<16,y<<16,32768L,a,tilenum,shade,p,2|orientation,windowx1,windowy1,windowx2,windowy2);
|
||||
}
|
||||
|
||||
void invennum(long x,long y,char num1,char ha,char sbits)
|
||||
static void invennum(long x,long y,char num1,char ha,char sbits)
|
||||
{
|
||||
char dabuf[80] = {0};
|
||||
Bsprintf(dabuf,"%d",num1);
|
||||
|
@ -1551,7 +1561,7 @@ void invennum(long x,long y,char num1,char ha,char sbits)
|
|||
rotatesprite(sbarx(x+4),sbary(y),sbarsc(65536L),0,THREEBYFIVE+dabuf[0]-'0',ha,0,sbits,0,0,xdim-1,ydim-1);
|
||||
}
|
||||
|
||||
void orderweaponnum(short ind,long x,long y,char ha)
|
||||
static void orderweaponnum(short ind,long x,long y,char ha)
|
||||
{
|
||||
rotatesprite(sbarx(x-7),sbary(y),sbarsc(65536L),0,THREEBYFIVE+ind+1,ha-10,7,10,0,0,xdim-1,ydim-1);
|
||||
rotatesprite(sbarx(x-3),sbary(y),sbarsc(65536L),0,THREEBYFIVE+10,ha,0,10,0,0,xdim-1,ydim-1);
|
||||
|
@ -1559,7 +1569,7 @@ void orderweaponnum(short ind,long x,long y,char ha)
|
|||
minitextshade(x+1,y-4,"ORDER",26,6,2+8+16);
|
||||
}
|
||||
|
||||
void weaponnum(short ind,long x,long y,long num1, long num2,char ha)
|
||||
static void weaponnum(short ind,long x,long y,long num1, long num2,char ha)
|
||||
{
|
||||
char dabuf[80] = {0};
|
||||
|
||||
|
@ -1587,7 +1597,7 @@ void weaponnum(short ind,long x,long y,long num1, long num2,char ha)
|
|||
else rotatesprite(sbarx(x+13),sbary(y),sbarsc(65536L),0,THREEBYFIVE+dabuf[0]-'0',ha,0,10,0,0,xdim-1,ydim-1);
|
||||
}
|
||||
|
||||
void weaponnum999(char ind,long x,long y,long num1, long num2,char ha)
|
||||
static void weaponnum999(char ind,long x,long y,long num1, long num2,char ha)
|
||||
{
|
||||
char dabuf[80] = {0};
|
||||
|
||||
|
@ -1624,7 +1634,7 @@ void weaponnum999(char ind,long x,long y,long num1, long num2,char ha)
|
|||
else rotatesprite(sbarx(x+25),sbary(y),sbarsc(65536L),0,THREEBYFIVE+dabuf[0]-'0',ha,0,10,0,0,xdim-1,ydim-1);
|
||||
}
|
||||
|
||||
void weapon_amounts(struct player_struct *p,long x,long y,long u)
|
||||
static void weapon_amounts(struct player_struct *p,long x,long y,long u)
|
||||
{
|
||||
int cw;
|
||||
|
||||
|
@ -1748,7 +1758,7 @@ void weapon_amounts(struct player_struct *p,long x,long y,long u)
|
|||
}
|
||||
}
|
||||
|
||||
void digitalnumber(long x,long y,long n,char s,char cs)
|
||||
static void digitalnumber(long x,long y,long n,char s,char cs)
|
||||
{
|
||||
|
||||
short i, j, k, p, c;
|
||||
|
@ -1820,7 +1830,7 @@ void scratchmarks(long x,long y,long n,char s,char p)
|
|||
if(ni) overwritesprite(x,y,SCRATCH+ni-1,s,p,0);
|
||||
}
|
||||
*/
|
||||
void displayinventory(struct player_struct *p)
|
||||
static void displayinventory(struct player_struct *p)
|
||||
{
|
||||
short n, j, xoff, y;
|
||||
|
||||
|
@ -1919,7 +1929,7 @@ void displayfragbar(void)
|
|||
|
||||
#define SBY (200-tilesizy[BOTTOMSTATUSBAR])
|
||||
|
||||
void coolgaugetext(short snum)
|
||||
static void coolgaugetext(short snum)
|
||||
{
|
||||
struct player_struct *p;
|
||||
long i, j, o, ss, u;
|
||||
|
@ -2343,7 +2353,7 @@ void coolgaugetext(short snum)
|
|||
#define AVERAGEFRAMES 16
|
||||
static long frameval[AVERAGEFRAMES], framecnt = 0;
|
||||
|
||||
void tics(void)
|
||||
static void tics(void)
|
||||
{
|
||||
long i,j;
|
||||
char b[10];
|
||||
|
@ -2379,7 +2389,7 @@ void tics(void)
|
|||
framecnt = ((framecnt+1)&(AVERAGEFRAMES-1));
|
||||
}
|
||||
|
||||
void coords(short snum)
|
||||
static void coords(short snum)
|
||||
{
|
||||
short y = 8;
|
||||
|
||||
|
@ -2416,7 +2426,7 @@ void coords(short snum)
|
|||
printext256(250L,y+99L+7,31,-1,tempbuf,0);
|
||||
}
|
||||
|
||||
void operatefta(void)
|
||||
static void operatefta(void)
|
||||
{
|
||||
long i, j, k, l;
|
||||
|
||||
|
@ -2523,7 +2533,7 @@ void FTA(short q,struct player_struct *p)
|
|||
else OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,p->ftq);
|
||||
}
|
||||
|
||||
void showtwoscreens(void)
|
||||
static void showtwoscreens(void)
|
||||
{
|
||||
if (!VOLUMEALL)
|
||||
{
|
||||
|
@ -2711,7 +2721,7 @@ inline short mpstrget(short x,short y,char *t,short dalen,short c)
|
|||
else return(strget(x,y,t,dalen,c));
|
||||
}
|
||||
|
||||
void typemode(void)
|
||||
static void typemode(void)
|
||||
{
|
||||
short ch, hitstate, i, j, l;
|
||||
|
||||
|
@ -2865,7 +2875,7 @@ void typemode(void)
|
|||
}
|
||||
}
|
||||
|
||||
void moveclouds(void)
|
||||
static void moveclouds(void)
|
||||
{
|
||||
if (totalclock > cloudtotalclock || totalclock < (cloudtotalclock-7))
|
||||
{
|
||||
|
@ -2884,7 +2894,7 @@ void moveclouds(void)
|
|||
}
|
||||
}
|
||||
|
||||
void drawoverheadmap(long cposx, long cposy, long czoom, short cang)
|
||||
static void drawoverheadmap(long cposx, long cposy, long czoom, short cang)
|
||||
{
|
||||
long i, j, k, l, x1, y1, x2=0, y2=0, x3, y3, x4, y4, ox, oy, xoff, yoff;
|
||||
long dax, day, cosang, sinang, xspan, yspan, sprx, spry;
|
||||
|
@ -3504,7 +3514,7 @@ void displayrest(long smoothratio)
|
|||
if (tintf > 0 || dotint) palto(tintr,tintg,tintb,tintf|128);
|
||||
}
|
||||
|
||||
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;
|
||||
long i, nx, ny, nz, hx, hy, hitx, hity, hitz;
|
||||
|
@ -4150,7 +4160,7 @@ short LocateTheLocator(short n,short sn)
|
|||
return -1;
|
||||
}
|
||||
|
||||
void dumpdebugdata(void)
|
||||
static void dumpdebugdata(void)
|
||||
{
|
||||
int i,j,x;
|
||||
FILE * fp=fopen("debug.con","w");
|
||||
|
@ -9254,7 +9264,52 @@ void sanitizegametype()
|
|||
// initprintf("ud.m_coop=%i after sanitisation\n",ud.m_coop);
|
||||
}
|
||||
|
||||
void genspriteremaps(void)
|
||||
{
|
||||
long j,fp;
|
||||
signed char look_pos;
|
||||
char *lookfn = "lookup.dat";
|
||||
|
||||
fp = kopen4load(lookfn,0);
|
||||
if (fp != -1)
|
||||
kread(fp,(char *)&numl,1);
|
||||
else
|
||||
gameexit("\nERROR: File 'LOOKUP.DAT' not found.");
|
||||
|
||||
for (j=0;j < numl;j++)
|
||||
{
|
||||
kread(fp,(signed char *)&look_pos,1);
|
||||
kread(fp,tempbuf,256);
|
||||
makepalookup((long)look_pos,tempbuf,0,0,0,1);
|
||||
}
|
||||
|
||||
for (j = 0; j < 256; j++)
|
||||
tempbuf[j] = j;
|
||||
numl++;
|
||||
makepalookup(numl, tempbuf, 15, 15, 15, 1);
|
||||
numl++;
|
||||
makepalookup(numl, tempbuf, 15, 0, 0, 1);
|
||||
numl++;
|
||||
makepalookup(numl, tempbuf, 0, 15, 0, 1);
|
||||
numl++;
|
||||
makepalookup(numl, tempbuf, 0, 0, 15, 1);
|
||||
|
||||
numl -= 3;
|
||||
kread(fp,&waterpal[0],768);
|
||||
kread(fp,&slimepal[0],768);
|
||||
kread(fp,&titlepal[0],768);
|
||||
kread(fp,&drealms[0],768);
|
||||
kread(fp,&endingpal[0],768);
|
||||
|
||||
palette[765] = palette[766] = palette[767] = 0;
|
||||
slimepal[765] = slimepal[766] = slimepal[767] = 0;
|
||||
waterpal[765] = waterpal[766] = waterpal[767] = 0;
|
||||
|
||||
kclose(fp);
|
||||
}
|
||||
|
||||
extern int startwin_run(void);
|
||||
static void SetupGameButtons(void);
|
||||
|
||||
void Startup(long argc, char **argv)
|
||||
{
|
||||
|
@ -9547,7 +9602,8 @@ void writestring(long a1,long a2,long a3,short a4,long vx,long vy,long vz)
|
|||
char testcd(char *fn, long testsiz);
|
||||
|
||||
// JBF: various hacks here
|
||||
void copyprotect(void)
|
||||
#if 0
|
||||
static void copyprotect(void)
|
||||
{
|
||||
// FILE *fp;
|
||||
// char idfile[256];
|
||||
|
@ -9565,6 +9621,7 @@ void copyprotect(void)
|
|||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void backtomenu(void)
|
||||
{
|
||||
|
@ -9812,8 +9869,10 @@ void app_main(int argc,char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
copyprotect();
|
||||
if (cp) return;
|
||||
#endif
|
||||
|
||||
if (netparamcount > 0) _buildargc = (argc -= netparamcount+1); // crop off the net parameters
|
||||
|
||||
|
@ -10153,7 +10212,7 @@ MAIN_LOOP_RESTART:
|
|||
|
||||
char demo_version;
|
||||
|
||||
char opendemoread(char which_demo) // 0 = mine
|
||||
static char opendemoread(char which_demo) // 0 = mine
|
||||
{
|
||||
char d[13];
|
||||
char ver;
|
||||
|
@ -10312,7 +10371,7 @@ void opendemowrite(void)
|
|||
ud.reccnt = 0;
|
||||
}
|
||||
|
||||
void record(void)
|
||||
static void record(void)
|
||||
{
|
||||
short i;
|
||||
|
||||
|
@ -10359,7 +10418,7 @@ oldinput;
|
|||
oldinput oldrecsync[RECSYNCBUFSIZ];
|
||||
|
||||
// extern long syncs[];
|
||||
long playback(void)
|
||||
static long playback(void)
|
||||
{
|
||||
long i,j,k,l;
|
||||
char foundemo;
|
||||
|
@ -10576,7 +10635,7 @@ RECHECK:
|
|||
return 1;
|
||||
}
|
||||
|
||||
char moveloop()
|
||||
static char moveloop()
|
||||
{
|
||||
long i;
|
||||
|
||||
|
@ -10596,7 +10655,7 @@ char moveloop()
|
|||
return 0;
|
||||
}
|
||||
|
||||
void fakedomovethingscorrect(void)
|
||||
static void fakedomovethingscorrect(void)
|
||||
{
|
||||
long i;
|
||||
struct player_struct *p;
|
||||
|
@ -10636,7 +10695,7 @@ void fakedomovethingscorrect(void)
|
|||
fakedomovethings();
|
||||
}
|
||||
|
||||
void fakedomovethings(void)
|
||||
static void fakedomovethings(void)
|
||||
{
|
||||
input *syn;
|
||||
struct player_struct *p;
|
||||
|
@ -11075,13 +11134,11 @@ ENDFAKEPROCESSINPUT:
|
|||
sprite[p->i].cstat = backcstat;
|
||||
}
|
||||
|
||||
char domovethings(void)
|
||||
static char domovethings(void)
|
||||
{
|
||||
short i, j, k;
|
||||
int i, j;
|
||||
char ch;
|
||||
|
||||
long p;
|
||||
|
||||
for (i=connecthead;i>=0;i=connectpoint2[i])
|
||||
if (sync[i].bits&(1<<17))
|
||||
{
|
||||
|
@ -11302,35 +11359,7 @@ char domovethings(void)
|
|||
}
|
||||
|
||||
if (ud.pause_on == 0)
|
||||
{
|
||||
|
||||
movefta(); //ST 2
|
||||
moveweapons(); //ST 5 (must be last)
|
||||
movetransports(); //ST 9
|
||||
|
||||
moveplayers(); //ST 10
|
||||
movefallers(); //ST 12
|
||||
moveexplosions(); //ST 4
|
||||
|
||||
moveactors(); //ST 1
|
||||
moveeffectors(); //ST 3
|
||||
|
||||
movestandables(); //ST 6
|
||||
|
||||
for (k=0;k<MAXSTATUS;k++)
|
||||
{
|
||||
i = headspritestat[k];
|
||||
while (i >= 0)
|
||||
{
|
||||
j = nextspritestat[i];
|
||||
OnEvent(EVENT_GAME,i, findplayer(&sprite[i],&p), p);
|
||||
i = j;
|
||||
}
|
||||
}
|
||||
|
||||
doanimations();
|
||||
movefx(); //ST 11
|
||||
}
|
||||
moveobjects();
|
||||
|
||||
fakedomovethingscorrect();
|
||||
|
||||
|
@ -11349,7 +11378,7 @@ char domovethings(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void doorders(void)
|
||||
static void doorders(void)
|
||||
{
|
||||
setview(0,0,xdim-1,ydim-1);
|
||||
|
||||
|
@ -12117,7 +12146,7 @@ FRAGBONUS:
|
|||
}
|
||||
}
|
||||
|
||||
void cameratext(short i)
|
||||
static void cameratext(short i)
|
||||
{
|
||||
char flipbits;
|
||||
long x , y;
|
||||
|
@ -12140,6 +12169,7 @@ void cameratext(short i)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
void vglass(long x,long y,short a,short wn,short n)
|
||||
{
|
||||
long z, zincs;
|
||||
|
@ -12152,6 +12182,7 @@ void vglass(long x,long y,short a,short wn,short n)
|
|||
for (z = sector[sect].ceilingz;z < sector[sect].floorz; z += zincs)
|
||||
EGS(sect,x,y,z-(TRAND&8191),GLASSPIECES+(z&(TRAND%3)),-32,36,36,a+128-(TRAND&255),16+(TRAND&31),0,-1,5);
|
||||
}
|
||||
#endif
|
||||
|
||||
void lotsofglass(short i,short wallnum,short n)
|
||||
{
|
||||
|
@ -12279,7 +12310,7 @@ void lotsofcolourglass(short i,short wallnum,short n)
|
|||
}
|
||||
}
|
||||
|
||||
void SetupGameButtons(void)
|
||||
static void SetupGameButtons(void)
|
||||
{
|
||||
CONTROL_DefineFlag(gamefunc_Move_Forward,false);
|
||||
CONTROL_DefineFlag(gamefunc_Move_Backward,false);
|
||||
|
@ -12348,6 +12379,7 @@ long GetTime(void)
|
|||
return totalclock;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*
|
||||
===================
|
||||
=
|
||||
|
@ -12412,4 +12444,4 @@ void CenterRudder(void)
|
|||
{
|
||||
initprintf("Center the rudder control and press a button\n");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -34,7 +34,7 @@ static spritetype *g_sp;
|
|||
|
||||
extern int32 scripthandle;
|
||||
|
||||
void DoUserDef(char bSet, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer)
|
||||
static void DoUserDef(char bSet, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer)
|
||||
{
|
||||
long lValue;
|
||||
|
||||
|
@ -809,7 +809,7 @@ void DoUserDef(char bSet, const long *lLabelID, const long *lVar2, const long *s
|
|||
return;
|
||||
}
|
||||
|
||||
void DoThisProjectile(char bSet, const long *lVar1, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer)
|
||||
static void DoThisProjectile(char bSet, const long *lVar1, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer)
|
||||
{
|
||||
long lValue,proj;
|
||||
|
||||
|
@ -1028,7 +1028,7 @@ void DoThisProjectile(char bSet, const long *lVar1, const long *lLabelID, const
|
|||
return;
|
||||
}
|
||||
|
||||
void DoPlayer(char bSet, const long *lVar1, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer, const long *lParm2)
|
||||
static void DoPlayer(char bSet, const long *lVar1, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer, const long *lParm2)
|
||||
{
|
||||
int iPlayer;
|
||||
long lValue;
|
||||
|
@ -2056,7 +2056,7 @@ void DoPlayer(char bSet, const long *lVar1, const long *lLabelID, const long *lV
|
|||
return;
|
||||
}
|
||||
|
||||
void DoInput(char bSet, const long *lVar1, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer)
|
||||
static void DoInput(char bSet, const long *lVar1, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer)
|
||||
{
|
||||
int iPlayer;
|
||||
long lValue;
|
||||
|
@ -2123,7 +2123,7 @@ void DoInput(char bSet, const long *lVar1, const long *lLabelID, const long *lVa
|
|||
return;
|
||||
}
|
||||
|
||||
void DoWall(char bSet, const long *lVar1, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer)
|
||||
static void DoWall(char bSet, const long *lVar1, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer)
|
||||
{
|
||||
int iWall;
|
||||
long lValue;
|
||||
|
@ -2261,7 +2261,7 @@ void DoWall(char bSet, const long *lVar1, const long *lLabelID, const long *lVar
|
|||
return;
|
||||
}
|
||||
|
||||
void DoSector(char bSet, const long *lVar1, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer)
|
||||
static void DoSector(char bSet, const long *lVar1, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer)
|
||||
{
|
||||
int iSector;
|
||||
long lValue;
|
||||
|
@ -2439,7 +2439,7 @@ void DoSector(char bSet, const long *lVar1, const long *lLabelID, const long *lV
|
|||
return;
|
||||
}
|
||||
|
||||
void DoActor(char bSet, const long *lVar1, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer, const long *lParm2)
|
||||
static void DoActor(char bSet, const long *lVar1, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer, const long *lParm2)
|
||||
{
|
||||
int iActor;
|
||||
long lValue;
|
||||
|
@ -2794,7 +2794,7 @@ void DoActor(char bSet, const long *lVar1, const long *lLabelID, const long *lVa
|
|||
return;
|
||||
}
|
||||
|
||||
void DoProjectile(char bSet, const long *lVar1, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer)
|
||||
static void DoProjectile(char bSet, const long *lVar1, const long *lLabelID, const long *lVar2, const long *sActor, const long *sPlayer)
|
||||
{
|
||||
long lValue,proj;
|
||||
|
||||
|
@ -3010,6 +3010,8 @@ void DoProjectile(char bSet, const long *lVar1, const long *lLabelID, const long
|
|||
return;
|
||||
}
|
||||
|
||||
static char parse(void);
|
||||
|
||||
void OnEvent(int iEventID, short sActor,short sPlayer,long lDist)
|
||||
{
|
||||
short og_i,og_p;
|
||||
|
@ -3081,7 +3083,46 @@ void OnEvent(int iEventID, short sActor,short sPlayer,long lDist)
|
|||
//AddLog("End of Execution");
|
||||
}
|
||||
|
||||
char dodge(spritetype *s)
|
||||
static long ifsquished(short i, short p)
|
||||
{
|
||||
sectortype *sc;
|
||||
char squishme;
|
||||
long floorceildist;
|
||||
|
||||
if (PN == APLAYER && ud.clipping)
|
||||
return 0;
|
||||
|
||||
sc = §or[SECT];
|
||||
floorceildist = sc->floorz - sc->ceilingz;
|
||||
|
||||
if (sc->lotag != 23)
|
||||
{
|
||||
if (sprite[i].pal == 1)
|
||||
squishme = floorceildist < (32<<8) && (sc->lotag&32768) == 0;
|
||||
else
|
||||
squishme = floorceildist < (12<<8); // && (sc->lotag&32768) == 0;
|
||||
}
|
||||
else squishme = 0;
|
||||
|
||||
if (squishme)
|
||||
{
|
||||
FTA(10,&ps[p]);
|
||||
|
||||
if (badguy(&sprite[i])) sprite[i].xvel = 0;
|
||||
|
||||
if (sprite[i].pal == 1)
|
||||
{
|
||||
hittype[i].picnum = SHOTSPARK1;
|
||||
hittype[i].extra = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char dodge(spritetype *s)
|
||||
{
|
||||
short i;
|
||||
long bx,by,mx,my,bxvect,byvect,mxvect,myvect,d;
|
||||
|
@ -3281,7 +3322,7 @@ short getincangle(short a,short na)
|
|||
}
|
||||
}
|
||||
|
||||
void alterang(short a)
|
||||
static void alterang(short a)
|
||||
{
|
||||
short aang, angdif, goalang,j;
|
||||
long ticselapsed, *moveptr;
|
||||
|
@ -3351,7 +3392,7 @@ void alterang(short a)
|
|||
}
|
||||
}
|
||||
|
||||
void move()
|
||||
static void move(void)
|
||||
{
|
||||
long l, *moveptr;
|
||||
short a, goalang, angdif;
|
||||
|
@ -3547,9 +3588,7 @@ void move()
|
|||
}
|
||||
}
|
||||
|
||||
char parse(void);
|
||||
|
||||
void parseifelse(long condition)
|
||||
static void parseifelse(long condition)
|
||||
{
|
||||
if (condition)
|
||||
{
|
||||
|
@ -3572,7 +3611,7 @@ void parseifelse(long condition)
|
|||
|
||||
// long *it = 0x00589a04;
|
||||
|
||||
char parse(void)
|
||||
static char parse(void)
|
||||
{
|
||||
long j, l, s, tw;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ static void tloadtile(short tilenume, char type)
|
|||
}
|
||||
}
|
||||
|
||||
void cachespritenum(short i)
|
||||
static void cachespritenum(short i)
|
||||
{
|
||||
char maxc;
|
||||
short j;
|
||||
|
@ -203,7 +203,7 @@ void cachespritenum(short i)
|
|||
for (j = PN; j < (PN+maxc); j++) tloadtile(j,1);
|
||||
}
|
||||
|
||||
void cachegoodsprites(void)
|
||||
static void cachegoodsprites(void)
|
||||
{
|
||||
short i,j;
|
||||
|
||||
|
@ -278,7 +278,7 @@ char getsound(unsigned short num)
|
|||
return 1;
|
||||
}
|
||||
|
||||
void precachenecessarysounds(void)
|
||||
static void precachenecessarysounds(void)
|
||||
{
|
||||
short i, j;
|
||||
|
||||
|
@ -485,7 +485,7 @@ void pickrandomspot(short snum)
|
|||
p->cursectnum = po[i].os;
|
||||
}
|
||||
|
||||
void resetplayerstats(short snum)
|
||||
static void resetplayerstats(short snum)
|
||||
{
|
||||
struct player_struct *p;
|
||||
|
||||
|
@ -645,7 +645,7 @@ void resetinventory(short snum)
|
|||
OnEvent(EVENT_RESETINVENTORY, p->i, snum, -1);
|
||||
}
|
||||
|
||||
void resetprestat(short snum,char g)
|
||||
static void resetprestat(short snum,char g)
|
||||
{
|
||||
struct player_struct *p;
|
||||
short i;
|
||||
|
@ -708,7 +708,7 @@ void resetprestat(short snum,char g)
|
|||
|
||||
}
|
||||
|
||||
void setupbackdrop(short sky)
|
||||
static void setupbackdrop(short sky)
|
||||
{
|
||||
short i;
|
||||
|
||||
|
@ -750,7 +750,7 @@ void setupbackdrop(short sky)
|
|||
pskybits=3;
|
||||
}
|
||||
|
||||
void prelevel(char g)
|
||||
static void prelevel(char g)
|
||||
{
|
||||
short i, nexti, j, startwall, endwall, lotaglist;
|
||||
short lotags[65];
|
||||
|
@ -1174,7 +1174,7 @@ void newgame(char vn,char ln,char sk)
|
|||
}
|
||||
}
|
||||
|
||||
void resetpspritevars(char g)
|
||||
static void resetpspritevars(char g)
|
||||
{
|
||||
short i, j, nexti,circ;
|
||||
long firstx,firsty;
|
||||
|
@ -1351,7 +1351,7 @@ void resetpspritevars(char g)
|
|||
}
|
||||
}
|
||||
|
||||
void clearfrags(void)
|
||||
static void clearfrags(void)
|
||||
{
|
||||
short i;
|
||||
|
||||
|
@ -1371,50 +1371,6 @@ void resettimevars(void)
|
|||
ready2send = 1;
|
||||
}
|
||||
|
||||
void genspriteremaps(void)
|
||||
{
|
||||
long j,fp;
|
||||
signed char look_pos;
|
||||
char *lookfn = "lookup.dat";
|
||||
|
||||
fp = kopen4load(lookfn,0);
|
||||
if (fp != -1)
|
||||
kread(fp,(char *)&numl,1);
|
||||
else
|
||||
gameexit("\nERROR: File 'LOOKUP.DAT' not found.");
|
||||
|
||||
for (j=0;j < numl;j++)
|
||||
{
|
||||
kread(fp,(signed char *)&look_pos,1);
|
||||
kread(fp,tempbuf,256);
|
||||
makepalookup((long)look_pos,tempbuf,0,0,0,1);
|
||||
}
|
||||
|
||||
for (j = 0; j < 256; j++)
|
||||
tempbuf[j] = j;
|
||||
numl++;
|
||||
makepalookup(numl, tempbuf, 15, 15, 15, 1);
|
||||
numl++;
|
||||
makepalookup(numl, tempbuf, 15, 0, 0, 1);
|
||||
numl++;
|
||||
makepalookup(numl, tempbuf, 0, 15, 0, 1);
|
||||
numl++;
|
||||
makepalookup(numl, tempbuf, 0, 0, 15, 1);
|
||||
|
||||
numl -= 3;
|
||||
kread(fp,&waterpal[0],768);
|
||||
kread(fp,&slimepal[0],768);
|
||||
kread(fp,&titlepal[0],768);
|
||||
kread(fp,&drealms[0],768);
|
||||
kread(fp,&endingpal[0],768);
|
||||
|
||||
palette[765] = palette[766] = palette[767] = 0;
|
||||
slimepal[765] = slimepal[766] = slimepal[767] = 0;
|
||||
waterpal[765] = waterpal[766] = waterpal[767] = 0;
|
||||
|
||||
kclose(fp);
|
||||
}
|
||||
|
||||
void waitforeverybody()
|
||||
{
|
||||
long i;
|
||||
|
|
Loading…
Reference in a new issue