add ShowMasks
This commit is contained in:
@@ -1015,6 +1015,7 @@ Screen Test Mode=Screen Test Mode
|
|||||||
Send Off To Screen=Send Off To Screen
|
Send Off To Screen=Send Off To Screen
|
||||||
Send On To Screen=Send On To Screen
|
Send On To Screen=Send On To Screen
|
||||||
Send Notes Ended=Send Notes Ended
|
Send Notes Ended=Send Notes Ended
|
||||||
|
Show Masks=Show Masks
|
||||||
Slow=Slow
|
Slow=Slow
|
||||||
Song=Song
|
Song=Song
|
||||||
Tempo=Tempo
|
Tempo=Tempo
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
#include "MessageManager.h"
|
#include "MessageManager.h"
|
||||||
#include "LightsManager.h" // for NUM_CabinetLight
|
#include "LightsManager.h" // for NUM_CabinetLight
|
||||||
#include "ActorUtil.h"
|
#include "ActorUtil.h"
|
||||||
|
#include "Preference.h"
|
||||||
|
|
||||||
|
static Preference<bool> g_bShowMasks("ShowMasks", false);
|
||||||
|
|
||||||
/* It's useful to be able to construct a basic Actor in XML, in
|
/* It's useful to be able to construct a basic Actor in XML, in
|
||||||
* order to simply delay a Transition, or receive and send broadcasts.
|
* order to simply delay a Transition, or receive and send broadcasts.
|
||||||
@@ -500,7 +503,8 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
|
|||||||
void Actor::SetGlobalRenderStates()
|
void Actor::SetGlobalRenderStates()
|
||||||
{
|
{
|
||||||
// set Actor-defined render states
|
// set Actor-defined render states
|
||||||
DISPLAY->SetBlendMode( m_BlendMode );
|
if( !g_bShowMasks.Get() || m_BlendMode != BLEND_NO_EFFECT )
|
||||||
|
DISPLAY->SetBlendMode( m_BlendMode );
|
||||||
DISPLAY->SetZWrite( m_bZWrite );
|
DISPLAY->SetZWrite( m_bZWrite );
|
||||||
DISPLAY->SetZTestMode( m_ZTestMode );
|
DISPLAY->SetZTestMode( m_ZTestMode );
|
||||||
|
|
||||||
|
|||||||
@@ -483,6 +483,7 @@ static LocalizedString RENDERING_STATS ( "ScreenDebugOverlay", "Rendering Stats
|
|||||||
static LocalizedString VSYNC ( "ScreenDebugOverlay", "Vsync" );
|
static LocalizedString VSYNC ( "ScreenDebugOverlay", "Vsync" );
|
||||||
static LocalizedString MULTITEXTURE ( "ScreenDebugOverlay", "Multitexture" );
|
static LocalizedString MULTITEXTURE ( "ScreenDebugOverlay", "Multitexture" );
|
||||||
static LocalizedString SCREEN_TEST_MODE ( "ScreenDebugOverlay", "Screen Test Mode" );
|
static LocalizedString SCREEN_TEST_MODE ( "ScreenDebugOverlay", "Screen Test Mode" );
|
||||||
|
static LocalizedString SCREEN_SHOW_MASKS ( "ScreenDebugOverlay", "Show Masks" );
|
||||||
static LocalizedString PROFILE ( "ScreenDebugOverlay", "Profile" );
|
static LocalizedString PROFILE ( "ScreenDebugOverlay", "Profile" );
|
||||||
static LocalizedString CLEAR_PROFILE_STATS ( "ScreenDebugOverlay", "Clear Profile Stats" );
|
static LocalizedString CLEAR_PROFILE_STATS ( "ScreenDebugOverlay", "Clear Profile Stats" );
|
||||||
static LocalizedString FILL_PROFILE_STATS ( "ScreenDebugOverlay", "Fill Profile Stats" );
|
static LocalizedString FILL_PROFILE_STATS ( "ScreenDebugOverlay", "Fill Profile Stats" );
|
||||||
@@ -711,6 +712,27 @@ class DebugLineScreenTestMode : public IDebugLine
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class DebugLineShowMasks : public IDebugLine
|
||||||
|
{
|
||||||
|
virtual RString GetDisplayTitle() { return SCREEN_SHOW_MASKS.GetValue(); }
|
||||||
|
virtual bool IsEnabled() { return GetPref()->Get(); }
|
||||||
|
virtual RString GetPageName() const { return "Theme"; }
|
||||||
|
virtual void DoAndMakeSystemMessage( RString &sMessageOut )
|
||||||
|
{
|
||||||
|
GetPref()->Set( !GetPref()->Get() );
|
||||||
|
IDebugLine::DoAndMakeSystemMessage( sMessageOut );
|
||||||
|
}
|
||||||
|
|
||||||
|
Preference<bool> *GetPref()
|
||||||
|
{
|
||||||
|
IPreference *pPref = IPreference::GetPreferenceByName("ShowMasks");
|
||||||
|
ASSERT( pPref );
|
||||||
|
Preference<bool> *pRet = dynamic_cast<Preference<bool> *>(pPref);
|
||||||
|
ASSERT( pRet );
|
||||||
|
return pRet;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
static ProfileSlot g_ProfileSlot = ProfileSlot_Machine;
|
static ProfileSlot g_ProfileSlot = ProfileSlot_Machine;
|
||||||
static bool IsSelectProfilePersistent()
|
static bool IsSelectProfilePersistent()
|
||||||
{
|
{
|
||||||
@@ -1072,6 +1094,7 @@ DECLARE_ONE( DebugLineStats );
|
|||||||
DECLARE_ONE( DebugLineVsync );
|
DECLARE_ONE( DebugLineVsync );
|
||||||
DECLARE_ONE( DebugLineAllowMultitexture );
|
DECLARE_ONE( DebugLineAllowMultitexture );
|
||||||
DECLARE_ONE( DebugLineScreenTestMode );
|
DECLARE_ONE( DebugLineScreenTestMode );
|
||||||
|
DECLARE_ONE( DebugLineShowMasks );
|
||||||
DECLARE_ONE( DebugLineProfileSlot );
|
DECLARE_ONE( DebugLineProfileSlot );
|
||||||
DECLARE_ONE( DebugLineClearProfileStats );
|
DECLARE_ONE( DebugLineClearProfileStats );
|
||||||
DECLARE_ONE( DebugLineFillProfileStats );
|
DECLARE_ONE( DebugLineFillProfileStats );
|
||||||
|
|||||||
Reference in New Issue
Block a user