2005-05-16 10:10:08 +00:00
|
|
|
#include "global.h"
|
|
|
|
|
#include "ScreenDebugOverlay.h"
|
|
|
|
|
#include "ScreenDimensions.h"
|
2005-07-20 09:48:19 +00:00
|
|
|
#include "ScreenManager.h"
|
2005-05-16 10:10:08 +00:00
|
|
|
#include "PrefsManager.h"
|
|
|
|
|
#include "RageLog.h"
|
|
|
|
|
#include "GameState.h"
|
|
|
|
|
#include "PlayerState.h"
|
|
|
|
|
#include "StepMania.h"
|
|
|
|
|
#include "GameCommand.h"
|
|
|
|
|
#include "ScreenGameplay.h"
|
2005-05-16 22:23:20 +00:00
|
|
|
#include "RageSoundManager.h"
|
2005-05-19 23:29:39 +00:00
|
|
|
#include "GameSoundManager.h"
|
|
|
|
|
#include "RageTextureManager.h"
|
2005-06-15 23:54:59 +00:00
|
|
|
#include "MemoryCardManager.h"
|
2005-05-19 23:29:39 +00:00
|
|
|
#include "NoteSkinManager.h"
|
|
|
|
|
#include "Bookkeeper.h"
|
|
|
|
|
#include "ProfileManager.h"
|
|
|
|
|
#include "CodeDetector.h"
|
2005-08-17 05:56:59 +00:00
|
|
|
#include "RageInput.h"
|
2005-08-17 23:53:02 +00:00
|
|
|
#include "RageDisplay.h"
|
2005-09-05 02:26:50 +00:00
|
|
|
#include "InputEventPlus.h"
|
2005-12-22 03:10:04 +00:00
|
|
|
#include "LocalizedString.h"
|
2006-01-18 10:09:34 +00:00
|
|
|
#include "Profile.h"
|
|
|
|
|
#include "SongManager.h"
|
2006-01-24 04:10:21 +00:00
|
|
|
#include "GameLoop.h"
|
2006-03-18 11:59:41 +00:00
|
|
|
#include "ScreenServiceAction.h"
|
2005-05-16 10:10:08 +00:00
|
|
|
|
|
|
|
|
static bool g_bIsDisplayed = false;
|
|
|
|
|
static bool g_bIsSlow = false;
|
|
|
|
|
static bool g_bIsHalt = false;
|
|
|
|
|
static RageTimer g_HaltTimer(RageZeroTimer);
|
2005-08-17 23:53:02 +00:00
|
|
|
static float g_fImageScaleCurrent = 1;
|
|
|
|
|
static float g_fImageScaleDestination = 1;
|
2005-08-16 23:23:49 +00:00
|
|
|
|
2006-04-24 22:52:33 +00:00
|
|
|
Preference<bool> g_bAllowFastAndSlow ("AllowFastAndSlow", true);
|
|
|
|
|
|
2005-08-16 23:23:49 +00:00
|
|
|
//
|
|
|
|
|
// self-registering debug lines
|
2006-01-24 04:18:05 +00:00
|
|
|
// We don't use SubscriptionManager, because we want to keep the line order.
|
2005-08-16 23:23:49 +00:00
|
|
|
//
|
|
|
|
|
class IDebugLine;
|
2006-01-24 04:18:05 +00:00
|
|
|
static vector<IDebugLine*> *g_pvpSubscribers = NULL;
|
2005-08-16 23:23:49 +00:00
|
|
|
class IDebugLine
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
IDebugLine()
|
|
|
|
|
{
|
2006-01-24 04:18:05 +00:00
|
|
|
if( g_pvpSubscribers == NULL )
|
|
|
|
|
g_pvpSubscribers = new vector<IDebugLine*>;
|
|
|
|
|
g_pvpSubscribers->push_back( this );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
2006-01-24 04:18:05 +00:00
|
|
|
virtual ~IDebugLine() { }
|
2006-04-04 21:55:06 +00:00
|
|
|
enum Type { all_screens, gameplay_only, editor_gameplay_only };
|
|
|
|
|
virtual Type GetType() const { return all_screens; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() = 0;
|
|
|
|
|
virtual RString GetValue() = 0;
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() = 0;
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-17 10:16:06 +00:00
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
RString s1 = GetDescription();
|
|
|
|
|
RString s2 = GetValue();
|
2005-08-17 10:16:06 +00:00
|
|
|
if( !s2.empty() )
|
|
|
|
|
s1 += " - ";
|
|
|
|
|
sMessageOut = s1 + s2;
|
|
|
|
|
};
|
2006-01-24 06:34:53 +00:00
|
|
|
|
|
|
|
|
DeviceInput m_Button;
|
2005-08-16 23:23:49 +00:00
|
|
|
};
|
|
|
|
|
|
2005-05-19 23:29:39 +00:00
|
|
|
static bool IsGameplay()
|
|
|
|
|
{
|
|
|
|
|
return SCREENMAN && SCREENMAN->GetTopScreen() && SCREENMAN->GetTopScreen()->GetScreenType() == gameplay;
|
|
|
|
|
}
|
|
|
|
|
|
2006-04-04 21:55:06 +00:00
|
|
|
static bool IsEditorGameplay()
|
|
|
|
|
{
|
|
|
|
|
if( IsGameplay() )
|
|
|
|
|
{
|
|
|
|
|
RString s = SCREENMAN->GetTopScreen()->GetName();
|
|
|
|
|
if( s.find("ScreenEdit") != s.npos )
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2005-08-16 23:23:49 +00:00
|
|
|
|
2006-01-15 20:46:15 +00:00
|
|
|
REGISTER_SCREEN_CLASS( ScreenDebugOverlay );
|
2005-05-16 10:10:08 +00:00
|
|
|
|
|
|
|
|
ScreenDebugOverlay::~ScreenDebugOverlay()
|
|
|
|
|
{
|
2005-08-16 23:23:49 +00:00
|
|
|
this->RemoveAllChildren();
|
|
|
|
|
|
|
|
|
|
FOREACH( BitmapText*, m_vptextButton, p )
|
|
|
|
|
SAFE_DELETE( *p );
|
|
|
|
|
m_vptextButton.clear();
|
|
|
|
|
FOREACH( BitmapText*, m_vptextFunction, p )
|
|
|
|
|
SAFE_DELETE( *p );
|
|
|
|
|
m_vptextFunction.clear();
|
2005-05-16 10:10:08 +00:00
|
|
|
}
|
|
|
|
|
|
2005-08-16 23:23:49 +00:00
|
|
|
const int MAX_DEBUG_LINES = 30;
|
2005-05-16 10:10:08 +00:00
|
|
|
struct MapDebugToDI
|
|
|
|
|
{
|
2005-08-16 19:56:37 +00:00
|
|
|
DeviceInput holdForDebug1;
|
|
|
|
|
DeviceInput holdForDebug2;
|
2006-01-24 06:18:09 +00:00
|
|
|
DeviceInput holdForSlow;
|
|
|
|
|
DeviceInput holdForFast;
|
2005-08-16 23:23:49 +00:00
|
|
|
DeviceInput debugButton[MAX_DEBUG_LINES];
|
|
|
|
|
DeviceInput gameplayButton[MAX_DEBUG_LINES];
|
2005-05-16 10:10:08 +00:00
|
|
|
void Clear()
|
|
|
|
|
{
|
2005-08-16 19:56:37 +00:00
|
|
|
holdForDebug1.MakeInvalid();
|
|
|
|
|
holdForDebug2.MakeInvalid();
|
2006-01-24 06:18:09 +00:00
|
|
|
holdForSlow.MakeInvalid();
|
|
|
|
|
holdForFast.MakeInvalid();
|
2005-08-16 23:23:49 +00:00
|
|
|
for( int i=0; i<MAX_DEBUG_LINES; i++ )
|
2005-05-19 23:29:39 +00:00
|
|
|
{
|
|
|
|
|
debugButton[i].MakeInvalid();
|
|
|
|
|
gameplayButton[i].MakeInvalid();
|
|
|
|
|
}
|
2005-05-16 10:10:08 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
static MapDebugToDI g_Mappings;
|
|
|
|
|
|
2006-01-08 18:40:20 +00:00
|
|
|
static LocalizedString IN_GAMEPLAY( "ScreenDebugOverlay", "%s in gameplay" );
|
2006-04-04 21:55:06 +00:00
|
|
|
static LocalizedString IN_EDITOR_GAMEPLAY( "ScreenDebugOverlay", "%s in editor gameplay" );
|
2006-01-08 18:40:20 +00:00
|
|
|
static LocalizedString OR( "ScreenDebugOverlay", "or" );
|
2006-01-24 06:34:53 +00:00
|
|
|
static RString GetDebugButtonName( const IDebugLine *pLine )
|
2005-05-16 10:10:08 +00:00
|
|
|
{
|
2006-04-04 21:55:06 +00:00
|
|
|
RString s = INPUTMAN->GetDeviceSpecificInputString(pLine->m_Button);
|
|
|
|
|
switch( pLine->GetType() )
|
|
|
|
|
{
|
|
|
|
|
case IDebugLine::all_screens:
|
|
|
|
|
return s;
|
|
|
|
|
case IDebugLine::gameplay_only:
|
|
|
|
|
return ssprintf( IN_GAMEPLAY.GetValue(), s.c_str() );
|
|
|
|
|
case IDebugLine::editor_gameplay_only:
|
|
|
|
|
return ssprintf( IN_EDITOR_GAMEPLAY.GetValue(), s.c_str() );
|
|
|
|
|
default:
|
|
|
|
|
ASSERT(0);
|
|
|
|
|
}
|
2005-05-16 10:10:08 +00:00
|
|
|
}
|
|
|
|
|
|
2006-03-09 22:59:29 +00:00
|
|
|
static LocalizedString DEBUG_MENU( "ScreenDebugOverlay", "Debug Menu" );
|
2005-05-16 10:10:08 +00:00
|
|
|
void ScreenDebugOverlay::Init()
|
|
|
|
|
{
|
|
|
|
|
Screen::Init();
|
|
|
|
|
|
|
|
|
|
// Init debug mappings
|
|
|
|
|
// TODO: Arch-specific?
|
|
|
|
|
{
|
|
|
|
|
g_Mappings.Clear();
|
|
|
|
|
|
2005-08-16 19:56:37 +00:00
|
|
|
g_Mappings.holdForDebug1 = DeviceInput(DEVICE_KEYBOARD, KEY_F3);
|
|
|
|
|
g_Mappings.holdForDebug2.MakeInvalid();
|
2006-04-24 22:52:33 +00:00
|
|
|
if( g_bAllowFastAndSlow )
|
|
|
|
|
{
|
|
|
|
|
g_Mappings.holdForSlow = DeviceInput(DEVICE_KEYBOARD, KEY_ACCENT);
|
|
|
|
|
g_Mappings.holdForFast = DeviceInput(DEVICE_KEYBOARD, KEY_TAB);
|
|
|
|
|
}
|
2006-01-24 06:18:09 +00:00
|
|
|
|
2005-05-19 23:29:39 +00:00
|
|
|
|
2005-11-07 03:59:05 +00:00
|
|
|
int i=0;
|
|
|
|
|
g_Mappings.gameplayButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_F8);
|
|
|
|
|
g_Mappings.gameplayButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_F7);
|
|
|
|
|
g_Mappings.gameplayButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_F6);
|
2006-01-24 06:34:53 +00:00
|
|
|
i=0;
|
2005-11-07 03:59:05 +00:00
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_C1);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_C2);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_C3);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_C4);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_C5);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_C6);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_C7);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_C8);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_C9);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_C0);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_Cq);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_Cw);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_Ce);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_Cr);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_Ct);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_Cy);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_Cu);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_Ci);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_Co);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_UP);
|
|
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_DOWN);
|
2006-02-11 03:47:42 +00:00
|
|
|
g_Mappings.debugButton[i++] = DeviceInput(DEVICE_KEYBOARD, KEY_BACK);
|
2005-05-16 10:10:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-01-24 06:34:53 +00:00
|
|
|
int iNextGameplayButton = 0;
|
|
|
|
|
int iNextDebugButton = 0;
|
|
|
|
|
FOREACH( IDebugLine*, *g_pvpSubscribers, p )
|
|
|
|
|
{
|
2006-04-04 21:55:06 +00:00
|
|
|
switch( (*p)->GetType() )
|
|
|
|
|
{
|
|
|
|
|
case IDebugLine::all_screens:
|
2006-01-24 06:34:53 +00:00
|
|
|
(*p)->m_Button = g_Mappings.debugButton[iNextDebugButton++];
|
2006-04-04 21:55:06 +00:00
|
|
|
break;
|
|
|
|
|
case IDebugLine::gameplay_only:
|
|
|
|
|
case IDebugLine::editor_gameplay_only:
|
|
|
|
|
(*p)->m_Button = g_Mappings.gameplayButton[iNextGameplayButton++];
|
|
|
|
|
break;
|
|
|
|
|
}
|
2006-01-24 06:34:53 +00:00
|
|
|
}
|
|
|
|
|
|
2005-05-16 10:10:08 +00:00
|
|
|
m_Quad.StretchTo( RectF( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT ) );
|
|
|
|
|
m_Quad.SetDiffuse( RageColor(0, 0, 0, 0.5f) );
|
|
|
|
|
this->AddChild( &m_Quad );
|
|
|
|
|
|
2005-09-03 02:08:27 +00:00
|
|
|
m_textHeader.LoadFromFont( THEME->GetPathF("Common", "normal") );
|
2005-05-19 23:29:39 +00:00
|
|
|
m_textHeader.SetHorizAlign( Actor::align_left );
|
|
|
|
|
m_textHeader.SetX( SCREEN_LEFT+20 );
|
|
|
|
|
m_textHeader.SetY( SCREEN_TOP+20 );
|
|
|
|
|
m_textHeader.SetZoom( 1.0f );
|
2006-03-09 22:59:29 +00:00
|
|
|
m_textHeader.SetText( DEBUG_MENU );
|
2005-05-19 23:29:39 +00:00
|
|
|
this->AddChild( &m_textHeader );
|
2005-05-16 10:10:08 +00:00
|
|
|
|
2006-01-24 04:18:05 +00:00
|
|
|
FOREACH_CONST( IDebugLine*, *g_pvpSubscribers, p )
|
2005-05-16 10:10:08 +00:00
|
|
|
{
|
2005-08-17 09:40:35 +00:00
|
|
|
{
|
|
|
|
|
BitmapText *pT1 = new BitmapText;
|
2005-09-03 02:08:27 +00:00
|
|
|
pT1->LoadFromFont( THEME->GetPathF("Common", "normal") );
|
2005-08-17 09:40:35 +00:00
|
|
|
pT1->SetHorizAlign( Actor::align_right );
|
|
|
|
|
pT1->SetText( "blah" );
|
|
|
|
|
pT1->SetShadowLength( 2 );
|
|
|
|
|
m_vptextButton.push_back( pT1 );
|
|
|
|
|
this->AddChild( pT1 );
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
BitmapText *pT2 = new BitmapText;
|
2005-09-03 02:08:27 +00:00
|
|
|
pT2->LoadFromFont( THEME->GetPathF("Common", "normal") );
|
2005-08-17 09:40:35 +00:00
|
|
|
pT2->SetHorizAlign( Actor::align_left );
|
|
|
|
|
pT2->SetText( "blah" );
|
|
|
|
|
pT2->SetShadowLength( 2 );
|
|
|
|
|
m_vptextFunction.push_back( pT2 );
|
|
|
|
|
this->AddChild( pT2 );
|
|
|
|
|
}
|
2005-05-16 10:10:08 +00:00
|
|
|
}
|
|
|
|
|
|
2005-08-16 23:23:49 +00:00
|
|
|
Update( 0 );
|
2005-05-16 10:10:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ScreenDebugOverlay::Update( float fDeltaTime )
|
|
|
|
|
{
|
2006-01-24 04:10:21 +00:00
|
|
|
{
|
|
|
|
|
float fRate = 1;
|
2006-01-24 06:18:09 +00:00
|
|
|
if( INPUTFILTER->IsBeingPressed(g_Mappings.holdForFast) )
|
2006-01-24 04:10:21 +00:00
|
|
|
{
|
2006-01-24 06:18:09 +00:00
|
|
|
if( INPUTFILTER->IsBeingPressed(g_Mappings.holdForSlow) )
|
2006-01-24 04:10:21 +00:00
|
|
|
fRate = 0; /* both; stop time */
|
|
|
|
|
else
|
|
|
|
|
fRate *= 4;
|
|
|
|
|
}
|
2006-01-24 06:18:09 +00:00
|
|
|
else if( INPUTFILTER->IsBeingPressed(g_Mappings.holdForSlow) )
|
2006-01-24 04:10:21 +00:00
|
|
|
{
|
|
|
|
|
fRate /= 4;
|
|
|
|
|
}
|
|
|
|
|
|
2006-01-24 04:44:15 +00:00
|
|
|
if( g_bIsHalt )
|
|
|
|
|
fRate = 0;
|
|
|
|
|
else if( g_bIsSlow )
|
|
|
|
|
fRate /= 4;
|
|
|
|
|
|
2006-01-24 04:10:21 +00:00
|
|
|
GameLoop::SetUpdateRate( fRate );
|
|
|
|
|
}
|
|
|
|
|
|
2005-08-17 23:53:02 +00:00
|
|
|
bool bCenteringNeedsUpdate = g_fImageScaleCurrent != g_fImageScaleDestination;
|
|
|
|
|
fapproach( g_fImageScaleCurrent, g_fImageScaleDestination, fDeltaTime );
|
|
|
|
|
if( bCenteringNeedsUpdate )
|
|
|
|
|
{
|
|
|
|
|
DISPLAY->ChangeCentering(
|
|
|
|
|
PREFSMAN->m_iCenterImageTranslateX,
|
|
|
|
|
PREFSMAN->m_iCenterImageTranslateY,
|
2005-08-18 00:07:34 +00:00
|
|
|
PREFSMAN->m_fCenterImageAddWidth - (int)SCREEN_WIDTH + (int)(g_fImageScaleCurrent*SCREEN_WIDTH),
|
|
|
|
|
PREFSMAN->m_fCenterImageAddHeight - (int)SCREEN_HEIGHT + (int)(g_fImageScaleCurrent*SCREEN_HEIGHT) );
|
2005-08-17 23:53:02 +00:00
|
|
|
}
|
|
|
|
|
|
2005-05-16 10:10:08 +00:00
|
|
|
Screen::Update(fDeltaTime);
|
|
|
|
|
|
2005-08-17 09:40:35 +00:00
|
|
|
this->SetVisible( g_bIsDisplayed );
|
2005-05-16 10:10:08 +00:00
|
|
|
if( !g_bIsDisplayed )
|
|
|
|
|
return;
|
|
|
|
|
|
2005-05-18 07:15:56 +00:00
|
|
|
UpdateText();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ScreenDebugOverlay::UpdateText()
|
|
|
|
|
{
|
2005-05-16 10:10:08 +00:00
|
|
|
/* Highlight options that aren't the default. */
|
|
|
|
|
const RageColor off(0.6f, 0.6f, 0.6f, 1.0f);
|
|
|
|
|
const RageColor on(1, 1, 1, 1);
|
|
|
|
|
|
2006-01-24 04:18:05 +00:00
|
|
|
const unsigned NUM_DEBUG_LINES = g_pvpSubscribers->size();
|
|
|
|
|
FOREACH_CONST( IDebugLine*, *g_pvpSubscribers, p )
|
2005-05-16 10:10:08 +00:00
|
|
|
{
|
2006-01-24 04:18:05 +00:00
|
|
|
int i = p-g_pvpSubscribers->begin();
|
2006-03-10 22:45:57 +00:00
|
|
|
float fOffsetFromCenterIndex = i - (NUM_DEBUG_LINES-1)/2.0f;
|
|
|
|
|
float fY = SCREEN_CENTER_Y+10 + fOffsetFromCenterIndex * 16;
|
2006-01-24 04:18:05 +00:00
|
|
|
|
2005-08-16 23:23:49 +00:00
|
|
|
BitmapText &txt1 = *m_vptextButton[i];
|
2005-05-19 23:29:39 +00:00
|
|
|
txt1.SetX( SCREEN_CENTER_X-50 );
|
2006-03-10 22:45:57 +00:00
|
|
|
txt1.SetY( fY );
|
2005-05-19 23:29:39 +00:00
|
|
|
txt1.SetZoom( 0.7f );
|
|
|
|
|
|
2005-08-16 23:23:49 +00:00
|
|
|
BitmapText &txt2 = *m_vptextFunction[i];
|
2005-05-19 23:29:39 +00:00
|
|
|
txt2.SetX( SCREEN_CENTER_X-30 );
|
2006-03-10 22:45:57 +00:00
|
|
|
txt2.SetY( fY );
|
2005-05-19 23:29:39 +00:00
|
|
|
txt2.SetZoom( 0.7f );
|
2005-05-16 10:10:08 +00:00
|
|
|
|
2006-01-22 01:00:06 +00:00
|
|
|
RString s1 = (*p)->GetDescription();
|
|
|
|
|
RString s2 = (*p)->GetValue();
|
2005-05-16 10:10:08 +00:00
|
|
|
|
2005-08-16 23:23:49 +00:00
|
|
|
bool bOn = (*p)->IsEnabled();
|
2005-05-16 22:23:20 +00:00
|
|
|
|
2005-05-19 23:29:39 +00:00
|
|
|
txt1.SetDiffuse( bOn ? on:off );
|
|
|
|
|
txt2.SetDiffuse( bOn ? on:off );
|
2005-05-16 22:23:20 +00:00
|
|
|
|
2006-01-24 06:34:53 +00:00
|
|
|
RString sButton = GetDebugButtonName( *p );
|
2005-05-16 22:23:20 +00:00
|
|
|
if( !sButton.empty() )
|
|
|
|
|
sButton += ": ";
|
2005-05-19 23:29:39 +00:00
|
|
|
txt1.SetText( sButton );
|
2005-05-16 22:23:20 +00:00
|
|
|
if( !s2.empty() )
|
|
|
|
|
s1 += " - ";
|
2005-05-19 23:29:39 +00:00
|
|
|
txt2.SetText( s1 + s2 );
|
2005-05-16 10:10:08 +00:00
|
|
|
}
|
|
|
|
|
|
2006-01-24 04:41:47 +00:00
|
|
|
if( g_bIsHalt )
|
|
|
|
|
{
|
2005-05-16 10:10:08 +00:00
|
|
|
/* More than once I've paused the game accidentally and wasted time
|
|
|
|
|
* figuring out why, so warn. */
|
|
|
|
|
if( g_HaltTimer.Ago() >= 5.0f )
|
|
|
|
|
{
|
|
|
|
|
g_HaltTimer.Touch();
|
|
|
|
|
LOG->Warn( "Game halted" );
|
|
|
|
|
}
|
2006-01-24 04:41:47 +00:00
|
|
|
}
|
2005-05-16 10:10:08 +00:00
|
|
|
}
|
|
|
|
|
|
2005-09-05 02:26:50 +00:00
|
|
|
bool ScreenDebugOverlay::OverlayInput( const InputEventPlus &input )
|
2005-05-16 10:10:08 +00:00
|
|
|
{
|
2005-09-05 02:26:50 +00:00
|
|
|
if( input.DeviceI == g_Mappings.holdForDebug1 ||
|
|
|
|
|
input.DeviceI == g_Mappings.holdForDebug2 )
|
2005-05-16 10:10:08 +00:00
|
|
|
{
|
2005-08-16 19:56:37 +00:00
|
|
|
bool bHoldingBoth =
|
|
|
|
|
(!g_Mappings.holdForDebug1.IsValid() || INPUTFILTER->IsBeingPressed(g_Mappings.holdForDebug1)) &&
|
|
|
|
|
(!g_Mappings.holdForDebug2.IsValid() || INPUTFILTER->IsBeingPressed(g_Mappings.holdForDebug2));
|
|
|
|
|
|
|
|
|
|
if( bHoldingBoth )
|
2005-05-16 10:10:08 +00:00
|
|
|
g_bIsDisplayed = true;
|
2005-08-16 19:56:37 +00:00
|
|
|
else
|
2005-05-16 10:10:08 +00:00
|
|
|
g_bIsDisplayed = false;
|
|
|
|
|
}
|
|
|
|
|
|
2006-01-24 04:18:05 +00:00
|
|
|
FOREACH_CONST( IDebugLine*, *g_pvpSubscribers, p )
|
2005-05-16 10:10:08 +00:00
|
|
|
{
|
2006-01-24 04:18:05 +00:00
|
|
|
int i = p-g_pvpSubscribers->begin();
|
|
|
|
|
|
2006-01-24 06:34:53 +00:00
|
|
|
// Gameplay buttons are available only in gameplay. Non-gameplay buttons are
|
|
|
|
|
// only available when the screen is displayed.
|
2006-04-04 21:55:06 +00:00
|
|
|
switch( (*p)->GetType() )
|
|
|
|
|
{
|
|
|
|
|
case IDebugLine::all_screens:
|
|
|
|
|
if( !g_bIsDisplayed )
|
|
|
|
|
continue;
|
|
|
|
|
break;
|
|
|
|
|
case IDebugLine::gameplay_only:
|
|
|
|
|
if( !IsGameplay() )
|
|
|
|
|
continue;
|
|
|
|
|
break;
|
|
|
|
|
case IDebugLine::editor_gameplay_only:
|
|
|
|
|
if( !IsEditorGameplay() )
|
|
|
|
|
continue;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
2006-01-24 06:34:53 +00:00
|
|
|
if( input.DeviceI == (*p)->m_Button )
|
2005-05-16 10:10:08 +00:00
|
|
|
{
|
2005-09-05 02:26:50 +00:00
|
|
|
if( input.type != IET_FIRST_PRESS )
|
2005-05-20 00:41:22 +00:00
|
|
|
return true; /* eat the input but do nothing */
|
|
|
|
|
|
2005-08-16 23:23:49 +00:00
|
|
|
BitmapText &txt1 = *m_vptextButton[i];
|
2005-05-19 23:29:39 +00:00
|
|
|
txt1.FinishTweening();
|
|
|
|
|
float fZoom = txt1.GetZoom();
|
|
|
|
|
txt1.SetZoom( fZoom * 1.2f );
|
2006-01-23 04:42:12 +00:00
|
|
|
txt1.BeginTweening( 0.2f, TWEEN_LINEAR );
|
2005-05-19 23:29:39 +00:00
|
|
|
txt1.SetZoom( fZoom );
|
2005-05-16 10:10:08 +00:00
|
|
|
|
2006-01-22 01:00:06 +00:00
|
|
|
RString sMessage;
|
2005-08-17 10:16:06 +00:00
|
|
|
(*p)->Do( sMessage );
|
2005-08-30 01:17:38 +00:00
|
|
|
if( !sMessage.empty() )
|
|
|
|
|
SCREENMAN->SystemMessage( sMessage );
|
2005-08-16 23:23:49 +00:00
|
|
|
|
2005-05-18 07:15:56 +00:00
|
|
|
UpdateText();
|
2005-05-19 23:29:39 +00:00
|
|
|
return true;
|
2005-05-16 10:10:08 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2005-05-19 23:29:39 +00:00
|
|
|
return false;
|
2005-05-16 10:10:08 +00:00
|
|
|
}
|
|
|
|
|
|
2005-05-16 22:23:20 +00:00
|
|
|
|
2005-08-16 23:23:49 +00:00
|
|
|
//
|
|
|
|
|
// DebugLine helpers
|
|
|
|
|
//
|
|
|
|
|
static void SetSpeed()
|
|
|
|
|
{
|
2006-01-24 04:41:47 +00:00
|
|
|
// PauseMusic( g_bIsHalt );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ChangeVolume( float fDelta )
|
|
|
|
|
{
|
|
|
|
|
float fVol = PREFSMAN->m_fSoundVolume;
|
|
|
|
|
fVol += fDelta;
|
|
|
|
|
CLAMP( fVol, 0.0f, 1.0f );
|
|
|
|
|
PREFSMAN->m_fSoundVolume.Set( fVol );
|
2005-10-04 06:51:06 +00:00
|
|
|
SOUNDMAN->SetMixVolume( PREFSMAN->m_fSoundVolume );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// DebugLines
|
|
|
|
|
//
|
2005-11-07 03:59:05 +00:00
|
|
|
#define DECLARE_ONE( x ) static x g_##x
|
|
|
|
|
|
2005-12-20 08:35:47 +00:00
|
|
|
|
|
|
|
|
static LocalizedString AUTO_PLAY ( "ScreenDebugOverlay", "AutoPlay" );
|
|
|
|
|
static LocalizedString ASSIST_TICK ( "ScreenDebugOverlay", "AssistTick" );
|
|
|
|
|
static LocalizedString AUTOSYNC ( "ScreenDebugOverlay", "Autosync" );
|
|
|
|
|
static LocalizedString COIN_MODE ( "ScreenDebugOverlay", "CoinMode" );
|
2006-01-24 06:09:25 +00:00
|
|
|
static LocalizedString HALT ( "ScreenDebugOverlay", "Halt" );
|
2005-12-20 08:35:47 +00:00
|
|
|
static LocalizedString LIGHTS_DEBUG ( "ScreenDebugOverlay", "Lights Debug" );
|
|
|
|
|
static LocalizedString MONKEY_INPUT ( "ScreenDebugOverlay", "Monkey Input" );
|
2006-01-24 06:09:25 +00:00
|
|
|
static LocalizedString RENDERING_STATS ( "ScreenDebugOverlay", "Rendering Stats" );
|
2005-12-20 08:35:47 +00:00
|
|
|
static LocalizedString VSYNC ( "ScreenDebugOverlay", "Vsync" );
|
|
|
|
|
static LocalizedString MULTITEXTURE ( "ScreenDebugOverlay", "Multitexture" );
|
2006-01-24 06:09:25 +00:00
|
|
|
static LocalizedString SCREEN_TEST_MODE ( "ScreenDebugOverlay", "Screen Test Mode" );
|
2005-12-20 08:35:47 +00:00
|
|
|
static LocalizedString CLEAR_MACHINE_STATS ( "ScreenDebugOverlay", "Clear Machine Stats" );
|
|
|
|
|
static LocalizedString FILL_MACHINE_STATS ( "ScreenDebugOverlay", "Fill Machine Stats" );
|
|
|
|
|
static LocalizedString SEND_NOTES_ENDED ( "ScreenDebugOverlay", "Send Notes Ended" );
|
2006-01-24 06:09:25 +00:00
|
|
|
static LocalizedString RELOAD ( "ScreenDebugOverlay", "Reload" );
|
|
|
|
|
static LocalizedString RELOAD_THEME_AND_TEXTURES( "ScreenDebugOverlay", "Reload Theme and Textures" );
|
2005-12-20 08:35:47 +00:00
|
|
|
static LocalizedString WRITE_PROFILES ( "ScreenDebugOverlay", "Write Profiles" );
|
|
|
|
|
static LocalizedString WRITE_PREFERENCES ( "ScreenDebugOverlay", "Write Preferences" );
|
2006-01-24 06:09:25 +00:00
|
|
|
static LocalizedString MENU_TIMER ( "ScreenDebugOverlay", "Menu Timer" );
|
|
|
|
|
static LocalizedString FLUSH_LOG ( "ScreenDebugOverlay", "Flush Log" );
|
2005-12-20 08:35:47 +00:00
|
|
|
static LocalizedString PULL_BACK_CAMERA ( "ScreenDebugOverlay", "Pull Back Camera" );
|
2006-01-24 06:09:25 +00:00
|
|
|
static LocalizedString VOLUME_UP ( "ScreenDebugOverlay", "Volume Up" );
|
|
|
|
|
static LocalizedString VOLUME_DOWN ( "ScreenDebugOverlay", "Volume Down" );
|
|
|
|
|
static LocalizedString UPTIME ( "ScreenDebugOverlay", "Uptime" );
|
2006-02-11 03:47:42 +00:00
|
|
|
static LocalizedString FORCE_CRASH ( "ScreenDebugOverlay", "Force Crash" );
|
2006-01-24 06:09:25 +00:00
|
|
|
static LocalizedString SLOW ( "ScreenDebugOverlay", "Slow" );
|
|
|
|
|
static LocalizedString ON ( "ScreenDebugOverlay", "on" );
|
|
|
|
|
static LocalizedString OFF ( "ScreenDebugOverlay", "off" );
|
|
|
|
|
static LocalizedString CPU ( "ScreenDebugOverlay", "CPU" );
|
|
|
|
|
static LocalizedString SONG ( "ScreenDebugOverlay", "Song" );
|
|
|
|
|
static LocalizedString MACHINE ( "ScreenDebugOverlay", "Machine" );
|
2005-12-20 08:35:47 +00:00
|
|
|
|
|
|
|
|
|
2005-08-16 23:23:49 +00:00
|
|
|
class DebugLineAutoplay : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return AUTO_PLAY.GetValue(); }
|
|
|
|
|
virtual RString GetValue()
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
switch( PREFSMAN->m_AutoPlay )
|
|
|
|
|
{
|
2006-01-12 20:04:41 +00:00
|
|
|
case PC_HUMAN: return OFF.GetValue(); break;
|
|
|
|
|
case PC_AUTOPLAY: return ON.GetValue(); break;
|
|
|
|
|
case PC_CPU: return CPU.GetValue(); break;
|
2006-01-22 01:00:06 +00:00
|
|
|
default: ASSERT(0); return RString();
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
}
|
2006-04-04 21:55:06 +00:00
|
|
|
virtual Type GetType() const { return IDebugLine::gameplay_only; }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return PREFSMAN->m_AutoPlay.Get() != PC_HUMAN; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
2006-04-04 21:55:06 +00:00
|
|
|
ASSERT( GAMESTATE->m_MasterPlayerNumber != PLAYER_INVALID );
|
|
|
|
|
PlayerController pc = GAMESTATE->m_pPlayerState[GAMESTATE->m_MasterPlayerNumber]->m_PlayerController;
|
|
|
|
|
bool bHoldingShift = INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_LSHIFT) );
|
|
|
|
|
if( bHoldingShift )
|
|
|
|
|
pc = (pc==PC_CPU) ? PC_HUMAN : PC_CPU;
|
|
|
|
|
else
|
|
|
|
|
pc = (pc==PC_AUTOPLAY) ? PC_HUMAN : PC_AUTOPLAY;
|
2005-08-16 23:23:49 +00:00
|
|
|
PREFSMAN->m_AutoPlay.Set( pc );
|
2005-08-23 21:07:07 +00:00
|
|
|
FOREACH_HumanPlayer(p)
|
|
|
|
|
GAMESTATE->m_pPlayerState[p]->m_PlayerController = PREFSMAN->m_AutoPlay;
|
|
|
|
|
FOREACH_MultiPlayer(p)
|
|
|
|
|
GAMESTATE->m_pMultiPlayerState[p]->m_PlayerController = PREFSMAN->m_AutoPlay;
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineAssistTick : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return ASSIST_TICK.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return IsEnabled() ? ON.GetValue():OFF.GetValue(); }
|
2006-04-04 21:55:06 +00:00
|
|
|
virtual Type GetType() const { return gameplay_only; }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return GAMESTATE->m_SongOptions.m_bAssistTick; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
GAMESTATE->m_SongOptions.m_bAssistTick = !GAMESTATE->m_SongOptions.m_bAssistTick;
|
|
|
|
|
// Store this change, so it sticks if we change songs
|
|
|
|
|
GAMESTATE->m_StoredSongOptions.m_bAssistTick = GAMESTATE->m_SongOptions.m_bAssistTick;
|
|
|
|
|
MESSAGEMAN->Broadcast( Message_AssistTickChanged );
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineAutosync : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return AUTOSYNC.GetValue(); }
|
|
|
|
|
virtual RString GetValue()
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
switch( GAMESTATE->m_SongOptions.m_AutosyncType )
|
|
|
|
|
{
|
2006-01-12 20:04:41 +00:00
|
|
|
case SongOptions::AUTOSYNC_OFF: return OFF.GetValue(); break;
|
|
|
|
|
case SongOptions::AUTOSYNC_SONG: return SONG.GetValue(); break;
|
|
|
|
|
case SongOptions::AUTOSYNC_MACHINE: return MACHINE.GetValue(); break;
|
2005-08-16 23:23:49 +00:00
|
|
|
default: ASSERT(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
2006-04-04 21:55:06 +00:00
|
|
|
virtual Type GetType() const { return IDebugLine::gameplay_only; }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return GAMESTATE->m_SongOptions.m_AutosyncType!=SongOptions::AUTOSYNC_OFF; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
2005-08-17 10:16:06 +00:00
|
|
|
SongOptions::AutosyncType as = (SongOptions::AutosyncType)(GAMESTATE->m_SongOptions.m_AutosyncType+1);
|
|
|
|
|
wrap( (int&)as, SongOptions::NUM_AUTOSYNC_TYPES );
|
|
|
|
|
GAMESTATE->m_SongOptions.m_AutosyncType = as;
|
|
|
|
|
MESSAGEMAN->Broadcast( Message_AutosyncChanged );
|
|
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineCoinMode : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return COIN_MODE.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return CoinModeToString(PREFSMAN->m_CoinMode); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return true; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
CoinMode cm = (CoinMode)(PREFSMAN->m_CoinMode+1);
|
|
|
|
|
wrap( (int&)cm, NUM_COIN_MODES );
|
|
|
|
|
PREFSMAN->m_CoinMode.Set( cm );
|
|
|
|
|
SCREENMAN->RefreshCreditsMessages();
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineSlow : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return SLOW.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return IsEnabled() ? ON.GetValue():OFF.GetValue(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return g_bIsSlow; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
g_bIsSlow = !g_bIsSlow;
|
|
|
|
|
SetSpeed();
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineHalt : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return HALT.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return IsEnabled() ? ON.GetValue():OFF.GetValue(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return g_bIsHalt; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
g_bIsHalt = !g_bIsHalt;
|
|
|
|
|
g_HaltTimer.Touch();
|
|
|
|
|
SetSpeed();
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineLightsDebug : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return LIGHTS_DEBUG.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return IsEnabled() ? ON.GetValue():OFF.GetValue(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return PREFSMAN->m_bDebugLights.Get(); }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
PREFSMAN->m_bDebugLights.Set( !PREFSMAN->m_bDebugLights );
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineMonkeyInput : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return MONKEY_INPUT.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return IsEnabled() ? ON.GetValue():OFF.GetValue(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return PREFSMAN->m_bMonkeyInput.Get(); }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
PREFSMAN->m_bMonkeyInput.Set( !PREFSMAN->m_bMonkeyInput );
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineStats : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return RENDERING_STATS.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return IsEnabled() ? ON.GetValue():OFF.GetValue(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return PREFSMAN->m_bShowStats.Get(); }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
PREFSMAN->m_bShowStats.Set( !PREFSMAN->m_bShowStats );
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineVsync : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return VSYNC.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return IsEnabled() ? ON.GetValue():OFF.GetValue(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return PREFSMAN->m_bVsync.Get(); }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
PREFSMAN->m_bVsync.Set( !PREFSMAN->m_bVsync );
|
2005-12-02 01:16:28 +00:00
|
|
|
StepMania::ApplyGraphicOptions();
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
2005-11-07 03:59:05 +00:00
|
|
|
|
|
|
|
|
class DebugLineAllowMultitexture : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return MULTITEXTURE.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return IsEnabled() ? ON.GetValue():OFF.GetValue(); }
|
2005-11-07 03:59:05 +00:00
|
|
|
virtual bool IsEnabled() { return PREFSMAN->m_bAllowMultitexture.Get(); }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-11-07 03:59:05 +00:00
|
|
|
{
|
|
|
|
|
PREFSMAN->m_bAllowMultitexture.Set( !PREFSMAN->m_bAllowMultitexture );
|
|
|
|
|
IDebugLine::Do( sMessageOut );
|
|
|
|
|
}
|
|
|
|
|
};
|
2005-08-16 23:23:49 +00:00
|
|
|
|
|
|
|
|
class DebugLineScreenTestMode : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return SCREEN_TEST_MODE.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return IsEnabled() ? ON.GetValue():OFF.GetValue(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return PREFSMAN->m_bScreenTestMode.Get(); }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
PREFSMAN->m_bScreenTestMode.Set( !PREFSMAN->m_bScreenTestMode );
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineClearMachineStats : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return CLEAR_MACHINE_STATS.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return RString(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return true; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
GameCommand gc;
|
2006-03-18 11:59:41 +00:00
|
|
|
ClearMachineStats();
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2006-01-18 10:09:34 +00:00
|
|
|
static HighScore MakeRandomHighScore( float fPercentDP )
|
|
|
|
|
{
|
|
|
|
|
HighScore hs;
|
|
|
|
|
hs.SetName( "FAKE" );
|
|
|
|
|
hs.SetGrade( (Grade)SCALE( rand()%5, 0, 4, Grade_Tier01, Grade_Tier05 ) );
|
|
|
|
|
hs.SetScore( rand()%100*1000 );
|
|
|
|
|
hs.SetPercentDP( fPercentDP );
|
|
|
|
|
hs.SetSurviveSeconds( randomf(30.0f, 100.0f) );
|
|
|
|
|
PlayerOptions po;
|
|
|
|
|
po.ChooseRandomModifiers();
|
|
|
|
|
hs.SetModifiers( po.GetString() );
|
|
|
|
|
hs.SetDateTime( DateTime::GetNowDateTime() );
|
|
|
|
|
hs.SetPlayerGuid( Profile::MakeGuid() );
|
|
|
|
|
hs.SetMachineGuid( Profile::MakeGuid() );
|
|
|
|
|
hs.SetProductID( rand()%10 );
|
|
|
|
|
FOREACH_TapNoteScore( tns )
|
|
|
|
|
hs.SetTapNoteScore( tns, rand() % 100 );
|
|
|
|
|
FOREACH_HoldNoteScore( hns )
|
|
|
|
|
hs.SetHoldNoteScore( hns, rand() % 100 );
|
|
|
|
|
RadarValues rv;
|
|
|
|
|
FOREACH_RadarCategory( rc )
|
|
|
|
|
rv.m_Values.f[rc] = randomf( 0, 1 );
|
|
|
|
|
hs.SetRadarValues( rv );
|
|
|
|
|
|
|
|
|
|
return hs;
|
|
|
|
|
}
|
|
|
|
|
|
2006-03-18 11:59:41 +00:00
|
|
|
static void FillProfileStats( Profile *pProfile )
|
2006-01-18 10:09:34 +00:00
|
|
|
{
|
2006-03-21 03:57:56 +00:00
|
|
|
pProfile->InitSongScores();
|
|
|
|
|
pProfile->InitCourseScores();
|
|
|
|
|
|
|
|
|
|
static int s_iCount = 0;
|
2006-01-18 10:09:34 +00:00
|
|
|
// Choose a percent for all scores. This is useful for testing unlocks
|
|
|
|
|
// where some elements are unlocked at a certain percent complete
|
2006-03-21 03:57:56 +00:00
|
|
|
float fPercentDP = s_iCount ? randomf( 0.6f, 1.0f ) : 1.0f;
|
|
|
|
|
s_iCount = (s_iCount+1)%2;
|
|
|
|
|
|
2006-01-18 10:09:34 +00:00
|
|
|
|
|
|
|
|
int iCount = pProfile->IsMachine()?
|
|
|
|
|
PREFSMAN->m_iMaxHighScoresPerListForMachine.Get():
|
|
|
|
|
PREFSMAN->m_iMaxHighScoresPerListForPlayer.Get();
|
|
|
|
|
|
|
|
|
|
vector<Song*> vpAllSongs = SONGMAN->GetAllSongs();
|
|
|
|
|
FOREACH( Song*, vpAllSongs, pSong )
|
|
|
|
|
{
|
|
|
|
|
vector<Steps*> vpAllSteps = (*pSong)->GetAllSteps();
|
|
|
|
|
FOREACH( Steps*, vpAllSteps, pSteps )
|
|
|
|
|
{
|
|
|
|
|
pProfile->IncrementStepsPlayCount( *pSong, *pSteps );
|
|
|
|
|
for( int i=0; i<iCount; i++ )
|
|
|
|
|
{
|
|
|
|
|
int iIndex = 0;
|
|
|
|
|
pProfile->AddStepsHighScore( *pSong, *pSteps, MakeRandomHighScore(fPercentDP), iIndex );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
vector<Course*> vpAllCourses;
|
|
|
|
|
SONGMAN->GetAllCourses( vpAllCourses, true );
|
|
|
|
|
FOREACH( Course*, vpAllCourses, pCourse )
|
|
|
|
|
{
|
|
|
|
|
vector<Trail*> vpAllTrails;
|
|
|
|
|
(*pCourse)->GetAllTrails( vpAllTrails );
|
|
|
|
|
FOREACH( Trail*, vpAllTrails, pTrail )
|
|
|
|
|
{
|
|
|
|
|
pProfile->IncrementCoursePlayCount( *pCourse, *pTrail );
|
|
|
|
|
for( int i=0; i<iCount; i++ )
|
|
|
|
|
{
|
|
|
|
|
int iIndex = 0;
|
|
|
|
|
pProfile->AddCourseHighScore( *pCourse, *pTrail, MakeRandomHighScore(fPercentDP), iIndex );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2005-08-16 23:23:49 +00:00
|
|
|
class DebugLineFillMachineStats : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return FILL_MACHINE_STATS.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return RString(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return true; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
2006-01-18 10:09:34 +00:00
|
|
|
Profile* pProfile = PROFILEMAN->GetMachineProfile();
|
2006-03-18 11:59:41 +00:00
|
|
|
FillProfileStats( pProfile );
|
2006-01-18 10:09:34 +00:00
|
|
|
PROFILEMAN->SaveMachineProfile();
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineSendNotesEnded : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return SEND_NOTES_ENDED.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return RString(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return true; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
SCREENMAN->PostMessageToTopScreen( SM_NotesEnded, 0 );
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineReloadCurrentScreen : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return RELOAD.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return SCREENMAN ? SCREENMAN->GetTopScreen()->GetName() : RString(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return true; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
SOUND->StopMusic();
|
2005-12-02 01:16:28 +00:00
|
|
|
StepMania::ResetGame();
|
2005-08-16 23:23:49 +00:00
|
|
|
SCREENMAN->SetNewScreen( SCREENMAN->GetTopScreen()->GetName() );
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-30 01:17:38 +00:00
|
|
|
sMessageOut = "";
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineReloadTheme : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return RELOAD_THEME_AND_TEXTURES.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return RString(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return true; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
THEME->ReloadMetrics();
|
|
|
|
|
TEXTUREMAN->ReloadAll();
|
|
|
|
|
NOTESKIN->RefreshNoteSkinData( GAMESTATE->m_pCurGame );
|
|
|
|
|
CodeDetector::RefreshCacheItems();
|
2006-01-24 06:09:25 +00:00
|
|
|
// HACK: Don't update text below. Return immediately because this screen
|
|
|
|
|
// was just destroyed as part of the theme reload.
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineWriteProfiles : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return WRITE_PROFILES.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return RString(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return true; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
// Also save bookkeeping and profile info for debugging
|
|
|
|
|
// so we don't have to play through a whole song to get new output.
|
|
|
|
|
BOOKKEEPER->WriteToDisk();
|
|
|
|
|
PROFILEMAN->SaveMachineProfile();
|
|
|
|
|
FOREACH_PlayerNumber( p )
|
|
|
|
|
{
|
|
|
|
|
if( !PROFILEMAN->IsPersistentProfile(p) )
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
bool bWasMemoryCard = PROFILEMAN->ProfileWasLoadedFromMemoryCard(p);
|
|
|
|
|
if( bWasMemoryCard )
|
|
|
|
|
MEMCARDMAN->MountCard( p );
|
|
|
|
|
PROFILEMAN->SaveProfile( p );
|
|
|
|
|
if( bWasMemoryCard )
|
|
|
|
|
MEMCARDMAN->UnmountCard( p );
|
|
|
|
|
}
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineWritePreferences : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return WRITE_PREFERENCES.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return RString(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return true; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
2005-10-27 04:54:45 +00:00
|
|
|
PREFSMAN->SavePrefsToDisk();
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineMenuTimer : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return MENU_TIMER.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return RString(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return PREFSMAN->m_bMenuTimer.Get(); }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
PREFSMAN->m_bMenuTimer.Set( !PREFSMAN->m_bMenuTimer );
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineFlushLog : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return FLUSH_LOG.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return RString(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return true; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
LOG->Flush();
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2005-08-17 23:53:02 +00:00
|
|
|
class DebugLinePullBackCamera : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return PULL_BACK_CAMERA.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return RString(); }
|
2005-08-17 23:53:02 +00:00
|
|
|
virtual bool IsEnabled() { return g_fImageScaleDestination != 1; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-17 23:53:02 +00:00
|
|
|
{
|
|
|
|
|
if( g_fImageScaleDestination == 1 )
|
|
|
|
|
g_fImageScaleDestination = 0.5f;
|
|
|
|
|
else
|
|
|
|
|
g_fImageScaleDestination = 1;
|
|
|
|
|
IDebugLine::Do( sMessageOut );
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2005-08-16 23:23:49 +00:00
|
|
|
class DebugLineVolumeUp : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return VOLUME_UP.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return ssprintf("%.0f%%",PREFSMAN->m_fSoundVolume.Get()*100); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return true; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
ChangeVolume( +0.1f );
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class DebugLineVolumeDown : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return VOLUME_DOWN.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return RString(); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return true; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut )
|
2005-08-16 23:23:49 +00:00
|
|
|
{
|
|
|
|
|
ChangeVolume( -0.1f );
|
2005-08-17 10:16:06 +00:00
|
|
|
IDebugLine::Do( sMessageOut );
|
2006-01-26 06:17:12 +00:00
|
|
|
sMessageOut += " - " + ssprintf("%.0f%%",PREFSMAN->m_fSoundVolume.Get()*100);
|
2005-08-16 23:23:49 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2006-02-11 03:47:42 +00:00
|
|
|
class DebugLineForceCrash : public IDebugLine
|
|
|
|
|
{
|
|
|
|
|
virtual RString GetDescription() { return FORCE_CRASH.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return RString(); }
|
|
|
|
|
virtual bool IsEnabled() { return false; }
|
|
|
|
|
virtual void Do( RString &sMessageOut ) { FAIL_M("DebugLineCrash"); }
|
|
|
|
|
};
|
|
|
|
|
|
2005-08-16 23:23:49 +00:00
|
|
|
class DebugLineUptime : public IDebugLine
|
|
|
|
|
{
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual RString GetDescription() { return UPTIME.GetValue(); }
|
|
|
|
|
virtual RString GetValue() { return SecondsToMMSSMsMsMs(RageTimer::GetTimeSinceStart()); }
|
2005-08-16 23:23:49 +00:00
|
|
|
virtual bool IsEnabled() { return false; }
|
2006-01-22 01:00:06 +00:00
|
|
|
virtual void Do( RString &sMessageOut ) {}
|
2005-08-16 23:23:49 +00:00
|
|
|
};
|
2005-12-09 01:46:19 +00:00
|
|
|
|
|
|
|
|
/* #ifdef out the lines below if you don't want them to appear on certain
|
|
|
|
|
* platforms. This is easier than #ifdefing the whole DebugLine definitions
|
|
|
|
|
* that can span pages.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
DECLARE_ONE( DebugLineAutoplay );
|
|
|
|
|
DECLARE_ONE( DebugLineAssistTick );
|
|
|
|
|
DECLARE_ONE( DebugLineAutosync );
|
|
|
|
|
DECLARE_ONE( DebugLineCoinMode );
|
|
|
|
|
DECLARE_ONE( DebugLineSlow );
|
|
|
|
|
DECLARE_ONE( DebugLineHalt );
|
|
|
|
|
DECLARE_ONE( DebugLineLightsDebug );
|
|
|
|
|
DECLARE_ONE( DebugLineMonkeyInput );
|
|
|
|
|
DECLARE_ONE( DebugLineStats );
|
|
|
|
|
DECLARE_ONE( DebugLineVsync );
|
|
|
|
|
DECLARE_ONE( DebugLineAllowMultitexture );
|
|
|
|
|
DECLARE_ONE( DebugLineScreenTestMode );
|
|
|
|
|
DECLARE_ONE( DebugLineClearMachineStats );
|
|
|
|
|
DECLARE_ONE( DebugLineFillMachineStats );
|
|
|
|
|
DECLARE_ONE( DebugLineSendNotesEnded );
|
|
|
|
|
DECLARE_ONE( DebugLineReloadCurrentScreen );
|
|
|
|
|
DECLARE_ONE( DebugLineReloadTheme );
|
|
|
|
|
DECLARE_ONE( DebugLineWriteProfiles );
|
|
|
|
|
DECLARE_ONE( DebugLineWritePreferences );
|
|
|
|
|
DECLARE_ONE( DebugLineMenuTimer );
|
|
|
|
|
DECLARE_ONE( DebugLineFlushLog );
|
|
|
|
|
DECLARE_ONE( DebugLinePullBackCamera );
|
|
|
|
|
DECLARE_ONE( DebugLineVolumeUp );
|
|
|
|
|
DECLARE_ONE( DebugLineVolumeDown );
|
2006-02-11 03:47:42 +00:00
|
|
|
DECLARE_ONE( DebugLineForceCrash );
|
2005-11-07 03:59:05 +00:00
|
|
|
DECLARE_ONE( DebugLineUptime );
|
2005-08-16 23:23:49 +00:00
|
|
|
|
|
|
|
|
|
2005-05-16 10:10:08 +00:00
|
|
|
/*
|
|
|
|
|
* (c) 2001-2005 Chris Danford, Glenn Maynard
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
|
* distribute, and/or sell copies of the Software, and to permit persons to
|
|
|
|
|
* whom the Software is furnished to do so, provided that the above
|
|
|
|
|
* copyright notice(s) and this permission notice appear in all copies of
|
|
|
|
|
* the Software and that both the above copyright notice(s) and this
|
|
|
|
|
* permission notice appear in supporting documentation.
|
|
|
|
|
*
|
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
|
|
|
|
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
|
|
|
|
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
|
|
|
|
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
|
|
|
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
|
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
*/
|