Yet more theme cleanup. This should be the job of the artists!
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
------------------------CVS after 3.00 beta 6----------------
|
||||
BUG FIX: DWI music sample info now read correctly - again.
|
||||
NEW FEATURE: Precise adjustment of timing window for each grade via the
|
||||
stepmania.ini file (see JudgeWindowPerfectPercent, JudgeWindowGreatPercent,
|
||||
etc).
|
||||
|
||||
@@ -2,8 +2,14 @@
|
||||
Fix
|
||||
/////////////////////////
|
||||
|
||||
anon CVS instructions
|
||||
|
||||
MS phone bill
|
||||
|
||||
In the arcade, it doesn't sort music by alphabetical order in its group, but rather, it sorts all the songs in a group according to light difficutly, from the easiest song on top, to the hardest light mode song on the bottom. When there are songs with the same light rating, THEN it sorts THOSE by alphabetical order.
|
||||
|
||||
difficulty hiding for ez2
|
||||
|
||||
get rid of lines between tiles
|
||||
|
||||
red life glow in sync with beat
|
||||
|
||||
@@ -93,6 +93,16 @@ void Background::Unload()
|
||||
m_iCurBGSegment = 0;
|
||||
}
|
||||
|
||||
void Background::LoadFromAniDir( CString sAniDir )
|
||||
{
|
||||
Unload();
|
||||
|
||||
BackgroundAnimation* pTempBGA;
|
||||
pTempBGA = new BackgroundAnimation;
|
||||
pTempBGA->LoadFromAniDir( sAniDir );
|
||||
m_BackgroundAnimations.Add( pTempBGA );
|
||||
}
|
||||
|
||||
void Background::LoadFromSong( Song* pSong )
|
||||
{
|
||||
Unload();
|
||||
|
||||
@@ -35,8 +35,9 @@ public:
|
||||
Background();
|
||||
~Background();
|
||||
|
||||
virtual void LoadFromAniDir( CString sAniDir );
|
||||
virtual void LoadFromSong( Song *pSong );
|
||||
virtual void Unload(); // call this on before calling load
|
||||
virtual void Unload();
|
||||
|
||||
virtual void Update( float fDeltaTime );
|
||||
virtual void DrawPrimitives();
|
||||
|
||||
@@ -279,10 +279,10 @@ bool DWILoader::LoadFromDWIFile( CString sPath, Song &out )
|
||||
out.m_fBeat0OffsetInSeconds = -atoi( sParams[1] ) / 1000.0f;
|
||||
|
||||
else if( 0==stricmp(sValueName,"SAMPLESTART") )
|
||||
out.m_fMusicSampleStartSeconds = TimeToSeconds( sParams[1] );
|
||||
out.m_fMusicSampleStartSeconds = TimeToSeconds( sParams[1]+":"+sParams[2] ); // this value has a ':' in it. Colon is supposed to be a parameter separator. Stupid DWI!
|
||||
|
||||
else if( 0==stricmp(sValueName,"SAMPLELENGTH") )
|
||||
out.m_fMusicSampleLengthSeconds = TimeToSeconds( sParams[1] );
|
||||
out.m_fMusicSampleLengthSeconds = TimeToSeconds( sParams[1]+":"+sParams[2] );
|
||||
|
||||
else if( 0==stricmp(sValueName,"FREEZE") )
|
||||
{
|
||||
|
||||
@@ -49,8 +49,8 @@ CString SecondsToTime( float fSecs )
|
||||
{
|
||||
int iMinsDisplay = (int)fSecs/60;
|
||||
int iSecsDisplay = (int)fSecs - iMinsDisplay*60;
|
||||
int iLeftoverDisplay = int( (fSecs - iMinsDisplay*60 - iSecsDisplay) * 100 );
|
||||
return ssprintf( "%02d:%02d:%02d", iMinsDisplay, iSecsDisplay, iLeftoverDisplay );
|
||||
float fLeftoverDisplay = (fSecs - iMinsDisplay*60 - iSecsDisplay) * 100;
|
||||
return ssprintf( "%02d:%02d:%02f", iMinsDisplay, iSecsDisplay, fLeftoverDisplay );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -64,6 +64,7 @@ ScreenAppearanceOptions::ScreenAppearanceOptions() :
|
||||
g_AppearanceOptionsLines,
|
||||
NUM_APPEARANCE_OPTIONS_LINES,
|
||||
false );
|
||||
m_Menu.SetTimer( 99 );
|
||||
m_Menu.StopTimer();
|
||||
|
||||
MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","appearance options music") );
|
||||
|
||||
@@ -198,8 +198,7 @@ ScreenEdit::ScreenEdit()
|
||||
GAMESTATE->m_PlayerOptions[PLAYER_1].m_fArrowScrollSpeed = 1;
|
||||
GAMESTATE->m_PlayerOptions[PLAYER_1].m_ColorType = PlayerOptions::COLOR_NOTE;
|
||||
|
||||
m_sprBackground.Load( THEME->GetPathTo("Graphics","edit background") );
|
||||
m_sprBackground.StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
||||
m_Background.LoadFromSong( m_pSong );
|
||||
|
||||
shiftAnchor = -1;
|
||||
m_SnapDisplay.SetXY( EDIT_X, EDIT_GRAY_Y );
|
||||
@@ -332,7 +331,7 @@ void ScreenEdit::Update( float fDeltaTime )
|
||||
}
|
||||
}
|
||||
|
||||
m_sprBackground.Update( fDeltaTime );
|
||||
m_Background.Update( fDeltaTime );
|
||||
m_SnapDisplay.Update( fDeltaTime );
|
||||
m_GrayArrowRowEdit.Update( fDeltaTime );
|
||||
m_NoteFieldEdit.Update( fDeltaTime );
|
||||
@@ -470,7 +469,7 @@ void ScreenEdit::Update( float fDeltaTime )
|
||||
|
||||
void ScreenEdit::DrawPrimitives()
|
||||
{
|
||||
m_sprBackground.Draw();
|
||||
m_Background.Draw();
|
||||
m_SnapDisplay.Draw();
|
||||
m_GrayArrowRowEdit.Draw();
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ protected:
|
||||
Song* m_pSong;
|
||||
Notes* m_pNotes;
|
||||
|
||||
Sprite m_sprBackground;
|
||||
Background m_Background;
|
||||
|
||||
NoteField m_NoteFieldEdit;
|
||||
SnapDisplay m_SnapDisplay;
|
||||
|
||||
@@ -45,7 +45,7 @@ ScreenEditMenu::ScreenEditMenu()
|
||||
this->AddChild( &Selector );
|
||||
|
||||
m_Menu.Load(
|
||||
THEME->GetPathTo("Graphics","edit menu background"),
|
||||
THEME->GetPathTo("BGAnimations","edit menu"),
|
||||
THEME->GetPathTo("Graphics","edit menu top edge"),
|
||||
HELP_TEXT, false, false, 99
|
||||
);
|
||||
|
||||
@@ -87,7 +87,7 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle()
|
||||
|
||||
|
||||
m_Menu.Load(
|
||||
THEME->GetPathTo("Graphics","select style background"),
|
||||
THEME->GetPathTo("BGAnimations","select style"),
|
||||
THEME->GetPathTo("Graphics","select style top edge"),
|
||||
HELP_TEXT, true, true, TIMER_SECONDS
|
||||
);
|
||||
|
||||
@@ -29,24 +29,11 @@ const ScreenMessage SM_PlayAnnouncer = ScreenMessage(SM_User + 3);
|
||||
|
||||
ScreenGameOver::ScreenGameOver()
|
||||
{
|
||||
m_bClosing = false;
|
||||
m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","game over") );
|
||||
this->AddChild( &m_Background );
|
||||
|
||||
m_sprGameOver.Load( THEME->GetPathTo("Graphics","game over") );
|
||||
m_sprGameOver.SetXY( CENTER_X, CENTER_Y );
|
||||
this->AddChild( &m_sprGameOver );
|
||||
|
||||
// tween game over
|
||||
m_sprGameOver.SetGlow( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprGameOver.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
|
||||
m_sprGameOver.BeginTweening( 0.5f ); // fade to white
|
||||
m_sprGameOver.SetTweenGlow( D3DXCOLOR(1,1,1,1) );
|
||||
|
||||
m_sprGameOver.BeginTweening( 0.01f ); // turn color on
|
||||
m_sprGameOver.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
|
||||
m_sprGameOver.BeginTweening( 0.5f ); // fade to color
|
||||
m_sprGameOver.SetTweenGlow( D3DXCOLOR(1,1,1,0) );
|
||||
m_Fade.OpenWipingRight( SM_None );
|
||||
this->AddChild( &m_Fade );
|
||||
|
||||
MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","game over music") );
|
||||
|
||||
@@ -63,10 +50,7 @@ void ScreenGameOver::HandleScreenMessage( const ScreenMessage SM )
|
||||
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo("game over") );
|
||||
break;
|
||||
case SM_StartFadingOut:
|
||||
m_bClosing = true;
|
||||
m_sprGameOver.BeginTweening( 0.8f );
|
||||
m_sprGameOver.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
this->SendScreenMessage( SM_GoToNextScreen, 0.8f );
|
||||
m_Fade.CloseWipingRight( SM_GoToNextScreen );
|
||||
break;
|
||||
case SM_GoToNextScreen:
|
||||
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
|
||||
@@ -76,7 +60,7 @@ void ScreenGameOver::HandleScreenMessage( const ScreenMessage SM )
|
||||
|
||||
void ScreenGameOver::MenuStart( PlayerNumber pn )
|
||||
{
|
||||
if( m_bClosing )
|
||||
if( m_Fade.IsClosing() )
|
||||
return;
|
||||
|
||||
this->ClearMessageQueue();
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
*/
|
||||
|
||||
#include "Screen.h"
|
||||
#include "Sprite.h"
|
||||
#include "BackgroundAnimation.h"
|
||||
#include "TransitionFade.h"
|
||||
|
||||
|
||||
class ScreenGameOver : public Screen
|
||||
@@ -24,8 +25,8 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
bool m_bClosing;
|
||||
Sprite m_sprGameOver;
|
||||
TransitionFade m_Fade;
|
||||
BackgroundAnimation m_Background;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ static const int VertRes[] = {
|
||||
|
||||
ScreenGraphicOptions::ScreenGraphicOptions() :
|
||||
ScreenOptions(
|
||||
THEME->GetPathTo("Graphics","graphic options background"),
|
||||
THEME->GetPathTo("BGAnimations","graphic options"),
|
||||
THEME->GetPathTo("Graphics","graphic options page"),
|
||||
THEME->GetPathTo("Graphics","graphic options top edge")
|
||||
)
|
||||
|
||||
@@ -167,7 +167,7 @@ void ScreenManager::Input( const DeviceInput& DeviceI, const InputEventType type
|
||||
#include "ScreenHowToPlay.h"
|
||||
#include "ScreenInputOptions.h"
|
||||
#include "ScreenMachineOptions.h"
|
||||
#include "ScreenMapInstruments.h"
|
||||
#include "ScreenMapControllers.h"
|
||||
#include "ScreenMusicScroll.h"
|
||||
#include "ScreenPlayerOptions.h"
|
||||
#include "ScreenSandbox.h"
|
||||
@@ -204,7 +204,7 @@ Screen* ScreenManager::MakeNewScreen( CString sClassName )
|
||||
else if( 0==stricmp(sClassName, "ScreenHowToPlay") ) return new ScreenHowToPlay;
|
||||
else if( 0==stricmp(sClassName, "ScreenInputOptions") ) return new ScreenInputOptions;
|
||||
else if( 0==stricmp(sClassName, "ScreenMachineOptions") ) return new ScreenMachineOptions;
|
||||
else if( 0==stricmp(sClassName, "ScreenMapInstruments") ) return new ScreenMapInstruments;
|
||||
else if( 0==stricmp(sClassName, "ScreenMapControllers") ) return new ScreenMapControllers;
|
||||
else if( 0==stricmp(sClassName, "ScreenInputOptions") ) return new ScreenInputOptions;
|
||||
else if( 0==stricmp(sClassName, "ScreenMusicScroll") ) return new ScreenMusicScroll;
|
||||
else if( 0==stricmp(sClassName, "ScreenPlayerOptions") ) return new ScreenPlayerOptions;
|
||||
|
||||
@@ -0,0 +1,277 @@
|
||||
#include "stdafx.h"
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: ScreenMapControllers
|
||||
|
||||
Desc: Where the player maps device input to pad input.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "ScreenMapControllers.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "ScreenManager.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "RageLog.h"
|
||||
#include "InputMapper.h"
|
||||
#include "GameManager.h"
|
||||
#include "GameState.h"
|
||||
#include "RageMusic.h"
|
||||
|
||||
|
||||
#define HELP_TEXT THEME->GetMetric("ScreenMapControllers","HelpText")
|
||||
|
||||
|
||||
// reserve the 3rd slot for hard-coded keys
|
||||
const int NUM_CHANGABLE_SLOTS = NUM_GAME_TO_DEVICE_SLOTS-1;
|
||||
|
||||
|
||||
const float TITLE_Y = 30;
|
||||
const float HELP_X = CENTER_X;
|
||||
const float HELP_Y = SCREEN_HEIGHT-10;
|
||||
const float LINE_START_Y = 64;
|
||||
const float LINE_GAP_Y = 28;
|
||||
const float BUTTON_COLUMN_X[NUM_GAME_TO_DEVICE_SLOTS*MAX_GAME_CONTROLLERS] =
|
||||
{
|
||||
50, 125, 200, 440, 515, 590
|
||||
};
|
||||
|
||||
|
||||
const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User+2);
|
||||
|
||||
|
||||
ScreenMapControllers::ScreenMapControllers()
|
||||
{
|
||||
LOG->Trace( "ScreenMapControllers::ScreenMapControllers()" );
|
||||
|
||||
for( int b=0; b<GAMESTATE->GetCurrentGameDef()->m_iButtonsPerController; b++ )
|
||||
{
|
||||
CString sName = GAMESTATE->GetCurrentGameDef()->m_szButtonNames[b];
|
||||
CString sSecondary = GAMESTATE->GetCurrentGameDef()->m_szSecondaryFunction[b];
|
||||
|
||||
m_textName[b].LoadFromFont( THEME->GetPathTo("Fonts","Header2") );
|
||||
m_textName[b].SetXY( CENTER_X, LINE_START_Y + b*LINE_GAP_Y-6 );
|
||||
m_textName[b].SetText( sName );
|
||||
m_textName[b].SetZoom( 0.7f );
|
||||
m_textName[b].SetShadowLength( 2 );
|
||||
this->AddChild( &m_textName[b] );
|
||||
|
||||
m_textName2[b].LoadFromFont( THEME->GetPathTo("Fonts","Header2") );
|
||||
m_textName2[b].SetXY( CENTER_X, LINE_START_Y + b*LINE_GAP_Y+6 );
|
||||
m_textName2[b].SetText( sSecondary );
|
||||
m_textName2[b].SetZoom( 0.5f );
|
||||
m_textName2[b].SetShadowLength( 2 );
|
||||
this->AddChild( &m_textName2[b] );
|
||||
|
||||
for( int p=0; p<MAX_GAME_CONTROLLERS; p++ )
|
||||
{
|
||||
for( int s=0; s<NUM_GAME_TO_DEVICE_SLOTS; s++ )
|
||||
{
|
||||
m_textMappedTo[p][b][s].LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||
m_textMappedTo[p][b][s].SetXY( BUTTON_COLUMN_X[p*NUM_GAME_TO_DEVICE_SLOTS+s], LINE_START_Y + b*LINE_GAP_Y );
|
||||
m_textMappedTo[p][b][s].SetZoom( 0.5f );
|
||||
m_textMappedTo[p][b][s].SetShadowLength( 2 );
|
||||
this->AddChild( &m_textMappedTo[p][b][s] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_textError.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||
m_textError.SetText( "" );
|
||||
m_textError.SetXY( CENTER_X, CENTER_Y );
|
||||
m_textError.SetDiffuse( D3DXCOLOR(0,1,0,0) );
|
||||
m_textError.SetZoom( 0.8f );
|
||||
this->AddChild( &m_textError );
|
||||
|
||||
|
||||
m_iCurController = 0;
|
||||
m_iCurButton = 0;
|
||||
m_iCurSlot = 0;
|
||||
|
||||
m_bWaitingForPress = false;
|
||||
|
||||
m_Menu.Load(
|
||||
THEME->GetPathTo("BGAnimations","map controllers"),
|
||||
THEME->GetPathTo("Graphics","map controllers top edge"),
|
||||
HELP_TEXT, false, false, 99
|
||||
);
|
||||
m_Menu.TweenOnScreenFromBlack( SM_None );
|
||||
this->AddChild( &m_Menu );
|
||||
|
||||
MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","map controllers music") );
|
||||
|
||||
Refresh();
|
||||
}
|
||||
|
||||
|
||||
|
||||
ScreenMapControllers::~ScreenMapControllers()
|
||||
{
|
||||
LOG->Trace( "ScreenMapControllers::~ScreenMapControllers()" );
|
||||
}
|
||||
|
||||
|
||||
void ScreenMapControllers::Update( float fDeltaTime )
|
||||
{
|
||||
Screen::Update( fDeltaTime );
|
||||
|
||||
for( int b=0; b<GAMESTATE->GetCurrentGameDef()->m_iButtonsPerController; b++ )
|
||||
{
|
||||
CString sButtonName = GAMESTATE->GetCurrentGameDef()->m_szButtonNames[b];
|
||||
|
||||
if( sButtonName == "Start" || sButtonName == "Back" )
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ScreenMapControllers::DrawPrimitives()
|
||||
{
|
||||
m_Menu.DrawBottomLayer();
|
||||
Screen::DrawPrimitives();
|
||||
m_Menu.DrawTopLayer();
|
||||
}
|
||||
|
||||
void ScreenMapControllers::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||
{
|
||||
if( type != IET_FIRST_PRESS && type != IET_SLOW_REPEAT )
|
||||
return; // ignore
|
||||
|
||||
LOG->Trace( "ScreenMapControllers::Input(): device: %d, button: %d",
|
||||
DeviceI.device, DeviceI.button );
|
||||
|
||||
if( m_bWaitingForPress ) // we're going to map an input
|
||||
{
|
||||
// ignore joystick D-Pad presses if the user has set their pref.
|
||||
if( PREFSMAN->m_bIgnoreJoyAxes &&
|
||||
DEVICE_JOY1 <= DeviceI.device && DeviceI.device <= DEVICE_JOY4 &&
|
||||
( DeviceI.button == JOY_LEFT || DeviceI.button == JOY_RIGHT || DeviceI.button == JOY_UP || DeviceI.button == JOY_DOWN ) )
|
||||
{
|
||||
//m_textError.SetText( "Game option is set to ignore the Joystick D-Pad." );
|
||||
//m_fErrorDisplayCountdown = 5; // show the error message
|
||||
m_textError.SetDiffuse( D3DXCOLOR(0,1,0,1) );
|
||||
m_textError.BeginTweening( 3 );
|
||||
m_textError.BeginTweening( 1 );
|
||||
m_textError.SetTweenDiffuse( D3DXCOLOR(0,1,0,0) );
|
||||
|
||||
return; // ignore this press
|
||||
}
|
||||
|
||||
GameInput curGameI( (GameController)m_iCurController,
|
||||
(GameButton)m_iCurButton );
|
||||
|
||||
INPUTMAPPER->SetInputMap( DeviceI, curGameI, m_iCurSlot );
|
||||
INPUTMAPPER->AddDefaultMappingsForCurrentGameIfUnmapped();
|
||||
// commit to disk so we don't lose the changes!
|
||||
INPUTMAPPER->SaveMappingsToDisk();
|
||||
|
||||
m_bWaitingForPress = false;
|
||||
}
|
||||
else if( DeviceI.device == DEVICE_KEYBOARD )
|
||||
{
|
||||
switch( DeviceI.button )
|
||||
{
|
||||
/* We only advertise space as doing this, but most games
|
||||
* use either backspace or delete, and I find them more
|
||||
* intuitive, so allow them, too. -gm */
|
||||
case DIK_SPACE:
|
||||
case DIK_DELETE:
|
||||
case DIK_BACK: /* Clear the selected input mapping. */
|
||||
{
|
||||
GameInput curGameI( (GameController)m_iCurController, (GameButton)m_iCurButton );
|
||||
INPUTMAPPER->ClearFromInputMap( curGameI, m_iCurSlot );
|
||||
INPUTMAPPER->AddDefaultMappingsForCurrentGameIfUnmapped();
|
||||
// commit to disk so we don't lose the changes!
|
||||
INPUTMAPPER->SaveMappingsToDisk();
|
||||
}
|
||||
break;
|
||||
case DIK_LEFT: /* Move the selection left, wrapping up. */
|
||||
if( m_iCurSlot == 0 && m_iCurController == 0 )
|
||||
break; // can't go left any more
|
||||
m_iCurSlot--;
|
||||
if( m_iCurSlot < 0 )
|
||||
{
|
||||
m_iCurSlot = NUM_CHANGABLE_SLOTS-1;
|
||||
m_iCurController--;
|
||||
}
|
||||
break;
|
||||
case DIK_RIGHT: /* Move the selection right, wrapping down. */
|
||||
if( m_iCurSlot == NUM_CHANGABLE_SLOTS-1 && m_iCurController == MAX_GAME_CONTROLLERS-1 )
|
||||
break; // can't go right any more
|
||||
m_iCurSlot++;
|
||||
if( m_iCurSlot > NUM_CHANGABLE_SLOTS-1 )
|
||||
{
|
||||
m_iCurSlot = 0;
|
||||
m_iCurController++;
|
||||
}
|
||||
break;
|
||||
case DIK_UP: /* Move the selection up. */
|
||||
if( m_iCurButton == 0 )
|
||||
break; // can't go up any more
|
||||
m_iCurButton--;
|
||||
break;
|
||||
case DIK_DOWN: /* Move the selection down. */
|
||||
if( m_iCurButton == GAMESTATE->GetCurrentGameDef()->m_iButtonsPerController-1 )
|
||||
break; // can't go down any more
|
||||
m_iCurButton++;
|
||||
break;
|
||||
case DIK_ESCAPE: /* Quit the screen. */
|
||||
m_Menu.TweenOffScreenToBlack( SM_GoToNextScreen, true );
|
||||
break;
|
||||
case DIK_RETURN: /* Change the selection. */
|
||||
m_bWaitingForPress = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default handler
|
||||
|
||||
LOG->Trace( "m_iCurSlot: %d m_iCurController: %d m_iCurButton: %d", m_iCurSlot, m_iCurController, m_iCurButton );
|
||||
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void ScreenMapControllers::HandleScreenMessage( const ScreenMessage SM )
|
||||
{
|
||||
switch( SM )
|
||||
{
|
||||
case SM_GoToNextScreen:
|
||||
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ScreenMapControllers::Refresh()
|
||||
{
|
||||
for( int p=0; p<MAX_GAME_CONTROLLERS; p++ )
|
||||
{
|
||||
for( int b=0; b<GAMESTATE->GetCurrentGameDef()->m_iButtonsPerController; b++ )
|
||||
{
|
||||
for( int s=0; s<NUM_GAME_TO_DEVICE_SLOTS; s++ )
|
||||
{
|
||||
GameInput cur_gi( (GameController)p, (GameButton)b );
|
||||
DeviceInput di;
|
||||
if( INPUTMAPPER->GameToDevice( cur_gi, s, di ) )
|
||||
m_textMappedTo[p][b][s].SetText( di.GetDescription() );
|
||||
else
|
||||
m_textMappedTo[p][b][s].SetText( "-----------" );
|
||||
|
||||
// highlight the currently selected pad button
|
||||
D3DXCOLOR color;
|
||||
if( p == m_iCurController && b == m_iCurButton && s == m_iCurSlot )
|
||||
{
|
||||
if( m_bWaitingForPress )
|
||||
color = D3DXCOLOR(1,0.5,0.5,1); // red
|
||||
else
|
||||
color = D3DXCOLOR(1,1,1,1); // white
|
||||
}
|
||||
else
|
||||
color = D3DXCOLOR(0.5,0.5,0.5,1); // gray
|
||||
m_textMappedTo[p][b][s].SetDiffuse( color );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: ScreenMapControllers
|
||||
|
||||
Desc: Where the player maps device input to instrument buttons.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "Screen.h"
|
||||
#include "Sprite.h"
|
||||
#include "BitmapText.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "GrayArrow.h"
|
||||
#include "InputMapper.h"
|
||||
#include "MenuElements.h"
|
||||
|
||||
|
||||
class ScreenMapControllers : public Screen
|
||||
{
|
||||
public:
|
||||
ScreenMapControllers();
|
||||
virtual ~ScreenMapControllers();
|
||||
|
||||
virtual void Update( float fDeltaTime );
|
||||
virtual void DrawPrimitives();
|
||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||
|
||||
private:
|
||||
void KeyLeft();
|
||||
void KeyRight();
|
||||
void KeyUp();
|
||||
void KeyDown();
|
||||
void KeyBack();
|
||||
void KeyStart();
|
||||
|
||||
void Refresh();
|
||||
|
||||
|
||||
int m_iCurController;
|
||||
int m_iCurButton;
|
||||
int m_iCurSlot;
|
||||
bool m_bWaitingForPress;
|
||||
|
||||
BitmapText m_textError;
|
||||
BitmapText m_textName[MAX_GAME_BUTTONS];
|
||||
BitmapText m_textName2[MAX_GAME_BUTTONS];
|
||||
BitmapText m_textMappedTo[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS][NUM_GAME_TO_DEVICE_SLOTS];
|
||||
|
||||
MenuElements m_Menu;
|
||||
|
||||
};
|
||||
|
||||
@@ -71,6 +71,8 @@ ScreenSelectGame::ScreenSelectGame() :
|
||||
g_SelectGameLines,
|
||||
NUM_SELECT_GAME_LINES,
|
||||
false );
|
||||
m_Menu.SetTimer( 99 );
|
||||
m_Menu.StopTimer();
|
||||
|
||||
MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","select game music") );
|
||||
}
|
||||
|
||||
@@ -365,9 +365,9 @@ ScreenStage::ScreenStage()
|
||||
|
||||
for (i=0; i<2; i++) // specify the font file.
|
||||
{
|
||||
m_ez2ukm[i].LoadFromFont( THEME->GetPathTo("Fonts","Stage") );
|
||||
m_ez2ukm[i].LoadFromFont( THEME->GetPathTo("Fonts","Stage ez2") );
|
||||
m_ez2ukm[i].TurnShadowOff();
|
||||
m_stagedesc[i].LoadFromFont( THEME->GetPathTo("Fonts","Stage") );
|
||||
m_stagedesc[i].LoadFromFont( THEME->GetPathTo("Fonts","Stage ez2") );
|
||||
m_stagedesc[i].TurnShadowOff();
|
||||
}
|
||||
|
||||
@@ -481,7 +481,7 @@ ScreenStage::ScreenStage()
|
||||
|
||||
|
||||
// write the stage name
|
||||
m_stagename.LoadFromFont( THEME->GetPathTo("Fonts","Stage") );
|
||||
m_stagename.LoadFromFont( THEME->GetPathTo("Fonts","Stage ez2") );
|
||||
m_stagename.TurnShadowOff();
|
||||
|
||||
m_stagename.SetXY( CENTER_X+400, CENTER_Y-30+element_y_offsets ); // set initial position
|
||||
|
||||
@@ -210,7 +210,7 @@ void ScreenTitleMenu::HandleScreenMessage( const ScreenMessage SM )
|
||||
SCREENMAN->SetNewScreen( "ScreenSelectGame" );
|
||||
break;
|
||||
case CHOICE_MAP_INSTRUMENTS:
|
||||
SCREENMAN->SetNewScreen( "ScreenMapInstruments" );
|
||||
SCREENMAN->SetNewScreen( "ScreenMapControllers" );
|
||||
break;
|
||||
case CHOICE_INPUT_OPTIONS:
|
||||
SCREENMAN->SetNewScreen( "ScreenInputOptions" );
|
||||
@@ -241,6 +241,7 @@ void ScreenTitleMenu::HandleScreenMessage( const ScreenMessage SM )
|
||||
case GAME_DANCE: GAMESTATE->m_CurStyle = STYLE_DANCE_VERSUS; break;
|
||||
case GAME_PUMP: GAMESTATE->m_CurStyle = STYLE_PUMP_VERSUS; break;
|
||||
case GAME_EZ2: GAMESTATE->m_CurStyle = STYLE_EZ2_SINGLE_VERSUS; break;
|
||||
case GAME_PARA: GAMESTATE->m_CurStyle = STYLE_PARA_SINGLE; break;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "NotesLoaderKSF.h"
|
||||
#include "NotesWriterDWI.h"
|
||||
|
||||
const int FILE_CACHE_VERSION = 70; // increment this when Song or Notes changes to invalidate cache
|
||||
const int FILE_CACHE_VERSION = 73; // increment this when Song or Notes changes to invalidate cache
|
||||
|
||||
|
||||
int CompareBPMSegments(const void *arg1, const void *arg2)
|
||||
|
||||
@@ -56,10 +56,10 @@ LINK32=link.exe
|
||||
# ADD LINK32 $(intdir)\verstub.obj /nologo /subsystem:windows /map /debug /machine:I386
|
||||
# Begin Special Build Tool
|
||||
IntDir=.\../Release6
|
||||
TargetDir=\Stepmania\stepmania
|
||||
TargetDir=\stepmania\stepmania
|
||||
TargetName=StepMania
|
||||
SOURCE="$(InputPath)"
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -91,10 +91,10 @@ LINK32=link.exe
|
||||
# SUBTRACT LINK32 /profile /incremental:no /nodefaultlib
|
||||
# Begin Special Build Tool
|
||||
IntDir=.\../Debug6
|
||||
TargetDir=\Stepmania\stepmania
|
||||
TargetDir=\stepmania\stepmania
|
||||
TargetName=StepMania-debug
|
||||
SOURCE="$(InputPath)"
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -1192,11 +1192,11 @@ SOURCE=.\ScreenManager.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenMapInstruments.cpp
|
||||
SOURCE=.\ScreenMapControllers.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenMapInstruments.h
|
||||
SOURCE=.\ScreenMapControllers.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
||||
@@ -262,10 +262,10 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
RelativePath="ScreenManager.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScreenMapInstruments.cpp">
|
||||
RelativePath="ScreenMapControllers.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScreenMapInstruments.h">
|
||||
RelativePath="ScreenMapControllers.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScreenMessage.h">
|
||||
|
||||
Reference in New Issue
Block a user