mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
Merge branch 'master' into v2.x
Conflicts: src/gl/textures/gl_material.cpp
This commit is contained in:
commit
9b8869e78d
18 changed files with 88 additions and 42 deletions
|
@ -723,7 +723,7 @@ void AddCommandString (char *cmd, int keynum)
|
|||
// Note that deferred commands lose track of which key
|
||||
// (if any) they were pressed from.
|
||||
*brkpt = ';';
|
||||
new DWaitingCommand (brkpt, tics+1);
|
||||
new DWaitingCommand (brkpt, tics);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -81,6 +81,7 @@ enum
|
|||
CP_SECTORFLOOROFFSET,
|
||||
CP_SETWALLYSCALE,
|
||||
CP_SETTHINGZ,
|
||||
CP_SETTAG,
|
||||
};
|
||||
|
||||
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
||||
|
@ -307,6 +308,15 @@ void ParseCompatibility()
|
|||
sc.MustGetFloat();
|
||||
CompatParams.Push(FLOAT2FIXED(sc.Float));
|
||||
}
|
||||
else if (sc.Compare("setsectortag"))
|
||||
{
|
||||
if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size();
|
||||
CompatParams.Push(CP_SETTAG);
|
||||
sc.MustGetNumber();
|
||||
CompatParams.Push(sc.Number);
|
||||
sc.MustGetNumber();
|
||||
CompatParams.Push(sc.Number);
|
||||
}
|
||||
else
|
||||
{
|
||||
sc.UnGet();
|
||||
|
@ -520,6 +530,15 @@ void SetCompatibilityParams()
|
|||
i += 3;
|
||||
break;
|
||||
}
|
||||
case CP_SETTAG:
|
||||
{
|
||||
if ((unsigned)CompatParams[i + 1] < (unsigned)numsectors)
|
||||
{
|
||||
sectors[CompatParams[i + 1]].tag = CompatParams[i + 2];
|
||||
}
|
||||
i += 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,6 +107,8 @@ enum SAW_Flags
|
|||
SF_RANDOMLIGHTHIT = 4,
|
||||
SF_NOUSEAMMOMISS = 8,
|
||||
SF_NOUSEAMMO = 16,
|
||||
SF_NOPULLIN = 32,
|
||||
SF_NOTURN = 64,
|
||||
};
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw)
|
||||
|
@ -187,23 +189,27 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw)
|
|||
S_Sound (self, CHAN_WEAPON, hitsound, 1, ATTN_NORM);
|
||||
|
||||
// turn to face target
|
||||
angle = R_PointToAngle2 (self->x, self->y,
|
||||
linetarget->x, linetarget->y);
|
||||
if (angle - self->angle > ANG180)
|
||||
if (!(Flags & SF_NOTURN))
|
||||
{
|
||||
if (angle - self->angle < (angle_t)(-ANG90/20))
|
||||
self->angle = angle + ANG90/21;
|
||||
angle = R_PointToAngle2(self->x, self->y,
|
||||
linetarget->x, linetarget->y);
|
||||
if (angle - self->angle > ANG180)
|
||||
{
|
||||
if (angle - self->angle < (angle_t)(-ANG90 / 20))
|
||||
self->angle = angle + ANG90 / 21;
|
||||
else
|
||||
self->angle -= ANG90 / 20;
|
||||
}
|
||||
else
|
||||
self->angle -= ANG90/20;
|
||||
{
|
||||
if (angle - self->angle > ANG90 / 20)
|
||||
self->angle = angle - ANG90 / 21;
|
||||
else
|
||||
self->angle += ANG90 / 20;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (angle - self->angle > ANG90/20)
|
||||
self->angle = angle - ANG90/21;
|
||||
else
|
||||
self->angle += ANG90/20;
|
||||
}
|
||||
self->flags |= MF_JUSTATTACKED;
|
||||
if (!(Flags & SF_NOPULLIN))
|
||||
self->flags |= MF_JUSTATTACKED;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -525,7 +525,7 @@ level_info_t *CheckLevelRedirect (level_info_t *info);
|
|||
|
||||
FString CalcMapName (int episode, int level);
|
||||
|
||||
void G_ParseMapInfo (const char *basemapinfo);
|
||||
void G_ParseMapInfo (FString basemapinfo);
|
||||
|
||||
void G_ClearSnapshots (void);
|
||||
void P_RemoveDefereds ();
|
||||
|
|
|
@ -1886,7 +1886,7 @@ static void ClearMapinfo()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void G_ParseMapInfo (const char *basemapinfo)
|
||||
void G_ParseMapInfo (FString basemapinfo)
|
||||
{
|
||||
int lump, lastlump = 0;
|
||||
level_info_t gamedefaults;
|
||||
|
@ -1895,7 +1895,7 @@ void G_ParseMapInfo (const char *basemapinfo)
|
|||
atterm(ClearMapinfo);
|
||||
|
||||
// Parse the default MAPINFO for the current game. This lump *MUST* come from zdoom.pk3.
|
||||
if (basemapinfo != NULL)
|
||||
if (basemapinfo.IsNotEmpty())
|
||||
{
|
||||
FMapInfoParser parse;
|
||||
level_info_t defaultinfo;
|
||||
|
@ -1903,7 +1903,7 @@ void G_ParseMapInfo (const char *basemapinfo)
|
|||
if (Wads.GetLumpFile(baselump) > 0)
|
||||
{
|
||||
I_FatalError("File %s is overriding core lump %s.",
|
||||
Wads.GetWadFullName(Wads.GetLumpFile(baselump)), basemapinfo);
|
||||
Wads.GetWadFullName(Wads.GetLumpFile(baselump)), basemapinfo.GetChars());
|
||||
}
|
||||
parse.ParseMapInfo(baselump, gamedefaults, defaultinfo);
|
||||
}
|
||||
|
|
|
@ -437,7 +437,6 @@ void gl_RecalcVertexHeights(vertex_t * v)
|
|||
int i,j,k;
|
||||
float height;
|
||||
|
||||
//@sync-vertexheights
|
||||
v->numheights=0;
|
||||
for(i=0;i<v->numsectors;i++)
|
||||
{
|
||||
|
|
|
@ -878,7 +878,6 @@ void GLDrawList::SortFlats()
|
|||
//==========================================================================
|
||||
void GLDrawList::AddWall(GLWall * wall)
|
||||
{
|
||||
//@sync-drawinfo
|
||||
drawitems.Push(GLDrawItem(GLDIT_WALL,walls.Push(*wall)));
|
||||
}
|
||||
|
||||
|
@ -889,7 +888,6 @@ void GLDrawList::AddWall(GLWall * wall)
|
|||
//==========================================================================
|
||||
void GLDrawList::AddFlat(GLFlat * flat)
|
||||
{
|
||||
//@sync-drawinfo
|
||||
drawitems.Push(GLDrawItem(GLDIT_FLAT,flats.Push(*flat)));
|
||||
}
|
||||
|
||||
|
@ -900,7 +898,6 @@ void GLDrawList::AddFlat(GLFlat * flat)
|
|||
//==========================================================================
|
||||
void GLDrawList::AddSprite(GLSprite * sprite)
|
||||
{
|
||||
//@sync-drawinfo
|
||||
drawitems.Push(GLDrawItem(GLDIT_SPRITE,sprites.Push(*sprite)));
|
||||
}
|
||||
|
||||
|
|
|
@ -162,7 +162,6 @@ void FDrawInfo::AddUpperMissingTexture(side_t * side, subsector_t *sub, fixed_t
|
|||
return;
|
||||
}
|
||||
|
||||
//@sync-hack
|
||||
for(unsigned int i=0;i<MissingUpperTextures.Size();i++)
|
||||
{
|
||||
if (MissingUpperTextures[i].sub == sub)
|
||||
|
@ -229,13 +228,12 @@ void FDrawInfo::AddLowerMissingTexture(side_t * side, subsector_t *sub, fixed_t
|
|||
}
|
||||
|
||||
// Ignore FF_FIX's because they are designed to abuse missing textures
|
||||
if (seg->backsector->e->XFloor.ffloors.Size() && seg->backsector->e->XFloor.ffloors[0]->flags&FF_FIX)
|
||||
if (seg->backsector->e->XFloor.ffloors.Size() && (seg->backsector->e->XFloor.ffloors[0]->flags&(FF_FIX|FF_SEETHROUGH)) == FF_FIX)
|
||||
{
|
||||
totalms.Unclock();
|
||||
return;
|
||||
}
|
||||
|
||||
//@sync-hack
|
||||
for(unsigned int i=0;i<MissingLowerTextures.Size();i++)
|
||||
{
|
||||
if (MissingLowerTextures[i].sub == sub)
|
||||
|
@ -732,7 +730,6 @@ void FDrawInfo::AddHackedSubsector(subsector_t * sub)
|
|||
{
|
||||
if (!(level.maptype == MAPTYPE_HEXEN))
|
||||
{
|
||||
//@sync-hack (probably not, this is only called from the main thread)
|
||||
SubsectorHackInfo sh={sub, 0};
|
||||
SubsectorHacks.Push (sh);
|
||||
}
|
||||
|
@ -1032,13 +1029,11 @@ ADD_STAT(sectorhacks)
|
|||
|
||||
void FDrawInfo::AddFloorStack(sector_t * sec)
|
||||
{
|
||||
//@sync-hack
|
||||
FloorStacks.Push(sec);
|
||||
}
|
||||
|
||||
void FDrawInfo::AddCeilingStack(sector_t * sec)
|
||||
{
|
||||
//@sync-hack
|
||||
CeilingStacks.Push(sec);
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,6 @@ void GLWall::PutWall(bool translucent)
|
|||
// portals don't go into the draw list.
|
||||
// Instead they are added to the portal manager
|
||||
case RENDERWALL_HORIZON:
|
||||
//@sync-portal
|
||||
horizon=UniqueHorizons.Get(horizon);
|
||||
portal=GLPortal::FindPortal(horizon);
|
||||
if (!portal) portal=new GLHorizonPortal(horizon);
|
||||
|
@ -177,14 +176,12 @@ void GLWall::PutWall(bool translucent)
|
|||
break;
|
||||
|
||||
case RENDERWALL_SKYBOX:
|
||||
//@sync-portal
|
||||
portal=GLPortal::FindPortal(skybox);
|
||||
if (!portal) portal=new GLSkyboxPortal(skybox);
|
||||
portal->AddLine(this);
|
||||
break;
|
||||
|
||||
case RENDERWALL_SECTORSTACK:
|
||||
//@sync-portal
|
||||
portal = this->portal->GetGLPortal();
|
||||
portal->AddLine(this);
|
||||
break;
|
||||
|
@ -201,7 +198,6 @@ void GLWall::PutWall(bool translucent)
|
|||
break;
|
||||
|
||||
case RENDERWALL_MIRROR:
|
||||
//@sync-portal
|
||||
portal=GLPortal::FindPortal(seg->linedef);
|
||||
if (!portal) portal=new GLMirrorPortal(seg->linedef);
|
||||
portal->AddLine(this);
|
||||
|
@ -214,7 +210,6 @@ void GLWall::PutWall(bool translucent)
|
|||
break;
|
||||
|
||||
case RENDERWALL_SKY:
|
||||
//@sync-portal
|
||||
portal=GLPortal::FindPortal(sky);
|
||||
if (!portal) portal=new GLSkyPortal(sky);
|
||||
portal->AddLine(this);
|
||||
|
|
|
@ -772,7 +772,6 @@ FMaterial * FMaterial::ValidateTexture(FTexture * tex, bool expand)
|
|||
FMaterial *gltex = tex->gl_info.Material[expand];
|
||||
if (gltex == NULL)
|
||||
{
|
||||
//@sync-tex
|
||||
gltex = new FMaterial(tex, expand);
|
||||
}
|
||||
return gltex;
|
||||
|
|
|
@ -569,7 +569,7 @@ bool FTexture::SmoothEdges(unsigned char * buffer,int w, int h)
|
|||
l1+=4;
|
||||
for(x=1;x<w-1;x++, l1+=4)
|
||||
{
|
||||
if (l1[MSB]==0 && !CHKPIX(-w) && !CHKPIX(-1) && !CHKPIX(1)) CHKPIX(w);
|
||||
if (l1[MSB]==0 && !CHKPIX(-w) && !CHKPIX(-1) && !CHKPIX(1) && !CHKPIX(-w-1) && !CHKPIX(-w+1) && !CHKPIX(w-1) && !CHKPIX(w+1)) CHKPIX(w);
|
||||
}
|
||||
if (l1[MSB]==0 && !CHKPIX(-w) && !CHKPIX(-1)) CHKPIX(w);
|
||||
l1+=4;
|
||||
|
|
|
@ -264,6 +264,7 @@ static int P_Set3DFloor(line_t * line, int param, int param2, int alpha)
|
|||
else if (param==4)
|
||||
{
|
||||
flags=FF_EXISTS|FF_RENDERPLANES|FF_INVERTPLANES|FF_NOSHADE|FF_FIX;
|
||||
if (param2 & 1) flags |= FF_SEETHROUGH; // marker for allowing missing texture checks
|
||||
alpha=255;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -3747,16 +3747,16 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value)
|
|||
break;
|
||||
|
||||
case APROP_Friendly:
|
||||
if (actor->CountsAsKill()) level.total_monsters--;
|
||||
if (value)
|
||||
{
|
||||
if (actor->CountsAsKill()) level.total_monsters--;
|
||||
actor->flags |= MF_FRIENDLY;
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->flags &= ~MF_FRIENDLY;
|
||||
if (actor->CountsAsKill()) level.total_monsters++;
|
||||
}
|
||||
if (actor->CountsAsKill()) level.total_monsters++;
|
||||
break;
|
||||
|
||||
|
||||
|
|
|
@ -540,7 +540,7 @@ bool MIDIStreamer::IsPlaying()
|
|||
|
||||
void MIDIStreamer::MusicVolumeChanged()
|
||||
{
|
||||
if (MIDI->FakeVolume())
|
||||
if (MIDI != NULL && MIDI->FakeVolume())
|
||||
{
|
||||
float realvolume = clamp<float>(snd_musicvolume * relative_volume, 0.f, 1.f);
|
||||
Volume = clamp<DWORD>((DWORD)(realvolume * 65535.f), 0, 65535);
|
||||
|
@ -622,7 +622,7 @@ void MIDIStreamer::FluidSettingStr(const char *setting, const char *value)
|
|||
|
||||
void MIDIStreamer::OutputVolume (DWORD volume)
|
||||
{
|
||||
if (MIDI->FakeVolume())
|
||||
if (MIDI != NULL && MIDI->FakeVolume())
|
||||
{
|
||||
NewVolume = volume;
|
||||
VolumeChanged = true;
|
||||
|
|
|
@ -14,6 +14,8 @@ const int SF_RANDOMLIGHTHIT = 4;
|
|||
const int SF_RANDOMLIGHTBOTH = 6;
|
||||
const int SF_NOUSEAMMOMISS = 8;
|
||||
const int SF_NOUSEAMMO = 16;
|
||||
const int SF_NOPULLIN = 32;
|
||||
const int SF_NOTURN = 64;
|
||||
|
||||
// Flags for A_CustomMissile
|
||||
const int CMF_AIMOFFSET = 1;
|
||||
|
|
|
@ -39,8 +39,8 @@ ACTOR Revenant 66
|
|||
SKEL I 6 A_SkelFist
|
||||
Goto See
|
||||
Missile:
|
||||
SKEL J 1 BRIGHT A_FaceTarget
|
||||
SKEL J 9 BRIGHT A_FaceTarget
|
||||
SKEL J 0 BRIGHT A_FaceTarget
|
||||
SKEL J 10 BRIGHT A_FaceTarget
|
||||
SKEL K 10 A_SkelMissile
|
||||
SKEL K 10 A_FaceTarget
|
||||
Goto See
|
||||
|
|
|
@ -381,3 +381,17 @@ B9DFF13207EACAC675C71D82624D0007 // XtheaterIII map01
|
|||
{
|
||||
DisablePushWindowCheck
|
||||
}
|
||||
|
||||
712BB4CFBD0753178CA0C6814BE4C288 // map12 BTSX_E1 - patch some rendering glitches that are problematic to detect
|
||||
{
|
||||
setsectortag 545 32000
|
||||
setsectortag 1618 32000
|
||||
setlinespecial 2853 Sector_Set3DFloor 32000 4 0 0 0
|
||||
setsectortag 439 32001
|
||||
setsectortag 458 32001
|
||||
setlinespecial 2182 Sector_Set3DFloor 32001 4 0 0 0
|
||||
setsectortag 454 32002
|
||||
setsectortag 910 32002
|
||||
setlinespecial 2410 Sector_Set3DFloor 32002 4 1 0 0
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,23 @@
|
|||
// Must be sorted in identification order (easiest to recognize first!)
|
||||
|
||||
IWad
|
||||
{
|
||||
Name = "The Adventures of Square"
|
||||
Game = "Doom"
|
||||
Config = "Square"
|
||||
MustContain = "SQU-IWAD", "E1A1"
|
||||
BannerColors = "ff ff ff", "80 00 80"
|
||||
}
|
||||
|
||||
IWad
|
||||
{
|
||||
Name = "The Adventures of Square (Square-ware)"
|
||||
Game = "Doom"
|
||||
Config = "Square"
|
||||
MustContain = "SQU-SWE1", "E1A1"
|
||||
BannerColors = "ff ff ff", "80 00 80"
|
||||
}
|
||||
|
||||
IWad
|
||||
{
|
||||
Name = "Harmony"
|
||||
|
@ -361,4 +379,5 @@ Names
|
|||
"harm1.wad"
|
||||
"hacx.wad"
|
||||
"hacx2.wad"
|
||||
"square1.pk3"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue