mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
new version of astyle
git-svn-id: https://svn.eduke32.com/eduke32@1229 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4ff6023244
commit
151189efab
41 changed files with 2449 additions and 2473 deletions
|
@ -424,8 +424,7 @@ void setpalconv(int32_t pal,int32_t pal1,int32_t pal2)
|
||||||
palconv[i].pal1=pal1;
|
palconv[i].pal1=pal1;
|
||||||
palconv[i].pal2=pal2; return;
|
palconv[i].pal2=pal2; return;
|
||||||
}
|
}
|
||||||
else
|
else if (palconv[i].pal==pal&&palconv[i].pal1==pal1)
|
||||||
if (palconv[i].pal==pal&&palconv[i].pal1==pal1)
|
|
||||||
{
|
{
|
||||||
palconv[i].pal2=pal2; return;
|
palconv[i].pal2=pal2; return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,8 +99,7 @@ int32_t nfCheckCP(int32_t other) //Check if target player is our current NatFre
|
||||||
{
|
{
|
||||||
if (!natfree || nfFinished)
|
if (!natfree || nfFinished)
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else if (nfCurrentPlayer == other) return 1;
|
||||||
if (nfCurrentPlayer == other) return 1;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4488,9 +4488,7 @@ void polymost_drawrooms()
|
||||||
hitallsprites = 0;
|
hitallsprites = 0;
|
||||||
|
|
||||||
searchsector = hitinfo.hitsect;
|
searchsector = hitinfo.hitsect;
|
||||||
if (hitinfo.pos.z<cz) searchstat = 1;else
|
if (hitinfo.pos.z<cz) searchstat = 1; else if (hitinfo.pos.z>fz) searchstat = 2; else if (hitinfo.hitwall >= 0)
|
||||||
if (hitinfo.pos.z>fz) searchstat = 2;else
|
|
||||||
if (hitinfo.hitwall >= 0)
|
|
||||||
{
|
{
|
||||||
searchwall = hitinfo.hitwall; searchstat = 0;
|
searchwall = hitinfo.hitwall; searchstat = 0;
|
||||||
if (wall[hitinfo.hitwall].nextwall >= 0)
|
if (wall[hitinfo.hitwall].nextwall >= 0)
|
||||||
|
|
|
@ -2388,8 +2388,7 @@ static void G_MoveWeapons(void)
|
||||||
j = 16384|(s->sectnum);
|
j = 16384|(s->sectnum);
|
||||||
s->zvel = -1;
|
s->zvel = -1;
|
||||||
}
|
}
|
||||||
else
|
else if ((s->z > ActorExtra[i].floorz && sector[s->sectnum].lotag != 1) ||
|
||||||
if ((s->z > ActorExtra[i].floorz && sector[s->sectnum].lotag != 1) ||
|
|
||||||
(s->z > ActorExtra[i].floorz+(16<<8) && sector[s->sectnum].lotag == 1))
|
(s->z > ActorExtra[i].floorz+(16<<8) && sector[s->sectnum].lotag == 1))
|
||||||
{
|
{
|
||||||
j = 16384|(s->sectnum);
|
j = 16384|(s->sectnum);
|
||||||
|
@ -2717,8 +2716,7 @@ static void G_MoveWeapons(void)
|
||||||
j = 16384|(s->sectnum);
|
j = 16384|(s->sectnum);
|
||||||
s->zvel = -1;
|
s->zvel = -1;
|
||||||
}
|
}
|
||||||
else
|
else if ((s->z > ActorExtra[i].floorz && sector[s->sectnum].lotag != 1) ||
|
||||||
if ((s->z > ActorExtra[i].floorz && sector[s->sectnum].lotag != 1) ||
|
|
||||||
(s->z > ActorExtra[i].floorz+(16<<8) && sector[s->sectnum].lotag == 1))
|
(s->z > ActorExtra[i].floorz+(16<<8) && sector[s->sectnum].lotag == 1))
|
||||||
{
|
{
|
||||||
j = 16384|(s->sectnum);
|
j = 16384|(s->sectnum);
|
||||||
|
@ -4721,8 +4719,7 @@ static void G_MoveMisc(void) // STATNUM 5
|
||||||
l += 3;
|
l += 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (t[0] > 64)
|
||||||
if (t[0] > 64)
|
|
||||||
{
|
{
|
||||||
t[0]--;
|
t[0]--;
|
||||||
l -= 3;
|
l -= 3;
|
||||||
|
@ -4821,8 +4818,7 @@ static void G_MoveMisc(void) // STATNUM 5
|
||||||
if (s->zvel < 64)
|
if (s->zvel < 64)
|
||||||
s->zvel += (g_spriteGravity>>5)+(krand()&7);
|
s->zvel += (g_spriteGravity>>5)+(krand()&7);
|
||||||
}
|
}
|
||||||
else
|
else if (s->zvel < 144)
|
||||||
if (s->zvel < 144)
|
|
||||||
s->zvel += (g_spriteGravity>>5)+(krand()&7);
|
s->zvel += (g_spriteGravity>>5)+(krand()&7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7478,19 +7474,6 @@ void A_PlayAlertSound(int32_t i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline int32_t A_CheckSpriteFlags(int32_t iActor, int32_t iType)
|
|
||||||
{
|
|
||||||
if ((SpriteFlags[sprite[iActor].picnum]^ActorExtra[iActor].flags) & iType) return 1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int32_t A_CheckSpriteTileFlags(int32_t iPicnum, int32_t iType)
|
|
||||||
{
|
|
||||||
if (SpriteFlags[iPicnum] & iType) return 1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t A_CheckEnemyTile(int32_t pn)
|
int32_t A_CheckEnemyTile(int32_t pn)
|
||||||
{
|
{
|
||||||
//this case can't be handled by the dynamictostatic system because it adds
|
//this case can't be handled by the dynamictostatic system because it adds
|
||||||
|
|
|
@ -660,8 +660,7 @@ const char *ExtGetSpriteCaption(int16_t spritenum)
|
||||||
else Bsprintf(tempbuf,"%s",lo);
|
else Bsprintf(tempbuf,"%s",lo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (sprite[spritenum].picnum==SECTOREFFECTOR)
|
||||||
if (sprite[spritenum].picnum==SECTOREFFECTOR)
|
|
||||||
{
|
{
|
||||||
if (onnames==8)
|
if (onnames==8)
|
||||||
tempbuf[0] = 0;
|
tempbuf[0] = 0;
|
||||||
|
@ -898,8 +897,7 @@ void ExtShowWallData(int16_t wallnum) //F6
|
||||||
case SECTOREFFECTOR:
|
case SECTOREFFECTOR:
|
||||||
if (sprite[i].lotag==10 || sprite[i].lotag==27 || sprite[i].lotag==28 || sprite[i].lotag==29)
|
if (sprite[i].lotag==10 || sprite[i].lotag==27 || sprite[i].lotag==28 || sprite[i].lotag==29)
|
||||||
break;
|
break;
|
||||||
else
|
else if (sprite[i].hitag>nextfreetag) nextfreetag=1+sprite[i].hitag;
|
||||||
if (sprite[i].hitag>nextfreetag) nextfreetag=1+sprite[i].hitag;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -5324,8 +5322,7 @@ static void Keys3d(void)
|
||||||
{
|
{
|
||||||
if (eitherSHIFT)
|
if (eitherSHIFT)
|
||||||
infobox^=1;
|
infobox^=1;
|
||||||
else
|
else if (eitherCTRL)
|
||||||
if (eitherCTRL)
|
|
||||||
infobox^=2;
|
infobox^=2;
|
||||||
else usedcount=!usedcount;
|
else usedcount=!usedcount;
|
||||||
keystatus[KEYSC_F2] = 0;
|
keystatus[KEYSC_F2] = 0;
|
||||||
|
@ -5773,8 +5770,7 @@ static void Keys3d(void)
|
||||||
if (updownunits) {mouseax=0;}
|
if (updownunits) {mouseax=0;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (eitherCTRL)
|
||||||
if (eitherCTRL)
|
|
||||||
{
|
{
|
||||||
mskip=1;
|
mskip=1;
|
||||||
if (mousex!=0)
|
if (mousex!=0)
|
||||||
|
@ -5881,8 +5877,7 @@ static void Keys3d(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (eitherCTRL)
|
||||||
if (eitherCTRL)
|
|
||||||
{
|
{
|
||||||
mskip=1;
|
mskip=1;
|
||||||
if (mousey!=0)
|
if (mousey!=0)
|
||||||
|
|
|
@ -255,10 +255,33 @@ extern void Net_SendQuit(void);
|
||||||
extern void G_AddUserQuote(const char *daquote);
|
extern void G_AddUserQuote(const char *daquote);
|
||||||
extern void Net_NewGame(int32_t volume, int32_t level);
|
extern void Net_NewGame(int32_t volume, int32_t level);
|
||||||
|
|
||||||
extern inline int32_t A_CheckSpriteFlags(int32_t iActor, int32_t iType);
|
extern int32_t SpriteFlags[MAXTILES];
|
||||||
extern inline int32_t A_CheckSpriteTileFlags(int32_t iPicnum, int32_t iType);
|
|
||||||
|
|
||||||
extern int32_t G_GetTeamPalette(int32_t team);
|
inline int32_t A_CheckSpriteFlags(int32_t iActor, int32_t iType)
|
||||||
|
{
|
||||||
|
return (((SpriteFlags[sprite[iActor].picnum]^ActorExtra[iActor].flags) & iType) != 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline int32_t A_CheckSpriteTileFlags(int32_t iPicnum, int32_t iType)
|
||||||
|
{
|
||||||
|
return ((SpriteFlags[iPicnum] & iType) != 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline int32_t G_GetTeamPalette(int32_t team)
|
||||||
|
{
|
||||||
|
switch (team)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
return 3;
|
||||||
|
case 1:
|
||||||
|
return 10;
|
||||||
|
case 2:
|
||||||
|
return 11;
|
||||||
|
case 3:
|
||||||
|
return 12;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
extern void se40code(int32_t x,int32_t y,int32_t z,int32_t a,int32_t h, int32_t smoothratio);
|
extern void se40code(int32_t x,int32_t y,int32_t z,int32_t a,int32_t h, int32_t smoothratio);
|
||||||
|
|
||||||
|
|
|
@ -11647,8 +11647,7 @@ static int32_t G_OpenDemoRead(int32_t g_whichDemo) // 0 = mine
|
||||||
{
|
{
|
||||||
if ((recfilep = kopen4loadfrommod(firstdemofile,g_loadFromGroupOnly)) == -1) return(0);
|
if ((recfilep = kopen4loadfrommod(firstdemofile,g_loadFromGroupOnly)) == -1) return(0);
|
||||||
}
|
}
|
||||||
else
|
else if ((recfilep = kopen4loadfrommod(d,g_loadFromGroupOnly)) == -1) return(0);
|
||||||
if ((recfilep = kopen4loadfrommod(d,g_loadFromGroupOnly)) == -1) return(0);
|
|
||||||
|
|
||||||
if (kread(recfilep,&ud.reccnt,sizeof(int32_t)) != sizeof(int32_t)) goto corrupt;
|
if (kread(recfilep,&ud.reccnt,sizeof(int32_t)) != sizeof(int32_t)) goto corrupt;
|
||||||
if (kread(recfilep,&ver,sizeof(uint8_t)) != sizeof(uint8_t)) goto corrupt;
|
if (kread(recfilep,&ver,sizeof(uint8_t)) != sizeof(uint8_t)) goto corrupt;
|
||||||
|
|
|
@ -278,7 +278,7 @@ static void G_PrecacheSprites(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: this function is a piece of shit, needs specific sounds listed
|
// FIXME: this function is a piece of shit, needs specific sounds listed
|
||||||
static int32_t CacheSound(uint32_t num)
|
static int32_t G_CacheSound(uint32_t num)
|
||||||
{
|
{
|
||||||
int16_t fp = -1;
|
int16_t fp = -1;
|
||||||
int32_t l;
|
int32_t l;
|
||||||
|
@ -326,7 +326,7 @@ static void G_PrecacheSounds(void)
|
||||||
handleevents();
|
handleevents();
|
||||||
Net_GetPackets();
|
Net_GetPackets();
|
||||||
}
|
}
|
||||||
CacheSound(i);
|
G_CacheSound(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -845,7 +845,7 @@ static void resetprestat(int32_t snum,int32_t g)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setupbackdrop(int16_t sky)
|
static inline void G_SetupBackdrop(int16_t sky)
|
||||||
{
|
{
|
||||||
int16_t i;
|
int16_t i;
|
||||||
|
|
||||||
|
@ -887,7 +887,7 @@ static void setupbackdrop(int16_t sky)
|
||||||
pskybits=3;
|
pskybits=3;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prelevel(char g)
|
static inline void prelevel(char g)
|
||||||
{
|
{
|
||||||
int32_t i, nexti, j, startwall, endwall, lotaglist;
|
int32_t i, nexti, j, startwall, endwall, lotaglist;
|
||||||
int32_t lotags[MAXSPRITES];
|
int32_t lotags[MAXSPRITES];
|
||||||
|
@ -922,7 +922,7 @@ static void prelevel(char g)
|
||||||
for (j=0; j<5; j++)
|
for (j=0; j<5; j++)
|
||||||
tloadtile(sector[i].ceilingpicnum+j, 0);
|
tloadtile(sector[i].ceilingpicnum+j, 0);
|
||||||
}
|
}
|
||||||
setupbackdrop(sector[i].ceilingpicnum);
|
G_SetupBackdrop(sector[i].ceilingpicnum);
|
||||||
|
|
||||||
if (sector[i].ceilingpicnum == CLOUDYSKIES && g_numClouds < 127)
|
if (sector[i].ceilingpicnum == CLOUDYSKIES && g_numClouds < 127)
|
||||||
clouds[g_numClouds++] = i;
|
clouds[g_numClouds++] = i;
|
||||||
|
@ -1230,7 +1230,7 @@ void G_NewGame(int32_t vn,int32_t ln,int32_t sk)
|
||||||
|
|
||||||
g_skillSoundID = -1;
|
g_skillSoundID = -1;
|
||||||
|
|
||||||
waitforeverybody();
|
Net_WaitForEverybody();
|
||||||
ready2send = 0;
|
ready2send = 0;
|
||||||
|
|
||||||
if (ud.m_recstat != 2 && ud.last_level >= 0 && ud.multimode > 1 && (ud.coop&GAMETYPE_SCORESHEET))
|
if (ud.m_recstat != 2 && ud.last_level >= 0 && ud.multimode > 1 && (ud.coop&GAMETYPE_SCORESHEET))
|
||||||
|
@ -1322,22 +1322,6 @@ void G_NewGame(int32_t vn,int32_t ln,int32_t sk)
|
||||||
X_OnEvent(EVENT_NEWGAME, g_player[screenpeek].ps->i, screenpeek, -1);
|
X_OnEvent(EVENT_NEWGAME, g_player[screenpeek].ps->i, screenpeek, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t G_GetTeamPalette(int32_t team)
|
|
||||||
{
|
|
||||||
switch (team)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
return 3;
|
|
||||||
case 1:
|
|
||||||
return 10;
|
|
||||||
case 2:
|
|
||||||
return 11;
|
|
||||||
case 3:
|
|
||||||
return 12;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void resetpspritevars(char g)
|
static void resetpspritevars(char g)
|
||||||
{
|
{
|
||||||
int16_t i, j, nexti,circ;
|
int16_t i, j, nexti,circ;
|
||||||
|
@ -1532,7 +1516,7 @@ void G_ResetTimers(void)
|
||||||
g_moveThingsCount = 0;
|
g_moveThingsCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void waitforeverybody()
|
void Net_WaitForEverybody(void)
|
||||||
{
|
{
|
||||||
int32_t i;
|
int32_t i;
|
||||||
|
|
||||||
|
@ -1948,7 +1932,7 @@ int32_t G_EnterLevel(int32_t g)
|
||||||
|
|
||||||
g_restorePalette = 1;
|
g_restorePalette = 1;
|
||||||
|
|
||||||
waitforeverybody();
|
Net_WaitForEverybody();
|
||||||
mmulti_flushpackets();
|
mmulti_flushpackets();
|
||||||
|
|
||||||
G_FadePalette(0,0,0,0);
|
G_FadePalette(0,0,0,0);
|
||||||
|
|
|
@ -398,8 +398,7 @@ int32_t S_PlaySoundXYZ(int32_t num, int32_t i, const vec3_t *pos)
|
||||||
if (*g_sounds[num].ptr == 'C')
|
if (*g_sounds[num].ptr == 'C')
|
||||||
voice = FX_PlayLoopedVOC(g_sounds[num].ptr, start, start + g_sounds[num].soundsiz,
|
voice = FX_PlayLoopedVOC(g_sounds[num].ptr, start, start + g_sounds[num].soundsiz,
|
||||||
pitch,sndist>>6,sndist>>6,0,g_sounds[num].pr,num);
|
pitch,sndist>>6,sndist>>6,0,g_sounds[num].pr,num);
|
||||||
else
|
else if (*g_sounds[num].ptr == 'O')
|
||||||
if (*g_sounds[num].ptr == 'O')
|
|
||||||
voice = FX_PlayLoopedOGG(g_sounds[num].ptr, start, start + g_sounds[num].soundsiz,
|
voice = FX_PlayLoopedOGG(g_sounds[num].ptr, start, start + g_sounds[num].soundsiz,
|
||||||
pitch,sndist>>6,sndist>>6,0,g_sounds[num].pr,num);
|
pitch,sndist>>6,sndist>>6,0,g_sounds[num].pr,num);
|
||||||
else
|
else
|
||||||
|
@ -410,8 +409,7 @@ int32_t S_PlaySoundXYZ(int32_t num, int32_t i, const vec3_t *pos)
|
||||||
{
|
{
|
||||||
if (*g_sounds[num].ptr == 'C')
|
if (*g_sounds[num].ptr == 'C')
|
||||||
voice = FX_PlayVOC3D(g_sounds[ num ].ptr,pitch,sndang>>6,sndist>>6, g_sounds[num].pr, num);
|
voice = FX_PlayVOC3D(g_sounds[ num ].ptr,pitch,sndang>>6,sndist>>6, g_sounds[num].pr, num);
|
||||||
else
|
else if (*g_sounds[num].ptr == 'O')
|
||||||
if (*g_sounds[num].ptr == 'O')
|
|
||||||
voice = FX_PlayOGG3D(g_sounds[ num ].ptr,pitch,sndang>>6,sndist>>6, g_sounds[num].pr, num);
|
voice = FX_PlayOGG3D(g_sounds[ num ].ptr,pitch,sndang>>6,sndist>>6, g_sounds[num].pr, num);
|
||||||
else
|
else
|
||||||
voice = FX_PlayWAV3D(g_sounds[ num ].ptr,pitch,sndang>>6,sndist>>6, g_sounds[num].pr, num);
|
voice = FX_PlayWAV3D(g_sounds[ num ].ptr,pitch,sndang>>6,sndist>>6, g_sounds[num].pr, num);
|
||||||
|
@ -475,8 +473,7 @@ void S_PlaySound(int32_t num)
|
||||||
voice = FX_PlayLoopedVOC(g_sounds[num].ptr, start, start + g_sounds[num].soundsiz,
|
voice = FX_PlayLoopedVOC(g_sounds[num].ptr, start, start + g_sounds[num].soundsiz,
|
||||||
pitch,LOUDESTVOLUME,LOUDESTVOLUME,LOUDESTVOLUME,g_sounds[num].pr,num);
|
pitch,LOUDESTVOLUME,LOUDESTVOLUME,LOUDESTVOLUME,g_sounds[num].pr,num);
|
||||||
}
|
}
|
||||||
else
|
else if (*g_sounds[num].ptr == 'O')
|
||||||
if (*g_sounds[num].ptr == 'O')
|
|
||||||
{
|
{
|
||||||
start = (int32_t)*(uint16_t *)(g_sounds[num].ptr + 0x14);
|
start = (int32_t)*(uint16_t *)(g_sounds[num].ptr + 0x14);
|
||||||
voice = FX_PlayLoopedOGG(g_sounds[num].ptr, start, start + g_sounds[num].soundsiz,
|
voice = FX_PlayLoopedOGG(g_sounds[num].ptr, start, start + g_sounds[num].soundsiz,
|
||||||
|
@ -493,8 +490,7 @@ void S_PlaySound(int32_t num)
|
||||||
{
|
{
|
||||||
if (*g_sounds[num].ptr == 'C')
|
if (*g_sounds[num].ptr == 'C')
|
||||||
voice = FX_PlayVOC3D(g_sounds[ num ].ptr, pitch,0,255-LOUDESTVOLUME,g_sounds[num].pr, num);
|
voice = FX_PlayVOC3D(g_sounds[ num ].ptr, pitch,0,255-LOUDESTVOLUME,g_sounds[num].pr, num);
|
||||||
else
|
else if (*g_sounds[num].ptr == 'O')
|
||||||
if (*g_sounds[num].ptr == 'O')
|
|
||||||
voice = FX_PlayOGG3D(g_sounds[ num ].ptr, pitch,0,255-LOUDESTVOLUME,g_sounds[num].pr, num);
|
voice = FX_PlayOGG3D(g_sounds[ num ].ptr, pitch,0,255-LOUDESTVOLUME,g_sounds[num].pr, num);
|
||||||
else
|
else
|
||||||
voice = FX_PlayWAV3D(g_sounds[ num ].ptr, pitch,0,255-LOUDESTVOLUME,g_sounds[num].pr, num);
|
voice = FX_PlayWAV3D(g_sounds[ num ].ptr, pitch,0,255-LOUDESTVOLUME,g_sounds[num].pr, num);
|
||||||
|
|
Loading…
Reference in a new issue