mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- Backport r1253 through r1256 and r1259 of GZDoom.
* By pressing request, allow Linux users to build ZDoom with an FMOD version that doesn't give them 3D sound positioning. :p * Fixed severe copy-pasta portal copy bug. * 3D floors hidden by being moved above the ceiling or below the floor will no longer show in the automap. * Reject TEXTURES scale of 0. They'd do nothing but provoke a division by zero error. * Maybe fixed Linux compilation? SVN r3297 (trunk)
This commit is contained in:
parent
3c47a30249
commit
9c8bb236ec
5 changed files with 25 additions and 14 deletions
|
@ -44,7 +44,7 @@ set( MINOR_VERSIONS "50" "49" "48" "47" "46" "45" "44" "43" "42" "41"
|
||||||
"27" "26" "25" "24" "23" "22" "21" "20" "21" "19" "18" "17" "16"
|
"27" "26" "25" "24" "23" "22" "21" "20" "21" "19" "18" "17" "16"
|
||||||
"15" "14" "13" "12" "11" "10" "09" "08" "07" "06" "05" "04" "03"
|
"15" "14" "13" "12" "11" "10" "09" "08" "07" "06" "05" "04" "03"
|
||||||
"02" "01" "00" )
|
"02" "01" "00" )
|
||||||
set( MAJOR_VERSIONS "30" "28" "26" "24" "22" "20" )
|
set( MAJOR_VERSIONS "34" "28" "26" "24" "22" "20" )
|
||||||
set( FMOD_DIR_VERSIONS ${FMOD_DIR_VERSIONS} "../fmod" )
|
set( FMOD_DIR_VERSIONS ${FMOD_DIR_VERSIONS} "../fmod" )
|
||||||
foreach( majver ${MAJOR_VERSIONS} )
|
foreach( majver ${MAJOR_VERSIONS} )
|
||||||
foreach( minver ${MINOR_VERSIONS} )
|
foreach( minver ${MINOR_VERSIONS} )
|
||||||
|
|
|
@ -1670,6 +1670,7 @@ void AM_drawSubsectors()
|
||||||
// (Make the comparison in floating point to avoid overflows and improve performance.)
|
// (Make the comparison in floating point to avoid overflows and improve performance.)
|
||||||
double secx;
|
double secx;
|
||||||
double secy;
|
double secy;
|
||||||
|
double seczb, seczt;
|
||||||
double cmpz = FIXED2DBL(viewz);
|
double cmpz = FIXED2DBL(viewz);
|
||||||
|
|
||||||
if (players[consoleplayer].camera && sec == players[consoleplayer].camera->Sector)
|
if (players[consoleplayer].camera && sec == players[consoleplayer].camera->Sector)
|
||||||
|
@ -1683,6 +1684,8 @@ void AM_drawSubsectors()
|
||||||
secx = FIXED2DBL(sec->soundorg[0]);
|
secx = FIXED2DBL(sec->soundorg[0]);
|
||||||
secy = FIXED2DBL(sec->soundorg[1]);
|
secy = FIXED2DBL(sec->soundorg[1]);
|
||||||
}
|
}
|
||||||
|
seczb = floorplane->ZatPoint(secx, secy);
|
||||||
|
seczt = sec->ceilingplane.ZatPoint(secx, secy);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < sec->e->XFloor.ffloors.Size(); ++i)
|
for (unsigned int i = 0; i < sec->e->XFloor.ffloors.Size(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -1690,7 +1693,13 @@ void AM_drawSubsectors()
|
||||||
if (!(rover->flags & FF_EXISTS)) continue;
|
if (!(rover->flags & FF_EXISTS)) continue;
|
||||||
if (rover->flags & FF_FOG) continue;
|
if (rover->flags & FF_FOG) continue;
|
||||||
if (rover->alpha == 0) continue;
|
if (rover->alpha == 0) continue;
|
||||||
if (rover->top.plane->ZatPoint(secx, secy) < cmpz)
|
double roverz = rover->top.plane->ZatPoint(secx, secy);
|
||||||
|
// Ignore 3D floors that are above or below the sector itself:
|
||||||
|
// they are hidden. Since 3D floors are sorted top to bottom,
|
||||||
|
// if we get below the sector floor, we can stop.
|
||||||
|
if (roverz > seczt) continue;
|
||||||
|
if (roverz < seczb) break;
|
||||||
|
if (roverz < cmpz)
|
||||||
{
|
{
|
||||||
maptex = *(rover->top.texture);
|
maptex = *(rover->top.texture);
|
||||||
floorplane = rover->top.plane;
|
floorplane = rover->top.plane;
|
||||||
|
|
|
@ -1046,18 +1046,18 @@ void P_SpawnPortal(line_t *line, int sectortag, int plane, int alpha)
|
||||||
{
|
{
|
||||||
// Check if this portal needs to be copied to other sectors
|
// Check if this portal needs to be copied to other sectors
|
||||||
// This must be done here to ensure that it gets done only after the portal is set up
|
// This must be done here to ensure that it gets done only after the portal is set up
|
||||||
if (lines[i].special == Sector_SetPortal &&
|
if (lines[j].special == Sector_SetPortal &&
|
||||||
lines[i].args[1] == 1 &&
|
lines[j].args[1] == 1 &&
|
||||||
lines[i].args[2] == plane &&
|
lines[j].args[2] == plane &&
|
||||||
lines[i].args[3] == sectortag)
|
lines[j].args[3] == sectortag)
|
||||||
{
|
{
|
||||||
if (lines[i].args[0] == 0)
|
if (lines[j].args[0] == 0)
|
||||||
{
|
{
|
||||||
SetPortal(lines[i].frontsector, plane, reference, alpha);
|
SetPortal(lines[j].frontsector, plane, reference, alpha);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (int s=-1; (s = P_FindSectorFromTag(lines[i].args[0],s)) >= 0;)
|
for (int s=-1; (s = P_FindSectorFromTag(lines[j].args[0],s)) >= 0;)
|
||||||
{
|
{
|
||||||
SetPortal(§ors[s], plane, reference, alpha);
|
SetPortal(§ors[s], plane, reference, alpha);
|
||||||
}
|
}
|
||||||
|
|
|
@ -855,15 +855,15 @@ struct SDL_PrivateVideoData
|
||||||
struct SDL_VideoDevice
|
struct SDL_VideoDevice
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
int (*functions)()[9];
|
int (*functions[9])();
|
||||||
SDL_VideoInfo info;
|
SDL_VideoInfo info;
|
||||||
SDL_PixelFormat *displayformatalphapixel;
|
SDL_PixelFormat *displayformatalphapixel;
|
||||||
int (*morefuncs)()[9];
|
int (*morefuncs[9])();
|
||||||
Uint16 *gamma;
|
Uint16 *gamma;
|
||||||
int (*somefuncs)()[9];
|
int (*somefuncs[9])();
|
||||||
unsigned int texture; // Only here if SDL was compiled with OpenGL support. Ack!
|
unsigned int texture; // Only here if SDL was compiled with OpenGL support. Ack!
|
||||||
int is_32bit;
|
int is_32bit;
|
||||||
int (*itsafuncs)()[13];
|
int (*itsafuncs[13])();
|
||||||
SDL_Surface *surfaces[3];
|
SDL_Surface *surfaces[3];
|
||||||
SDL_Palette *physpal;
|
SDL_Palette *physpal;
|
||||||
SDL_Color *gammacols;
|
SDL_Color *gammacols;
|
||||||
|
@ -874,7 +874,7 @@ struct SDL_VideoDevice
|
||||||
SDL_PrivateVideoData *hidden; // Why did they have to bury this so far in?
|
SDL_PrivateVideoData *hidden; // Why did they have to bury this so far in?
|
||||||
};
|
};
|
||||||
|
|
||||||
extern SDL_VideDevice *current_video;
|
extern SDL_VideoDevice *current_video;
|
||||||
#define SDL_Display (current_video->hidden->X11_Display)
|
#define SDL_Display (current_video->hidden->X11_Display)
|
||||||
|
|
||||||
SDL_Cursor *CreateColorCursor(FTexture *cursorpic)
|
SDL_Cursor *CreateColorCursor(FTexture *cursorpic)
|
||||||
|
|
|
@ -1254,11 +1254,13 @@ FMultiPatchTexture::FMultiPatchTexture (FScanner &sc, int usetype)
|
||||||
{
|
{
|
||||||
sc.MustGetFloat();
|
sc.MustGetFloat();
|
||||||
xScale = FLOAT2FIXED(sc.Float);
|
xScale = FLOAT2FIXED(sc.Float);
|
||||||
|
if (xScale == 0) sc.ScriptError("Texture %s is defined with null x-scale\n", Name);
|
||||||
}
|
}
|
||||||
else if (sc.Compare("YScale"))
|
else if (sc.Compare("YScale"))
|
||||||
{
|
{
|
||||||
sc.MustGetFloat();
|
sc.MustGetFloat();
|
||||||
yScale = FLOAT2FIXED(sc.Float);
|
yScale = FLOAT2FIXED(sc.Float);
|
||||||
|
if (yScale == 0) sc.ScriptError("Texture %s is defined with null y-scale\n", Name);
|
||||||
}
|
}
|
||||||
else if (sc.Compare("WorldPanning"))
|
else if (sc.Compare("WorldPanning"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue