mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-14 08:30:50 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
8c6b4c12b6
13 changed files with 67 additions and 46 deletions
|
@ -106,6 +106,7 @@ static FCompatOption Options[] =
|
||||||
{ "ignoreteleporttags", BCOMPATF_BADTELEPORTERS, SLOT_BCOMPAT },
|
{ "ignoreteleporttags", BCOMPATF_BADTELEPORTERS, SLOT_BCOMPAT },
|
||||||
{ "rebuildnodes", BCOMPATF_REBUILDNODES, SLOT_BCOMPAT },
|
{ "rebuildnodes", BCOMPATF_REBUILDNODES, SLOT_BCOMPAT },
|
||||||
{ "linkfrozenprops", BCOMPATF_LINKFROZENPROPS, SLOT_BCOMPAT },
|
{ "linkfrozenprops", BCOMPATF_LINKFROZENPROPS, SLOT_BCOMPAT },
|
||||||
|
{ "disablepushwindowcheck", BCOMPATF_NOWINDOWCHECK, SLOT_BCOMPAT },
|
||||||
|
|
||||||
// list copied from g_mapinfo.cpp
|
// list copied from g_mapinfo.cpp
|
||||||
{ "shorttex", COMPATF_SHORTTEX, SLOT_COMPAT },
|
{ "shorttex", COMPATF_SHORTTEX, SLOT_COMPAT },
|
||||||
|
|
|
@ -387,7 +387,7 @@ void D_SetupUserInfo ()
|
||||||
{
|
{
|
||||||
// Some cvars don't copy their original value directly.
|
// Some cvars don't copy their original value directly.
|
||||||
case NAME_Team: coninfo->TeamChanged(team); break;
|
case NAME_Team: coninfo->TeamChanged(team); break;
|
||||||
case NAME_Skin: coninfo->SkinChanged(skin); break;
|
case NAME_Skin: coninfo->SkinChanged(skin, players[consoleplayer].CurrentPlayerClass); break;
|
||||||
case NAME_Gender: coninfo->GenderChanged(gender); break;
|
case NAME_Gender: coninfo->GenderChanged(gender); break;
|
||||||
case NAME_PlayerClass: coninfo->PlayerClassChanged(playerclass); break;
|
case NAME_PlayerClass: coninfo->PlayerClassChanged(playerclass); break;
|
||||||
// The rest do.
|
// The rest do.
|
||||||
|
@ -447,9 +447,9 @@ int userinfo_t::TeamChanged(int team)
|
||||||
return team;
|
return team;
|
||||||
}
|
}
|
||||||
|
|
||||||
int userinfo_t::SkinChanged(const char *skinname)
|
int userinfo_t::SkinChanged(const char *skinname, int playerclass)
|
||||||
{
|
{
|
||||||
int skinnum = R_FindSkin(skinname, 0);
|
int skinnum = R_FindSkin(skinname, playerclass);
|
||||||
*static_cast<FIntCVar *>((*this)[NAME_Skin]) = skinnum;
|
*static_cast<FIntCVar *>((*this)[NAME_Skin]) = skinnum;
|
||||||
return skinnum;
|
return skinnum;
|
||||||
}
|
}
|
||||||
|
@ -821,7 +821,7 @@ void D_ReadUserInfoStrings (int pnum, BYTE **stream, bool update)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NAME_Skin:
|
case NAME_Skin:
|
||||||
info->SkinChanged(value);
|
info->SkinChanged(value, players[pnum].CurrentPlayerClass);
|
||||||
if (players[pnum].mo != NULL)
|
if (players[pnum].mo != NULL)
|
||||||
{
|
{
|
||||||
if (players[pnum].cls != NULL &&
|
if (players[pnum].cls != NULL &&
|
||||||
|
@ -941,14 +941,21 @@ void WriteUserInfo(FArchive &arc, userinfo_t &info)
|
||||||
arc << name;
|
arc << name;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadUserInfo(FArchive &arc, userinfo_t &info)
|
void ReadUserInfo(FArchive &arc, userinfo_t &info, FString &skin)
|
||||||
{
|
{
|
||||||
FName name;
|
FName name;
|
||||||
FBaseCVar **cvar;
|
FBaseCVar **cvar;
|
||||||
char *str = NULL;
|
char *str = NULL;
|
||||||
UCVarValue val;
|
UCVarValue val;
|
||||||
|
|
||||||
|
if (SaveVersion < 4253)
|
||||||
|
{
|
||||||
|
ReadCompatibleUserInfo(arc, info);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
info.Reset();
|
info.Reset();
|
||||||
|
skin = NULL;
|
||||||
for (arc << name; name != NAME_None; arc << name)
|
for (arc << name; name != NAME_None; arc << name)
|
||||||
{
|
{
|
||||||
cvar = info.CheckKey(name);
|
cvar = info.CheckKey(name);
|
||||||
|
@ -958,7 +965,7 @@ void ReadUserInfo(FArchive &arc, userinfo_t &info)
|
||||||
switch (name)
|
switch (name)
|
||||||
{
|
{
|
||||||
case NAME_Team: info.TeamChanged(atoi(str)); break;
|
case NAME_Team: info.TeamChanged(atoi(str)); break;
|
||||||
case NAME_Skin: info.SkinChanged(str); break;
|
case NAME_Skin: skin = str; break; // Caller must call SkinChanged() once current calss is known
|
||||||
case NAME_PlayerClass: info.PlayerClassChanged(str); break;
|
case NAME_PlayerClass: info.PlayerClassChanged(str); break;
|
||||||
default:
|
default:
|
||||||
val.String = str;
|
val.String = str;
|
||||||
|
@ -973,23 +980,6 @@ void ReadUserInfo(FArchive &arc, userinfo_t &info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FArchive &operator<< (FArchive &arc, userinfo_t &info)
|
|
||||||
{
|
|
||||||
if (SaveVersion < 4253)
|
|
||||||
{
|
|
||||||
ReadCompatibleUserInfo(arc, info);
|
|
||||||
}
|
|
||||||
else if (arc.IsStoring())
|
|
||||||
{
|
|
||||||
WriteUserInfo(arc, info);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ReadUserInfo(arc, info);
|
|
||||||
}
|
|
||||||
return arc;
|
|
||||||
}
|
|
||||||
|
|
||||||
CCMD (playerinfo)
|
CCMD (playerinfo)
|
||||||
{
|
{
|
||||||
if (argv.argc() < 2)
|
if (argv.argc() < 2)
|
||||||
|
|
|
@ -333,7 +333,7 @@ struct userinfo_t : TMap<FName,FBaseCVar *>
|
||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
int TeamChanged(int team);
|
int TeamChanged(int team);
|
||||||
int SkinChanged(const char *skinname);
|
int SkinChanged(const char *skinname, int playerclass);
|
||||||
int SkinNumChanged(int skinnum);
|
int SkinNumChanged(int skinnum);
|
||||||
int GenderChanged(const char *gendername);
|
int GenderChanged(const char *gendername);
|
||||||
int PlayerClassChanged(const char *classname);
|
int PlayerClassChanged(const char *classname);
|
||||||
|
@ -343,8 +343,8 @@ struct userinfo_t : TMap<FName,FBaseCVar *>
|
||||||
int ColorSetChanged(int setnum);
|
int ColorSetChanged(int setnum);
|
||||||
};
|
};
|
||||||
|
|
||||||
FArchive &operator<< (FArchive &arc, userinfo_t &info);
|
void ReadUserInfo(FArchive &arc, userinfo_t &info, FString &skin);
|
||||||
|
void WriteUserInfo(FArchive &arc, userinfo_t &info);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Extended player object info: player_t
|
// Extended player object info: player_t
|
||||||
|
|
|
@ -351,6 +351,7 @@ enum
|
||||||
BCOMPATF_BADPORTALS = 1 << 4, // Restores the old unstable portal behavior
|
BCOMPATF_BADPORTALS = 1 << 4, // Restores the old unstable portal behavior
|
||||||
BCOMPATF_REBUILDNODES = 1 << 5, // Force node rebuild
|
BCOMPATF_REBUILDNODES = 1 << 5, // Force node rebuild
|
||||||
BCOMPATF_LINKFROZENPROPS = 1 << 6, // Clearing PROP_TOTALLYFROZEN or PROP_FROZEN also clears the other
|
BCOMPATF_LINKFROZENPROPS = 1 << 6, // Clearing PROP_TOTALLYFROZEN or PROP_FROZEN also clears the other
|
||||||
|
BCOMPATF_NOWINDOWCHECK = 1 << 7, // Disable the window check in CheckForPushSpecial()
|
||||||
};
|
};
|
||||||
|
|
||||||
// phares 3/20/98:
|
// phares 3/20/98:
|
||||||
|
|
|
@ -96,7 +96,7 @@ fail: delete[] scoredata;
|
||||||
else if (((DWORD *)scoredata)[0] == MAKE_ID('D','B','R','A') &&
|
else if (((DWORD *)scoredata)[0] == MAKE_ID('D','B','R','A') &&
|
||||||
((DWORD *)scoredata)[1] == MAKE_ID('W','O','P','L'))
|
((DWORD *)scoredata)[1] == MAKE_ID('W','O','P','L'))
|
||||||
{
|
{
|
||||||
if (((DWORD *)scoredata)[2] == MAKE_ID(0,0,1,0))
|
if (LittleShort(((WORD *)scoredata)[5]) == 1)
|
||||||
{
|
{
|
||||||
RawPlayer = DosBox1;
|
RawPlayer = DosBox1;
|
||||||
SamplesPerTick = OPL_SAMPLE_RATE / 1000;
|
SamplesPerTick = OPL_SAMPLE_RATE / 1000;
|
||||||
|
@ -104,16 +104,19 @@ fail: delete[] scoredata;
|
||||||
}
|
}
|
||||||
else if (((DWORD *)scoredata)[2] == MAKE_ID(2,0,0,0))
|
else if (((DWORD *)scoredata)[2] == MAKE_ID(2,0,0,0))
|
||||||
{
|
{
|
||||||
if (scoredata[20] != 0)
|
bool okay = true;
|
||||||
{
|
|
||||||
Printf("Unsupported DOSBox Raw OPL format %d\n", scoredata[20]);
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
if (scoredata[21] != 0)
|
if (scoredata[21] != 0)
|
||||||
{
|
{
|
||||||
Printf("Unsupported DOSBox Raw OPL compression %d\n", scoredata[21]);
|
Printf("Unsupported DOSBox Raw OPL format %d\n", scoredata[20]);
|
||||||
goto fail;
|
okay = false;
|
||||||
}
|
}
|
||||||
|
if (scoredata[22] != 0)
|
||||||
|
{
|
||||||
|
Printf("Unsupported DOSBox Raw OPL compression %d\n", scoredata[21]);
|
||||||
|
okay = false;
|
||||||
|
}
|
||||||
|
if (!okay)
|
||||||
|
goto fail;
|
||||||
RawPlayer = DosBox2;
|
RawPlayer = DosBox2;
|
||||||
SamplesPerTick = OPL_SAMPLE_RATE / 1000;
|
SamplesPerTick = OPL_SAMPLE_RATE / 1000;
|
||||||
int headersize = 0x1A + scoredata[0x19];
|
int headersize = 0x1A + scoredata[0x19];
|
||||||
|
@ -264,7 +267,7 @@ bool OPLmusicBlock::ServiceStream (void *buff, int numbytes)
|
||||||
{
|
{
|
||||||
for (i = 0; i < io->NumChips; ++i)
|
for (i = 0; i < io->NumChips; ++i)
|
||||||
{
|
{
|
||||||
io->chips[i]->Update(samples1, samplesleft);
|
io->chips[i]->Update(samples1, numsamples);
|
||||||
}
|
}
|
||||||
OffsetSamples(samples1, numsamples << stereoshift);
|
OffsetSamples(samples1, numsamples << stereoshift);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1640,7 +1640,7 @@ static void CheckForPushSpecial (line_t *line, int side, AActor *mobj, bool wind
|
||||||
{
|
{
|
||||||
if (line->special && !(mobj->flags6 & MF6_NOTRIGGER))
|
if (line->special && !(mobj->flags6 & MF6_NOTRIGGER))
|
||||||
{
|
{
|
||||||
if (windowcheck && line->backsector != NULL)
|
if (windowcheck && !(ib_compatflags & BCOMPATF_NOWINDOWCHECK) && line->backsector != NULL)
|
||||||
{ // Make sure this line actually blocks us and is not a window
|
{ // Make sure this line actually blocks us and is not a window
|
||||||
// or similar construct we are standing inside of.
|
// or similar construct we are standing inside of.
|
||||||
fixed_t fzt = line->frontsector->ceilingplane.ZatPoint(mobj->x, mobj->y);
|
fixed_t fzt = line->frontsector->ceilingplane.ZatPoint(mobj->x, mobj->y);
|
||||||
|
|
|
@ -178,6 +178,12 @@ void P_SetSlope (secplane_t *plane, bool setCeil, int xyangi, int zangi,
|
||||||
}
|
}
|
||||||
zang >>= ANGLETOFINESHIFT;
|
zang >>= ANGLETOFINESHIFT;
|
||||||
|
|
||||||
|
// Sanitize xyangi to [0,360) range
|
||||||
|
xyangi = xyangi % 360;
|
||||||
|
if (xyangi < 0)
|
||||||
|
{
|
||||||
|
xyangi = 360 + xyangi;
|
||||||
|
}
|
||||||
xyang = (angle_t)Scale (xyangi, ANGLE_90, 90 << ANGLETOFINESHIFT);
|
xyang = (angle_t)Scale (xyangi, ANGLE_90, 90 << ANGLETOFINESHIFT);
|
||||||
|
|
||||||
FVector3 norm;
|
FVector3 norm;
|
||||||
|
@ -446,11 +452,11 @@ void P_SpawnSlopeMakers (FMapThing *firstmt, FMapThing *lastmt, const int *oldve
|
||||||
P_VavoomSlope(sec, mt->thingid, x, y, mt->z, mt->type & 1);
|
P_VavoomSlope(sec, mt->thingid, x, y, mt->z, mt->type & 1);
|
||||||
}
|
}
|
||||||
else if (mt->type <= THING_SlopeCeilingPointLine)
|
else if (mt->type <= THING_SlopeCeilingPointLine)
|
||||||
{
|
{ // THING_SlopeFloorPointLine and THING_SlopCeilingPointLine
|
||||||
P_SlopeLineToPoint (mt->args[0], x, y, z, mt->type & 1);
|
P_SlopeLineToPoint (mt->args[0], x, y, z, mt->type & 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{ // THING_SetFloorSlope and THING_SetCeilingSlope
|
||||||
P_SetSlope (refplane, mt->type & 1, mt->angle, mt->args[0], x, y, z);
|
P_SetSlope (refplane, mt->type & 1, mt->angle, mt->args[0], x, y, z);
|
||||||
}
|
}
|
||||||
mt->type = 0;
|
mt->type = 0;
|
||||||
|
|
|
@ -2746,14 +2746,22 @@ void P_UnPredictPlayer ()
|
||||||
void player_t::Serialize (FArchive &arc)
|
void player_t::Serialize (FArchive &arc)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
FString skinname;
|
||||||
|
|
||||||
arc << cls
|
arc << cls
|
||||||
<< mo
|
<< mo
|
||||||
<< camera
|
<< camera
|
||||||
<< playerstate
|
<< playerstate
|
||||||
<< cmd
|
<< cmd;
|
||||||
<< userinfo
|
if (arc.IsLoading())
|
||||||
<< DesiredFOV << FOV
|
{
|
||||||
|
ReadUserInfo(arc, userinfo, skinname);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WriteUserInfo(arc, userinfo);
|
||||||
|
}
|
||||||
|
arc << DesiredFOV << FOV
|
||||||
<< viewz
|
<< viewz
|
||||||
<< viewheight
|
<< viewheight
|
||||||
<< deltaviewheight
|
<< deltaviewheight
|
||||||
|
@ -2904,6 +2912,10 @@ void player_t::Serialize (FArchive &arc)
|
||||||
oldbuttons = ~0;
|
oldbuttons = ~0;
|
||||||
original_oldbuttons = ~0;
|
original_oldbuttons = ~0;
|
||||||
}
|
}
|
||||||
|
if (skinname.IsNotEmpty())
|
||||||
|
{
|
||||||
|
userinfo.SkinChanged(skinname, CurrentPlayerClass);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -244,7 +244,6 @@ FMultiPatchTexture::FMultiPatchTexture (const void *texdef, FPatchLookup *patchl
|
||||||
Height = SAFESHORT(mtexture.d->height);
|
Height = SAFESHORT(mtexture.d->height);
|
||||||
strncpy (Name, (const char *)mtexture.d->name, 8);
|
strncpy (Name, (const char *)mtexture.d->name, 8);
|
||||||
Name[8] = 0;
|
Name[8] = 0;
|
||||||
|
|
||||||
CalcBitSize ();
|
CalcBitSize ();
|
||||||
|
|
||||||
xScale = mtexture.d->ScaleX ? mtexture.d->ScaleX*(FRACUNIT/8) : FRACUNIT;
|
xScale = mtexture.d->ScaleX ? mtexture.d->ScaleX*(FRACUNIT/8) : FRACUNIT;
|
||||||
|
@ -280,6 +279,10 @@ FMultiPatchTexture::FMultiPatchTexture (const void *texdef, FPatchLookup *patchl
|
||||||
NumParts--;
|
NumParts--;
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Parts[i].Texture->bKeepAround = true;
|
||||||
|
}
|
||||||
if (strife)
|
if (strife)
|
||||||
mpatch.s++;
|
mpatch.s++;
|
||||||
else
|
else
|
||||||
|
@ -859,7 +862,6 @@ void FTextureManager::AddTexturesLump (const void *lumpdata, int lumpsize, int d
|
||||||
{
|
{
|
||||||
pnames.Read (patchlookup[i].Name, 8);
|
pnames.Read (patchlookup[i].Name, 8);
|
||||||
patchlookup[i].Name[8] = 0;
|
patchlookup[i].Name[8] = 0;
|
||||||
|
|
||||||
FTextureID j = CheckForTexture (patchlookup[i].Name, FTexture::TEX_WallPatch);
|
FTextureID j = CheckForTexture (patchlookup[i].Name, FTexture::TEX_WallPatch);
|
||||||
if (j.isValid())
|
if (j.isValid())
|
||||||
{
|
{
|
||||||
|
|
|
@ -146,7 +146,7 @@ FTexture::FTexture (const char *name, int lumpnum)
|
||||||
: LeftOffset(0), TopOffset(0),
|
: LeftOffset(0), TopOffset(0),
|
||||||
WidthBits(0), HeightBits(0), xScale(FRACUNIT), yScale(FRACUNIT), SourceLump(lumpnum),
|
WidthBits(0), HeightBits(0), xScale(FRACUNIT), yScale(FRACUNIT), SourceLump(lumpnum),
|
||||||
UseType(TEX_Any), bNoDecals(false), bNoRemap0(false), bWorldPanning(false),
|
UseType(TEX_Any), bNoDecals(false), bNoRemap0(false), bWorldPanning(false),
|
||||||
bMasked(true), bAlphaTexture(false), bHasCanvas(false), bWarped(0), bComplex(false), bMultiPatch(false),
|
bMasked(true), bAlphaTexture(false), bHasCanvas(false), bWarped(0), bComplex(false), bMultiPatch(false), bKeepAround(false),
|
||||||
Rotations(0xFFFF), SkyOffset(0), Width(0), Height(0), WidthMask(0), Native(NULL)
|
Rotations(0xFFFF), SkyOffset(0), Width(0), Height(0), WidthMask(0), Native(NULL)
|
||||||
{
|
{
|
||||||
id.SetInvalid();
|
id.SetInvalid();
|
||||||
|
|
|
@ -428,7 +428,7 @@ void FTextureManager::ReplaceTexture (FTextureID picnum, FTexture *newtexture, b
|
||||||
Textures[index].Texture = newtexture;
|
Textures[index].Texture = newtexture;
|
||||||
|
|
||||||
newtexture->id = oldtexture->id;
|
newtexture->id = oldtexture->id;
|
||||||
if (free)
|
if (free && !oldtexture->bKeepAround)
|
||||||
{
|
{
|
||||||
delete oldtexture;
|
delete oldtexture;
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,6 +177,7 @@ public:
|
||||||
// fully composited before subjected to any kind of postprocessing instead of
|
// fully composited before subjected to any kind of postprocessing instead of
|
||||||
// doing it per patch.
|
// doing it per patch.
|
||||||
BYTE bMultiPatch:1; // This is a multipatch texture (we really could use real type info for textures...)
|
BYTE bMultiPatch:1; // This is a multipatch texture (we really could use real type info for textures...)
|
||||||
|
BYTE bKeepAround:1; // This texture was used as part of a multi-patch texture. Do not free it.
|
||||||
|
|
||||||
WORD Rotations;
|
WORD Rotations;
|
||||||
SWORD SkyOffset;
|
SWORD SkyOffset;
|
||||||
|
|
|
@ -376,3 +376,8 @@ D62DCA9EC226DE49108D5DD9271F7631 // Cheogsh 2 map04
|
||||||
setthingz 1648 528
|
setthingz 1648 528
|
||||||
setthingz 1649 528
|
setthingz 1649 528
|
||||||
}
|
}
|
||||||
|
|
||||||
|
B9DFF13207EACAC675C71D82624D0007 // XtheaterIII map01
|
||||||
|
{
|
||||||
|
DisablePushWindowCheck
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue