Skip to content
Permalink
Browse files

Merge remote-tracking branch 'origin/master' into vulkan2

  • Loading branch information...
madame-rachelle committed Apr 11, 2019
2 parents 482e9c0 + 1090c4b commit 3deda0efd230290abd4955842e1a06760bd81438
Showing with 5,690 additions and 4,379 deletions.
  1. +1 −1 src/b_game.cpp
  2. +28 −22 src/c_console.cpp
  3. +10 −0 src/d_iwad.cpp
  4. +3 −9 src/d_main.cpp
  5. +1 −0 src/d_main.h
  6. +3 −0 src/doomstat.h
  7. +3 −3 src/g_game.cpp
  8. +9 −9 src/g_statusbar/hudmessages.cpp
  9. +3 −3 src/g_statusbar/sbar.h
  10. +0 −1 src/g_statusbar/shared_hud.cpp
  11. +132 −6 src/g_statusbar/shared_sbar.cpp
  12. +14 −12 src/gamedata/fonts/font.cpp
  13. +47 −3 src/gamedata/fonts/v_font.cpp
  14. +4 −0 src/gamedata/fonts/v_font.h
  15. +0 −1 src/gamedata/w_wad.cpp
  16. +96 −26 src/intermission/intermission.cpp
  17. +5 −0 src/intermission/intermission.h
  18. +4 −5 src/p_acs.cpp
  19. +1 −1 src/p_conversation.cpp
  20. +4 −4 src/p_interaction.cpp
  21. +22 −14 src/r_data/gldefs.cpp
  22. +2 −2 src/rendering/2d/v_draw.cpp
  23. +13 −0 src/rendering/2d/v_drawtext.cpp
  24. +1 −1 src/scripting/vmthunks.cpp
  25. +2 −0 src/v_video.cpp
  26. +6 −0 wadsrc/static/iwadinfo.txt
  27. +2,305 −2,141 wadsrc/static/language.csv
  28. +3 −3 wadsrc/static/mapinfo/chex.txt
  29. +3 −3 wadsrc/static/mapinfo/doomcommon.txt
  30. +3 −3 wadsrc/static/mapinfo/heretic.txt
  31. +3 −3 wadsrc/static/mapinfo/hexen.txt
  32. +3 −3 wadsrc/static/mapinfo/mindefaults.txt
  33. +3 −3 wadsrc/static/mapinfo/strife.txt
  34. +2 −0 wadsrc/static/zscript/base.zs
  35. +55 −21 wadsrc/static/zscript/ui/menu/conversationmenu.zs
  36. +16 −10 wadsrc/static/zscript/ui/menu/listmenuitems.zs
  37. +36 −18 wadsrc/static/zscript/ui/menu/messagebox.zs
  38. +13 −1 wadsrc/static/zscript/ui/statscreen/statscreen.zs
  39. +15 −13 wadsrc/static/zscript/ui/statscreen/statscreen_sp.zs
  40. +32 −40 wadsrc/static/zscript/ui/statusbar/alt_hud.zs
  41. +1 −74 wadsrc/static/zscript/ui/statusbar/statusbar.zs
  42. +2 −2 wadsrc/static/zscript/ui/statusbar/strife_sbar.zs
  43. BIN wadsrc_extra/static/filter/game-heretic/fonts/defbigfont/0021.lmp
  44. BIN wadsrc_extra/static/filter/game-heretic/fonts/defbigfont/00A1.lmp
  45. BIN wadsrc_extra/static/filter/game-hexen/fonts/defbigfont/0021.lmp
  46. BIN wadsrc_extra/static/filter/game-hexen/fonts/defbigfont/00A1.lmp
  47. +2,781 −1,918 wadsrc_extra/static/language.csv
@@ -394,8 +394,8 @@ bool FCajunMaster::DoAddBot (FLevelLocals *Level, uint8_t *info, botskill_t skil
else
Printf ("%s joined the game\n", players[bnum].userinfo.GetName());

Level->localEventManager->PlayerEntered(bnum, false);
Level->DoReborn (bnum, true);
Level->localEventManager->PlayerEntered(bnum, false);
return true;
}

@@ -79,8 +79,20 @@ CUSTOM_CVAR(Int, con_buffersize, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
if (self >= 0 && self < 128) self = 128;
}

CVAR(Bool, con_consolefont, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, con_midconsolefont, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
bool generic_hud, generic_ui;

EXTERN_CVAR(Bool, ui_generic)

CUSTOM_CVAR(Bool, hud_generic, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // All HUD elements only use generic assets
{
generic_hud = self || ui_generic;
}

CUSTOM_CVAR(Bool, ui_generic, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // The entire UI uses generic assets (this excludes the primary menus)
{
generic_ui = self;
generic_hud = self || hud_generic;
}

FConsoleBuffer *conbuffer;

@@ -587,9 +599,15 @@ CUSTOM_CVAR (Int, msgmidcolor2, 4, CVAR_ARCHIVE)
EColorRange C_GetDefaultFontColor()
{
// Ideally this should analyze the SmallFont and pick a matching color.
if (!generic_hud) return CR_UNTRANSLATED;
return gameinfo.gametype == GAME_Doom ? CR_RED : gameinfo.gametype == GAME_Chex ? CR_GREEN : gameinfo.gametype == GAME_Strife ? CR_GOLD : CR_GRAY;
}

FFont * C_GetDefaultHUDFont()
{
return generic_hud? NewSmallFont : SmallFont;
}

void C_InitConback()
{
conback = TexMan.CheckForTexture ("CONBACK", ETextureType::MiscPatch);
@@ -782,9 +800,10 @@ void FNotifyBuffer::AddString(int printlevel, FString source)
con_notifylines == 0)
return;

width = DisplayWidth / active_con_scaletext(con_consolefont);
width = DisplayWidth / active_con_scaletext(generic_hud);

FFont *font = *con_consolefont ? NewSmallFont : SmallFont;
FFont *font = hud_generic ? NewSmallFont : SmallFont;
if (font == nullptr) return; // Without an initialized font we cannot handle the message (this is for those which come here before the font system is ready.)

if (AddType == APPENDLINE && Text.Size() > 0 && Text[Text.Size() - 1].PrintLevel == printlevel)
{
@@ -897,7 +916,7 @@ int PrintString (int iprintlevel, const char *outline)
I_PrintStr(outline);

conbuffer->AddText(printlevel, outline);
if (vidactive && screen && SmallFont && !(iprintlevel & PRINT_NONOTIFY))
if (vidactive && screen && !(iprintlevel & PRINT_NONOTIFY))
{
NotifyStrings.AddString(printlevel, outline);
}
@@ -1067,7 +1086,7 @@ void FNotifyBuffer::Draw()
line = Top;
canskip = true;

FFont *font = *con_consolefont ? NewSmallFont : SmallFont;
FFont *font = hud_generic ? NewSmallFont : SmallFont;
lineadv = font->GetHeight ();

for (unsigned i = 0; i < Text.Size(); ++ i)
@@ -1090,11 +1109,7 @@ void FNotifyBuffer::Draw()
else
color = PrintColors[notify.PrintLevel];

if (color == CR_UNTRANSLATED && *con_consolefont)
{
color = C_GetDefaultFontColor();
}
int scale = active_con_scaletext(con_consolefont);
int scale = active_con_scaletext(generic_hud);
if (!center)
screen->DrawText (font, color, 0, line, notify.Text,
DTA_VirtualWidth, screen->GetWidth() / scale,
@@ -1103,7 +1118,7 @@ void FNotifyBuffer::Draw()
DTA_Alpha, alpha, TAG_DONE);
else
screen->DrawText (font, color, (screen->GetWidth() -
SmallFont->StringWidth (notify.Text) * scale) / 2 / scale,
font->StringWidth (notify.Text) * scale) / 2 / scale,
line, notify.Text,
DTA_VirtualWidth, screen->GetWidth() / scale,
DTA_VirtualHeight, screen->GetHeight() / scale,
@@ -1756,16 +1771,7 @@ void C_MidPrint (FFont *font, const char *msg, bool bold)
auto color = (EColorRange)PrintColors[bold? PRINTLEVELS+1 : PRINTLEVELS];
Printf(PRINT_HIGH|PRINT_NONOTIFY, TEXTCOLOR_ESCAPESTR "%c%s\n%s\n%s\n", color, console_bar, msg, console_bar);

bool altscale = false;
if (font == nullptr)
{
altscale = con_midconsolefont;
font = altscale ? NewSmallFont : SmallFont;
if (altscale && color == CR_UNTRANSLATED) color = C_GetDefaultFontColor();
}

StatusBar->AttachMessage (Create<DHUDMessage>(font, msg, 1.5f, 0.375f, 0, 0,
color, con_midtime, altscale), MAKE_ID('C','N','T','R'));
StatusBar->AttachMessage (Create<DHUDMessage>(font, msg, 1.5f, 0.375f, 0, 0, color, con_midtime), MAKE_ID('C','N','T','R'));
}
else
{
@@ -155,6 +155,16 @@ void FIWadManager::ParseIWadInfo(const char *fn, const char *data, int datasize,
}
while (sc.CheckString(","));
}
else if (sc.Compare("DeleteLumps"))
{
sc.MustGetStringName("=");
do
{
sc.MustGetString();
iwad->DeleteLumps.Push(FString(sc.String));
}
while (sc.CheckString(","));
}
else if (sc.Compare("BannerColors"))
{
sc.MustGetStringName("=");
@@ -858,9 +858,10 @@ void D_Display ()
screen->DrawTexture (tex, x, 4, DTA_CleanNoMove, true, TAG_DONE);
if (paused && multiplayer)
{
FFont *font = generic_hud? NewSmallFont : SmallFont;
pstring << ' ' << players[paused - 1].userinfo.GetName();
screen->DrawText(SmallFont, CR_RED,
(screen->GetWidth() - SmallFont->StringWidth(pstring)*CleanXfac) / 2,
screen->DrawText(font, CR_RED,
(screen->GetWidth() - font->StringWidth(pstring)*CleanXfac) / 2,
(tex->GetDisplayHeight() * CleanYfac) + 4, pstring, DTA_CleanNoMove, true, TAG_DONE);
}
}
@@ -1075,13 +1076,6 @@ void D_PageDrawer (void)
DTA_BilinearFilter, true,
TAG_DONE);
}
else
{
if (!PageBlank)
{
screen->DrawText (SmallFont, CR_WHITE, 0, 0, "Page graphic goes here", TAG_DONE);
}
}
if (Advisory != NULL)
{
screen->DrawTexture (Advisory, 4, 160, DTA_320x200, true, TAG_DONE);
@@ -109,6 +109,7 @@ struct FIWADInfo
FString MapInfo; // Base mapinfo to load
TArray<FString> Load; // Wads to be loaded with this one.
TArray<FString> Lumps; // Lump names for identification
TArray<FString> DeleteLumps; // Lumps which must be deleted from the directory.
int flags = 0;
};

@@ -253,4 +253,7 @@ EXTERN_CVAR (Int, compatflags2);
// Filters from AddAutoloadFiles(). Used to filter files from archives.
extern FString LumpFilterIWAD;

// These control whether certain items use generic text output instead of game-specific one.
extern bool generic_hud, generic_ui;

#endif
@@ -350,7 +350,7 @@ CCMD (weapnext)
// [BC] Option to display the name of the weapon being cycled to.
if ((displaynametags & 2) && StatusBar && SmallFont && SendItemUse)
{
StatusBar->AttachMessage(Create<DHUDMessageFadeOut>(SmallFont, SendItemUse->GetTag(),
StatusBar->AttachMessage(Create<DHUDMessageFadeOut>(nullptr, SendItemUse->GetTag(),
1.5f, 0.90f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID( 'W', 'E', 'P', 'N' ));
}
if (SendItemUse != players[consoleplayer].ReadyWeapon)
@@ -376,7 +376,7 @@ CCMD (weapprev)
// [BC] Option to display the name of the weapon being cycled to.
if ((displaynametags & 2) && StatusBar && SmallFont && SendItemUse)
{
StatusBar->AttachMessage(Create<DHUDMessageFadeOut>(SmallFont, SendItemUse->GetTag(),
StatusBar->AttachMessage(Create<DHUDMessageFadeOut>(nullptr, SendItemUse->GetTag(),
1.5f, 0.90f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID( 'W', 'E', 'P', 'N' ));
}
if (SendItemUse != players[consoleplayer].ReadyWeapon)
@@ -389,7 +389,7 @@ static void DisplayNameTag(AActor *actor)
{
auto tag = actor->GetTag();
if ((displaynametags & 1) && StatusBar && SmallFont)
StatusBar->AttachMessage(Create<DHUDMessageFadeOut>(SmallFont, tag,
StatusBar->AttachMessage(Create<DHUDMessageFadeOut>(nullptr, tag,
1.5f, 0.80f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID('S', 'I', 'N', 'V'));

}
@@ -39,6 +39,7 @@
#include "v_video.h"
#include "cmdlib.h"
#include "serializer.h"
#include "doomstat.h"
#include "vm.h"

EXTERN_CVAR(Int, con_scaletext)
@@ -128,7 +129,7 @@ void DHUDMessageBase::CallDraw(int bottom, int visibility)
//============================================================================

DHUDMessage::DHUDMessage (FFont *font, const char *text, float x, float y, int hudwidth, int hudheight,
EColorRange textColor, float holdTime, bool altscale)
EColorRange textColor, float holdTime)
{
if (hudwidth == 0 || hudheight == 0)
{
@@ -139,7 +140,6 @@ DHUDMessage::DHUDMessage (FFont *font, const char *text, float x, float y, int h
// for x range [0.0, 1.0]: Positions center of box
// for x range [1.0, 2.0]: Positions center of box, and centers text inside it
HUDWidth = HUDHeight = 0;
AltScale = altscale;
if (fabs (x) > 2.f)
{
CenterX = true;
@@ -197,10 +197,10 @@ DHUDMessage::DHUDMessage (FFont *font, const char *text, float x, float y, int h
Top = y;
HoldTics = (int)(holdTime * TICRATE);
Tics = -1; // -1 to compensate for one additional Tick the message will receive.
Font = font? font : generic_hud? NewSmallFont : SmallFont;
TextColor = textColor;
State = 0;
SourceText = copystring (text);
Font = font;
VisibilityFlags = 0;
Style = STYLE_Translucent;
Alpha = 1.;
@@ -320,7 +320,7 @@ void DHUDMessage::ResetText (const char *text)
}
else
{
width = SCREENWIDTH / active_con_scaletext(AltScale);
width = SCREENWIDTH / active_con_scaletext();
}

Lines = V_BreakLines (Font, NoWrap ? INT_MAX : width, (uint8_t *)text);
@@ -380,7 +380,7 @@ void DHUDMessage::Draw (int bottom, int visibility)
xscale = yscale = 1;
if (HUDWidth == 0)
{
int scale = active_con_scaletext(AltScale);
int scale = active_con_scaletext();
screen_width /= scale;
screen_height /= scale;
bottom /= scale;
@@ -484,7 +484,7 @@ void DHUDMessage::DoDraw (int linenum, int x, int y, bool clean, int hudheight)
{
if (hudheight == 0)
{
int scale = active_con_scaletext(AltScale);
int scale = active_con_scaletext();
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
DTA_VirtualWidth, SCREENWIDTH / scale,
DTA_VirtualHeight, SCREENHEIGHT / scale,
@@ -577,7 +577,7 @@ void DHUDMessageFadeOut::DoDraw (int linenum, int x, int y, bool clean, int hudh
float trans = float(Alpha * -(Tics - FadeOutTics) / FadeOutTics);
if (hudheight == 0)
{
int scale = active_con_scaletext(AltScale);
int scale = active_con_scaletext();
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
DTA_VirtualWidth, SCREENWIDTH / scale,
DTA_VirtualHeight, SCREENHEIGHT / scale,
@@ -666,7 +666,7 @@ void DHUDMessageFadeInOut::DoDraw (int linenum, int x, int y, bool clean, int hu
float trans = float(Alpha * Tics / FadeInTics);
if (hudheight == 0)
{
int scale = active_con_scaletext(AltScale);
int scale = active_con_scaletext();
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
DTA_VirtualWidth, SCREENWIDTH / scale,
DTA_VirtualHeight, SCREENHEIGHT / scale,
@@ -837,7 +837,7 @@ void DHUDMessageTypeOnFadeOut::DoDraw (int linenum, int x, int y, bool clean, in
{
if (hudheight == 0)
{
int scale = active_con_scaletext(AltScale);
int scale = active_con_scaletext();
screen->DrawText (Font, TextColor, x, y, Lines[linenum].Text,
DTA_VirtualWidth, SCREENWIDTH / scale,
DTA_VirtualHeight, SCREENHEIGHT / scale,
@@ -84,7 +84,7 @@ class DHUDMessage : public DHUDMessageBase
DECLARE_CLASS (DHUDMessage, DHUDMessageBase)
public:
DHUDMessage (FFont *font, const char *text, float x, float y, int hudwidth, int hudheight,
EColorRange textColor, float holdTime, bool altscale = false);
EColorRange textColor, float holdTime);
virtual void OnDestroy () override;

virtual void Serialize(FSerializer &arc);
@@ -140,7 +140,6 @@ class DHUDMessage : public DHUDMessageBase
int ClipX, ClipY, ClipWidth, ClipHeight, WrapWidth; // in HUD coords
int ClipLeft, ClipTop, ClipRight, ClipBot; // in screen coords
bool HandleAspect;
bool AltScale;
EColorRange TextColor;
FFont *Font;
FRenderStyle Style;
@@ -207,7 +206,7 @@ class DHUDMessageTypeOnFadeOut : public DHUDMessageFadeOut
DECLARE_CLASS (DHUDMessageTypeOnFadeOut, DHUDMessageFadeOut)
public:
DHUDMessageTypeOnFadeOut (FFont *font, const char *text, float x, float y, int hudwidth, int hudheight,
EColorRange textColor, float typeTime, float holdTime, float fadeOutTime);
EColorRange textColor, float typeTime, float holdTime, float fadeOutTimee);

virtual void Serialize(FSerializer &arc);
virtual void DoDraw (int linenum, int x, int y, bool clean, int hudheight);
@@ -448,6 +447,7 @@ class DBaseStatusBar : public DObject
{
return SBarTop;
}
void DoDrawAutomapHUD(int crdefault, int highlight);

//protected:
void DrawPowerups ();
@@ -55,7 +55,6 @@
CVAR(Int,hud_althudscale, 0, CVAR_ARCHIVE) // Scale the hud to 640x400?
CVAR(Bool,hud_althud, false, CVAR_ARCHIVE) // Enable/Disable the alternate HUD

CVAR(Bool, hud_althudfont, false, CVAR_ARCHIVE) // Enable/Disable the alternate HUD
// These are intentionally not the same as in the automap!
CVAR (Bool, hud_showsecrets, true,CVAR_ARCHIVE); // Show secrets on HUD
CVAR (Bool, hud_showmonsters, true,CVAR_ARCHIVE); // Show monster stats on HUD
Oops, something went wrong.

0 comments on commit 3deda0e

Please sign in to comment.
You can’t perform that action at this time.