mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-20 18:01:16 +00:00
Merge remote-tracking branch 'remotes/origin/master' into dashmode
This commit is contained in:
commit
bd1231764e
49 changed files with 943 additions and 944 deletions
|
@ -103,7 +103,8 @@ set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary")
|
|||
include(GitUtilities)
|
||||
git_describe(SRB2_GIT_DESCRIBE "${CMAKE_SOURCE_DIR}")
|
||||
git_current_branch(SRB2_GIT_BRANCH "${CMAKE_SOURCE_DIR}")
|
||||
set(SRB2_COMP_REVISION "${SRB2_GIT_DESCRIBE}-<${SRB2_GIT_BRANCH}>")
|
||||
set(SRB2_COMP_BRANCH "${SRB2_GIT_BRANCH}")
|
||||
set(SRB2_COMP_REVISION "${SRB2_GIT_DESCRIBE}")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h)
|
||||
|
||||
##### PACKAGE CONFIGURATION #####
|
||||
|
|
30
comptime.bat
30
comptime.bat
|
@ -1,10 +1,32 @@
|
|||
@ECHO OFF
|
||||
set REV=Unknown
|
||||
set BRA=Unknown
|
||||
set REV=illegal
|
||||
|
||||
copy nul: /b +%1\comptime.c tmp.$$$ > nul
|
||||
move tmp.$$$ %1\comptime.c > nul
|
||||
SET REV=illegal
|
||||
FOR /F "usebackq" %%s IN (`svnversion %1`) DO @SET REV=%%s
|
||||
|
||||
if exist .git goto gitrev
|
||||
if exist ..\.git goto gitrev
|
||||
if exist .svn goto svnrev
|
||||
goto filwri
|
||||
|
||||
:gitrev
|
||||
set GIT=%2
|
||||
if "%GIT%"=="" set GIT=git
|
||||
FOR /F "usebackq" %%s IN (`%GIT% rev-parse --abbrev-ref HEAD`) DO @SET BRA=%%s
|
||||
FOR /F "usebackq" %%s IN (`%GIT% rev-parse HEAD`) DO @SET REV=%%s
|
||||
set REV=%REV:~0,8%
|
||||
goto filwri
|
||||
|
||||
:svnrev
|
||||
set BRA=Subversion
|
||||
FOR /F "usebackq" %%s IN (`svnversion .`) DO @SET REV=%%s
|
||||
set REV=r%REV%
|
||||
goto filwri
|
||||
|
||||
:filwri
|
||||
ECHO // Do not edit! This file was autogenerated > %1\comptime.h
|
||||
ECHO // by the %0 batch file >> %1\comptime.h
|
||||
ECHO // >> %1\comptime.h
|
||||
ECHO const char* comprevision = "r%REV%"; >> %1\comptime.h
|
||||
ECHO const char* compbranch = "%BRA%"; >> %1\comptime.h
|
||||
ECHO const char* comprevision = "%REV%"; >> %1\comptime.h
|
||||
|
|
10
comptime.sh
10
comptime.sh
|
@ -5,13 +5,15 @@ if [ x"$1" != x ]; then
|
|||
fi
|
||||
|
||||
versiongit() {
|
||||
gitversion=`git describe`
|
||||
gitbranch=`git rev-parse --abbrev-ref HEAD`
|
||||
gitversion=`git rev-parse HEAD`
|
||||
cat <<EOF > $path/comptime.h
|
||||
|
||||
// Do not edit! This file was autogenerated
|
||||
// by the $0 script with git svn
|
||||
// by the $0 script with git
|
||||
//
|
||||
const char* comprevision = "$gitversion";
|
||||
const char* compbranch = "$gitbranch";
|
||||
const char* comprevision = "${gitversion:0:8}";
|
||||
EOF
|
||||
exit 0
|
||||
}
|
||||
|
@ -23,6 +25,7 @@ versionsvn() {
|
|||
// Do not edit! This file was autogenerated
|
||||
// by the $0 script with subversion
|
||||
//
|
||||
const char* compbranch = "Subversion";
|
||||
const char* comprevision = "r$svnrevision";
|
||||
EOF
|
||||
exit 0
|
||||
|
@ -34,6 +37,7 @@ versionfake() {
|
|||
// Do not edit! This file was autogenerated
|
||||
// by the $0 script with an unknown or nonexist SCM
|
||||
//
|
||||
const char* compbranch = "Unknown";
|
||||
const char* comprevision = "illegal";
|
||||
EOF
|
||||
}
|
||||
|
|
|
@ -9,12 +9,14 @@
|
|||
|
||||
#if (defined(CMAKECONFIG))
|
||||
#include "config.h"
|
||||
const char *compbranch = SRB2_COMP_BRANCH;
|
||||
const char *comprevision = SRB2_COMP_REVISION;
|
||||
|
||||
#elif (defined(COMPVERSION))
|
||||
#include "comptime.h"
|
||||
|
||||
#else
|
||||
const char *compbranch = "Unknown";
|
||||
const char *comprevision = "illegal";
|
||||
|
||||
#endif
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}"
|
||||
|
||||
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
|
||||
#define SRB2_COMP_BRANCH "${SRB2_COMP_BRANCH}"
|
||||
#define SRB2_GIT_DESCRIBE "${SRB2_GIT_DESCRIBE}"
|
||||
#define SRB2_GIT_BRANCH "${SRB2_GIT_BRANCH}"
|
||||
|
||||
|
|
|
@ -1472,4 +1472,3 @@ void CON_Drawer(void)
|
|||
else if (gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE || gamestate == GS_CREDITS)
|
||||
CON_DrawHudlines();
|
||||
}
|
||||
|
||||
|
|
|
@ -3179,7 +3179,11 @@ static void Command_ListWADS_f(void)
|
|||
*/
|
||||
static void Command_Version_f(void)
|
||||
{
|
||||
#ifdef DEVELOP
|
||||
CONS_Printf("Sonic Robo Blast 2 %s-%s (%s %s)\n", compbranch, comprevision, compdate, comptime);
|
||||
#else
|
||||
CONS_Printf("Sonic Robo Blast 2 %s (%s %s %s)\n", VERSIONSTRING, compdate, comptime, comprevision);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef UPDATE_ALERT
|
||||
|
|
|
@ -167,7 +167,7 @@ typedef enum
|
|||
PA_RUN,
|
||||
PA_PAIN,
|
||||
PA_ROLL,
|
||||
PA_JUMP,
|
||||
PA_SPRING,
|
||||
PA_FALL,
|
||||
PA_ABILITY,
|
||||
PA_RIDE
|
||||
|
|
|
@ -1132,6 +1132,10 @@ static void readlevelheader(MYFILE *f, INT32 num)
|
|||
}
|
||||
else if (fastcmp(word, "NEXTLEVEL"))
|
||||
{
|
||||
if (fastcmp(word2, "TITLE")) i = 1100;
|
||||
else if (fastcmp(word2, "EVALUATION")) i = 1101;
|
||||
else if (fastcmp(word2, "CREDITS")) i = 1102;
|
||||
else
|
||||
// Support using the actual map name,
|
||||
// i.e., Nextlevel = AB, Nextlevel = FZ, etc.
|
||||
|
||||
|
@ -3755,6 +3759,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_PLAY_DASH",
|
||||
"S_PLAY_GASP",
|
||||
"S_PLAY_JUMP",
|
||||
"S_PLAY_SPRING",
|
||||
"S_PLAY_FALL",
|
||||
"S_PLAY_EDGE",
|
||||
"S_PLAY_RIDE",
|
||||
|
@ -3779,6 +3784,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_PLAY_SUPER_SPIN",
|
||||
"S_PLAY_SUPER_GASP",
|
||||
"S_PLAY_SUPER_JUMP",
|
||||
"S_PLAY_SUPER_SPRING",
|
||||
"S_PLAY_SUPER_FALL",
|
||||
"S_PLAY_SUPER_EDGE",
|
||||
"S_PLAY_SUPER_RIDE",
|
||||
|
@ -7680,7 +7686,7 @@ struct {
|
|||
{"PA_RUN",PA_RUN},
|
||||
{"PA_PAIN",PA_PAIN},
|
||||
{"PA_ROLL",PA_ROLL},
|
||||
{"PA_JUMP",PA_JUMP},
|
||||
{"PA_SPRING",PA_SPRING},
|
||||
{"PA_FALL",PA_FALL},
|
||||
{"PA_ABILITY",PA_ABILITY},
|
||||
{"PA_RIDE",PA_RIDE},
|
||||
|
@ -8819,4 +8825,3 @@ void LUA_SetActionByName(void *state, const char *actiontocompare)
|
|||
}
|
||||
|
||||
#endif // HAVE_BLUA
|
||||
|
||||
|
|
|
@ -142,8 +142,10 @@ extern FILE *logstream;
|
|||
#ifdef DEVELOP
|
||||
#define VERSION 0 // Game version
|
||||
#define SUBVERSION 0 // more precise version number
|
||||
#define VERSIONSTRING "Trunk"
|
||||
#define VERSIONSTRINGW L"Trunk"
|
||||
#define VERSIONSTRING "Development EXE"
|
||||
#define VERSIONSTRINGW L"Development EXE"
|
||||
// most interface strings are ignored in development mode.
|
||||
// we use comprevision and compbranch instead.
|
||||
#else
|
||||
#define VERSION 202 // Game version
|
||||
#define SUBVERSION 0 // more precise version number
|
||||
|
@ -430,7 +432,7 @@ INT32 I_GetKey(void);
|
|||
#endif
|
||||
|
||||
// Compile date and time and revision.
|
||||
extern const char *compdate, *comptime, *comprevision;
|
||||
extern const char *compdate, *comptime, *comprevision, *compbranch;
|
||||
|
||||
// Disabled code and code under testing
|
||||
// None of these that are disabled in the normal build are guaranteed to work perfectly
|
||||
|
@ -504,4 +506,3 @@ extern const char *compdate, *comptime, *comprevision;
|
|||
//#define REDSANALOG
|
||||
|
||||
#endif // __DOOMDEF__
|
||||
|
||||
|
|
|
@ -100,11 +100,13 @@ typedef long ssize_t;
|
|||
|
||||
#if defined (_MSC_VER) || defined (__OS2__)
|
||||
// Microsoft VisualC++
|
||||
#ifdef _MSC_VER
|
||||
#if (_MSC_VER <= 1800) // MSVC 2013 and back
|
||||
#define snprintf _snprintf
|
||||
#if (_MSC_VER <= 1200) // MSVC 2012 and back
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#define strncasecmp strnicmp
|
||||
#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.
|
||||
#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__
|
||||
#define __BYTEBOOL__
|
||||
|
||||
|
@ -193,7 +197,6 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
|
|||
#else
|
||||
typedef enum {false, true} boolean;
|
||||
#endif
|
||||
//#endif // __cplusplus
|
||||
#endif // __BYTEBOOL__
|
||||
|
||||
/* 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;
|
||||
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_rowend = scrxpos[maskx + 1];
|
||||
draw_linestart = scrypos[masky];
|
||||
draw_lineend = scrypos[masky + 1];
|
||||
|
||||
// DRAWING LOOP
|
||||
relativepos = (draw_linestart * vid.width) + draw_rowstart;
|
||||
draw_linestogo = draw_lineend - draw_linestart;
|
||||
while (draw_linestogo--)
|
||||
|
||||
if (*mask == 0)
|
||||
{
|
||||
w = w_base + relativepos;
|
||||
s = s_base + relativepos;
|
||||
e = e_base + relativepos;
|
||||
draw_rowstogo = draw_rowend - draw_rowstart;
|
||||
while (draw_rowstogo--)
|
||||
// shortcut - memcpy source to work
|
||||
while (draw_linestogo--)
|
||||
{
|
||||
if (*s != *e)
|
||||
*w = ((*mask == 0) ? *s : (*mask == 10) ? *e : transtbl[(*e<<8) + *s]);
|
||||
++w, ++s, ++e;
|
||||
M_Memcpy(w_base+relativepos, s_base+relativepos, draw_rowend-draw_rowstart);
|
||||
relativepos += vid.width;
|
||||
}
|
||||
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)
|
||||
++masky, maskx = 0;
|
||||
|
|
|
@ -297,9 +297,6 @@ static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"},
|
|||
#if JOYAXISSET > 3
|
||||
{7, "Pitch"}, {8, "Roll"}, {-7, "Pitch-"}, {-8, "Roll-"},
|
||||
#endif
|
||||
#if JOYAXISSET > 3
|
||||
{7, "Pitch"}, {8, "Roll"}, {-7, "Pitch-"}, {-8, "Roll-"},
|
||||
#endif
|
||||
#if JOYAXISSET > 4
|
||||
{7, "Yaw"}, {8, "Dummy"}, {-7, "Yaw-"}, {-8, "Dummy-"},
|
||||
#endif
|
||||
|
|
|
@ -229,4 +229,3 @@ enum hwdfiltermode
|
|||
|
||||
|
||||
#endif //_HWR_DEFS_
|
||||
|
||||
|
|
|
@ -79,6 +79,7 @@ typedef struct gr_vissprite_s
|
|||
boolean vflip;
|
||||
//Hurdler: 25/04/2000: now support colormap in hardware mode
|
||||
UINT8 *colormap;
|
||||
INT32 dispoffset; // copy of info->dispoffset, affects ordering but not drawing
|
||||
} gr_vissprite_t;
|
||||
|
||||
// --------
|
||||
|
|
|
@ -3998,6 +3998,7 @@ static void HWR_SortVisSprites(void)
|
|||
gr_vissprite_t *best = NULL;
|
||||
gr_vissprite_t unsorted;
|
||||
float bestdist;
|
||||
INT32 bestdispoffset;
|
||||
|
||||
if (!gr_visspritecount)
|
||||
return;
|
||||
|
@ -4025,11 +4026,19 @@ static void HWR_SortVisSprites(void)
|
|||
for (i = 0; i < gr_visspritecount; i++)
|
||||
{
|
||||
bestdist = ZCLIP_PLANE-1;
|
||||
bestdispoffset = INT32_MAX;
|
||||
for (ds = unsorted.next; ds != &unsorted; ds = ds->next)
|
||||
{
|
||||
if (ds->tz > bestdist)
|
||||
{
|
||||
bestdist = ds->tz;
|
||||
bestdispoffset = ds->dispoffset;
|
||||
best = ds;
|
||||
}
|
||||
// order visprites of same scale by dispoffset, smallest first
|
||||
else if (ds->tz == bestdist && ds->dispoffset < bestdispoffset)
|
||||
{
|
||||
bestdispoffset = ds->dispoffset;
|
||||
best = ds;
|
||||
}
|
||||
}
|
||||
|
@ -4653,6 +4662,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
#endif
|
||||
vis->x2 = tx;
|
||||
vis->tz = tz;
|
||||
vis->dispoffset = thing->info->dispoffset; // Monster Iestyn: 23/11/15: HARDWARE SUPPORT AT LAST
|
||||
vis->patchlumpnum = sprframe->lumppat[rot];
|
||||
vis->flip = flip;
|
||||
vis->mobj = thing;
|
||||
|
@ -4769,6 +4779,7 @@ static void HWR_ProjectPrecipitationSprite(precipmobj_t *thing)
|
|||
vis->x1 = x1;
|
||||
vis->x2 = tx;
|
||||
vis->tz = tz;
|
||||
vis->dispoffset = 0; // Monster Iestyn: 23/11/15: HARDWARE SUPPORT AT LAST
|
||||
vis->patchlumpnum = sprframe->lumppat[rot];
|
||||
vis->flip = flip;
|
||||
vis->mobj = (mobj_t *)thing;
|
||||
|
|
|
@ -1085,7 +1085,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
|
|||
if (!cv_grmd2.value)
|
||||
return;
|
||||
|
||||
if (!spr->precip)
|
||||
if (spr->precip)
|
||||
return;
|
||||
|
||||
// MD2 colormap fix
|
||||
|
|
10
src/info.c
10
src/info.c
|
@ -69,6 +69,7 @@ char spr2names[NUMPLAYERSPRITES][5] =
|
|||
"DASH",
|
||||
"GASP",
|
||||
"JUMP",
|
||||
"SPNG",
|
||||
"FALL",
|
||||
"EDGE",
|
||||
"RIDE",
|
||||
|
@ -94,6 +95,7 @@ char spr2names[NUMPLAYERSPRITES][5] =
|
|||
"SSPN",
|
||||
"SGSP",
|
||||
"SJMP",
|
||||
"SSPG",
|
||||
"SFAL",
|
||||
"SEDG",
|
||||
"SRID",
|
||||
|
@ -135,7 +137,8 @@ state_t states[NUMSTATES] =
|
|||
{SPR_PLAY, SPR2_SPIN, 1, {NULL}, 0, 0, S_PLAY_SPIN}, // S_PLAY_SPIN
|
||||
{SPR_PLAY, SPR2_DASH, 2, {NULL}, 0, 0, S_PLAY_DASH}, // S_PLAY_DASH
|
||||
{SPR_PLAY, SPR2_GASP, 14, {NULL}, 0, 0, S_PLAY_WALK}, // S_PLAY_GASP
|
||||
{SPR_PLAY, SPR2_JUMP, 2, {NULL}, 0, 0, S_PLAY_JUMP}, // S_PLAY_JUMP
|
||||
{SPR_PLAY, SPR2_JUMP, 1, {NULL}, 0, 0, S_PLAY_JUMP}, // S_PLAY_JUMP
|
||||
{SPR_PLAY, SPR2_SPNG, 2, {NULL}, 0, 0, S_PLAY_SPRING}, // S_PLAY_SPRING
|
||||
{SPR_PLAY, SPR2_FALL, 2, {NULL}, 0, 0, S_PLAY_FALL}, // S_PLAY_FALL
|
||||
{SPR_PLAY, SPR2_EDGE, 12, {NULL}, 0, 0, S_PLAY_EDGE}, // S_PLAY_EDGE
|
||||
{SPR_PLAY, SPR2_RIDE, 4, {NULL}, 0, 0, S_PLAY_RIDE}, // S_PLAY_RIDE
|
||||
|
@ -159,7 +162,8 @@ state_t states[NUMSTATES] =
|
|||
{SPR_PLAY, SPR2_SDRN, 4, {NULL}, 0, 0, S_PLAY_SUPER_DRWN}, // S_PLAY_SUPER_DRWN
|
||||
{SPR_PLAY, SPR2_SSPN, 1, {NULL}, 0, 0, S_PLAY_SUPER_SPIN}, // S_PLAY_SUPER_SPIN
|
||||
{SPR_PLAY, SPR2_SGSP, 14, {NULL}, 0, 0, S_PLAY_SUPER_WALK}, // S_PLAY_SUPER_GASP
|
||||
{SPR_PLAY, SPR2_SJMP, 2, {NULL}, 0, 0, S_PLAY_SUPER_JUMP}, // S_PLAY_SUPER_JUMP
|
||||
{SPR_PLAY, SPR2_SJMP, 1, {NULL}, 0, 0, S_PLAY_SUPER_JUMP}, // S_PLAY_SUPER_JUMP
|
||||
{SPR_PLAY, SPR2_SSPG, 2, {NULL}, 0, 0, S_PLAY_SUPER_SPRING}, // S_PLAY_SUPER_SPRING
|
||||
{SPR_PLAY, SPR2_SFAL, 2, {NULL}, 0, 0, S_PLAY_SUPER_FALL}, // S_PLAY_SUPER_FALL
|
||||
{SPR_PLAY, SPR2_SEDG, 12, {NULL}, 0, 0, S_PLAY_SUPER_EDGE}, // S_PLAY_SUPER_EDGE
|
||||
{SPR_PLAY, SPR2_SRID, 4, {NULL}, 0, 0, S_PLAY_SUPER_RIDE}, // S_PLAY_SUPER_RIDE
|
||||
|
@ -3426,7 +3430,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_XPLD1, // deathstate
|
||||
S_DETON16, // xdeathstate
|
||||
sfx_pop, // deathsound
|
||||
1*FRACUNIT, // speed
|
||||
|
|
|
@ -588,6 +588,7 @@ enum playersprite
|
|||
SPR2_DASH,
|
||||
SPR2_GASP,
|
||||
SPR2_JUMP,
|
||||
SPR2_SPNG, // spring
|
||||
SPR2_FALL,
|
||||
SPR2_EDGE,
|
||||
SPR2_RIDE,
|
||||
|
@ -613,6 +614,7 @@ enum playersprite
|
|||
SPR2_SSPN,
|
||||
SPR2_SGSP,
|
||||
SPR2_SJMP,
|
||||
SPR2_SSPG,
|
||||
SPR2_SFAL,
|
||||
SPR2_SEDG,
|
||||
SPR2_SRID,
|
||||
|
@ -649,7 +651,8 @@ typedef enum state
|
|||
S_PLAY_SPIN,
|
||||
S_PLAY_DASH,
|
||||
S_PLAY_GASP,
|
||||
S_PLAY_JUMP,
|
||||
S_PLAY_JUMP, // spin jump (todo: make jump separate from spring up for non-spin chars too?)
|
||||
S_PLAY_SPRING,
|
||||
S_PLAY_FALL,
|
||||
S_PLAY_EDGE,
|
||||
S_PLAY_RIDE,
|
||||
|
@ -673,7 +676,8 @@ typedef enum state
|
|||
S_PLAY_SUPER_DRWN,
|
||||
S_PLAY_SUPER_SPIN,
|
||||
S_PLAY_SUPER_GASP,
|
||||
S_PLAY_SUPER_JUMP,
|
||||
S_PLAY_SUPER_JUMP, // see note above
|
||||
S_PLAY_SUPER_SPRING,
|
||||
S_PLAY_SUPER_FALL,
|
||||
S_PLAY_SUPER_EDGE,
|
||||
S_PLAY_SUPER_RIDE,
|
||||
|
|
|
@ -1157,14 +1157,11 @@ static int mapheaderinfo_get(lua_State *L)
|
|||
{
|
||||
mapheader_t *header = *((mapheader_t **)luaL_checkudata(L, 1, META_MAPHEADER));
|
||||
const char *field = luaL_checkstring(L, 2);
|
||||
//INT16 i;
|
||||
if (fastcmp(field,"lvlttl")) {
|
||||
//for (i = 0; i < 21; i++)
|
||||
// if (!header->lvlttl[i])
|
||||
// break;
|
||||
lua_pushlstring(L, header->lvlttl, 21);
|
||||
} else if (fastcmp(field,"subttl"))
|
||||
lua_pushlstring(L, header->subttl, 32);
|
||||
INT16 i;
|
||||
if (fastcmp(field,"lvlttl"))
|
||||
lua_pushstring(L, header->lvlttl);
|
||||
else if (fastcmp(field,"subttl"))
|
||||
lua_pushstring(L, header->subttl);
|
||||
else if (fastcmp(field,"actnum"))
|
||||
lua_pushinteger(L, header->actnum);
|
||||
else if (fastcmp(field,"typeoflevel"))
|
||||
|
@ -1176,7 +1173,7 @@ static int mapheaderinfo_get(lua_State *L)
|
|||
else if (fastcmp(field,"musicslottrack"))
|
||||
lua_pushinteger(L, header->musicslottrack);
|
||||
else if (fastcmp(field,"forcecharacter"))
|
||||
lua_pushlstring(L, header->forcecharacter, 16);
|
||||
lua_pushstring(L, header->forcecharacter);
|
||||
else if (fastcmp(field,"weather"))
|
||||
lua_pushinteger(L, header->weather);
|
||||
else if (fastcmp(field,"skynum"))
|
||||
|
@ -1187,12 +1184,15 @@ static int mapheaderinfo_get(lua_State *L)
|
|||
lua_pushinteger(L, header->skybox_scaley);
|
||||
else if (fastcmp(field,"skybox_scalez"))
|
||||
lua_pushinteger(L, header->skybox_scalez);
|
||||
else if (fastcmp(field,"interscreen"))
|
||||
lua_pushlstring(L, header->interscreen, 8);
|
||||
else if (fastcmp(field,"runsoc"))
|
||||
lua_pushlstring(L, header->runsoc, 32);
|
||||
else if (fastcmp(field,"interscreen")) {
|
||||
for (i = 0; i < 8; i++)
|
||||
if (!header->interscreen[i])
|
||||
break;
|
||||
lua_pushlstring(L, header->interscreen, i);
|
||||
} else if (fastcmp(field,"runsoc"))
|
||||
lua_pushstring(L, header->runsoc);
|
||||
else if (fastcmp(field,"scriptname"))
|
||||
lua_pushlstring(L, header->scriptname, 32);
|
||||
lua_pushstring(L, header->scriptname);
|
||||
else if (fastcmp(field,"precutscenenum"))
|
||||
lua_pushinteger(L, header->precutscenenum);
|
||||
else if (fastcmp(field,"cutscenenum"))
|
||||
|
@ -1217,11 +1217,11 @@ static int mapheaderinfo_get(lua_State *L)
|
|||
else {
|
||||
// Read custom vars now
|
||||
// (note: don't include the "LUA." in your lua scripts!)
|
||||
UINT8 i = 0;
|
||||
for (;i < header->numCustomOptions && !fastcmp(field, header->customopts[i].option); ++i);
|
||||
UINT8 j = 0;
|
||||
for (;j < header->numCustomOptions && !fastcmp(field, header->customopts[j].option); ++j);
|
||||
|
||||
if(i < header->numCustomOptions)
|
||||
lua_pushlstring(L, header->customopts[i].value, 255);
|
||||
if(j < header->numCustomOptions)
|
||||
lua_pushstring(L, header->customopts[j].value);
|
||||
else
|
||||
lua_pushnil(L);
|
||||
}
|
||||
|
|
|
@ -77,7 +77,9 @@ static int lib_finecosine(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;
|
||||
}
|
||||
|
||||
|
@ -164,7 +166,7 @@ static int lib_all7emeralds(lua_State *L)
|
|||
// Returns both color and frame numbers!
|
||||
static int lib_coloropposite(lua_State *L)
|
||||
{
|
||||
int colornum = ((int)luaL_checkinteger(L, 1)) & MAXSKINCOLORS;
|
||||
int colornum = ((int)luaL_checkinteger(L, 1)) % MAXSKINCOLORS;
|
||||
lua_pushinteger(L, Color_Opposite[colornum*2]); // push color
|
||||
lua_pushinteger(L, Color_Opposite[colornum*2+1]); // push frame
|
||||
return 2;
|
||||
|
|
|
@ -880,12 +880,33 @@ static boolean OP_HeightOkay(player_t *player, UINT8 ceiling)
|
|||
|
||||
static mapthing_t *OP_CreateNewMapThing(player_t *player, UINT16 type, boolean ceiling)
|
||||
{
|
||||
mapthing_t *mt;
|
||||
mapthing_t *mt = mapthings;
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
LUA_InvalidateMapthings();
|
||||
#endif
|
||||
|
||||
mapthings = Z_Realloc(mapthings, ++nummapthings * sizeof (*mapthings), PU_LEVEL, NULL);
|
||||
|
||||
// as Z_Realloc can relocate mapthings, quickly go through thinker list and correct
|
||||
// the spawnpoints of any objects that have them to the new location
|
||||
if (mt != mapthings)
|
||||
{
|
||||
thinker_t *th;
|
||||
mobj_t *mo;
|
||||
|
||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
|
||||
continue;
|
||||
|
||||
mo = (mobj_t *)th;
|
||||
// get offset from mt, which points to old mapthings, then add new location
|
||||
if (mo->spawnpoint)
|
||||
mo->spawnpoint = (mo->spawnpoint - mt) + mapthings;
|
||||
}
|
||||
}
|
||||
|
||||
mt = (mapthings+nummapthings-1);
|
||||
|
||||
mt->type = type;
|
||||
|
|
10
src/m_menu.c
10
src/m_menu.c
|
@ -2463,11 +2463,14 @@ void M_Drawer(void)
|
|||
V_DrawThinString(vid.dupx, vid.height - 9*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, customversionstring);
|
||||
}
|
||||
else
|
||||
#if VERSION > 0 || SUBVERSION > 0
|
||||
{
|
||||
#ifdef DEVELOP // Development -- show revision / branch info
|
||||
V_DrawThinString(vid.dupx, vid.height - 17*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, compbranch);
|
||||
V_DrawThinString(vid.dupx, vid.height - 9*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, comprevision);
|
||||
#else // Regular build
|
||||
V_DrawThinString(vid.dupx, vid.height - 9*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, va("%s", VERSIONSTRING));
|
||||
#else // Trunk build, show revision info
|
||||
V_DrawThinString(vid.dupx, vid.height - 9*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, va("%s (%s)", VERSIONSTRING, comprevision));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7406,4 +7409,3 @@ static void M_HandleFogColor(INT32 choice)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
10
src/m_misc.c
10
src/m_misc.c
|
@ -1800,16 +1800,14 @@ UINT8 M_HighestBit(UINT32 num)
|
|||
|
||||
const char *GetRevisionString(void)
|
||||
{
|
||||
INT32 vinfo;
|
||||
static char rev[8] = {0};
|
||||
static char rev[9] = {0};
|
||||
if (rev[0])
|
||||
return rev;
|
||||
|
||||
vinfo = atoi(&comprevision[1]);
|
||||
if (vinfo)
|
||||
snprintf(rev, 7, "r%d", vinfo);
|
||||
if (comprevision[0] == 'r')
|
||||
strncpy(rev, comprevision, 7);
|
||||
else
|
||||
strcpy(rev, "rNULL");
|
||||
snprintf(rev, 7, "r%s", comprevision);
|
||||
rev[7] = '\0';
|
||||
|
||||
return rev;
|
||||
|
|
|
@ -7597,48 +7597,35 @@ void A_SetTargetsTarget(mobj_t *actor)
|
|||
{
|
||||
INT32 locvar1 = var1;
|
||||
INT32 locvar2 = var2;
|
||||
mobj_t *targetedmobj = NULL;
|
||||
thinker_t *th;
|
||||
mobj_t *mo2;
|
||||
mobj_t *oldtarg = NULL, *newtarg = NULL;
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUA_CallAction("A_SetTargetsTarget", actor))
|
||||
return;
|
||||
#endif
|
||||
|
||||
if ((!locvar1 && (!actor->target)) || (locvar1 && (!actor->tracer)))
|
||||
// actor's target
|
||||
if (locvar1) // or tracer
|
||||
oldtarg = actor->tracer;
|
||||
else
|
||||
oldtarg = actor->target;
|
||||
|
||||
if (P_MobjWasRemoved(oldtarg))
|
||||
return;
|
||||
|
||||
if ((!locvar1 && !locvar2 && (!actor->target->target))
|
||||
|| (!locvar1 && locvar2 && (!actor->target->tracer))
|
||||
|| (locvar1 && !locvar2 && (!actor->tracer->target))
|
||||
|| (locvar1 && locvar2 && (!actor->tracer->tracer)))
|
||||
return; // Don't search for nothing.
|
||||
|
||||
// scan the thinkers
|
||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
|
||||
continue;
|
||||
|
||||
mo2 = (mobj_t *)th;
|
||||
|
||||
if ((!locvar1 && !locvar2 && (mo2 == actor->target->target))
|
||||
|| (!locvar1 && locvar2 && (mo2 == actor->target->tracer))
|
||||
|| (locvar1 && !locvar2 && (mo2 == actor->tracer->target))
|
||||
|| (locvar1 && locvar2 && (mo2 == actor->tracer->tracer)))
|
||||
{
|
||||
targetedmobj = mo2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!targetedmobj)
|
||||
return; // Oops, nothing found..
|
||||
|
||||
if (!locvar1)
|
||||
P_SetTarget(&actor->target, targetedmobj);
|
||||
// actor's target's target!
|
||||
if (locvar2) // or tracer
|
||||
newtarg = oldtarg->tracer;
|
||||
else
|
||||
P_SetTarget(&actor->tracer, targetedmobj);
|
||||
newtarg = oldtarg->target;
|
||||
|
||||
if (P_MobjWasRemoved(newtarg))
|
||||
return;
|
||||
|
||||
// set actor's new target
|
||||
if (locvar1) // or tracer
|
||||
P_SetTarget(&actor->tracer, newtarg);
|
||||
else
|
||||
P_SetTarget(&actor->target, newtarg);
|
||||
}
|
||||
|
||||
// Function: A_SetObjectFlags
|
||||
|
|
117
src/p_inter.c
117
src/p_inter.c
|
@ -1648,11 +1648,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"));
|
||||
}
|
||||
|
||||
/** 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.
|
||||
* Verify that the value of ::cv_pointlimit is greater than zero before
|
||||
* calling this function.
|
||||
*
|
||||
* \sa cv_pointlimit, P_UpdateSpecials
|
||||
* \sa cv_pointlimit, P_CheckTimeLimit, P_UpdateSpecials
|
||||
*/
|
||||
void P_CheckPointLimit(void)
|
||||
{
|
||||
|
|
|
@ -397,6 +397,7 @@ void P_PlayerEmeraldBurst(player_t *player, boolean toss);
|
|||
|
||||
void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck);
|
||||
void P_PlayerFlagBurst(player_t *player, boolean toss);
|
||||
void P_CheckTimeLimit(void);
|
||||
void P_CheckPointLimit(void);
|
||||
void P_CheckSurvivors(void);
|
||||
boolean P_CheckRacers(void);
|
||||
|
|
|
@ -199,7 +199,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
|||
P_ResetPlayer(object->player);
|
||||
|
||||
if (P_MobjFlip(object)*vertispeed > 0)
|
||||
P_SetPlayerMobjState(object, S_PLAY_JUMP);
|
||||
P_SetPlayerMobjState(object, S_PLAY_SPRING);
|
||||
else if (P_MobjFlip(object)*vertispeed < 0)
|
||||
P_SetPlayerMobjState(object, S_PLAY_FALL);
|
||||
else // horizontal spring
|
||||
|
@ -213,7 +213,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
|||
if (spring->info->painchance)
|
||||
{
|
||||
object->player->pflags |= PF_JUMPED;
|
||||
P_SetPlayerMobjState(object, S_PLAY_SPIN);
|
||||
P_SetPlayerMobjState(object, S_PLAY_JUMP);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -1929,7 +1929,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
|
|||
|
||||
// Don't 'step up' while springing,
|
||||
// Only step up "if needed".
|
||||
if (thing->player->panim == PA_JUMP
|
||||
if (thing->player->panim == PA_SPRING
|
||||
&& P_MobjFlip(thing)*thing->momz > FixedMul(FRACUNIT, thing->scale))
|
||||
maxstep = 0;
|
||||
}
|
||||
|
|
48
src/p_mobj.c
48
src/p_mobj.c
|
@ -163,7 +163,11 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
|||
case S_PLAY_GASP:
|
||||
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_GASP);
|
||||
case S_PLAY_JUMP:
|
||||
if (!(player->charflags & SF_SUPERSPIN))
|
||||
return true;
|
||||
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_JUMP);
|
||||
case S_PLAY_SPRING:
|
||||
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_SPRING);
|
||||
case S_PLAY_FALL:
|
||||
return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_FALL);
|
||||
case S_PLAY_EDGE:
|
||||
|
@ -209,12 +213,14 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
|||
break;
|
||||
case S_PLAY_SPIN:
|
||||
case S_PLAY_DASH:
|
||||
case S_PLAY_JUMP:
|
||||
case S_PLAY_SUPER_SPIN:
|
||||
case S_PLAY_SUPER_JUMP:
|
||||
player->panim = PA_ROLL;
|
||||
break;
|
||||
case S_PLAY_JUMP:
|
||||
case S_PLAY_SUPER_JUMP:
|
||||
player->panim = PA_JUMP;
|
||||
case S_PLAY_SPRING:
|
||||
case S_PLAY_SUPER_SPRING:
|
||||
player->panim = PA_SPRING;
|
||||
break;
|
||||
case S_PLAY_FALL:
|
||||
case S_PLAY_SUPER_FALL:
|
||||
|
@ -317,9 +323,12 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
|||
spr2 = SPR2_SPIN;
|
||||
break;
|
||||
case SPR2_GASP:
|
||||
spr2 = SPR2_JUMP;
|
||||
spr2 = SPR2_SPNG;
|
||||
break;
|
||||
case SPR2_JUMP:
|
||||
spr2 = SPR2_SPIN;
|
||||
break;
|
||||
case SPR2_SPNG: // spring
|
||||
spr2 = SPR2_FALL;
|
||||
break;
|
||||
case SPR2_FALL:
|
||||
|
@ -330,7 +339,7 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
|||
break;
|
||||
|
||||
case SPR2_FLY:
|
||||
spr2 = SPR2_JUMP;
|
||||
spr2 = SPR2_SPNG;
|
||||
break;
|
||||
case SPR2_TIRE:
|
||||
spr2 = SPR2_FLY;
|
||||
|
@ -379,6 +388,9 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
|
|||
case SPR2_SJMP:
|
||||
spr2 = SPR2_JUMP;
|
||||
break;
|
||||
case SPR2_SSPG:
|
||||
spr2 = SPR2_SPNG;
|
||||
break;
|
||||
case SPR2_SFAL:
|
||||
spr2 = SPR2_FALL;
|
||||
break;
|
||||
|
@ -5924,8 +5936,6 @@ static void P_NightsItemChase(mobj_t *thing)
|
|||
|
||||
static boolean P_ShieldLook(mobj_t *thing, shieldtype_t shield)
|
||||
{
|
||||
fixed_t destx, desty;
|
||||
|
||||
if (!thing->target || thing->target->health <= 0 || !thing->target->player
|
||||
|| (thing->target->player->powers[pw_shield] & SH_NOSTACK) == SH_NONE || thing->target->player->powers[pw_super]
|
||||
|| thing->target->player->powers[pw_invulnerability] > 1)
|
||||
|
@ -5950,26 +5960,6 @@ static boolean P_ShieldLook(mobj_t *thing, shieldtype_t shield)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!splitscreen && rendermode != render_soft)
|
||||
{
|
||||
angle_t viewingangle;
|
||||
|
||||
if (players[displayplayer].awayviewtics)
|
||||
viewingangle = R_PointToAngle2(thing->target->x, thing->target->y, players[displayplayer].awayviewmobj->x, players[displayplayer].awayviewmobj->y);
|
||||
else if (!camera.chase && players[displayplayer].mo)
|
||||
viewingangle = R_PointToAngle2(thing->target->x, thing->target->y, players[displayplayer].mo->x, players[displayplayer].mo->y);
|
||||
else
|
||||
viewingangle = R_PointToAngle2(thing->target->x, thing->target->y, camera.x, camera.y);
|
||||
|
||||
destx = thing->target->x + P_ReturnThrustX(thing->target, viewingangle, FixedMul(FRACUNIT, thing->scale));
|
||||
desty = thing->target->y + P_ReturnThrustY(thing->target, viewingangle, FixedMul(FRACUNIT, thing->scale));
|
||||
}
|
||||
else
|
||||
{
|
||||
destx = thing->target->x;
|
||||
desty = thing->target->y;
|
||||
}
|
||||
|
||||
if (shield == SH_FORCE && thing->movecount != (thing->target->player->powers[pw_shield] & 0xFF))
|
||||
{
|
||||
thing->movecount = (thing->target->player->powers[pw_shield] & 0xFF);
|
||||
|
@ -5994,8 +5984,8 @@ static boolean P_ShieldLook(mobj_t *thing, shieldtype_t shield)
|
|||
|
||||
P_SetScale(thing, thing->target->scale);
|
||||
P_UnsetThingPosition(thing);
|
||||
thing->x = destx;
|
||||
thing->y = desty;
|
||||
thing->x = thing->target->x;
|
||||
thing->y = thing->target->y;
|
||||
if (thing->eflags & MFE_VERTICALFLIP)
|
||||
thing->z = thing->target->z + thing->target->height - thing->height + FixedDiv(P_GetPlayerHeight(thing->target->player) - thing->target->height, 3*FRACUNIT) - FixedMul(2*FRACUNIT, thing->target->scale);
|
||||
else
|
||||
|
|
|
@ -638,7 +638,7 @@ static void P_NetArchiveWorld(void)
|
|||
if (li->special != SHORT(mld->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;
|
||||
|
||||
if (li->sidenum[0] != 0xffff)
|
||||
|
|
|
@ -46,14 +46,14 @@ static pslope_t *slopelist = NULL;
|
|||
static UINT16 slopecount = 0;
|
||||
|
||||
// Calculate line normal
|
||||
void P_CalculateSlopeNormal(pslope_t *slope) {
|
||||
static void P_CalculateSlopeNormal(pslope_t *slope) {
|
||||
slope->normal.z = FINECOSINE(slope->zangle>>ANGLETOFINESHIFT);
|
||||
slope->normal.x = -FixedMul(FINESINE(slope->zangle>>ANGLETOFINESHIFT), slope->d.x);
|
||||
slope->normal.y = -FixedMul(FINESINE(slope->zangle>>ANGLETOFINESHIFT), slope->d.y);
|
||||
}
|
||||
|
||||
// With a vertex slope that has its vertices set, configure relevant slope info
|
||||
void P_ReconfigureVertexSlope(pslope_t *slope)
|
||||
static void P_ReconfigureVertexSlope(pslope_t *slope)
|
||||
{
|
||||
vector3_t vec1, vec2;
|
||||
|
||||
|
@ -543,7 +543,7 @@ void P_SpawnSlope_Line(int linenum)
|
|||
//
|
||||
// Creates a new slope from three vertices with the specified IDs
|
||||
//
|
||||
pslope_t *P_NewVertexSlope(INT16 tag1, INT16 tag2, INT16 tag3, UINT8 flags)
|
||||
static pslope_t *P_NewVertexSlope(INT16 tag1, INT16 tag2, INT16 tag3, UINT8 flags)
|
||||
{
|
||||
size_t i;
|
||||
mapthing_t *mt = mapthings;
|
||||
|
|
|
@ -29,9 +29,6 @@
|
|||
#define P_SLOPES_H__
|
||||
|
||||
#ifdef ESLOPE
|
||||
void P_CalculateSlopeNormal(pslope_t *slope);
|
||||
void P_ReconfigureVertexSlope(pslope_t *slope);
|
||||
|
||||
void P_ResetDynamicSlopes(void);
|
||||
void P_RunDynamicSlopes(void);
|
||||
// P_SpawnSlope_Line
|
||||
|
@ -39,8 +36,6 @@ void P_RunDynamicSlopes(void);
|
|||
// sectors.
|
||||
void P_SpawnSlope_Line(int linenum);
|
||||
|
||||
pslope_t *P_NewVertexSlope(INT16 tag1, INT16 tag2, INT16 tag3, UINT8 flags);
|
||||
|
||||
#ifdef SPRINGCLEAN
|
||||
// Loads just map objects that make slopes,
|
||||
// terrain affecting objects have to be spawned first
|
||||
|
|
105
src/p_spec.c
105
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.
|
||||
*
|
||||
* \sa cv_timelimit, P_CheckPointLimit
|
||||
* \sa P_CheckTimeLimit, P_CheckPointLimit
|
||||
*/
|
||||
void P_UpdateSpecials(void)
|
||||
{
|
||||
anim_t *anim;
|
||||
INT32 i, k;
|
||||
INT32 i;
|
||||
INT32 pic;
|
||||
size_t j;
|
||||
|
||||
levelflat_t *foundflats; // for flat animation
|
||||
|
||||
// LEVEL TIMER
|
||||
// Exit if the timer is equal to or greater the timelimit, unless you are
|
||||
// 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);
|
||||
}
|
||||
P_CheckTimeLimit();
|
||||
|
||||
// POINT LIMIT
|
||||
P_CheckPointLimit();
|
||||
|
@ -4766,11 +4671,11 @@ void P_UpdateSpecials(void)
|
|||
// ANIMATE TEXTURES
|
||||
for (anim = anims; anim < lastanim; anim++)
|
||||
{
|
||||
for (i = anim->basepic; i < anim->basepic + anim->numpics; i++)
|
||||
for (i = 0; i < anim->numpics; i++)
|
||||
{
|
||||
pic = anim->basepic + ((leveltime/anim->speed + i) % anim->numpics);
|
||||
if (anim->istexture)
|
||||
texturetranslation[i] = pic;
|
||||
texturetranslation[anim->basepic+i] = pic;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
68
src/p_user.c
68
src/p_user.c
|
@ -1598,7 +1598,7 @@ void P_DoPlayerExit(player_t *player)
|
|||
{
|
||||
player->climbing = 0;
|
||||
player->pflags |= PF_JUMPED;
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
}
|
||||
player->powers[pw_underwater] = 0;
|
||||
player->powers[pw_spacetime] = 0;
|
||||
|
@ -2115,30 +2115,7 @@ static void P_CheckInvincibilityTimer(player_t *player)
|
|||
player->mo->color = (UINT8)(1 + (leveltime % (MAXSKINCOLORS-1)));
|
||||
else if (leveltime % (TICRATE/7) == 0)
|
||||
{
|
||||
fixed_t destx, desty;
|
||||
mobj_t *sparkle;
|
||||
|
||||
if (!splitscreen && rendermode != render_soft)
|
||||
{
|
||||
angle_t viewingangle;
|
||||
|
||||
if (players[displayplayer].awayviewtics)
|
||||
viewingangle = R_PointToAngle2(player->mo->x, player->mo->y, players[displayplayer].awayviewmobj->x, players[displayplayer].awayviewmobj->y);
|
||||
else if (!camera.chase && players[displayplayer].mo)
|
||||
viewingangle = R_PointToAngle2(player->mo->x, player->mo->y, players[displayplayer].mo->x, players[displayplayer].mo->y);
|
||||
else
|
||||
viewingangle = R_PointToAngle2(player->mo->x, player->mo->y, camera.x, camera.y);
|
||||
|
||||
destx = player->mo->x + P_ReturnThrustX(player->mo, viewingangle, FixedMul(FRACUNIT, player->mo->scale));
|
||||
desty = player->mo->y + P_ReturnThrustY(player->mo, viewingangle, FixedMul(FRACUNIT, player->mo->scale));
|
||||
}
|
||||
else
|
||||
{
|
||||
destx = player->mo->x;
|
||||
desty = player->mo->y;
|
||||
}
|
||||
|
||||
sparkle = P_SpawnMobj(destx, desty, player->mo->z, MT_IVSP);
|
||||
mobj_t *sparkle = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_IVSP);
|
||||
sparkle->destscale = player->mo->scale;
|
||||
P_SetScale(sparkle, player->mo->scale);
|
||||
}
|
||||
|
@ -2689,21 +2666,21 @@ static void P_DoClimbing(player_t *player)
|
|||
|
||||
player->climbing = 0;
|
||||
player->pflags |= PF_JUMPED;
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
}
|
||||
|
||||
if (skyclimber)
|
||||
{
|
||||
player->climbing = 0;
|
||||
player->pflags |= PF_JUMPED;
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player->climbing = 0;
|
||||
player->pflags |= PF_JUMPED;
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
}
|
||||
|
||||
if (cmd->sidemove != 0 || cmd->forwardmove != 0)
|
||||
|
@ -2721,7 +2698,7 @@ static void P_DoClimbing(player_t *player)
|
|||
{
|
||||
player->climbing = 0;
|
||||
player->pflags |= PF_JUMPED;
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
P_SetObjectMomZ(player->mo, 4*FRACUNIT, false);
|
||||
P_InstaThrust(player->mo, player->mo->angle, FixedMul(-4*FRACUNIT, player->mo->scale));
|
||||
}
|
||||
|
@ -2732,7 +2709,7 @@ static void P_DoClimbing(player_t *player)
|
|||
localangle2 = player->mo->angle;
|
||||
|
||||
if (player->climbing == 0)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
|
||||
if (player->climbing && P_IsObjectOnGround(player->mo))
|
||||
{
|
||||
|
@ -3520,8 +3497,9 @@ static void P_DoSuperStuff(player_t *player)
|
|||
|
||||
if (player->mo->health > 0)
|
||||
{
|
||||
if ((player->pflags & PF_JUMPED || player->pflags & PF_SPINNING)
|
||||
&& player->mo->state-states != S_PLAY_DASH)
|
||||
if (player->pflags & PF_JUMPED)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
else if (player->pflags & PF_SPINNING && player->mo->state-states != S_PLAY_DASH)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
|
||||
else switch (player->mo->state-states)
|
||||
{
|
||||
|
@ -3539,8 +3517,8 @@ static void P_DoSuperStuff(player_t *player)
|
|||
case S_PLAY_SUPER_PAIN:
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_PAIN);
|
||||
break;
|
||||
case S_PLAY_SUPER_JUMP:
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
case S_PLAY_SUPER_SPRING:
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPRING);
|
||||
break;
|
||||
case S_PLAY_SUPER_FALL:
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
|
||||
|
@ -3760,9 +3738,9 @@ void P_DoJump(player_t *player, boolean soundandstate)
|
|||
S_StartSound(player->mo, sfx_jump); // Play jump sound!
|
||||
|
||||
if (!(player->charability2 == CA2_SPINDASH))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPRING);
|
||||
else
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6546,10 +6524,10 @@ static void P_MovePlayer(player_t *player)
|
|||
}
|
||||
|
||||
// If Springing, but travelling DOWNWARD, change back!
|
||||
if (player->panim == PA_JUMP && P_MobjFlip(player->mo)*player->mo->momz < 0)
|
||||
if (player->panim == PA_SPRING && P_MobjFlip(player->mo)*player->mo->momz < 0)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
|
||||
// If Springing but on the ground, change back!
|
||||
else if (onground && (player->panim == PA_JUMP || player->panim == PA_FALL || player->panim == PA_RIDE) && !player->mo->momz)
|
||||
else if (onground && (player->panim == PA_SPRING || player->panim == PA_FALL || player->panim == PA_RIDE) && !player->mo->momz)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
|
||||
|
||||
// If you are stopped and are still walking, stand still!
|
||||
|
@ -6588,7 +6566,7 @@ static void P_MovePlayer(player_t *player)
|
|||
else
|
||||
{
|
||||
player->pflags |= PF_JUMPED;
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
}
|
||||
}
|
||||
player->pflags &= ~PF_GLIDING;
|
||||
|
@ -6646,7 +6624,7 @@ static void P_MovePlayer(player_t *player)
|
|||
|| (player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds]) && player->charability == CA_GLIDEANDCLIMB))
|
||||
{
|
||||
player->pflags |= PF_JUMPED;
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -6716,7 +6694,7 @@ static void P_MovePlayer(player_t *player)
|
|||
else
|
||||
{
|
||||
player->pflags |= PF_JUMPED;
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
}
|
||||
}
|
||||
player->powers[pw_tailsfly] = 0;
|
||||
|
@ -7296,7 +7274,7 @@ static void P_DoRopeHang(player_t *player)
|
|||
|
||||
if (!(player->pflags & PF_SLIDING) && (player->pflags & PF_JUMPED)
|
||||
&& !(player->panim == PA_ROLL) && player->charability2 == CA2_SPINDASH)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -7413,7 +7391,7 @@ static void P_DoRopeHang(player_t *player)
|
|||
|
||||
if (!(player->pflags & PF_SLIDING) && (player->pflags & PF_JUMPED)
|
||||
&& !(player->panim == PA_ROLL) && player->charability2 == CA2_SPINDASH)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
}
|
||||
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
|
@ -8729,7 +8707,7 @@ void P_PlayerThink(player_t *player)
|
|||
P_SetPlayerMobjState(player->mo, S_PLAY_GLIDE);
|
||||
}
|
||||
else if ((player->pflags & PF_JUMPED) && !player->powers[pw_super] && player->panim != PA_ROLL && player->charability2 == CA2_SPINDASH)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
|
||||
if (player->flashcount)
|
||||
player->flashcount--;
|
||||
|
@ -9398,7 +9376,7 @@ void P_PlayerAfterThink(player_t *player)
|
|||
&& ((!player->powers[pw_super] && player->panim != PA_ROLL)
|
||||
|| player->mo->state == &states[player->mo->info->painstate])
|
||||
&& player->charability2 == CA2_SPINDASH)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||
|
||||
if (player->pflags & PF_CARRIED && player->mo->tracer)
|
||||
{
|
||||
|
|
20
src/r_bsp.c
20
src/r_bsp.c
|
@ -935,14 +935,14 @@ static void R_Subsector(size_t num)
|
|||
|
||||
ffloor[numffloors].plane = NULL;
|
||||
ffloor[numffloors].polyobj = NULL;
|
||||
|
||||
floorcenterz =
|
||||
|
||||
floorcenterz =
|
||||
#ifdef ESLOPE
|
||||
frontsector->f_slope ? P_GetZAt(frontsector->f_slope, frontsector->soundorg.x, frontsector->soundorg.y) :
|
||||
#endif
|
||||
frontsector->floorheight;
|
||||
|
||||
ceilingcenterz =
|
||||
|
||||
ceilingcenterz =
|
||||
#ifdef ESLOPE
|
||||
frontsector->c_slope ? P_GetZAt(frontsector->c_slope, frontsector->soundorg.x, frontsector->soundorg.y) :
|
||||
#endif
|
||||
|
@ -953,8 +953,8 @@ static void R_Subsector(size_t num)
|
|||
*rover->b_slope ? P_GetZAt(*rover->b_slope, viewx, viewy) :
|
||||
#endif
|
||||
*rover->bottomheight;
|
||||
|
||||
planecenterz =
|
||||
|
||||
planecenterz =
|
||||
#ifdef ESLOPE
|
||||
*rover->b_slope ? P_GetZAt(*rover->b_slope, frontsector->soundorg.x, frontsector->soundorg.y) :
|
||||
#endif
|
||||
|
@ -966,7 +966,7 @@ static void R_Subsector(size_t num)
|
|||
{
|
||||
light = R_GetPlaneLight(frontsector, planecenterz,
|
||||
viewz < *rover->bottomheight);
|
||||
|
||||
|
||||
ffloor[numffloors].plane = R_FindPlane(*rover->bottomheight, *rover->bottompic,
|
||||
*frontsector->lightlist[light].lightlevel, *rover->bottomxoffs,
|
||||
*rover->bottomyoffs, *rover->bottomangle, frontsector->lightlist[light].extra_colormap, rover
|
||||
|
@ -1002,8 +1002,8 @@ static void R_Subsector(size_t num)
|
|||
*rover->t_slope ? P_GetZAt(*rover->t_slope, viewx, viewy) :
|
||||
#endif
|
||||
*rover->topheight;
|
||||
|
||||
planecenterz =
|
||||
|
||||
planecenterz =
|
||||
#ifdef ESLOPE
|
||||
*rover->t_slope ? P_GetZAt(*rover->t_slope, frontsector->soundorg.x, frontsector->soundorg.y) :
|
||||
#endif
|
||||
|
@ -1014,7 +1014,7 @@ static void R_Subsector(size_t num)
|
|||
|| (viewz < heightcheck && (rover->flags & FF_BOTHPLANES))))
|
||||
{
|
||||
light = R_GetPlaneLight(frontsector, planecenterz, viewz < *rover->topheight);
|
||||
|
||||
|
||||
ffloor[numffloors].plane = R_FindPlane(*rover->topheight, *rover->toppic,
|
||||
*frontsector->lightlist[light].lightlevel, *rover->topxoffs, *rover->topyoffs, *rover->topangle,
|
||||
frontsector->lightlist[light].extra_colormap, rover
|
||||
|
|
|
@ -347,7 +347,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
|
|||
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 3);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case SKINCOLOR_PEACH:
|
||||
// 11 colors
|
||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||
|
@ -362,7 +362,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
|
|||
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 7); // Darkest
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case SKINCOLOR_RED:
|
||||
// 16 colors
|
||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||
|
@ -957,4 +957,3 @@ void R_DrawViewBorder(void)
|
|||
// ==========================================================================
|
||||
|
||||
#include "r_draw16.c"
|
||||
|
||||
|
|
|
@ -1388,4 +1388,3 @@ void R_DrawColumnShadowed_8(void)
|
|||
if (dc_yl <= realyh)
|
||||
walldrawerfunc(); // R_DrawWallColumn_8 for the appropriate architecture
|
||||
}
|
||||
|
||||
|
|
|
@ -114,15 +114,6 @@ INT32 viewangletox[FINEANGLES/2];
|
|||
// from clipangle to -clipangle.
|
||||
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 *scalelightfixed[MAXLIGHTSCALE];
|
||||
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)
|
||||
if (pl->polyobj->translucency >= 10)
|
||||
return; // Don't even draw it
|
||||
else if (pl->polyobj->translucency == 9)
|
||||
ds_transmap = ((tr_trans90)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
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 if (pl->polyobj->translucency > 0)
|
||||
ds_transmap = transtables + ((pl->polyobj->translucency-1)<<FF_TRANSSHIFT);
|
||||
else // Opaque, but allow transparent flat pixels
|
||||
spanfunc = splatfunc;
|
||||
|
||||
if (pl->extra_colormap && pl->extra_colormap->fog)
|
||||
light = (pl->lightlevel >> LIGHTSEGSHIFT);
|
||||
else
|
||||
light = LIGHTLEVELS-1;
|
||||
light = LIGHTLEVELS-1;
|
||||
|
||||
} else
|
||||
#endif
|
||||
|
@ -805,23 +789,23 @@ void R_DrawSinglePlane(visplane_t *pl)
|
|||
if (pl->ffloor->alpha < 12)
|
||||
return; // Don't even draw it
|
||||
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)
|
||||
ds_transmap = ((tr_trans80)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
ds_transmap = transtables + ((tr_trans80-1)<<FF_TRANSSHIFT);
|
||||
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)
|
||||
ds_transmap = ((tr_trans60)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
ds_transmap = transtables + ((tr_trans60-1)<<FF_TRANSSHIFT);
|
||||
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)
|
||||
ds_transmap = ((tr_trans40)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
ds_transmap = transtables + ((tr_trans40-1)<<FF_TRANSSHIFT);
|
||||
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)
|
||||
ds_transmap = ((tr_trans20)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
ds_transmap = transtables + ((tr_trans20-1)<<FF_TRANSSHIFT);
|
||||
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
|
||||
spanfunc = splatfunc;
|
||||
|
||||
|
@ -1082,7 +1066,7 @@ using the palette colors.
|
|||
if (spanfunc == R_DrawSpan_8)
|
||||
{
|
||||
INT32 i;
|
||||
ds_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
ds_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||
spanfunc = R_DrawTranslucentSpan_8;
|
||||
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;
|
||||
else
|
||||
{
|
||||
dc_transmap = ((tr_trans50 - 1)<<FF_TRANSSHIFT) + transtables;
|
||||
dc_transmap = transtables + ((tr_trans50 - 1)<<FF_TRANSSHIFT);
|
||||
colfunc = fuzzcolfunc;
|
||||
}
|
||||
|
||||
|
@ -304,39 +304,15 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
switch (ldef->special)
|
||||
{
|
||||
case 900:
|
||||
dc_transmap = ((tr_trans10)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 901:
|
||||
dc_transmap = ((tr_trans20)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 902:
|
||||
dc_transmap = ((tr_trans30)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 903:
|
||||
dc_transmap = ((tr_trans40)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 904:
|
||||
dc_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 905:
|
||||
dc_transmap = ((tr_trans60)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 906:
|
||||
dc_transmap = ((tr_trans70)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 907:
|
||||
dc_transmap = ((tr_trans80)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 908:
|
||||
dc_transmap = ((tr_trans90)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
dc_transmap = transtables + ((ldef->special-900)<<FF_TRANSSHIFT);
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 909:
|
||||
|
@ -354,7 +330,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
if (curline->polyseg->translucency >= NUMTRANSMAPS)
|
||||
return;
|
||||
|
||||
dc_transmap = ((curline->polyseg->translucency)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
dc_transmap = transtables + ((curline->polyseg->translucency-1)<<FF_TRANSSHIFT);
|
||||
colfunc = fuzzcolfunc;
|
||||
}
|
||||
|
||||
|
@ -733,23 +709,23 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
if (pfloor->alpha < 12)
|
||||
return; // Don't even draw it
|
||||
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)
|
||||
dc_transmap = ((tr_trans80)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
dc_transmap = transtables + ((tr_trans80-1)<<FF_TRANSSHIFT);
|
||||
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)
|
||||
dc_transmap = ((tr_trans60)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
dc_transmap = transtables + ((tr_trans60-1)<<FF_TRANSSHIFT);
|
||||
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)
|
||||
dc_transmap = ((tr_trans40)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
dc_transmap = transtables + ((tr_trans40-1)<<FF_TRANSSHIFT);
|
||||
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)
|
||||
dc_transmap = ((tr_trans20)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
dc_transmap = transtables + ((tr_trans20-1)<<FF_TRANSSHIFT);
|
||||
else if (pfloor->alpha < 243)
|
||||
dc_transmap = ((tr_trans10)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
dc_transmap = transtables + ((tr_trans10-1)<<FF_TRANSSHIFT);
|
||||
else
|
||||
fuzzy = false; // Opaque
|
||||
|
||||
|
|
|
@ -503,7 +503,7 @@ static void R_RenderFloorSplat(floorsplat_t *pSplat, vertex_t *verts, UINT8 *pTe
|
|||
{
|
||||
ds_x1 = x1;
|
||||
ds_x2 = x2;
|
||||
ds_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
ds_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||
splatfunc();
|
||||
}
|
||||
|
||||
|
|
|
@ -1266,7 +1266,8 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
vis = R_NewVisSprite();
|
||||
vis->heightsec = heightsec; //SoM: 3/17/2000
|
||||
vis->mobjflags = thing->flags;
|
||||
vis->scale = yscale + thing->info->dispoffset; //<<detailshift;
|
||||
vis->scale = yscale; //<<detailshift;
|
||||
vis->dispoffset = thing->info->dispoffset; // Monster Iestyn: 23/11/15
|
||||
vis->gx = thing->x;
|
||||
vis->gy = thing->y;
|
||||
vis->gz = gz;
|
||||
|
@ -1329,9 +1330,9 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
if (!cv_translucency.value)
|
||||
; // no translucency
|
||||
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)
|
||||
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))
|
||||
&& (!vis->extra_colormap || !vis->extra_colormap->fog))
|
||||
|
@ -1482,6 +1483,7 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
|
|||
// store information in a vissprite
|
||||
vis = R_NewVisSprite();
|
||||
vis->scale = yscale; //<<detailshift;
|
||||
vis->dispoffset = 0; // Monster Iestyn: 23/11/15
|
||||
vis->gx = thing->x;
|
||||
vis->gy = thing->y;
|
||||
vis->gz = gz;
|
||||
|
@ -1633,6 +1635,7 @@ void R_SortVisSprites(void)
|
|||
vissprite_t *best = NULL;
|
||||
vissprite_t unsorted;
|
||||
fixed_t bestscale;
|
||||
INT32 bestdispoffset;
|
||||
|
||||
if (!visspritecount)
|
||||
return;
|
||||
|
@ -1663,12 +1666,19 @@ void R_SortVisSprites(void)
|
|||
vsprsortedhead.next = vsprsortedhead.prev = &vsprsortedhead;
|
||||
for (i = 0; i < visspritecount; i++)
|
||||
{
|
||||
bestscale = INT32_MAX;
|
||||
bestscale = bestdispoffset = INT32_MAX;
|
||||
for (ds = unsorted.next; ds != &unsorted; ds = ds->next)
|
||||
{
|
||||
if (ds->scale < bestscale)
|
||||
{
|
||||
bestscale = ds->scale;
|
||||
bestdispoffset = ds->dispoffset;
|
||||
best = ds;
|
||||
}
|
||||
// order visprites of same scale by dispoffset, smallest first
|
||||
else if (ds->scale == bestscale && ds->dispoffset < bestdispoffset)
|
||||
{
|
||||
bestdispoffset = ds->dispoffset;
|
||||
best = ds;
|
||||
}
|
||||
}
|
||||
|
@ -1920,7 +1930,8 @@ static void R_CreateDrawNodes(void)
|
|||
if (r2->sprite->szt > rover->sz || r2->sprite->sz < rover->szt)
|
||||
continue;
|
||||
|
||||
if (r2->sprite->scale > rover->scale)
|
||||
if (r2->sprite->scale > rover->scale
|
||||
|| (r2->sprite->scale == rover->scale && r2->sprite->dispoffset > rover->dispoffset))
|
||||
{
|
||||
entry = R_CreateDrawNode(NULL);
|
||||
(entry->prev = r2->prev)->next = entry;
|
||||
|
@ -2654,9 +2665,6 @@ next_token:
|
|||
}
|
||||
free(buf2);
|
||||
|
||||
if (skin != &skins[0])
|
||||
skin->flags &= ~SF_SUPER;
|
||||
|
||||
// Add sprites
|
||||
{
|
||||
UINT16 z;
|
||||
|
|
|
@ -162,6 +162,7 @@ typedef struct vissprite_s
|
|||
boolean precip;
|
||||
boolean vflip; // Flip vertically
|
||||
boolean isScaled;
|
||||
INT32 dispoffset; // copy of info->dispoffset, affects ordering but not drawing
|
||||
} vissprite_t;
|
||||
|
||||
// A drawnode is something that points to a 3D floor, 3D side, or masked
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#ifdef CMAKECONFIG
|
||||
#include "config.h"
|
||||
#else
|
||||
#include "config.h.in"
|
||||
#include "../config.h.in"
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WCE
|
||||
|
|
|
@ -217,10 +217,12 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
OglSdlSurface(vid.width, vid.height);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (rendermode == render_soft)
|
||||
{
|
||||
|
@ -401,9 +403,11 @@ static INT32 Impl_SDL_Scancode_To_Keycode(SDL_Scancode code)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
#ifdef HWRENDER
|
||||
DBG_Printf("Unknown incoming scancode: %d, represented %c\n",
|
||||
code,
|
||||
SDL_GetKeyName(SDL_GetKeyFromScancode(code)));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1842,37 +1842,6 @@ static void ST_overlayDrawer(void)
|
|||
LUAh_GameHUD(stplyr);
|
||||
#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
|
||||
if (*mapheaderinfo[gamemap-1]->lvlttl != '\0' && !(hu_showscores && (netgame || multiplayer))
|
||||
#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)
|
||||
{
|
||||
v_translevel = ((alphalevel)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
v_translevel = transtables + ((alphalevel-1)<<FF_TRANSSHIFT);
|
||||
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
|
||||
INT32 newpix;
|
||||
INT32 sine;
|
||||
//UINT8 *transme = ((tr_trans50)<<FF_TRANSSHIFT) + transtables;
|
||||
//UINT8 *transme = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||
|
||||
for (y = yoffset; y < yoffset+height; y++)
|
||||
{
|
||||
|
@ -1926,7 +1926,7 @@ Unoptimized version
|
|||
INT32 x, y;
|
||||
|
||||
// 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++)
|
||||
{
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
#ifdef HWRENDER
|
||||
#include "hardware/hw_data.h"
|
||||
#else
|
||||
typedef void GLPatch_t;
|
||||
#endif
|
||||
|
||||
#ifdef __GNUG__
|
||||
|
|
Loading…
Reference in a new issue