mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-04 11:10:48 +00:00
* Updated to ZDoom r2965:
- Made "follow player" automap option a CVAR and added a menu item for it. - Added a CVAR to decide when to show the map label (ExMy, MAPxx) on the automap HUD. Available settings are Never, Always and Not for hubs. - Made all crosshair related CVARs game specific. They were all global to all supportesd games. - Fixed: When used on non-projectiles A_Explode ignored the HurtSource flag. - Fixed: The intermission screen was not taking texture scaling into account (it was written before the introduction of scaled texture handling for 2D.) - Fixed: The GAMEINFO parser did not correctly handle NOSPRITERENAME - Added STTPRCNT to HUDFONT_DOOM git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1065 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
f50cbb09e8
commit
6922d4da45
10 changed files with 78 additions and 47 deletions
|
@ -385,8 +385,6 @@ static FTextureID marknums[10]; // numbers used for marking by the automap
|
|||
static mpoint_t markpoints[AM_NUMMARKPOINTS]; // where the points are
|
||||
static int markpointnum = 0; // next point to be assigned
|
||||
|
||||
static int followplayer = 1; // specifies whether to follow the player around
|
||||
|
||||
static FTextureID mapback; // the automap background
|
||||
static fixed_t mapystart=0; // y-value for the start of the map bitmap...used in the parallax stuff.
|
||||
static fixed_t mapxstart=0; //x-value for the bitmap.
|
||||
|
@ -412,11 +410,14 @@ void AM_restoreScaleAndLoc ();
|
|||
void AM_minOutWindowScale ();
|
||||
|
||||
|
||||
CVAR(Bool, am_followplayer, true, CVAR_ARCHIVE)
|
||||
|
||||
|
||||
CCMD(am_togglefollow)
|
||||
{
|
||||
followplayer = !followplayer;
|
||||
am_followplayer = !am_followplayer;
|
||||
f_oldloc.x = FIXED_MAX;
|
||||
Printf ("%s\n", GStrings(followplayer ? "AMSTR_FOLLOWON" : "AMSTR_FOLLOWOFF"));
|
||||
Printf ("%s\n", GStrings(am_followplayer ? "AMSTR_FOLLOWON" : "AMSTR_FOLLOWOFF"));
|
||||
}
|
||||
|
||||
CCMD(am_togglegrid)
|
||||
|
@ -580,7 +581,7 @@ void AM_restoreScaleAndLoc ()
|
|||
{
|
||||
m_w = old_m_w;
|
||||
m_h = old_m_h;
|
||||
if (!followplayer)
|
||||
if (!am_followplayer)
|
||||
{
|
||||
m_x = old_m_x;
|
||||
m_y = old_m_y;
|
||||
|
@ -777,7 +778,7 @@ void AM_changeWindowLoc ()
|
|||
{
|
||||
if (0 != (m_paninc.x | m_paninc.y))
|
||||
{
|
||||
followplayer = 0;
|
||||
am_followplayer = false;
|
||||
f_oldloc.x = FIXED_MAX;
|
||||
}
|
||||
|
||||
|
@ -1199,7 +1200,7 @@ bool AM_Responder (event_t *ev, bool last)
|
|||
{
|
||||
if (automapactive && (ev->type == EV_KeyDown || ev->type == EV_KeyUp))
|
||||
{
|
||||
if (followplayer)
|
||||
if (am_followplayer)
|
||||
{
|
||||
// check for am_pan* and ignore in follow mode
|
||||
const char *defbind = AutomapBindings.GetBind(ev->data1);
|
||||
|
@ -1312,7 +1313,7 @@ void AM_Ticker ()
|
|||
|
||||
amclock++;
|
||||
|
||||
if (followplayer)
|
||||
if (am_followplayer)
|
||||
{
|
||||
AM_doFollowPlayer();
|
||||
}
|
||||
|
|
|
@ -1723,7 +1723,8 @@ static FString ParseGameInfo(TArray<FString> &pwads, const char *fn, const char
|
|||
}
|
||||
else if (!nextKey.CompareNoCase("NOSPRITERENAME"))
|
||||
{
|
||||
nospriterename = true;
|
||||
sc.MustGetString();
|
||||
nospriterename = sc.Compare("true");
|
||||
}
|
||||
else if (!nextKey.CompareNoCase("STARTUPTITLE"))
|
||||
{
|
||||
|
|
|
@ -381,6 +381,7 @@ DBaseStatusBar *CreateCustomStatusBar(int script=0);
|
|||
|
||||
// Crosshair stuff ----------------------------------------------------------
|
||||
|
||||
void ST_FormatMapName(FString &mapname, const char *mapnamecolor = "");
|
||||
void ST_LoadCrosshair(bool alwaysload=false);
|
||||
extern FTexture *CrosshairImage;
|
||||
|
||||
|
|
|
@ -833,10 +833,9 @@ void DrawHUD()
|
|||
}
|
||||
else
|
||||
{
|
||||
FString mapname;
|
||||
char printstr[256];
|
||||
int seconds;
|
||||
cluster_info_t *thiscluster = FindClusterInfo (level.cluster);
|
||||
bool hub = !!(thiscluster->flags&CLUSTER_HUB);
|
||||
int length=8*SmallFont->GetCharWidth('0');
|
||||
int fonth=SmallFont->GetHeight()+1;
|
||||
int bottom=hudheight-1;
|
||||
|
@ -865,8 +864,8 @@ void DrawHUD()
|
|||
}
|
||||
}
|
||||
|
||||
mysnprintf(printstr, countof(printstr), "%s: %s", level.mapname, level.LevelName.GetChars());
|
||||
screen->DrawText(SmallFont, hudcolor_titl, 1, hudheight-fonth-1, printstr,
|
||||
ST_FormatMapName(mapname);
|
||||
screen->DrawText(SmallFont, hudcolor_titl, 1, hudheight-fonth-1, mapname,
|
||||
DTA_KeepRatio, true,
|
||||
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, TAG_DONE);
|
||||
|
||||
|
|
|
@ -95,12 +95,16 @@ CUSTOM_CVAR (Bool, st_scale, true, CVAR_ARCHIVE)
|
|||
}
|
||||
}
|
||||
|
||||
CVAR (Int, crosshair, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (Bool, crosshairforce, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (Color, crosshaircolor, 0xff0000, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
||||
CVAR (Bool, crosshairhealth, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
||||
CVAR (Bool, crosshairscale, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
||||
CVAR (Bool, crosshairgrow, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
||||
CVAR (Int, crosshair, 0, CVAR_ARCHIVE)
|
||||
CVAR (Bool, crosshairforce, false, CVAR_ARCHIVE)
|
||||
CVAR (Color, crosshaircolor, 0xff0000, CVAR_ARCHIVE);
|
||||
CVAR (Bool, crosshairhealth, true, CVAR_ARCHIVE);
|
||||
CVAR (Bool, crosshairscale, false, CVAR_ARCHIVE);
|
||||
CVAR (Bool, crosshairgrow, false, CVAR_ARCHIVE);
|
||||
CUSTOM_CVAR(Int, am_showmaplabel, 2, CVAR_ARCHIVE)
|
||||
{
|
||||
if (self < 0 || self > 2) self = 2;
|
||||
}
|
||||
|
||||
CVAR (Bool, idmypos, false, 0);
|
||||
|
||||
|
@ -118,6 +122,30 @@ BYTE DBaseStatusBar::DamageToAlpha[114] =
|
|||
230, 231, 232, 233, 234, 235, 235, 236, 237
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Format the map name, include the map label if wanted
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void ST_FormatMapName(FString &mapname, const char *mapnamecolor)
|
||||
{
|
||||
cluster_info_t *cluster = FindClusterInfo (level.cluster);
|
||||
bool ishub = (cluster != NULL && (cluster->flags & CLUSTER_HUB));
|
||||
|
||||
if (am_showmaplabel == 1 || (am_showmaplabel == 2 && !ishub))
|
||||
{
|
||||
mapname << level.mapname << ": ";
|
||||
}
|
||||
mapname << mapnamecolor << level.LevelName;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Load crosshair definitions
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void ST_LoadCrosshair(bool alwaysload)
|
||||
{
|
||||
int num = 0;
|
||||
|
@ -1270,18 +1298,9 @@ void DBaseStatusBar::Draw (EHudState state)
|
|||
y -= 8;
|
||||
}
|
||||
}
|
||||
cluster_info_t *cluster = FindClusterInfo (level.cluster);
|
||||
if (cluster == NULL || !(cluster->flags & CLUSTER_HUB))
|
||||
{
|
||||
mysnprintf (line, countof(line), "%s: ", level.mapname);
|
||||
}
|
||||
else
|
||||
{
|
||||
*line = 0;
|
||||
}
|
||||
FString mapname;
|
||||
|
||||
mapname.Format("%s%c%c%s", line, TEXTCOLOR_ESCAPE, CR_GREY + 'A', level.LevelName.GetChars());
|
||||
ST_FormatMapName(mapname, TEXTCOLOR_GREY);
|
||||
screen->DrawText (SmallFont, highlight,
|
||||
(SCREENWIDTH - SmallFont->StringWidth (mapname)*CleanXfac)/2, y, mapname,
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
|
|
|
@ -4325,7 +4325,7 @@ void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int b
|
|||
if (thing->flags3 & MF3_NORADIUSDMG && !(bombspot->flags4 & MF4_FORCERADIUSDMG))
|
||||
continue;
|
||||
|
||||
if (!DamageSource && thing == bombsource)
|
||||
if (!DamageSource && (thing == bombsource || thing == bombspot))
|
||||
{ // don't damage the source of the explosion
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
// This file was automatically generated by the
|
||||
// updaterevision tool. Do not edit by hand.
|
||||
|
||||
#define ZD_SVN_REVISION_STRING "2957"
|
||||
#define ZD_SVN_REVISION_NUMBER 2957
|
||||
#define ZD_SVN_REVISION_STRING "2965"
|
||||
#define ZD_SVN_REVISION_NUMBER 2965
|
||||
|
|
|
@ -79,7 +79,7 @@ void WI_unloadData ();
|
|||
|
||||
// NET GAME STUFF
|
||||
#define NG_STATSY 50
|
||||
#define NG_STATSX (32 + star->GetWidth()/2 + 32*!dofrags)
|
||||
#define NG_STATSX (32 + star->GetScaledWidth()/2 + 32*!dofrags)
|
||||
|
||||
#define NG_SPACINGX 64
|
||||
|
||||
|
@ -606,8 +606,8 @@ void WI_drawBackground()
|
|||
// scale all animations below to fit the size of the base pic
|
||||
// The base pic is always scaled to fit the screen so this allows
|
||||
// placing the animations precisely where they belong on the base pic
|
||||
animwidth = background->GetScaledWidth();
|
||||
animheight = background->GetScaledHeight();
|
||||
animwidth = background->GetScaledWidthDouble();
|
||||
animheight = background->GetScaledHeightDouble();
|
||||
screen->FillBorder (NULL);
|
||||
screen->DrawTexture(background, 0, 0, DTA_Fullscreen, true, TAG_DONE);
|
||||
}
|
||||
|
@ -746,8 +746,8 @@ int WI_drawLF ()
|
|||
// draw <LevelName>
|
||||
if (tex)
|
||||
{
|
||||
screen->DrawTexture(tex, midx - tex->GetWidth()*CleanXfac/2, y, DTA_CleanNoMove, true, TAG_DONE);
|
||||
y += (tex->GetHeight() + BigFont->GetHeight()/4) * CleanYfac;
|
||||
screen->DrawTexture(tex, midx - tex->GetScaledWidth()*CleanXfac/2, y, DTA_CleanNoMove, true, TAG_DONE);
|
||||
y += (tex->GetScaledHeight() + BigFont->GetHeight()/4) * CleanYfac;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -761,8 +761,8 @@ int WI_drawLF ()
|
|||
// don't draw 'finished' if the level name is too high!
|
||||
if (gameinfo.gametype & GAME_DoomChex)
|
||||
{
|
||||
screen->DrawTexture(finished, midx - finished->GetWidth()*CleanXfac/2, y, DTA_CleanNoMove, true, TAG_DONE);
|
||||
return y + finished->GetHeight() * CleanYfac;
|
||||
screen->DrawTexture(finished, midx - finished->GetScaledWidth()*CleanXfac/2, y, DTA_CleanNoMove, true, TAG_DONE);
|
||||
return y + finished->GetScaledHeight() * CleanYfac;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -793,8 +793,8 @@ void WI_drawEL ()
|
|||
// be careful with the added height so that it works for oversized 'entering' patches!
|
||||
if (gameinfo.gametype & GAME_DoomChex)
|
||||
{
|
||||
screen->DrawTexture(entering, (SCREENWIDTH - entering->GetWidth() * CleanXfac) / 2, y, DTA_CleanNoMove, true, TAG_DONE);
|
||||
y += (entering->GetHeight() + font->GetHeight()/4) * CleanYfac;
|
||||
screen->DrawTexture(entering, (SCREENWIDTH - entering->GetScaledWidth() * CleanXfac) / 2, y, DTA_CleanNoMove, true, TAG_DONE);
|
||||
y += (entering->GetScaledHeight() + font->GetHeight()/4) * CleanYfac;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -808,7 +808,7 @@ void WI_drawEL ()
|
|||
FTexture *tex = wbs->LName1;
|
||||
if (tex)
|
||||
{
|
||||
screen->DrawTexture(tex, (SCREENWIDTH - tex->GetWidth() * CleanXfac) / 2, y, DTA_CleanNoMove, true, TAG_DONE);
|
||||
screen->DrawTexture(tex, (SCREENWIDTH - tex->GetScaledWidth() * CleanXfac) / 2, y, DTA_CleanNoMove, true, TAG_DONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -853,10 +853,10 @@ void WI_drawOnLnode( int n, FTexture * c[] ,int numc)
|
|||
int bottom;
|
||||
|
||||
|
||||
right = c[i]->GetWidth();
|
||||
bottom = c[i]->GetHeight();
|
||||
left = lnodes[n].x - c[i]->LeftOffset;
|
||||
top = lnodes[n].y - c[i]->TopOffset;
|
||||
right = c[i]->GetScaledWidth();
|
||||
bottom = c[i]->GetScaledHeight();
|
||||
left = lnodes[n].x - c[i]->GetScaledLeftOffset();
|
||||
top = lnodes[n].y - c[i]->GetScaledTopOffset();
|
||||
right += left;
|
||||
bottom += top;
|
||||
|
||||
|
@ -980,7 +980,7 @@ void WI_drawTime (int x, int y, int t, bool no_sucks=false)
|
|||
{ // "sucks"
|
||||
if (sucks != NULL)
|
||||
{
|
||||
screen->DrawTexture (sucks, x - sucks->GetWidth(), y - IntermissionFont->GetHeight() - 2,
|
||||
screen->DrawTexture (sucks, x - sucks->GetScaledWidth(), y - IntermissionFont->GetHeight() - 2,
|
||||
DTA_Clean, true, TAG_DONE);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
HUDFONT_DOOM
|
||||
{
|
||||
- STTMINUS
|
||||
% STTPRCNT
|
||||
0 STTNUM0
|
||||
1 STTNUM1
|
||||
2 STTNUM2
|
||||
|
|
|
@ -841,6 +841,13 @@ OptionValue OverlayTypes
|
|||
2, "Overlay Only"
|
||||
}
|
||||
|
||||
OptionValue MaplabelTypes
|
||||
{
|
||||
0, "Never"
|
||||
1, "Always"
|
||||
2, "Not for hubs"
|
||||
}
|
||||
|
||||
OptionMenu AutomapOptions
|
||||
{
|
||||
Title "AUTOMAP OPTIONS"
|
||||
|
@ -851,6 +858,7 @@ OptionMenu AutomapOptions
|
|||
Option "Rotate automap", "am_rotate", "RotateTypes"
|
||||
Option "Overlay automap", "am_overlay", "OverlayTypes"
|
||||
Option "Enable textured display", "am_textured", "OnOff"
|
||||
Option "Follow player", "am_followplayer", "OnOff"
|
||||
StaticText " "
|
||||
Option "Show item counts", "am_showitems", "OnOff"
|
||||
Option "Show monster counts", "am_showmonsters", "OnOff"
|
||||
|
@ -858,6 +866,7 @@ OptionMenu AutomapOptions
|
|||
Option "Show time elapsed", "am_showtime", "OnOff"
|
||||
Option "Show total time elapsed", "am_showtotaltime", "OnOff"
|
||||
Option "Show secrets on map", "am_map_secrets", "SecretTypes"
|
||||
Option "Show map label", "am_showmaplabel", "MaplabelTypes"
|
||||
Option "Draw map background", "am_drawmapback", "OnOff"
|
||||
Option "Show keys (cheat)", "am_showkeys", "OnOff"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue