mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
- Added HUD message visibility flags, which are ORed into the type field:
* HUDMSG_NOTWITH3DVIEW : This message does not appear when the 3D view is active. * HUDMSG_NOTWITHFULLMAP : This message does not appear when the fullscreen automap is active. * HUDMSG_NOTWITHOVERLAYMAP : This message does not appear when the overlay automap is active. These flags may be combined, so for example: HUDMSG_NOTWITHFULLMAP | HUDMSG_NOTWITHOVERLAYMAP would prevent the message from appearing if any form of automap is active. - Added HUD message layers, which are ORed into the type field: * HUDMSG_LAYER_OVERHUD : This is the default and standard behavior. The message appear on top of most HUD elements. This definition is just included for completeness' sake; you don't need to explicitly use it. * HUDMSG_LAYER_UNDERHUD : The message appears underneath other HUD elements, such as the status bar. * HUDMSG_LAYER_OVERMAP : The message appears on top of the fullscreen automap. At the moment, this layer is functionally equivalent to using the flags HUDMSG_NOTWITH3DVIEW | HUDMSG_NOTWITHOVERLAYMAP. However, if Blzut3 decides to implement support for drawing the automap permanently on a second screen, messages on this layer will move to that screen with the automap and be permanently visible as long as the map is visible on that other screen. These are not flags, so for example HUDMSG_LAYER_UNDERHUD | HUDMSG_LAYER_OVERHUD is not valid. SVN r3821 (trunk)
This commit is contained in:
parent
27f6d431ca
commit
73552f0365
5 changed files with 199 additions and 112 deletions
|
@ -804,17 +804,21 @@ void D_Display ()
|
||||||
|
|
||||||
if (hud_althud && viewheight == SCREENHEIGHT && screenblocks > 10)
|
if (hud_althud && viewheight == SCREENHEIGHT && screenblocks > 10)
|
||||||
{
|
{
|
||||||
|
StatusBar->DrawBottomStuff (HUD_None);
|
||||||
if (DrawFSHUD || automapactive) DrawHUD();
|
if (DrawFSHUD || automapactive) DrawHUD();
|
||||||
StatusBar->DrawTopStuff (HUD_None);
|
StatusBar->DrawTopStuff (HUD_None);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (viewheight == SCREENHEIGHT && viewactive && screenblocks > 10)
|
if (viewheight == SCREENHEIGHT && viewactive && screenblocks > 10)
|
||||||
{
|
{
|
||||||
StatusBar->Draw (DrawFSHUD ? HUD_Fullscreen : HUD_None);
|
EHudState state = DrawFSHUD ? HUD_Fullscreen : HUD_None;
|
||||||
StatusBar->DrawTopStuff (DrawFSHUD ? HUD_Fullscreen : HUD_None);
|
StatusBar->DrawBottomStuff (state);
|
||||||
|
StatusBar->Draw (state);
|
||||||
|
StatusBar->DrawTopStuff (state);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
StatusBar->DrawBottomStuff (HUD_StatusBar);
|
||||||
StatusBar->Draw (HUD_StatusBar);
|
StatusBar->Draw (HUD_StatusBar);
|
||||||
StatusBar->DrawTopStuff (HUD_StatusBar);
|
StatusBar->DrawTopStuff (HUD_StatusBar);
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,6 +140,7 @@ DHUDMessage::DHUDMessage (FFont *font, const char *text, float x, float y, int h
|
||||||
State = 0;
|
State = 0;
|
||||||
SourceText = copystring (text);
|
SourceText = copystring (text);
|
||||||
Font = font;
|
Font = font;
|
||||||
|
VisibilityFlags = 0;
|
||||||
ResetText (SourceText);
|
ResetText (SourceText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,6 +185,14 @@ void DHUDMessage::Serialize (FArchive &arc)
|
||||||
Lines = NULL;
|
Lines = NULL;
|
||||||
ResetText (SourceText);
|
ResetText (SourceText);
|
||||||
}
|
}
|
||||||
|
if (SaveVersion < 3821)
|
||||||
|
{
|
||||||
|
VisibilityFlags = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
arc << VisibilityFlags;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
@ -262,7 +271,7 @@ bool DHUDMessage::Tick ()
|
||||||
//
|
//
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
void DHUDMessage::Draw (int bottom)
|
void DHUDMessage::Draw (int bottom, int visibility)
|
||||||
{
|
{
|
||||||
int xscale, yscale;
|
int xscale, yscale;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
@ -271,6 +280,12 @@ void DHUDMessage::Draw (int bottom)
|
||||||
bool clean = false;
|
bool clean = false;
|
||||||
int hudheight;
|
int hudheight;
|
||||||
|
|
||||||
|
// If any of the visibility flags match, do NOT draw this message.
|
||||||
|
if (VisibilityFlags & visibility)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
DrawSetup ();
|
DrawSetup ();
|
||||||
|
|
||||||
int screen_width = SCREENWIDTH;
|
int screen_width = SCREENWIDTH;
|
||||||
|
|
|
@ -66,13 +66,18 @@ public:
|
||||||
|
|
||||||
virtual void Serialize (FArchive &arc);
|
virtual void Serialize (FArchive &arc);
|
||||||
|
|
||||||
void Draw (int bottom);
|
void Draw (int bottom, int visibility);
|
||||||
virtual void ResetText (const char *text);
|
virtual void ResetText (const char *text);
|
||||||
virtual void DrawSetup ();
|
virtual void DrawSetup ();
|
||||||
virtual void DoDraw (int linenum, int x, int y, bool clean, int hudheight);
|
virtual void DoDraw (int linenum, int x, int y, bool clean, int hudheight);
|
||||||
virtual bool Tick (); // Returns true to indicate time for removal
|
virtual bool Tick (); // Returns true to indicate time for removal
|
||||||
virtual void ScreenSizeChanged ();
|
virtual void ScreenSizeChanged ();
|
||||||
|
|
||||||
|
void SetVisibility(int vis)
|
||||||
|
{
|
||||||
|
VisibilityFlags = vis;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
FBrokenLines *Lines;
|
FBrokenLines *Lines;
|
||||||
int Width, Height, NumLines;
|
int Width, Height, NumLines;
|
||||||
|
@ -81,6 +86,7 @@ protected:
|
||||||
int HoldTics;
|
int HoldTics;
|
||||||
int Tics;
|
int Tics;
|
||||||
int State;
|
int State;
|
||||||
|
int VisibilityFlags;
|
||||||
int HUDWidth, HUDHeight;
|
int HUDWidth, HUDHeight;
|
||||||
EColorRange TextColor;
|
EColorRange TextColor;
|
||||||
FFont *Font;
|
FFont *Font;
|
||||||
|
@ -95,6 +101,14 @@ private:
|
||||||
friend class DBaseStatusBar;
|
friend class DBaseStatusBar;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// HUD message visibility flags
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
HUDMSG_NotWith3DView = 1,
|
||||||
|
HUDMSG_NotWithFullMap = 2,
|
||||||
|
HUDMSG_NotWithOverlayMap = 4,
|
||||||
|
};
|
||||||
|
|
||||||
// HUD Message; appear instantly, then fade out type ------------------------
|
// HUD Message; appear instantly, then fade out type ------------------------
|
||||||
|
|
||||||
class DHUDMessageFadeOut : public DHUDMessage
|
class DHUDMessageFadeOut : public DHUDMessage
|
||||||
|
@ -242,6 +256,16 @@ int FindMugShotStateIndex(FName state);
|
||||||
class FTexture;
|
class FTexture;
|
||||||
class AAmmo;
|
class AAmmo;
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
HUDMSGLayer_OverHUD,
|
||||||
|
HUDMSGLayer_UnderHUD,
|
||||||
|
HUDMSGLayer_OverMap,
|
||||||
|
|
||||||
|
NUM_HUDMSGLAYERS,
|
||||||
|
HUDMSGLayer_Default = HUDMSGLayer_OverHUD,
|
||||||
|
};
|
||||||
|
|
||||||
class DBaseStatusBar : public DObject
|
class DBaseStatusBar : public DObject
|
||||||
{
|
{
|
||||||
DECLARE_CLASS (DBaseStatusBar, DObject)
|
DECLARE_CLASS (DBaseStatusBar, DObject)
|
||||||
|
@ -281,11 +305,10 @@ public:
|
||||||
|
|
||||||
void SetScaled (bool scale, bool force=false);
|
void SetScaled (bool scale, bool force=false);
|
||||||
|
|
||||||
void AttachMessage (DHUDMessage *msg, uint32 id=0);
|
void AttachMessage (DHUDMessage *msg, uint32 id=0, int layer=HUDMSGLayer_Default);
|
||||||
DHUDMessage *DetachMessage (DHUDMessage *msg);
|
DHUDMessage *DetachMessage (DHUDMessage *msg);
|
||||||
DHUDMessage *DetachMessage (uint32 id);
|
DHUDMessage *DetachMessage (uint32 id);
|
||||||
void DetachAllMessages ();
|
void DetachAllMessages ();
|
||||||
bool CheckMessage (DHUDMessage *msg);
|
|
||||||
void ShowPlayerName ();
|
void ShowPlayerName ();
|
||||||
fixed_t GetDisplacement () { return Displacement; }
|
fixed_t GetDisplacement () { return Displacement; }
|
||||||
int GetPlayer ();
|
int GetPlayer ();
|
||||||
|
@ -296,6 +319,7 @@ public:
|
||||||
|
|
||||||
virtual void Tick ();
|
virtual void Tick ();
|
||||||
virtual void Draw (EHudState state);
|
virtual void Draw (EHudState state);
|
||||||
|
void DrawBottomStuff (EHudState state);
|
||||||
void DrawTopStuff (EHudState state);
|
void DrawTopStuff (EHudState state);
|
||||||
virtual void FlashItem (const PClass *itemtype);
|
virtual void FlashItem (const PClass *itemtype);
|
||||||
virtual void AttachToPlayer (player_t *player);
|
virtual void AttachToPlayer (player_t *player);
|
||||||
|
@ -364,10 +388,10 @@ public:
|
||||||
private:
|
private:
|
||||||
DBaseStatusBar() {}
|
DBaseStatusBar() {}
|
||||||
bool RepositionCoords (int &x, int &y, int xo, int yo, const int w, const int h) const;
|
bool RepositionCoords (int &x, int &y, int xo, int yo, const int w, const int h) const;
|
||||||
void DrawMessages (int bottom);
|
void DrawMessages (int layer, int bottom);
|
||||||
void DrawConsistancy () const;
|
void DrawConsistancy () const;
|
||||||
|
|
||||||
TObjPtr<DHUDMessage> Messages;
|
TObjPtr<DHUDMessage> Messages[NUM_HUDMSGLAYERS];
|
||||||
bool ShowLog;
|
bool ShowLog;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,7 @@ DBaseStatusBar::DBaseStatusBar (int reltop, int hres, int vres)
|
||||||
FixedOrigin = false;
|
FixedOrigin = false;
|
||||||
CrosshairSize = FRACUNIT;
|
CrosshairSize = FRACUNIT;
|
||||||
RelTop = reltop;
|
RelTop = reltop;
|
||||||
Messages = NULL;
|
memset(Messages, 0, sizeof(Messages));
|
||||||
Displacement = 0;
|
Displacement = 0;
|
||||||
CPlayer = NULL;
|
CPlayer = NULL;
|
||||||
ShowLog = false;
|
ShowLog = false;
|
||||||
|
@ -238,16 +238,17 @@ DBaseStatusBar::DBaseStatusBar (int reltop, int hres, int vres)
|
||||||
|
|
||||||
void DBaseStatusBar::Destroy ()
|
void DBaseStatusBar::Destroy ()
|
||||||
{
|
{
|
||||||
DHUDMessage *msg;
|
for (int i = 0; i < countof(Messages); ++i)
|
||||||
|
{
|
||||||
msg = Messages;
|
DHUDMessage *msg = Messages[i];
|
||||||
while (msg)
|
while (msg)
|
||||||
{
|
{
|
||||||
DHUDMessage *next = msg->Next;
|
DHUDMessage *next = msg->Next;
|
||||||
msg->Destroy();
|
msg->Destroy();
|
||||||
msg = next;
|
msg = next;
|
||||||
}
|
}
|
||||||
Messages = NULL;
|
Messages[i] = NULL;
|
||||||
|
}
|
||||||
Super::Destroy();
|
Super::Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,8 +340,10 @@ void DBaseStatusBar::MultiplayerChanged ()
|
||||||
|
|
||||||
void DBaseStatusBar::Tick ()
|
void DBaseStatusBar::Tick ()
|
||||||
{
|
{
|
||||||
DHUDMessage *msg = Messages;
|
for (int i = 0; i < countof(Messages); ++i)
|
||||||
DHUDMessage **prev = &Messages;
|
{
|
||||||
|
DHUDMessage *msg = Messages[i];
|
||||||
|
DHUDMessage **prev = &Messages[i];
|
||||||
|
|
||||||
while (msg)
|
while (msg)
|
||||||
{
|
{
|
||||||
|
@ -368,6 +371,7 @@ void DBaseStatusBar::Tick ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
@ -375,7 +379,7 @@ void DBaseStatusBar::Tick ()
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void DBaseStatusBar::AttachMessage (DHUDMessage *msg, DWORD id)
|
void DBaseStatusBar::AttachMessage (DHUDMessage *msg, DWORD id, int layer)
|
||||||
{
|
{
|
||||||
DHUDMessage *old = NULL;
|
DHUDMessage *old = NULL;
|
||||||
DHUDMessage **prev;
|
DHUDMessage **prev;
|
||||||
|
@ -387,7 +391,7 @@ void DBaseStatusBar::AttachMessage (DHUDMessage *msg, DWORD id)
|
||||||
old->Destroy();
|
old->Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
prev = &Messages;
|
prev = &Messages[layer];
|
||||||
|
|
||||||
// The ID serves as a priority, where lower numbers appear in front of
|
// The ID serves as a priority, where lower numbers appear in front of
|
||||||
// higher numbers. (i.e. The list is sorted in descending order, since
|
// higher numbers. (i.e. The list is sorted in descending order, since
|
||||||
|
@ -412,8 +416,10 @@ void DBaseStatusBar::AttachMessage (DHUDMessage *msg, DWORD id)
|
||||||
|
|
||||||
DHUDMessage *DBaseStatusBar::DetachMessage (DHUDMessage *msg)
|
DHUDMessage *DBaseStatusBar::DetachMessage (DHUDMessage *msg)
|
||||||
{
|
{
|
||||||
DHUDMessage *probe = Messages;
|
for (int i = 0; i < countof(Messages); ++i)
|
||||||
DHUDMessage **prev = &Messages;
|
{
|
||||||
|
DHUDMessage *probe = Messages[i];
|
||||||
|
DHUDMessage **prev = &Messages[i];
|
||||||
|
|
||||||
while (probe && probe != msg)
|
while (probe && probe != msg)
|
||||||
{
|
{
|
||||||
|
@ -429,14 +435,18 @@ DHUDMessage *DBaseStatusBar::DetachMessage (DHUDMessage *msg)
|
||||||
{
|
{
|
||||||
SB_state = screen->GetPageCount();
|
SB_state = screen->GetPageCount();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return probe;
|
return probe;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
DHUDMessage *DBaseStatusBar::DetachMessage (DWORD id)
|
DHUDMessage *DBaseStatusBar::DetachMessage (DWORD id)
|
||||||
{
|
{
|
||||||
DHUDMessage *probe = Messages;
|
for (int i = 0; i < countof(Messages); ++i)
|
||||||
DHUDMessage **prev = &Messages;
|
{
|
||||||
|
DHUDMessage *probe = Messages[i];
|
||||||
|
DHUDMessage **prev = &Messages[i];
|
||||||
|
|
||||||
while (probe && probe->SBarID != id)
|
while (probe && probe->SBarID != id)
|
||||||
{
|
{
|
||||||
|
@ -452,9 +462,11 @@ DHUDMessage *DBaseStatusBar::DetachMessage (DWORD id)
|
||||||
{
|
{
|
||||||
SB_state = screen->GetPageCount();
|
SB_state = screen->GetPageCount();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return probe;
|
return probe;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
@ -464,9 +476,11 @@ DHUDMessage *DBaseStatusBar::DetachMessage (DWORD id)
|
||||||
|
|
||||||
void DBaseStatusBar::DetachAllMessages ()
|
void DBaseStatusBar::DetachAllMessages ()
|
||||||
{
|
{
|
||||||
DHUDMessage *probe = Messages;
|
for (int i = 0; i < countof(Messages); ++i)
|
||||||
|
{
|
||||||
|
DHUDMessage *probe = Messages[i];
|
||||||
|
|
||||||
Messages = NULL;
|
Messages[i] = NULL;
|
||||||
while (probe != NULL)
|
while (probe != NULL)
|
||||||
{
|
{
|
||||||
DHUDMessage *next = probe->Next;
|
DHUDMessage *next = probe->Next;
|
||||||
|
@ -474,21 +488,6 @@ void DBaseStatusBar::DetachAllMessages ()
|
||||||
probe = next;
|
probe = next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// PROC CheckMessage
|
|
||||||
//
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
bool DBaseStatusBar::CheckMessage (DHUDMessage *msg)
|
|
||||||
{
|
|
||||||
DHUDMessage *probe = Messages;
|
|
||||||
while (probe && probe != msg)
|
|
||||||
{
|
|
||||||
probe = probe->Next;
|
|
||||||
}
|
|
||||||
return (probe == msg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -1191,13 +1190,23 @@ void DBaseStatusBar::FlashCrosshair ()
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void DBaseStatusBar::DrawMessages (int bottom)
|
void DBaseStatusBar::DrawMessages (int layer, int bottom)
|
||||||
{
|
{
|
||||||
DHUDMessage *msg = Messages;
|
DHUDMessage *msg = Messages[layer];
|
||||||
|
int visibility = 0;
|
||||||
|
|
||||||
|
if (viewactive)
|
||||||
|
{
|
||||||
|
visibility |= HUDMSG_NotWith3DView;
|
||||||
|
}
|
||||||
|
if (automapactive)
|
||||||
|
{
|
||||||
|
visibility |= viewactive ? HUDMSG_NotWithOverlayMap : HUDMSG_NotWithFullMap;
|
||||||
|
}
|
||||||
while (msg)
|
while (msg)
|
||||||
{
|
{
|
||||||
DHUDMessage *next = msg->Next;
|
DHUDMessage *next = msg->Next;
|
||||||
msg->Draw (bottom);
|
msg->Draw (bottom, visibility);
|
||||||
msg = next;
|
msg = next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1445,6 +1454,17 @@ void DBaseStatusBar::SetMugShotState(const char *stateName, bool waitTillDone, b
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// DrawBottomStuff
|
||||||
|
//
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void DBaseStatusBar::DrawBottomStuff (EHudState state)
|
||||||
|
{
|
||||||
|
DrawMessages (HUDMSGLayer_UnderHUD, (state == HUD_StatusBar) ? ::ST_Y : SCREENHEIGHT);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// DrawTopStuff
|
// DrawTopStuff
|
||||||
|
@ -1462,16 +1482,11 @@ void DBaseStatusBar::DrawTopStuff (EHudState state)
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawPowerups ();
|
DrawPowerups ();
|
||||||
|
if (automapactive && !viewactive)
|
||||||
if (state == HUD_StatusBar)
|
|
||||||
{
|
{
|
||||||
DrawMessages (::ST_Y);
|
DrawMessages (HUDMSGLayer_OverMap, (state == HUD_StatusBar) ? ::ST_Y : SCREENHEIGHT);
|
||||||
}
|
}
|
||||||
else
|
DrawMessages (HUDMSGLayer_OverHUD, (state == HUD_StatusBar) ? ::ST_Y : SCREENHEIGHT);
|
||||||
{
|
|
||||||
DrawMessages (SCREENHEIGHT);
|
|
||||||
}
|
|
||||||
|
|
||||||
DrawConsistancy ();
|
DrawConsistancy ();
|
||||||
if (ShowLog && MustDrawLog(state)) DrawLog ();
|
if (ShowLog && MustDrawLog(state)) DrawLog ();
|
||||||
|
|
||||||
|
@ -1597,7 +1612,18 @@ void DBaseStatusBar::ReceivedWeapon (AWeapon *weapon)
|
||||||
|
|
||||||
void DBaseStatusBar::Serialize (FArchive &arc)
|
void DBaseStatusBar::Serialize (FArchive &arc)
|
||||||
{
|
{
|
||||||
arc << Messages;
|
if (SaveVersion < 3821)
|
||||||
|
{
|
||||||
|
memset(Messages, 0, sizeof(Messages));
|
||||||
|
arc << Messages[HUDMSGLayer_Default];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (int i = 0; i < countof(Messages); ++i)
|
||||||
|
{
|
||||||
|
arc << Messages[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DBaseStatusBar::ScreenSizeChanged ()
|
void DBaseStatusBar::ScreenSizeChanged ()
|
||||||
|
@ -1605,13 +1631,16 @@ void DBaseStatusBar::ScreenSizeChanged ()
|
||||||
st_scale.Callback ();
|
st_scale.Callback ();
|
||||||
SB_state = screen->GetPageCount ();
|
SB_state = screen->GetPageCount ();
|
||||||
|
|
||||||
DHUDMessage *message = Messages;
|
for (int i = 0; i < countof(Messages); ++i)
|
||||||
|
{
|
||||||
|
DHUDMessage *message = Messages[i];
|
||||||
while (message != NULL)
|
while (message != NULL)
|
||||||
{
|
{
|
||||||
message->ScreenSizeChanged ();
|
message->ScreenSizeChanged ();
|
||||||
message = message->Next;
|
message = message->Next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
|
|
@ -86,9 +86,22 @@ FRandom pr_acs ("ACS");
|
||||||
#define STACK_SIZE 4096
|
#define STACK_SIZE 4096
|
||||||
|
|
||||||
#define CLAMPCOLOR(c) (EColorRange)((unsigned)(c) >= NUM_TEXT_COLORS ? CR_UNTRANSLATED : (c))
|
#define CLAMPCOLOR(c) (EColorRange)((unsigned)(c) >= NUM_TEXT_COLORS ? CR_UNTRANSLATED : (c))
|
||||||
|
#define LANGREGIONMASK MAKE_ID(0,0,0xff,0xff)
|
||||||
|
|
||||||
|
// HUD message flags
|
||||||
#define HUDMSG_LOG (0x80000000)
|
#define HUDMSG_LOG (0x80000000)
|
||||||
#define HUDMSG_COLORSTRING (0x40000000)
|
#define HUDMSG_COLORSTRING (0x40000000)
|
||||||
#define LANGREGIONMASK MAKE_ID(0,0,0xff,0xff)
|
#define HUDMSG_ADDBLEND (0x20000000)
|
||||||
|
|
||||||
|
// HUD message layers; these are not flags
|
||||||
|
#define HUDMSG_LAYER_SHIFT 12
|
||||||
|
#define HUDMSG_LAYER_MASK (0x0000F000)
|
||||||
|
// See HUDMSGLayer enumerations in sbar.h
|
||||||
|
|
||||||
|
// HUD message visibility flags
|
||||||
|
#define HUDMSG_VISIBILITY_SHIFT 16
|
||||||
|
#define HUDMSG_VISIBILITY_MASK (0x00070000)
|
||||||
|
// See HUDMSG visibility enumerations in sbar.h
|
||||||
|
|
||||||
// Flags for ReplaceTextures
|
// Flags for ReplaceTextures
|
||||||
#define NOT_BOTTOM 1
|
#define NOT_BOTTOM 1
|
||||||
|
@ -5681,7 +5694,7 @@ scriptwait:
|
||||||
color = CLAMPCOLOR(Stack[optstart-4]);
|
color = CLAMPCOLOR(Stack[optstart-4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (type & 0xFFFF)
|
switch (type & 0xFF)
|
||||||
{
|
{
|
||||||
default: // normal
|
default: // normal
|
||||||
msg = new DHUDMessage (activefont, work, x, y, hudwidth, hudheight, color, holdTime);
|
msg = new DHUDMessage (activefont, work, x, y, hudwidth, hudheight, color, holdTime);
|
||||||
|
@ -5707,7 +5720,9 @@ scriptwait:
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
StatusBar->AttachMessage (msg, id ? 0xff000000|id : 0);
|
msg->SetVisibility((type & HUDMSG_VISIBILITY_MASK) >> HUDMSG_VISIBILITY_SHIFT);
|
||||||
|
StatusBar->AttachMessage (msg, id ? 0xff000000|id : 0,
|
||||||
|
(type & HUDMSG_LAYER_MASK) >> HUDMSG_LAYER_SHIFT);
|
||||||
if (type & HUDMSG_LOG)
|
if (type & HUDMSG_LOG)
|
||||||
{
|
{
|
||||||
static const char bar[] = TEXTCOLOR_ORANGE "\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36"
|
static const char bar[] = TEXTCOLOR_ORANGE "\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36"
|
||||||
|
|
Loading…
Reference in a new issue