Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal into repeat-monitors
This commit is contained in:
commit
c81571f0af
|
@ -100,11 +100,13 @@ typedef long ssize_t;
|
||||||
|
|
||||||
#if defined (_MSC_VER) || defined (__OS2__)
|
#if defined (_MSC_VER) || defined (__OS2__)
|
||||||
// Microsoft VisualC++
|
// Microsoft VisualC++
|
||||||
|
#ifdef _MSC_VER
|
||||||
#if (_MSC_VER <= 1800) // MSVC 2013 and back
|
#if (_MSC_VER <= 1800) // MSVC 2013 and back
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
#if (_MSC_VER <= 1200) // MSVC 2012 and back
|
#if (_MSC_VER <= 1200) // MSVC 2012 and back
|
||||||
#define vsnprintf _vsnprintf
|
#define vsnprintf _vsnprintf
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#define strncasecmp strnicmp
|
#define strncasecmp strnicmp
|
||||||
#define strcasecmp stricmp
|
#define strcasecmp stricmp
|
||||||
|
@ -177,6 +179,8 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||||
// not the number of bytes in the buffer.
|
// not the number of bytes in the buffer.
|
||||||
#define STRBUFCPY(dst,src) strlcpy(dst, src, sizeof dst)
|
#define STRBUFCPY(dst,src) strlcpy(dst, src, sizeof dst)
|
||||||
|
|
||||||
|
// \note __BYTEBOOL__ used to be set above if "macintosh" was defined,
|
||||||
|
// if macintosh's version of boolean type isn't needed anymore, then isn't this macro pointless now?
|
||||||
#ifndef __BYTEBOOL__
|
#ifndef __BYTEBOOL__
|
||||||
#define __BYTEBOOL__
|
#define __BYTEBOOL__
|
||||||
|
|
||||||
|
@ -193,7 +197,6 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||||
#else
|
#else
|
||||||
typedef enum {false, true} boolean;
|
typedef enum {false, true} boolean;
|
||||||
#endif
|
#endif
|
||||||
//#endif // __cplusplus
|
|
||||||
#endif // __BYTEBOOL__
|
#endif // __BYTEBOOL__
|
||||||
|
|
||||||
/* 7.18.2.1 Limits of exact-width integer types */
|
/* 7.18.2.1 Limits of exact-width integer types */
|
||||||
|
|
52
src/f_wipe.c
52
src/f_wipe.c
|
@ -231,34 +231,52 @@ static void F_DoWipe(fademask_t *fademask)
|
||||||
maskx = masky = 0;
|
maskx = masky = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
// pointer to transtable that this mask would use
|
|
||||||
transtbl = transtables + ((9 - *mask)<<FF_TRANSSHIFT);
|
|
||||||
// (ignore that it goes out of bounds if *mask is 0 or 10 --
|
|
||||||
// it wouldn't be used in those cases anyway)
|
|
||||||
|
|
||||||
draw_rowstart = scrxpos[maskx];
|
draw_rowstart = scrxpos[maskx];
|
||||||
draw_rowend = scrxpos[maskx + 1];
|
draw_rowend = scrxpos[maskx + 1];
|
||||||
draw_linestart = scrypos[masky];
|
draw_linestart = scrypos[masky];
|
||||||
draw_lineend = scrypos[masky + 1];
|
draw_lineend = scrypos[masky + 1];
|
||||||
|
|
||||||
// DRAWING LOOP
|
|
||||||
relativepos = (draw_linestart * vid.width) + draw_rowstart;
|
relativepos = (draw_linestart * vid.width) + draw_rowstart;
|
||||||
draw_linestogo = draw_lineend - draw_linestart;
|
draw_linestogo = draw_lineend - draw_linestart;
|
||||||
while (draw_linestogo--)
|
|
||||||
|
if (*mask == 0)
|
||||||
{
|
{
|
||||||
w = w_base + relativepos;
|
// shortcut - memcpy source to work
|
||||||
s = s_base + relativepos;
|
while (draw_linestogo--)
|
||||||
e = e_base + relativepos;
|
|
||||||
draw_rowstogo = draw_rowend - draw_rowstart;
|
|
||||||
while (draw_rowstogo--)
|
|
||||||
{
|
{
|
||||||
if (*s != *e)
|
M_Memcpy(w_base+relativepos, s_base+relativepos, draw_rowend-draw_rowstart);
|
||||||
*w = ((*mask == 0) ? *s : (*mask == 10) ? *e : transtbl[(*e<<8) + *s]);
|
relativepos += vid.width;
|
||||||
++w, ++s, ++e;
|
|
||||||
}
|
}
|
||||||
relativepos += vid.width;
|
|
||||||
}
|
}
|
||||||
// END DRAWING LOOP
|
else if (*mask == 10)
|
||||||
|
{
|
||||||
|
// shortcut - memcpy target to work
|
||||||
|
while (draw_linestogo--)
|
||||||
|
{
|
||||||
|
M_Memcpy(w_base+relativepos, e_base+relativepos, draw_rowend-draw_rowstart);
|
||||||
|
relativepos += vid.width;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// pointer to transtable that this mask would use
|
||||||
|
transtbl = transtables + ((9 - *mask)<<FF_TRANSSHIFT);
|
||||||
|
|
||||||
|
// DRAWING LOOP
|
||||||
|
while (draw_linestogo--)
|
||||||
|
{
|
||||||
|
w = w_base + relativepos;
|
||||||
|
s = s_base + relativepos;
|
||||||
|
e = e_base + relativepos;
|
||||||
|
draw_rowstogo = draw_rowend - draw_rowstart;
|
||||||
|
|
||||||
|
while (draw_rowstogo--)
|
||||||
|
*w++ = transtbl[ ( *e++ << 8 ) + *s++ ];
|
||||||
|
|
||||||
|
relativepos += vid.width;
|
||||||
|
}
|
||||||
|
// END DRAWING LOOP
|
||||||
|
}
|
||||||
|
|
||||||
if (++maskx >= fademask->width)
|
if (++maskx >= fademask->width)
|
||||||
++masky, maskx = 0;
|
++masky, maskx = 0;
|
||||||
|
|
|
@ -297,9 +297,6 @@ static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"},
|
||||||
#if JOYAXISSET > 3
|
#if JOYAXISSET > 3
|
||||||
{7, "Pitch"}, {8, "Roll"}, {-7, "Pitch-"}, {-8, "Roll-"},
|
{7, "Pitch"}, {8, "Roll"}, {-7, "Pitch-"}, {-8, "Roll-"},
|
||||||
#endif
|
#endif
|
||||||
#if JOYAXISSET > 3
|
|
||||||
{7, "Pitch"}, {8, "Roll"}, {-7, "Pitch-"}, {-8, "Roll-"},
|
|
||||||
#endif
|
|
||||||
#if JOYAXISSET > 4
|
#if JOYAXISSET > 4
|
||||||
{7, "Yaw"}, {8, "Dummy"}, {-7, "Yaw-"}, {-8, "Dummy-"},
|
{7, "Yaw"}, {8, "Dummy"}, {-7, "Yaw-"}, {-8, "Dummy-"},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -77,7 +77,9 @@ static int lib_finecosine(lua_State *L)
|
||||||
|
|
||||||
static int lib_finetangent(lua_State *L)
|
static int lib_finetangent(lua_State *L)
|
||||||
{
|
{
|
||||||
lua_pushfixed(L, FINETANGENT((luaL_checkangle(L, 1)>>ANGLETOFINESHIFT) & FINEMASK));
|
// HACK: add ANGLE_90 to make tan() in Lua start at 0 like it should
|
||||||
|
// use & 4095 instead of & FINEMASK (8191), so it doesn't go out of the array's bounds
|
||||||
|
lua_pushfixed(L, FINETANGENT(((luaL_checkangle(L, 1)+ANGLE_90)>>ANGLETOFINESHIFT) & 4095));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
117
src/p_inter.c
117
src/p_inter.c
|
@ -1647,11 +1647,126 @@ static void P_HitDeathMessages(player_t *player, mobj_t *inflictor, mobj_t *sour
|
||||||
CONS_Printf(str, targetname, deadtarget ? M_GetText("killed") : M_GetText("hit"));
|
CONS_Printf(str, targetname, deadtarget ? M_GetText("killed") : M_GetText("hit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Checks if the level timer is over the timelimit and the round should end,
|
||||||
|
* unless you are in overtime. In which case leveltime may stretch out beyond
|
||||||
|
* timelimitintics and overtime's status will be checked here each tick.
|
||||||
|
* Verify that the value of ::cv_timelimit is greater than zero before
|
||||||
|
* calling this function.
|
||||||
|
*
|
||||||
|
* \sa cv_timelimit, P_CheckPointLimit, P_UpdateSpecials
|
||||||
|
*/
|
||||||
|
void P_CheckTimeLimit(void)
|
||||||
|
{
|
||||||
|
INT32 i, k;
|
||||||
|
|
||||||
|
if (!cv_timelimit.value)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!(multiplayer || netgame))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (G_PlatformGametype())
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (leveltime < timelimitintics)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (gameaction == ga_completed)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//Tagmode round end but only on the tic before the
|
||||||
|
//XD_EXITLEVEL packet is recieved by all players.
|
||||||
|
if (G_TagGametype())
|
||||||
|
{
|
||||||
|
if (leveltime == (timelimitintics + 1))
|
||||||
|
{
|
||||||
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
{
|
||||||
|
if (!playeringame[i] || players[i].spectator
|
||||||
|
|| (players[i].pflags & PF_TAGGED) || (players[i].pflags & PF_TAGIT))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
CONS_Printf(M_GetText("%s recieved double points for surviving the round.\n"), player_names[i]);
|
||||||
|
P_AddPlayerScore(&players[i], players[i].score);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (server)
|
||||||
|
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Optional tie-breaker for Match/CTF
|
||||||
|
else if (cv_overtime.value)
|
||||||
|
{
|
||||||
|
INT32 playerarray[MAXPLAYERS];
|
||||||
|
INT32 tempplayer = 0;
|
||||||
|
INT32 spectators = 0;
|
||||||
|
INT32 playercount = 0;
|
||||||
|
|
||||||
|
//Figure out if we have enough participating players to care.
|
||||||
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
{
|
||||||
|
if (playeringame[i] && players[i].spectator)
|
||||||
|
spectators++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((D_NumPlayers() - spectators) > 1)
|
||||||
|
{
|
||||||
|
// Play the starpost sfx after the first second of overtime.
|
||||||
|
if (gamestate == GS_LEVEL && (leveltime == (timelimitintics + TICRATE)))
|
||||||
|
S_StartSound(NULL, sfx_strpst);
|
||||||
|
|
||||||
|
// Normal Match
|
||||||
|
if (!G_GametypeHasTeams())
|
||||||
|
{
|
||||||
|
//Store the nodes of participating players in an array.
|
||||||
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
{
|
||||||
|
if (playeringame[i] && !players[i].spectator)
|
||||||
|
{
|
||||||
|
playerarray[playercount] = i;
|
||||||
|
playercount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Sort 'em.
|
||||||
|
for (i = 1; i < playercount; i++)
|
||||||
|
{
|
||||||
|
for (k = i; k < playercount; k++)
|
||||||
|
{
|
||||||
|
if (players[playerarray[i-1]].score < players[playerarray[k]].score)
|
||||||
|
{
|
||||||
|
tempplayer = playerarray[i-1];
|
||||||
|
playerarray[i-1] = playerarray[k];
|
||||||
|
playerarray[k] = tempplayer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//End the round if the top players aren't tied.
|
||||||
|
if (players[playerarray[0]].score == players[playerarray[1]].score)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//In team match and CTF, determining a tie is much simpler. =P
|
||||||
|
if (redscore == bluescore)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (server)
|
||||||
|
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (server)
|
||||||
|
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/** Checks if a player's score is over the pointlimit and the round should end.
|
/** Checks if a player's score is over the pointlimit and the round should end.
|
||||||
* Verify that the value of ::cv_pointlimit is greater than zero before
|
* Verify that the value of ::cv_pointlimit is greater than zero before
|
||||||
* calling this function.
|
* calling this function.
|
||||||
*
|
*
|
||||||
* \sa cv_pointlimit, P_UpdateSpecials
|
* \sa cv_pointlimit, P_CheckTimeLimit, P_UpdateSpecials
|
||||||
*/
|
*/
|
||||||
void P_CheckPointLimit(void)
|
void P_CheckPointLimit(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -399,6 +399,7 @@ void P_PlayerEmeraldBurst(player_t *player, boolean toss);
|
||||||
|
|
||||||
void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck);
|
void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck);
|
||||||
void P_PlayerFlagBurst(player_t *player, boolean toss);
|
void P_PlayerFlagBurst(player_t *player, boolean toss);
|
||||||
|
void P_CheckTimeLimit(void);
|
||||||
void P_CheckPointLimit(void);
|
void P_CheckPointLimit(void);
|
||||||
void P_CheckSurvivors(void);
|
void P_CheckSurvivors(void);
|
||||||
boolean P_CheckRacers(void);
|
boolean P_CheckRacers(void);
|
||||||
|
|
|
@ -636,7 +636,7 @@ static void P_NetArchiveWorld(void)
|
||||||
if (li->special != SHORT(mld->special))
|
if (li->special != SHORT(mld->special))
|
||||||
diff |= LD_SPECIAL;
|
diff |= LD_SPECIAL;
|
||||||
|
|
||||||
if (mld->special == 321 || mld->special == 322) // only reason li->callcount would be non-zero is if either of these are involved
|
if (SHORT(mld->special) == 321 || SHORT(mld->special) == 322) // only reason li->callcount would be non-zero is if either of these are involved
|
||||||
diff |= LD_CLLCOUNT;
|
diff |= LD_CLLCOUNT;
|
||||||
|
|
||||||
if (li->sidenum[0] != 0xffff)
|
if (li->sidenum[0] != 0xffff)
|
||||||
|
|
101
src/p_spec.c
101
src/p_spec.c
|
@ -4648,114 +4648,19 @@ void P_PlayerInSpecialSector(player_t *player)
|
||||||
|
|
||||||
/** Animate planes, scroll walls, etc. and keeps track of level timelimit and exits if time is up.
|
/** Animate planes, scroll walls, etc. and keeps track of level timelimit and exits if time is up.
|
||||||
*
|
*
|
||||||
* \sa cv_timelimit, P_CheckPointLimit
|
* \sa P_CheckTimeLimit, P_CheckPointLimit
|
||||||
*/
|
*/
|
||||||
void P_UpdateSpecials(void)
|
void P_UpdateSpecials(void)
|
||||||
{
|
{
|
||||||
anim_t *anim;
|
anim_t *anim;
|
||||||
INT32 i, k;
|
INT32 i;
|
||||||
INT32 pic;
|
INT32 pic;
|
||||||
size_t j;
|
size_t j;
|
||||||
|
|
||||||
levelflat_t *foundflats; // for flat animation
|
levelflat_t *foundflats; // for flat animation
|
||||||
|
|
||||||
// LEVEL TIMER
|
// LEVEL TIMER
|
||||||
// Exit if the timer is equal to or greater the timelimit, unless you are
|
P_CheckTimeLimit();
|
||||||
// in overtime. In which case leveltime may stretch out beyond timelimitintics
|
|
||||||
// and overtime's status will be checked here each tick.
|
|
||||||
if (cv_timelimit.value && timelimitintics <= leveltime && (multiplayer || netgame)
|
|
||||||
&& G_RingSlingerGametype() && (gameaction != ga_completed))
|
|
||||||
{
|
|
||||||
boolean pexit = false;
|
|
||||||
|
|
||||||
//Tagmode round end but only on the tic before the
|
|
||||||
//XD_EXITLEVEL packet is recieved by all players.
|
|
||||||
if (G_TagGametype())
|
|
||||||
{
|
|
||||||
if (leveltime == (timelimitintics + 1))
|
|
||||||
{
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
|
||||||
{
|
|
||||||
if (!playeringame[i] || players[i].spectator
|
|
||||||
|| (players[i].pflags & PF_TAGGED) || (players[i].pflags & PF_TAGIT))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
CONS_Printf(M_GetText("%s recieved double points for surviving the round.\n"), player_names[i]);
|
|
||||||
P_AddPlayerScore(&players[i], players[i].score);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pexit = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Optional tie-breaker for Match/CTF
|
|
||||||
else if (G_RingSlingerGametype() && cv_overtime.value)
|
|
||||||
{
|
|
||||||
INT32 playerarray[MAXPLAYERS];
|
|
||||||
INT32 tempplayer = 0;
|
|
||||||
INT32 spectators = 0;
|
|
||||||
INT32 playercount = 0;
|
|
||||||
|
|
||||||
//Figure out if we have enough participating players to care.
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
|
||||||
{
|
|
||||||
if (playeringame[i] && players[i].spectator)
|
|
||||||
spectators++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((D_NumPlayers() - spectators) > 1)
|
|
||||||
{
|
|
||||||
// Play the starpost sfx after the first second of overtime.
|
|
||||||
if (gamestate == GS_LEVEL && (leveltime == (timelimitintics + TICRATE)))
|
|
||||||
S_StartSound(NULL, sfx_strpst);
|
|
||||||
|
|
||||||
// Normal Match
|
|
||||||
if (!G_GametypeHasTeams())
|
|
||||||
{
|
|
||||||
//Store the nodes of participating players in an array.
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
|
||||||
{
|
|
||||||
if (playeringame[i] && !players[i].spectator)
|
|
||||||
{
|
|
||||||
playerarray[playercount] = i;
|
|
||||||
playercount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Sort 'em.
|
|
||||||
for (i = 1; i < playercount; i++)
|
|
||||||
{
|
|
||||||
for (k = i; k < playercount; k++)
|
|
||||||
{
|
|
||||||
if (players[playerarray[i-1]].score < players[playerarray[k]].score)
|
|
||||||
{
|
|
||||||
tempplayer = playerarray[i-1];
|
|
||||||
playerarray[i-1] = playerarray[k];
|
|
||||||
playerarray[k] = tempplayer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//End the round if the top players aren't tied.
|
|
||||||
if (!(players[playerarray[0]].score == players[playerarray[1]].score))
|
|
||||||
pexit = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//In team match and CTF, determining a tie is much simpler. =P
|
|
||||||
if (!(redscore == bluescore))
|
|
||||||
pexit = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pexit = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pexit = true;
|
|
||||||
|
|
||||||
if (server && pexit)
|
|
||||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// POINT LIMIT
|
// POINT LIMIT
|
||||||
P_CheckPointLimit();
|
P_CheckPointLimit();
|
||||||
|
|
|
@ -114,15 +114,6 @@ INT32 viewangletox[FINEANGLES/2];
|
||||||
// from clipangle to -clipangle.
|
// from clipangle to -clipangle.
|
||||||
angle_t xtoviewangle[MAXVIDWIDTH+1];
|
angle_t xtoviewangle[MAXVIDWIDTH+1];
|
||||||
|
|
||||||
// UNUSED.
|
|
||||||
// The finetangentgent[angle+FINEANGLES/4] table
|
|
||||||
// holds the fixed_t tangent values for view angles,
|
|
||||||
// ranging from INT32_MIN to 0 to INT32_MAX.
|
|
||||||
|
|
||||||
#if !(defined _NDS) || !(defined NONET)
|
|
||||||
fixed_t *finecosine = &finesine[FINEANGLES/4];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
lighttable_t *scalelight[LIGHTLEVELS][MAXLIGHTSCALE];
|
lighttable_t *scalelight[LIGHTLEVELS][MAXLIGHTSCALE];
|
||||||
lighttable_t *scalelightfixed[MAXLIGHTSCALE];
|
lighttable_t *scalelightfixed[MAXLIGHTSCALE];
|
||||||
lighttable_t *zlight[LIGHTLEVELS][MAXLIGHTZ];
|
lighttable_t *zlight[LIGHTLEVELS][MAXLIGHTZ];
|
||||||
|
|
|
@ -750,31 +750,15 @@ void R_DrawSinglePlane(visplane_t *pl)
|
||||||
// Hacked up support for alpha value in software mode Tails 09-24-2002 (sidenote: ported to polys 10-15-2014, there was no time travel involved -Red)
|
// Hacked up support for alpha value in software mode Tails 09-24-2002 (sidenote: ported to polys 10-15-2014, there was no time travel involved -Red)
|
||||||
if (pl->polyobj->translucency >= 10)
|
if (pl->polyobj->translucency >= 10)
|
||||||
return; // Don't even draw it
|
return; // Don't even draw it
|
||||||
else if (pl->polyobj->translucency == 9)
|
else if (pl->polyobj->translucency > 0)
|
||||||
ds_transmap = ((tr_trans90)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((pl->polyobj->translucency-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->polyobj->translucency == 8)
|
|
||||||
ds_transmap = ((tr_trans80)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else if (pl->polyobj->translucency == 7)
|
|
||||||
ds_transmap = ((tr_trans70)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else if (pl->polyobj->translucency == 6)
|
|
||||||
ds_transmap = ((tr_trans60)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else if (pl->polyobj->translucency == 5)
|
|
||||||
ds_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else if (pl->polyobj->translucency == 4)
|
|
||||||
ds_transmap = ((tr_trans40)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else if (pl->polyobj->translucency == 3)
|
|
||||||
ds_transmap = ((tr_trans30)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else if (pl->polyobj->translucency == 2)
|
|
||||||
ds_transmap = ((tr_trans20)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else if (pl->polyobj->translucency == 1)
|
|
||||||
ds_transmap = ((tr_trans10)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else // Opaque, but allow transparent flat pixels
|
else // Opaque, but allow transparent flat pixels
|
||||||
spanfunc = splatfunc;
|
spanfunc = splatfunc;
|
||||||
|
|
||||||
if (pl->extra_colormap && pl->extra_colormap->fog)
|
if (pl->extra_colormap && pl->extra_colormap->fog)
|
||||||
light = (pl->lightlevel >> LIGHTSEGSHIFT);
|
light = (pl->lightlevel >> LIGHTSEGSHIFT);
|
||||||
else
|
else
|
||||||
light = LIGHTLEVELS-1;
|
light = LIGHTLEVELS-1;
|
||||||
|
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
@ -805,23 +789,23 @@ void R_DrawSinglePlane(visplane_t *pl)
|
||||||
if (pl->ffloor->alpha < 12)
|
if (pl->ffloor->alpha < 12)
|
||||||
return; // Don't even draw it
|
return; // Don't even draw it
|
||||||
else if (pl->ffloor->alpha < 38)
|
else if (pl->ffloor->alpha < 38)
|
||||||
ds_transmap = ((tr_trans90)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans90-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 64)
|
else if (pl->ffloor->alpha < 64)
|
||||||
ds_transmap = ((tr_trans80)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans80-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 89)
|
else if (pl->ffloor->alpha < 89)
|
||||||
ds_transmap = ((tr_trans70)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans70-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 115)
|
else if (pl->ffloor->alpha < 115)
|
||||||
ds_transmap = ((tr_trans60)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans60-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 140)
|
else if (pl->ffloor->alpha < 140)
|
||||||
ds_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 166)
|
else if (pl->ffloor->alpha < 166)
|
||||||
ds_transmap = ((tr_trans40)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans40-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 192)
|
else if (pl->ffloor->alpha < 192)
|
||||||
ds_transmap = ((tr_trans30)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans30-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 217)
|
else if (pl->ffloor->alpha < 217)
|
||||||
ds_transmap = ((tr_trans20)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans20-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 243)
|
else if (pl->ffloor->alpha < 243)
|
||||||
ds_transmap = ((tr_trans10)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans10-1)<<FF_TRANSSHIFT);
|
||||||
else // Opaque, but allow transparent flat pixels
|
else // Opaque, but allow transparent flat pixels
|
||||||
spanfunc = splatfunc;
|
spanfunc = splatfunc;
|
||||||
|
|
||||||
|
@ -1082,7 +1066,7 @@ using the palette colors.
|
||||||
if (spanfunc == R_DrawSpan_8)
|
if (spanfunc == R_DrawSpan_8)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
ds_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||||
spanfunc = R_DrawTranslucentSpan_8;
|
spanfunc = R_DrawTranslucentSpan_8;
|
||||||
for (i=0; i<4; i++)
|
for (i=0; i<4; i++)
|
||||||
{
|
{
|
||||||
|
|
48
src/r_segs.c
48
src/r_segs.c
|
@ -183,7 +183,7 @@ static void R_DrawWallSplats(void)
|
||||||
colfunc = basecolfunc;
|
colfunc = basecolfunc;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dc_transmap = ((tr_trans50 - 1)<<FF_TRANSSHIFT) + transtables;
|
dc_transmap = transtables + ((tr_trans50 - 1)<<FF_TRANSSHIFT);
|
||||||
colfunc = fuzzcolfunc;
|
colfunc = fuzzcolfunc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,39 +304,15 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
||||||
switch (ldef->special)
|
switch (ldef->special)
|
||||||
{
|
{
|
||||||
case 900:
|
case 900:
|
||||||
dc_transmap = ((tr_trans10)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 901:
|
case 901:
|
||||||
dc_transmap = ((tr_trans20)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 902:
|
case 902:
|
||||||
dc_transmap = ((tr_trans30)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 903:
|
case 903:
|
||||||
dc_transmap = ((tr_trans40)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 904:
|
case 904:
|
||||||
dc_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 905:
|
case 905:
|
||||||
dc_transmap = ((tr_trans60)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 906:
|
case 906:
|
||||||
dc_transmap = ((tr_trans70)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 907:
|
case 907:
|
||||||
dc_transmap = ((tr_trans80)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 908:
|
case 908:
|
||||||
dc_transmap = ((tr_trans90)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((ldef->special-900)<<FF_TRANSSHIFT);
|
||||||
colfunc = fuzzcolfunc;
|
colfunc = fuzzcolfunc;
|
||||||
break;
|
break;
|
||||||
case 909:
|
case 909:
|
||||||
|
@ -354,7 +330,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
||||||
if (curline->polyseg->translucency >= NUMTRANSMAPS)
|
if (curline->polyseg->translucency >= NUMTRANSMAPS)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
dc_transmap = ((curline->polyseg->translucency)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((curline->polyseg->translucency-1)<<FF_TRANSSHIFT);
|
||||||
colfunc = fuzzcolfunc;
|
colfunc = fuzzcolfunc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -733,23 +709,23 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
||||||
if (pfloor->alpha < 12)
|
if (pfloor->alpha < 12)
|
||||||
return; // Don't even draw it
|
return; // Don't even draw it
|
||||||
else if (pfloor->alpha < 38)
|
else if (pfloor->alpha < 38)
|
||||||
dc_transmap = ((tr_trans90)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans90-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 64)
|
else if (pfloor->alpha < 64)
|
||||||
dc_transmap = ((tr_trans80)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans80-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 89)
|
else if (pfloor->alpha < 89)
|
||||||
dc_transmap = ((tr_trans70)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans70-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 115)
|
else if (pfloor->alpha < 115)
|
||||||
dc_transmap = ((tr_trans60)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans60-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 140)
|
else if (pfloor->alpha < 140)
|
||||||
dc_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 166)
|
else if (pfloor->alpha < 166)
|
||||||
dc_transmap = ((tr_trans40)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans40-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 192)
|
else if (pfloor->alpha < 192)
|
||||||
dc_transmap = ((tr_trans30)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans30-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 217)
|
else if (pfloor->alpha < 217)
|
||||||
dc_transmap = ((tr_trans20)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans20-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 243)
|
else if (pfloor->alpha < 243)
|
||||||
dc_transmap = ((tr_trans10)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans10-1)<<FF_TRANSSHIFT);
|
||||||
else
|
else
|
||||||
fuzzy = false; // Opaque
|
fuzzy = false; // Opaque
|
||||||
|
|
||||||
|
|
|
@ -503,7 +503,7 @@ static void R_RenderFloorSplat(floorsplat_t *pSplat, vertex_t *verts, UINT8 *pTe
|
||||||
{
|
{
|
||||||
ds_x1 = x1;
|
ds_x1 = x1;
|
||||||
ds_x2 = x2;
|
ds_x2 = x2;
|
||||||
ds_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||||
splatfunc();
|
splatfunc();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1330,9 +1330,9 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
if (!cv_translucency.value)
|
if (!cv_translucency.value)
|
||||||
; // no translucency
|
; // no translucency
|
||||||
else if (thing->flags2 & MF2_SHADOW) // actually only the player should use this (temporary invisibility)
|
else if (thing->flags2 & MF2_SHADOW) // actually only the player should use this (temporary invisibility)
|
||||||
vis->transmap = ((tr_trans80-1)<<FF_TRANSSHIFT) + transtables; // because now the translucency is set through FF_TRANSMASK
|
vis->transmap = transtables + ((tr_trans80-1)<<FF_TRANSSHIFT); // because now the translucency is set through FF_TRANSMASK
|
||||||
else if (thing->frame & FF_TRANSMASK)
|
else if (thing->frame & FF_TRANSMASK)
|
||||||
vis->transmap = (thing->frame & FF_TRANSMASK) - 0x10000 + transtables;
|
vis->transmap = transtables + (thing->frame & FF_TRANSMASK) - 0x10000;
|
||||||
|
|
||||||
if (((thing->frame & FF_FULLBRIGHT) || (thing->flags2 & MF2_SHADOW))
|
if (((thing->frame & FF_FULLBRIGHT) || (thing->flags2 & MF2_SHADOW))
|
||||||
&& (!vis->extra_colormap || !vis->extra_colormap->fog))
|
&& (!vis->extra_colormap || !vis->extra_colormap->fog))
|
||||||
|
|
|
@ -1842,37 +1842,6 @@ static void ST_overlayDrawer(void)
|
||||||
LUAh_GameHUD(stplyr);
|
LUAh_GameHUD(stplyr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0 // Pope XVI
|
|
||||||
if (!(netgame || multiplayer) && !modifiedgame && gamemap == 11 && ALL7EMERALDS(emeralds)
|
|
||||||
&& stplyr->mo && stplyr->mo->subsector && stplyr->mo->subsector->sector-sectors == 1361)
|
|
||||||
{
|
|
||||||
if (grade & 2048) // NAGZ
|
|
||||||
{
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 70, 0, M_GetText("I, Pope Rededict XVI proclaim"));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 80, 0, M_GetText("AJ & Amy"));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 90, 0, M_GetText("Husband & Wife"));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 100, 0, M_GetText("on this day"));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 110, 0, M_GetText("May 16, 2009"));
|
|
||||||
|
|
||||||
P_GivePlayerRings(stplyr, 9999);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 60, 0, M_GetText("Oh... it's you again..."));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 80, 0, M_GetText("Look, I wanted to apologize for the way"));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 90, 0, M_GetText("I've acted in the past."));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 110, 0, M_GetText("I've seen the error of my ways"));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 120, 0, M_GetText("and turned over a new leaf."));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 140, 0, M_GetText("Instead of sending people to hell,"));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 150, 0, M_GetText("I now send them to heaven!"));
|
|
||||||
|
|
||||||
P_LinedefExecute(4200, stplyr->mo, stplyr->mo->subsector->sector);
|
|
||||||
P_LinedefExecute(4201, stplyr->mo, stplyr->mo->subsector->sector);
|
|
||||||
stplyr->mo->momx = stplyr->mo->momy = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// draw level title Tails
|
// draw level title Tails
|
||||||
if (*mapheaderinfo[gamemap-1]->lvlttl != '\0' && !(hu_showscores && (netgame || multiplayer))
|
if (*mapheaderinfo[gamemap-1]->lvlttl != '\0' && !(hu_showscores && (netgame || multiplayer))
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
|
|
1028
src/tables.c
1028
src/tables.c
File diff suppressed because it is too large
Load diff
|
@ -366,7 +366,7 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
|
||||||
}
|
}
|
||||||
if (alphalevel)
|
if (alphalevel)
|
||||||
{
|
{
|
||||||
v_translevel = ((alphalevel)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
v_translevel = transtables + ((alphalevel-1)<<FF_TRANSSHIFT);
|
||||||
patchdrawfunc = translucentpdraw;
|
patchdrawfunc = translucentpdraw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1869,7 +1869,7 @@ void V_DoPostProcessor(INT32 view, postimg_t type, INT32 param)
|
||||||
angle_t disStart = (leveltime * 128) & FINEMASK; // in 0 to FINEANGLE
|
angle_t disStart = (leveltime * 128) & FINEMASK; // in 0 to FINEANGLE
|
||||||
INT32 newpix;
|
INT32 newpix;
|
||||||
INT32 sine;
|
INT32 sine;
|
||||||
//UINT8 *transme = ((tr_trans50)<<FF_TRANSSHIFT) + transtables;
|
//UINT8 *transme = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||||
|
|
||||||
for (y = yoffset; y < yoffset+height; y++)
|
for (y = yoffset; y < yoffset+height; y++)
|
||||||
{
|
{
|
||||||
|
@ -1926,7 +1926,7 @@ Unoptimized version
|
||||||
INT32 x, y;
|
INT32 x, y;
|
||||||
|
|
||||||
// TODO: Add a postimg_param so that we can pick the translucency level...
|
// TODO: Add a postimg_param so that we can pick the translucency level...
|
||||||
UINT8 *transme = ((param)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
UINT8 *transme = transtables + ((param-1)<<FF_TRANSSHIFT);
|
||||||
|
|
||||||
for (y = yoffset; y < yoffset+height; y++)
|
for (y = yoffset; y < yoffset+height; y++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue