mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-04 19:20:53 +00:00
* Fixed: GLDEFS DisableBrightMaps did not apply to HUD sprites.
* Updated to ZDoom r2462: - Added automap enhancements but made the new key icon optional. - Use side_t::RightSide in IterFindPolySides() instead of the SideListHead array. - Added Pink Silver's DrawString/Number alignment patch (with one minor change). git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@855 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
bad057fe55
commit
fabdbd1706
8 changed files with 181 additions and 51 deletions
104
src/am_map.cpp
104
src/am_map.cpp
|
@ -59,6 +59,7 @@
|
||||||
#include "am_map.h"
|
#include "am_map.h"
|
||||||
#include "a_artifacts.h"
|
#include "a_artifacts.h"
|
||||||
#include "po_man.h"
|
#include "po_man.h"
|
||||||
|
#include "a_keys.h"
|
||||||
|
|
||||||
struct AMColor
|
struct AMColor
|
||||||
{
|
{
|
||||||
|
@ -80,7 +81,7 @@ struct AMColor
|
||||||
|
|
||||||
static AMColor Background, YourColor, WallColor, TSWallColor,
|
static AMColor Background, YourColor, WallColor, TSWallColor,
|
||||||
FDWallColor, CDWallColor, ThingColor,
|
FDWallColor, CDWallColor, ThingColor,
|
||||||
ThingColor_Item, ThingColor_Monster, ThingColor_Friend,
|
ThingColor_Item, ThingColor_CountItem, ThingColor_Monster, ThingColor_Friend,
|
||||||
SecretWallColor, GridColor, XHairColor,
|
SecretWallColor, GridColor, XHairColor,
|
||||||
NotSeenColor,
|
NotSeenColor,
|
||||||
LockedColor,
|
LockedColor,
|
||||||
|
@ -171,12 +172,15 @@ CVAR (Color, am_secretsectorcolor, 0xff00ff, CVAR_ARCHIVE);
|
||||||
CVAR (Color, am_ovsecretsectorcolor,0x00ffff, CVAR_ARCHIVE);
|
CVAR (Color, am_ovsecretsectorcolor,0x00ffff, CVAR_ARCHIVE);
|
||||||
CVAR (Int, am_map_secrets, 1, CVAR_ARCHIVE);
|
CVAR (Int, am_map_secrets, 1, CVAR_ARCHIVE);
|
||||||
CVAR (Bool, am_drawmapback, true, CVAR_ARCHIVE);
|
CVAR (Bool, am_drawmapback, true, CVAR_ARCHIVE);
|
||||||
|
CVAR (Bool, am_showkeys, true, CVAR_ARCHIVE);
|
||||||
CVAR (Color, am_thingcolor_friend, 0xfcfcfc, CVAR_ARCHIVE);
|
CVAR (Color, am_thingcolor_friend, 0xfcfcfc, CVAR_ARCHIVE);
|
||||||
CVAR (Color, am_thingcolor_monster, 0xfcfcfc, CVAR_ARCHIVE);
|
CVAR (Color, am_thingcolor_monster, 0xfcfcfc, CVAR_ARCHIVE);
|
||||||
CVAR (Color, am_thingcolor_item, 0xfcfcfc, CVAR_ARCHIVE);
|
CVAR (Color, am_thingcolor_item, 0xfcfcfc, CVAR_ARCHIVE);
|
||||||
|
CVAR (Color, am_thingcolor_citem, 0xfcfcfc, CVAR_ARCHIVE);
|
||||||
CVAR (Color, am_ovthingcolor_friend, 0xe88800, CVAR_ARCHIVE);
|
CVAR (Color, am_ovthingcolor_friend, 0xe88800, CVAR_ARCHIVE);
|
||||||
CVAR (Color, am_ovthingcolor_monster, 0xe88800, CVAR_ARCHIVE);
|
CVAR (Color, am_ovthingcolor_monster, 0xe88800, CVAR_ARCHIVE);
|
||||||
CVAR (Color, am_ovthingcolor_item, 0xe88800, CVAR_ARCHIVE);
|
CVAR (Color, am_ovthingcolor_item, 0xe88800, CVAR_ARCHIVE);
|
||||||
|
CVAR (Color, am_ovthingcolor_citem, 0xe88800, CVAR_ARCHIVE);
|
||||||
|
|
||||||
|
|
||||||
CVAR(Int, am_showsubsector, -1, 0);
|
CVAR(Int, am_showsubsector, -1, 0);
|
||||||
|
@ -297,25 +301,22 @@ mline_t player_arrow[] = {
|
||||||
{ { -R+3*R/8, 0 }, { -R+R/8, R/4 } }, // >>--->
|
{ { -R+3*R/8, 0 }, { -R+R/8, R/4 } }, // >>--->
|
||||||
{ { -R+3*R/8, 0 }, { -R+R/8, -R/4 } }
|
{ { -R+3*R/8, 0 }, { -R+R/8, -R/4 } }
|
||||||
};
|
};
|
||||||
|
#define NUMPLYRLINES (sizeof(player_arrow)/sizeof(mline_t))
|
||||||
|
|
||||||
mline_t player_arrow_raven[] = {
|
mline_t player_arrow_raven[] = {
|
||||||
{ { -R+R/4, 0 }, { 0, 0} }, // center line.
|
{ { -R+R/4, 0 }, { 0, 0} }, // center line.
|
||||||
{ { -R+R/4, R/8 }, { R, 0} }, // blade
|
{ { -R+R/4, R/8 }, { R, 0} }, // blade
|
||||||
{ { -R+R/4, -R/8 }, { R, 0 } },
|
{ { -R+R/4, -R/8 }, { R, 0 } },
|
||||||
{ { -R+R/4, -R/4 }, { -R+R/4, R/4 } }, // crosspiece
|
{ { -R+R/4, -R/4 }, { -R+R/4, R/4 } }, // crosspiece
|
||||||
{ { -R+R/8, -R/4 }, { -R+R/8, R/4 } },
|
{ { -R+R/8, -R/4 }, { -R+R/8, R/4 } },
|
||||||
{ { -R+R/8, -R/4 }, { -R+R/4, -R/4} }, //crosspiece connectors
|
{ { -R+R/8, -R/4 }, { -R+R/4, -R/4} }, //crosspiece connectors
|
||||||
{ { -R+R/8, R/4 }, { -R+R/4, R/4} },
|
{ { -R+R/8, R/4 }, { -R+R/4, R/4} },
|
||||||
{ { -R-R/4, R/8 }, { -R-R/4, -R/8 } }, //pommel
|
{ { -R-R/4, R/8 }, { -R-R/4, -R/8 } }, //pommel
|
||||||
{ { -R-R/4, R/8 }, { -R+R/8, R/8 } },
|
{ { -R-R/4, R/8 }, { -R+R/8, R/8 } },
|
||||||
{ { -R-R/4, -R/8}, { -R+R/8, -R/8 } }
|
{ { -R-R/4, -R/8}, { -R+R/8, -R/8 } }
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef R
|
|
||||||
#define NUMPLYRLINES (sizeof(player_arrow)/sizeof(mline_t))
|
|
||||||
#define NUMPLYRLINES_RAVEN (sizeof(player_arrow_raven)/sizeof(mline_t))
|
#define NUMPLYRLINES_RAVEN (sizeof(player_arrow_raven)/sizeof(mline_t))
|
||||||
|
|
||||||
#define R ((8*PLAYERRADIUS)/7)
|
|
||||||
mline_t cheat_player_arrow[] = {
|
mline_t cheat_player_arrow[] = {
|
||||||
{ { -R+R/8, 0 }, { R, 0 } }, // -----
|
{ { -R+R/8, 0 }, { R, 0 } }, // -----
|
||||||
{ { R, 0 }, { R-R/2, R/6 } }, // ----->
|
{ { R, 0 }, { R-R/2, R/6 } }, // ----->
|
||||||
|
@ -334,9 +335,9 @@ mline_t cheat_player_arrow[] = {
|
||||||
{ { R/6, -R/7 }, { R/6+R/32, -R/7-R/32 } },
|
{ { R/6, -R/7 }, { R/6+R/32, -R/7-R/32 } },
|
||||||
{ { R/6+R/32, -R/7-R/32 }, { R/6+R/10, -R/7 } }
|
{ { R/6+R/32, -R/7-R/32 }, { R/6+R/10, -R/7 } }
|
||||||
};
|
};
|
||||||
|
#define NUMCHEATPLYRLINES (sizeof(cheat_player_arrow)/sizeof(mline_t))
|
||||||
|
|
||||||
#undef R
|
#undef R
|
||||||
#define NUMCHEATPLYRLINES (sizeof(cheat_player_arrow)/sizeof(mline_t))
|
|
||||||
|
|
||||||
#define R (MAPUNIT)
|
#define R (MAPUNIT)
|
||||||
// [RH] Avoid lots of warnings without compiler-specific #pragmas
|
// [RH] Avoid lots of warnings without compiler-specific #pragmas
|
||||||
|
@ -353,9 +354,37 @@ mline_t thintriangle_guy[] = {
|
||||||
L (1,0, -.5,.7),
|
L (1,0, -.5,.7),
|
||||||
L (-.5,.7, -.5,-.7)
|
L (-.5,.7, -.5,-.7)
|
||||||
};
|
};
|
||||||
|
#define NUMTHINTRIANGLEGUYLINES (sizeof(thintriangle_guy)/sizeof(mline_t))
|
||||||
|
|
||||||
|
mline_t square_guy[] = {
|
||||||
|
L (0,1,1,0),
|
||||||
|
L (1,0,0,-1),
|
||||||
|
L (0,-1,-1,0),
|
||||||
|
L (-1,0,0,1)
|
||||||
|
};
|
||||||
|
#define NUMSQUAREGUYLINES (sizeof(square_guy)/sizeof(mline_t))
|
||||||
|
|
||||||
|
#undef R
|
||||||
|
#define R (MAPUNIT)
|
||||||
|
|
||||||
|
mline_t key_guy[] = {
|
||||||
|
L (-2, 0, -1.7, -0.5),
|
||||||
|
L (-1.7, -0.5, -1.5, -0.7),
|
||||||
|
L (-1.5, -0.7, -0.8, -0.5),
|
||||||
|
L (-0.8, -0.5, -0.6, 0),
|
||||||
|
L (-0.6, 0, -0.8, 0.5),
|
||||||
|
L (-1.5, 0.7, -0.8, 0.5),
|
||||||
|
L (-1.7, 0.5, -1.5, 0.7),
|
||||||
|
L (-2, 0, -1.7, 0.5),
|
||||||
|
L (-0.6, 0, 2, 0),
|
||||||
|
L (1.7, 0, 1.7, -1),
|
||||||
|
L (1.5, 0, 1.5, -1),
|
||||||
|
L (1.3, 0, 1.3, -1)
|
||||||
|
};
|
||||||
|
#define NUMKEYGUYLINES (sizeof(key_guy)/sizeof(mline_t))
|
||||||
|
|
||||||
#undef L
|
#undef L
|
||||||
#undef R
|
#undef R
|
||||||
#define NUMTHINTRIANGLEGUYLINES (sizeof(thintriangle_guy)/sizeof(mline_t))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -818,6 +847,7 @@ static void AM_initColors (bool overlayed)
|
||||||
SecretWallColor = WallColor;
|
SecretWallColor = WallColor;
|
||||||
SecretSectorColor.FromCVar (am_ovsecretsectorcolor);
|
SecretSectorColor.FromCVar (am_ovsecretsectorcolor);
|
||||||
ThingColor_Item.FromCVar (am_ovthingcolor_item);
|
ThingColor_Item.FromCVar (am_ovthingcolor_item);
|
||||||
|
ThingColor_CountItem.FromCVar (am_ovthingcolor_citem);
|
||||||
ThingColor_Friend.FromCVar (am_ovthingcolor_friend);
|
ThingColor_Friend.FromCVar (am_ovthingcolor_friend);
|
||||||
ThingColor_Monster.FromCVar (am_ovthingcolor_monster);
|
ThingColor_Monster.FromCVar (am_ovthingcolor_monster);
|
||||||
ThingColor.FromCVar (am_ovthingcolor);
|
ThingColor.FromCVar (am_ovthingcolor);
|
||||||
|
@ -841,6 +871,7 @@ static void AM_initColors (bool overlayed)
|
||||||
FDWallColor.FromCVar (am_fdwallcolor);
|
FDWallColor.FromCVar (am_fdwallcolor);
|
||||||
CDWallColor.FromCVar (am_cdwallcolor);
|
CDWallColor.FromCVar (am_cdwallcolor);
|
||||||
ThingColor_Item.FromCVar (am_thingcolor_item);
|
ThingColor_Item.FromCVar (am_thingcolor_item);
|
||||||
|
ThingColor_CountItem.FromCVar (am_thingcolor_citem);
|
||||||
ThingColor_Friend.FromCVar (am_thingcolor_friend);
|
ThingColor_Friend.FromCVar (am_thingcolor_friend);
|
||||||
ThingColor_Monster.FromCVar (am_thingcolor_monster);
|
ThingColor_Monster.FromCVar (am_thingcolor_monster);
|
||||||
ThingColor.FromCVar (am_thingcolor);
|
ThingColor.FromCVar (am_thingcolor);
|
||||||
|
@ -2027,11 +2058,40 @@ void AM_drawThings ()
|
||||||
if (t->flags & MF_FRIENDLY || !(t->flags & MF_COUNTKILL)) color = ThingColor_Friend;
|
if (t->flags & MF_FRIENDLY || !(t->flags & MF_COUNTKILL)) color = ThingColor_Friend;
|
||||||
else color = ThingColor_Monster;
|
else color = ThingColor_Monster;
|
||||||
}
|
}
|
||||||
else if (t->flags&MF_SPECIAL) color = ThingColor_Item;
|
else if (t->flags&MF_SPECIAL)
|
||||||
|
{
|
||||||
|
// Find the key's own color.
|
||||||
|
// Only works correctly if single-key locks have lower numbers than any-key locks.
|
||||||
|
// That is the case for all default keys, however.
|
||||||
|
if (t->IsKindOf(RUNTIME_CLASS(AKey)))
|
||||||
|
{
|
||||||
|
if (am_showkeys)
|
||||||
|
{
|
||||||
|
int P_GetMapColorForKey (AInventory * key);
|
||||||
|
int c = P_GetMapColorForKey(static_cast<AKey *>(t));
|
||||||
|
|
||||||
AM_drawLineCharacter
|
if (c >= 0) color.FromRGB(RPART(c), GPART(c), BPART(c));
|
||||||
(thintriangle_guy, NUMTHINTRIANGLEGUYLINES,
|
else color = ThingColor_CountItem;
|
||||||
16<<MAPBITS, angle, color, p.x, p.y);
|
AM_drawLineCharacter(key_guy, NUMKEYGUYLINES, 16<<MAPBITS, 0, color, p.x, p.y);
|
||||||
|
color.Index = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
color = ThingColor_Item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (t->flags&MF_COUNTITEM)
|
||||||
|
color = ThingColor_CountItem;
|
||||||
|
else
|
||||||
|
color = ThingColor_Item;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (color.Index != -1)
|
||||||
|
{
|
||||||
|
AM_drawLineCharacter
|
||||||
|
(thintriangle_guy, NUMTHINTRIANGLEGUYLINES,
|
||||||
|
16<<MAPBITS, angle, color, p.x, p.y);
|
||||||
|
}
|
||||||
|
|
||||||
if (am_cheat >= 3)
|
if (am_cheat >= 3)
|
||||||
{
|
{
|
||||||
|
|
|
@ -952,7 +952,7 @@ static int PatchThing (int thingy)
|
||||||
// compatibility, the upper bits are freed, but we have conflicts between the ZDoom bits
|
// compatibility, the upper bits are freed, but we have conflicts between the ZDoom bits
|
||||||
// and the MBF bits. The only such flag exposed to DEHSUPP, though, is STEALTH -- the others
|
// and the MBF bits. The only such flag exposed to DEHSUPP, though, is STEALTH -- the others
|
||||||
// are not available through mnemonics, and aren't available either through their bit value.
|
// are not available through mnemonics, and aren't available either through their bit value.
|
||||||
// So if we find the STEALTH keyword, it's a ZDoom mod, otherwise assume assume FRIEND.
|
// So if we find the STEALTH keyword, it's a ZDoom mod, otherwise assume FRIEND.
|
||||||
bool zdoomflags = false;
|
bool zdoomflags = false;
|
||||||
char *strval;
|
char *strval;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,12 @@ struct OneKey
|
||||||
|
|
||||||
bool check(AActor * owner)
|
bool check(AActor * owner)
|
||||||
{
|
{
|
||||||
return !!owner->FindInventory(key);
|
// P_GetMapColorForKey() checks the key directly
|
||||||
|
if (owner->IsKindOf (RUNTIME_CLASS(AKey)))
|
||||||
|
return owner->IsA(key);
|
||||||
|
// Other calls check an actor that may have a key in its inventory.
|
||||||
|
else
|
||||||
|
return !!owner->FindInventory(key);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -516,7 +516,7 @@ class CommandDrawString : public SBarInfoCommand
|
||||||
CommandDrawString(SBarInfo *script) : SBarInfoCommand(script),
|
CommandDrawString(SBarInfo *script) : SBarInfoCommand(script),
|
||||||
shadow(false), shadowX(2), shadowY(2), spacing(0), font(NULL),
|
shadow(false), shadowX(2), shadowY(2), spacing(0), font(NULL),
|
||||||
translation(CR_UNTRANSLATED), cache(-1), strValue(CONSTANT),
|
translation(CR_UNTRANSLATED), cache(-1), strValue(CONSTANT),
|
||||||
valueArgument(0)
|
valueArgument(0), alignment (ALIGN_RIGHT)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,6 +587,29 @@ class CommandDrawString : public SBarInfoCommand
|
||||||
{
|
{
|
||||||
sc.MustGetToken(TK_IntConst);
|
sc.MustGetToken(TK_IntConst);
|
||||||
spacing = sc.Number;
|
spacing = sc.Number;
|
||||||
|
if(sc.CheckToken(',')) //[KS] flags? flags! SIX FLAGS!
|
||||||
|
{
|
||||||
|
while(sc.CheckToken(TK_Identifier))
|
||||||
|
{
|
||||||
|
if(sc.Compare("alignment"))
|
||||||
|
{
|
||||||
|
sc.MustGetToken('(');
|
||||||
|
sc.MustGetToken(TK_Identifier);
|
||||||
|
if(sc.Compare("right"))
|
||||||
|
alignment = ALIGN_RIGHT;
|
||||||
|
else if(sc.Compare("left"))
|
||||||
|
alignment = ALIGN_LEFT;
|
||||||
|
else if(sc.Compare("center"))
|
||||||
|
alignment = ALIGN_CENTER;
|
||||||
|
else
|
||||||
|
sc.ScriptError("Unknown alignment '%s'.", sc.String);
|
||||||
|
sc.MustGetToken(')');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
sc.ScriptError("Unknown flag '%s'.", sc.String);
|
||||||
|
if(!sc.CheckToken('|') && !sc.CheckToken(',')) break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sc.MustGetToken(';');
|
sc.MustGetToken(';');
|
||||||
|
|
||||||
|
@ -682,13 +705,33 @@ class CommandDrawString : public SBarInfoCommand
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
|
enum StringAlignment
|
||||||
|
{
|
||||||
|
ALIGN_RIGHT,
|
||||||
|
ALIGN_LEFT,
|
||||||
|
ALIGN_CENTER,
|
||||||
|
};
|
||||||
|
|
||||||
void RealignString()
|
void RealignString()
|
||||||
{
|
{
|
||||||
x = startX;
|
x = startX;
|
||||||
if(script->spacingCharacter == '\0')
|
switch (alignment)
|
||||||
x -= static_cast<int> (font->StringWidth(str)+(spacing * str.Len()));
|
{
|
||||||
else //monospaced, so just multiplay the character size
|
case ALIGN_LEFT:
|
||||||
x -= static_cast<int> ((font->GetCharWidth((int) script->spacingCharacter) + spacing) * str.Len());
|
break;
|
||||||
|
case ALIGN_RIGHT:
|
||||||
|
if(script->spacingCharacter == '\0')
|
||||||
|
x -= static_cast<int> (font->StringWidth(str)+(spacing * str.Len()));
|
||||||
|
else //monospaced, so just multiplay the character size
|
||||||
|
x -= static_cast<int> ((font->GetCharWidth((int) script->spacingCharacter) + spacing) * str.Len());
|
||||||
|
break;
|
||||||
|
case ALIGN_CENTER:
|
||||||
|
if(script->spacingCharacter == '\0')
|
||||||
|
x -= static_cast<int> (font->StringWidth(str)+(spacing * str.Len()) / 2);
|
||||||
|
else
|
||||||
|
x -= static_cast<int> ((font->GetCharWidth((int) script->spacingCharacter) + spacing) * str.Len() / 2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum StringValueType
|
enum StringValueType
|
||||||
|
@ -721,6 +764,7 @@ class CommandDrawString : public SBarInfoCommand
|
||||||
StringValueType strValue;
|
StringValueType strValue;
|
||||||
int valueArgument;
|
int valueArgument;
|
||||||
FString str;
|
FString str;
|
||||||
|
StringAlignment alignment;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetStringToTag(AActor *actor)
|
void SetStringToTag(AActor *actor)
|
||||||
|
@ -887,6 +931,20 @@ class CommandDrawNumber : public CommandDrawString
|
||||||
interpolationSpeed = sc.Number;
|
interpolationSpeed = sc.Number;
|
||||||
sc.MustGetToken(')');
|
sc.MustGetToken(')');
|
||||||
}
|
}
|
||||||
|
else if(sc.Compare("alignment"))
|
||||||
|
{
|
||||||
|
sc.MustGetToken('(');
|
||||||
|
sc.MustGetToken(TK_Identifier);
|
||||||
|
if(sc.Compare("right"))
|
||||||
|
alignment = ALIGN_RIGHT;
|
||||||
|
else if(sc.Compare("left"))
|
||||||
|
alignment = ALIGN_LEFT;
|
||||||
|
else if(sc.Compare("center"))
|
||||||
|
alignment = ALIGN_CENTER;
|
||||||
|
else
|
||||||
|
sc.ScriptError("Unknown alignment '%s'.", sc.String);
|
||||||
|
sc.MustGetToken(')');
|
||||||
|
}
|
||||||
else
|
else
|
||||||
sc.ScriptError("Unknown flag '%s'.", sc.String);
|
sc.ScriptError("Unknown flag '%s'.", sc.String);
|
||||||
if(!sc.CheckToken('|'))
|
if(!sc.CheckToken('|'))
|
||||||
|
|
|
@ -182,7 +182,19 @@ void FGLRenderer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
|
||||||
if (player->fixedcolormap==NOFIXEDCOLORMAP)
|
if (player->fixedcolormap==NOFIXEDCOLORMAP)
|
||||||
{
|
{
|
||||||
for (i=0, psp=player->psprites; i<=ps_flash; i++,psp++)
|
for (i=0, psp=player->psprites; i<=ps_flash; i++,psp++)
|
||||||
if (psp->state != NULL) statebright[i] = !!psp->state->GetFullbright();
|
if (psp->state != NULL)
|
||||||
|
{
|
||||||
|
bool disablefullbright = false;
|
||||||
|
FTextureID lump = gl_GetSpriteFrame(psp->sprite, psp->frame, 0, 0, NULL);
|
||||||
|
if (lump.isValid() && gl_BrightmapsActive())
|
||||||
|
{
|
||||||
|
FMaterial * tex=FMaterial::ValidateTexture(lump, false);
|
||||||
|
if (tex)
|
||||||
|
disablefullbright = tex->tex->gl_info.bBrightmapDisablesFullbright;
|
||||||
|
}
|
||||||
|
statebright[i] = !!psp->state->GetFullbright() && !disablefullbright;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gl_fixedcolormap)
|
if (gl_fixedcolormap)
|
||||||
|
|
|
@ -121,6 +121,7 @@ EXTERN_CVAR (Int, crosshair)
|
||||||
EXTERN_CVAR (Bool, freelook)
|
EXTERN_CVAR (Bool, freelook)
|
||||||
EXTERN_CVAR (Int, sv_smartaim)
|
EXTERN_CVAR (Int, sv_smartaim)
|
||||||
EXTERN_CVAR (Int, am_colorset)
|
EXTERN_CVAR (Int, am_colorset)
|
||||||
|
EXTERN_CVAR (Bool, am_showkeys)
|
||||||
EXTERN_CVAR (Int, vid_aspect)
|
EXTERN_CVAR (Int, vid_aspect)
|
||||||
|
|
||||||
static void CalcIndent (menu_t *menu);
|
static void CalcIndent (menu_t *menu);
|
||||||
|
@ -591,6 +592,7 @@ static menuitem_t AutomapItems[] = {
|
||||||
{ discrete, "Show total time elapsed", {&am_showtotaltime}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
{ discrete, "Show total time elapsed", {&am_showtotaltime}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
||||||
{ discrete, "Show secrets on map", {&am_map_secrets}, {3.0}, {0.0}, {0.0}, {SecretTypes} },
|
{ discrete, "Show secrets on map", {&am_map_secrets}, {3.0}, {0.0}, {0.0}, {SecretTypes} },
|
||||||
{ discrete, "Draw map background", {&am_drawmapback}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
{ discrete, "Draw map background", {&am_drawmapback}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
||||||
|
{ discrete, "Show keys (cheat)", {&am_showkeys}, {2.0}, {0.0}, {0.0}, {OnOff} },
|
||||||
};
|
};
|
||||||
|
|
||||||
menu_t AutomapMenu =
|
menu_t AutomapMenu =
|
||||||
|
@ -634,9 +636,11 @@ EXTERN_CVAR (Color, am_ovsecretsectorcolor)
|
||||||
EXTERN_CVAR (Color, am_thingcolor_friend)
|
EXTERN_CVAR (Color, am_thingcolor_friend)
|
||||||
EXTERN_CVAR (Color, am_thingcolor_monster)
|
EXTERN_CVAR (Color, am_thingcolor_monster)
|
||||||
EXTERN_CVAR (Color, am_thingcolor_item)
|
EXTERN_CVAR (Color, am_thingcolor_item)
|
||||||
|
EXTERN_CVAR (Color, am_thingcolor_citem)
|
||||||
EXTERN_CVAR (Color, am_ovthingcolor_friend)
|
EXTERN_CVAR (Color, am_ovthingcolor_friend)
|
||||||
EXTERN_CVAR (Color, am_ovthingcolor_monster)
|
EXTERN_CVAR (Color, am_ovthingcolor_monster)
|
||||||
EXTERN_CVAR (Color, am_ovthingcolor_item)
|
EXTERN_CVAR (Color, am_ovthingcolor_item)
|
||||||
|
EXTERN_CVAR (Color, am_ovthingcolor_citem)
|
||||||
|
|
||||||
static menuitem_t MapColorsItems[] = {
|
static menuitem_t MapColorsItems[] = {
|
||||||
{ rsafemore, "Restore default custom colors", {NULL}, {0}, {0}, {0}, {(value_t*)DefaultCustomColors} },
|
{ rsafemore, "Restore default custom colors", {NULL}, {0}, {0}, {0}, {(value_t*)DefaultCustomColors} },
|
||||||
|
@ -660,6 +664,7 @@ static menuitem_t MapColorsItems[] = {
|
||||||
{ colorpicker, "Monsters (for cheat)", {&am_thingcolor_monster}, {0}, {0}, {0}, {0} },
|
{ colorpicker, "Monsters (for cheat)", {&am_thingcolor_monster}, {0}, {0}, {0}, {0} },
|
||||||
{ colorpicker, "Friends (for cheat)", {&am_thingcolor_friend}, {0}, {0}, {0}, {0} },
|
{ colorpicker, "Friends (for cheat)", {&am_thingcolor_friend}, {0}, {0}, {0}, {0} },
|
||||||
{ colorpicker, "Items (for cheat)", {&am_thingcolor_item}, {0}, {0}, {0}, {0} },
|
{ colorpicker, "Items (for cheat)", {&am_thingcolor_item}, {0}, {0}, {0}, {0} },
|
||||||
|
{ colorpicker, "Count Items (for cheat)", {&am_thingcolor_citem}, {0}, {0}, {0}, {0} },
|
||||||
{ redtext, " ", {NULL}, {0}, {0}, {0}, {0} },
|
{ redtext, " ", {NULL}, {0}, {0}, {0}, {0} },
|
||||||
{ colorpicker, "You (overlay)", {&am_ovyourcolor}, {0}, {0}, {0}, {0} },
|
{ colorpicker, "You (overlay)", {&am_ovyourcolor}, {0}, {0}, {0}, {0} },
|
||||||
{ colorpicker, "1-sided walls (overlay)", {&am_ovwallcolor}, {0}, {0}, {0}, {0} },
|
{ colorpicker, "1-sided walls (overlay)", {&am_ovwallcolor}, {0}, {0}, {0}, {0} },
|
||||||
|
@ -671,6 +676,7 @@ static menuitem_t MapColorsItems[] = {
|
||||||
{ colorpicker, "Monsters (overlay) (for cheat)", {&am_ovthingcolor_monster}, {0}, {0}, {0}, {0} },
|
{ colorpicker, "Monsters (overlay) (for cheat)", {&am_ovthingcolor_monster}, {0}, {0}, {0}, {0} },
|
||||||
{ colorpicker, "Friends (overlay) (for cheat)", {&am_ovthingcolor_friend}, {0}, {0}, {0}, {0} },
|
{ colorpicker, "Friends (overlay) (for cheat)", {&am_ovthingcolor_friend}, {0}, {0}, {0}, {0} },
|
||||||
{ colorpicker, "Items (overlay) (for cheat)", {&am_ovthingcolor_item}, {0}, {0}, {0}, {0} },
|
{ colorpicker, "Items (overlay) (for cheat)", {&am_ovthingcolor_item}, {0}, {0}, {0}, {0} },
|
||||||
|
{ colorpicker, "Count Items (overlay) (for cheat)", {&am_ovthingcolor_citem}, {0}, {0}, {0}, {0} },
|
||||||
};
|
};
|
||||||
|
|
||||||
menu_t MapColorsMenu =
|
menu_t MapColorsMenu =
|
||||||
|
|
|
@ -136,7 +136,7 @@ static void UnLinkPolyobj (FPolyObj *po);
|
||||||
static void LinkPolyobj (FPolyObj *po);
|
static void LinkPolyobj (FPolyObj *po);
|
||||||
static bool CheckMobjBlocking (side_t *seg, FPolyObj *po);
|
static bool CheckMobjBlocking (side_t *seg, FPolyObj *po);
|
||||||
static void InitBlockMap (void);
|
static void InitBlockMap (void);
|
||||||
static void IterFindPolySides (vertex_t *v1, vertex_t *v2, seg_t **segList);
|
static void IterFindPolySides (FPolyObj *po, side_t *side);
|
||||||
static void SpawnPolyobj (int index, int tag, int type);
|
static void SpawnPolyobj (int index, int tag, int type);
|
||||||
static void TranslateToStartSpot (int tag, int originX, int originY);
|
static void TranslateToStartSpot (int tag, int originX, int originY);
|
||||||
static void DoMovePolyobj (FPolyObj *po, int x, int y);
|
static void DoMovePolyobj (FPolyObj *po, int x, int y);
|
||||||
|
@ -156,7 +156,6 @@ polyspawns_t *polyspawns; // [RH] Let P_SpawnMapThings() find our thingies for u
|
||||||
|
|
||||||
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
||||||
|
|
||||||
static SDWORD *SideListHead; // contains numvertexes elements
|
|
||||||
static TArray<SDWORD> KnownPolySides;
|
static TArray<SDWORD> KnownPolySides;
|
||||||
|
|
||||||
// CODE --------------------------------------------------------------------
|
// CODE --------------------------------------------------------------------
|
||||||
|
@ -1323,21 +1322,13 @@ static void InitBlockMap (void)
|
||||||
|
|
||||||
static void InitSideLists ()
|
static void InitSideLists ()
|
||||||
{
|
{
|
||||||
SDWORD i;
|
for (int i = 0; i < numsides; ++i)
|
||||||
|
|
||||||
SideListHead = new SDWORD[numvertexes];
|
|
||||||
clearbuf (SideListHead, numvertexes, -1);
|
|
||||||
|
|
||||||
for (i = 0; i < numsides; ++i)
|
|
||||||
{
|
{
|
||||||
if (sides[i].linedef != NULL)
|
if (sides[i].linedef != NULL &&
|
||||||
|
(sides[i].linedef->special == Polyobj_StartLine ||
|
||||||
|
sides[i].linedef->special == Polyobj_ExplicitLine))
|
||||||
{
|
{
|
||||||
SideListHead[sides[i].V1() - vertexes] = i;
|
KnownPolySides.Push (i);
|
||||||
if ((sides[i].linedef->special == Polyobj_StartLine ||
|
|
||||||
sides[i].linedef->special == Polyobj_ExplicitLine))
|
|
||||||
{
|
|
||||||
KnownPolySides.Push (i);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1350,8 +1341,6 @@ static void InitSideLists ()
|
||||||
|
|
||||||
static void KillSideLists ()
|
static void KillSideLists ()
|
||||||
{
|
{
|
||||||
delete[] SideListHead;
|
|
||||||
SideListHead = NULL;
|
|
||||||
KnownPolySides.Clear ();
|
KnownPolySides.Clear ();
|
||||||
KnownPolySides.ShrinkToFit ();
|
KnownPolySides.ShrinkToFit ();
|
||||||
}
|
}
|
||||||
|
@ -1375,9 +1364,9 @@ static void IterFindPolySides (FPolyObj *po, side_t *side)
|
||||||
for (i = 0; i < numsides; i++)
|
for (i = 0; i < numsides; i++)
|
||||||
{
|
{
|
||||||
int v2 = int(side->V2() - vertexes);
|
int v2 = int(side->V2() - vertexes);
|
||||||
j = SideListHead[v2];
|
j = side->RightSide;
|
||||||
|
|
||||||
if (j < 0)
|
if (j == NO_SIDE)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
// This file was automatically generated by the
|
// This file was automatically generated by the
|
||||||
// updaterevision tool. Do not edit by hand.
|
// updaterevision tool. Do not edit by hand.
|
||||||
|
|
||||||
#define ZD_SVN_REVISION_STRING "2456"
|
#define ZD_SVN_REVISION_STRING "2462"
|
||||||
#define ZD_SVN_REVISION_NUMBER 2456
|
#define ZD_SVN_REVISION_NUMBER 2462
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue