mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- Blends created with the ACS fade commands now degrade to transparent overlays
when the menu is visible, so they can no longer obscure the menu. SVN r87 (trunk)
This commit is contained in:
parent
fa2ef4611b
commit
201e17082c
6 changed files with 34 additions and 8 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
May 8, 2006
|
||||||
|
- Blends created with the ACS fade commands now degrade to transparent overlays
|
||||||
|
when the menu is visible, so they can no longer obscure the menu.
|
||||||
|
|
||||||
May 7, 2006 (Changes by Graf Zahl)
|
May 7, 2006 (Changes by Graf Zahl)
|
||||||
- Added a misc/secret sound definition for Heretic.
|
- Added a misc/secret sound definition for Heretic.
|
||||||
- Fixed: Powered up weapons were not properly deselected when the level ended
|
- Fixed: Powered up weapons were not properly deselected when the level ended
|
||||||
|
|
|
@ -175,6 +175,8 @@ public:
|
||||||
fixed_t GetDisplacement () { return Displacement; }
|
fixed_t GetDisplacement () { return Displacement; }
|
||||||
int GetPlayer ();
|
int GetPlayer ();
|
||||||
|
|
||||||
|
static void AddBlend (float r, float g, float b, float a, float v_blend[4]);
|
||||||
|
|
||||||
virtual void Serialize (FArchive &arc);
|
virtual void Serialize (FArchive &arc);
|
||||||
|
|
||||||
virtual void Tick ();
|
virtual void Tick ();
|
||||||
|
@ -213,8 +215,6 @@ protected:
|
||||||
|
|
||||||
void GetCurrentAmmo (AAmmo *&ammo1, AAmmo *&ammo2, int &ammocount1, int &ammocount2) const;
|
void GetCurrentAmmo (AAmmo *&ammo1, AAmmo *&ammo2, int &ammocount1, int &ammocount2) const;
|
||||||
|
|
||||||
static void AddBlend (float r, float g, float b, float a, float v_blend[4]);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AInventory *ValidateInvFirst (int numVisible) const;
|
AInventory *ValidateInvFirst (int numVisible) const;
|
||||||
void DrawCrosshair ();
|
void DrawCrosshair ();
|
||||||
|
|
|
@ -1370,7 +1370,7 @@ void FBaseStatusBar::BlendView (float blend[4])
|
||||||
AddBlend (0.25f, 0.25f, 0.853f, 0.4f, blend);
|
AddBlend (0.25f, 0.25f, 0.853f, 0.4f, blend);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CPlayer->camera != NULL)
|
if (CPlayer->camera != NULL && menuactive == MENU_Off)
|
||||||
{
|
{
|
||||||
player_t *player = (CPlayer->camera->player != NULL) ? CPlayer->camera->player : CPlayer;
|
player_t *player = (CPlayer->camera->player != NULL) ? CPlayer->camera->player : CPlayer;
|
||||||
AddBlend (player->BlendR, player->BlendG, player->BlendB, player->BlendA, blend);
|
AddBlend (player->BlendR, player->BlendG, player->BlendB, player->BlendA, blend);
|
||||||
|
|
|
@ -2851,11 +2851,22 @@ void M_StartControlPanel (bool makeSound)
|
||||||
void M_Drawer ()
|
void M_Drawer ()
|
||||||
{
|
{
|
||||||
int i, x, y, max;
|
int i, x, y, max;
|
||||||
|
PalEntry fade = 0;
|
||||||
|
|
||||||
|
const player_t *player = &players[consoleplayer];
|
||||||
|
if (player->camera != NULL)
|
||||||
|
{
|
||||||
|
if (player->camera->player != NULL)
|
||||||
|
{
|
||||||
|
player = player->camera->player;
|
||||||
|
}
|
||||||
|
fade = PalEntry (BYTE(player->BlendA*255), BYTE(player->BlendR*255), BYTE(player->BlendG*255), BYTE(player->BlendB*255));
|
||||||
|
}
|
||||||
|
|
||||||
// Horiz. & Vertically center string and print it.
|
// Horiz. & Vertically center string and print it.
|
||||||
if (messageToPrint)
|
if (messageToPrint)
|
||||||
{
|
{
|
||||||
screen->Dim ();
|
screen->Dim (fade);
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
BorderNeedRefresh = screen->GetPageCount ();
|
||||||
SB_state = screen->GetPageCount ();
|
SB_state = screen->GetPageCount ();
|
||||||
|
|
||||||
|
@ -2878,7 +2889,7 @@ void M_Drawer ()
|
||||||
{
|
{
|
||||||
if (InfoType == 0 && !OptionsActive)
|
if (InfoType == 0 && !OptionsActive)
|
||||||
{
|
{
|
||||||
screen->Dim ();
|
screen->Dim (fade);
|
||||||
}
|
}
|
||||||
// For Heretic shareware message:
|
// For Heretic shareware message:
|
||||||
if (showSharewareMessage)
|
if (showSharewareMessage)
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
#include "cmdlib.h"
|
#include "cmdlib.h"
|
||||||
#include "gi.h"
|
#include "gi.h"
|
||||||
#include "templates.h"
|
#include "templates.h"
|
||||||
|
#include "sbar.h"
|
||||||
|
|
||||||
IMPLEMENT_ABSTRACT_CLASS (DCanvas)
|
IMPLEMENT_ABSTRACT_CLASS (DCanvas)
|
||||||
IMPLEMENT_ABSTRACT_CLASS (DFrameBuffer)
|
IMPLEMENT_ABSTRACT_CLASS (DFrameBuffer)
|
||||||
|
@ -196,8 +197,9 @@ void DCanvas::Clear (int left, int top, int right, int bottom, int color) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DCanvas::Dim () const
|
void DCanvas::Dim (PalEntry color) const
|
||||||
{
|
{
|
||||||
|
PalEntry dimmer;
|
||||||
float amount = dimamount;
|
float amount = dimamount;
|
||||||
|
|
||||||
if (gameinfo.gametype == GAME_Hexen && gamestate == GS_DEMOSCREEN)
|
if (gameinfo.gametype == GAME_Hexen && gamestate == GS_DEMOSCREEN)
|
||||||
|
@ -205,7 +207,16 @@ void DCanvas::Dim () const
|
||||||
// enough to make the menus readable.
|
// enough to make the menus readable.
|
||||||
amount = MIN<float> (1.f, amount*2.f);
|
amount = MIN<float> (1.f, amount*2.f);
|
||||||
}
|
}
|
||||||
Dim (PalEntry(dimcolor), amount, 0, 0, Width, Height);
|
dimmer = PalEntry(dimcolor);
|
||||||
|
// Add the cvar's dimming on top of the color passed to the function
|
||||||
|
if (color.a != 0)
|
||||||
|
{
|
||||||
|
float dim[4] = { color.r/255.f, color.g/255.f, color.b/255.f, color.a/255.f };
|
||||||
|
FBaseStatusBar::AddBlend (dimmer.r/255.f, dimmer.g/255.f, dimmer.b/255.f, amount, dim);
|
||||||
|
dimmer = PalEntry (BYTE(dim[0]*255), BYTE(dim[1]*255), BYTE(dim[2]*255));
|
||||||
|
amount = dim[3];
|
||||||
|
}
|
||||||
|
Dim (dimmer, amount, 0, 0, Width, Height);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DCanvas::Dim (PalEntry color, float damount, int x1, int y1, int w, int h) const
|
void DCanvas::Dim (PalEntry color, float damount, int x1, int y1, int w, int h) const
|
||||||
|
|
|
@ -149,7 +149,7 @@ public:
|
||||||
virtual void GetBlock (int x, int y, int width, int height, byte *dest) const;
|
virtual void GetBlock (int x, int y, int width, int height, byte *dest) const;
|
||||||
|
|
||||||
// Dim the entire canvas for the menus
|
// Dim the entire canvas for the menus
|
||||||
virtual void Dim () const;
|
virtual void Dim (PalEntry color = 0) const;
|
||||||
|
|
||||||
// Dim part of the canvas
|
// Dim part of the canvas
|
||||||
virtual void Dim (PalEntry color, float amount, int x1, int y1, int w, int h) const;
|
virtual void Dim (PalEntry color, float amount, int x1, int y1, int w, int h) const;
|
||||||
|
|
Loading…
Reference in a new issue