remove ScreenAward
This commit is contained in:
@@ -21,7 +21,7 @@ $(srcdir)/libresample/libresample.a:
|
||||
cd $(srcdir)/libresample && autoconf && sh ./configure && make
|
||||
|
||||
Screens = \
|
||||
Screen.cpp Screen.h ScreenAttract.cpp ScreenAttract.h ScreenAward.cpp ScreenAward.h \
|
||||
Screen.cpp Screen.h ScreenAttract.cpp ScreenAttract.h \
|
||||
ScreenBookkeeping.cpp ScreenBookkeeping.h ScreenBranch.cpp ScreenBranch.h ScreenCaution.cpp ScreenCaution.h \
|
||||
ScreenCenterImage.cpp ScreenCenterImage.h ScreenCredits.cpp ScreenCredits.h \
|
||||
ScreenDemonstration.cpp ScreenDemonstration.h ScreenDimensions.h \
|
||||
|
||||
@@ -293,7 +293,6 @@ void Screen::ClearMessageQueue( const ScreenMessage SM )
|
||||
#include "ScreenBookkeeping.h"
|
||||
#include "ScreenBranch.h"
|
||||
#include "ScreenEnding.h"
|
||||
#include "ScreenAward.h"
|
||||
#include "ScreenDownloadMachineStats.h"
|
||||
#include "ScreenSetTime.h"
|
||||
#include "ScreenTestLights.h"
|
||||
@@ -362,7 +361,6 @@ Screen* Screen::Create( CString sClassName )
|
||||
IF_RETURN( ScreenBookkeeping );
|
||||
IF_RETURN( ScreenBranch );
|
||||
IF_RETURN( ScreenEnding );
|
||||
IF_RETURN( ScreenAward );
|
||||
IF_RETURN( ScreenDownloadMachineStats );
|
||||
IF_RETURN( ScreenSetTime );
|
||||
IF_RETURN( ScreenTestLights );
|
||||
|
||||
@@ -1,193 +0,0 @@
|
||||
#include "global.h"
|
||||
#include "ScreenAward.h"
|
||||
#include "ScreenManager.h"
|
||||
#include "AnnouncerManager.h"
|
||||
#include "RageSounds.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "GameState.h"
|
||||
#include "SongManager.h"
|
||||
#include "Steps.h"
|
||||
#include "Style.h"
|
||||
#include "CodeDetector.h"
|
||||
#include "ProfileManager.h"
|
||||
#include "StepMania.h"
|
||||
#include "CryptManager.h"
|
||||
|
||||
|
||||
#define NEXT_SCREEN THEME->GetMetric (m_sName,"NextScreen")
|
||||
|
||||
|
||||
ScreenAward::ScreenAward( CString sName ) : ScreenWithMenuElements( sName )
|
||||
{
|
||||
bool bEitherPlayerHasAward = false;
|
||||
ZERO( m_bSavedScreenshot );
|
||||
|
||||
FOREACH_PlayerNumber( p )
|
||||
{
|
||||
if( !GAMESTATE->IsHumanPlayer(p) )
|
||||
continue;
|
||||
|
||||
CString sAward;
|
||||
CString sDescription;
|
||||
if( !GAMESTATE->m_vLastPerDifficultyAwards[p].empty() )
|
||||
{
|
||||
PerDifficultyAward pda = GAMESTATE->m_vLastPerDifficultyAwards[p].front();
|
||||
GAMESTATE->m_vLastPerDifficultyAwards[p].pop_front();
|
||||
sAward = PerDifficultyAwardToString( pda );
|
||||
sDescription =
|
||||
PerDifficultyAwardToThemedString( pda ) + "\n" +
|
||||
DifficultyToThemedString( GAMESTATE->m_pCurSteps[p]->GetDifficulty() );
|
||||
}
|
||||
else if( !GAMESTATE->m_vLastPeakComboAwards[p].empty() )
|
||||
{
|
||||
PeakComboAward pca = GAMESTATE->m_vLastPeakComboAwards[p].front();
|
||||
GAMESTATE->m_vLastPeakComboAwards[p].pop_front();
|
||||
sAward = PeakComboAwardToString( pca );
|
||||
sDescription = PeakComboAwardToThemedString( pca );
|
||||
}
|
||||
|
||||
if( sAward.empty() )
|
||||
continue; // skip this player
|
||||
|
||||
bEitherPlayerHasAward = true;
|
||||
|
||||
m_Received[p].Load( THEME->GetPathG(m_sName,"received") );
|
||||
m_Received[p]->SetName( ssprintf("ReceivedP%d",p+1) );
|
||||
SET_XY_AND_ON_COMMAND( m_Received[p] );
|
||||
this->AddChild( m_Received[p] );
|
||||
|
||||
m_Trophy[p].Load( THEME->GetPathG(m_sName,"trophy "+sAward) );
|
||||
m_Trophy[p]->SetName( ssprintf("TrophyP%d",p+1) );
|
||||
SET_XY_AND_ON_COMMAND( m_Trophy[p] );
|
||||
this->AddChild( m_Trophy[p] );
|
||||
|
||||
m_textDescription[p].LoadFromFont( THEME->GetPathF(m_sName,"description") );
|
||||
m_textDescription[p].SetName( ssprintf("DescriptionP%d",p+1) );
|
||||
m_textDescription[p].SetText( sDescription );
|
||||
SET_XY_AND_ON_COMMAND( m_textDescription[p] );
|
||||
this->AddChild( &m_textDescription[p] );
|
||||
}
|
||||
|
||||
if( !bEitherPlayerHasAward )
|
||||
{
|
||||
HandleScreenMessage( SM_GoToNextScreen );
|
||||
return;
|
||||
}
|
||||
|
||||
SOUND->PlayMusic( THEME->GetPathToS( m_sName + " music") );
|
||||
}
|
||||
|
||||
void ScreenAward::DrawPrimitives()
|
||||
{
|
||||
Screen::DrawPrimitives();
|
||||
}
|
||||
|
||||
void ScreenAward::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||
{
|
||||
// LOG->Trace( "ScreenAward::Input()" );
|
||||
|
||||
if( IsTransitioning() )
|
||||
return;
|
||||
|
||||
|
||||
if( GameI.IsValid() )
|
||||
{
|
||||
PlayerNumber pn = GAMESTATE->GetCurrentStyle()->ControllerToPlayerNumber( GameI.controller );
|
||||
|
||||
if( CodeDetector::EnteredCode(GameI.controller, CodeDetector::CODE_SAVE_SCREENSHOT) )
|
||||
{
|
||||
if( !m_bSavedScreenshot[pn] && // only allow one screenshot
|
||||
PROFILEMAN->IsUsingProfile(pn) )
|
||||
{
|
||||
Profile* pProfile = PROFILEMAN->GetProfile(pn);
|
||||
CString sDir = PROFILEMAN->GetProfileDir((ProfileSlot)pn) + "Screenshots/";
|
||||
int iScreenshotIndex = pProfile->GetNextScreenshotIndex();
|
||||
CString sFileName = SaveScreenshot( sDir, true, true, iScreenshotIndex );
|
||||
CString sPath = sDir+sFileName;
|
||||
|
||||
if( !sFileName.empty() )
|
||||
{
|
||||
Screenshot screenshot;
|
||||
screenshot.sFileName = sFileName;
|
||||
screenshot.sMD5 = CRYPTMAN->GetMD5( sPath );
|
||||
// FIXME: save HighScore
|
||||
pProfile->AddScreenshot( screenshot );
|
||||
}
|
||||
|
||||
m_bSavedScreenshot[pn] = true;
|
||||
return; // handled
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Screen::Input( DeviceI, type, GameI, MenuI, StyleI );
|
||||
}
|
||||
|
||||
void ScreenAward::HandleScreenMessage( const ScreenMessage SM )
|
||||
{
|
||||
switch( SM )
|
||||
{
|
||||
case SM_MenuTimer:
|
||||
MenuStart( PLAYER_INVALID );
|
||||
break;
|
||||
case SM_GoToNextScreen:
|
||||
// TRICKY: Keep looping on this screen until all awards are shown
|
||||
bool bMoreAwardsLeft = false;
|
||||
FOREACH_PlayerNumber( p )
|
||||
{
|
||||
if( !GAMESTATE->IsHumanPlayer(p) )
|
||||
continue;
|
||||
|
||||
if( !GAMESTATE->m_vLastPerDifficultyAwards[p].empty() ||
|
||||
!GAMESTATE->m_vLastPeakComboAwards[p].empty() )
|
||||
{
|
||||
bMoreAwardsLeft = true;
|
||||
}
|
||||
}
|
||||
if( bMoreAwardsLeft )
|
||||
SCREENMAN->SetNewScreen( m_sName );
|
||||
else
|
||||
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ScreenAward::MenuStart( PlayerNumber pn )
|
||||
{
|
||||
FOREACH_PlayerNumber( p )
|
||||
{
|
||||
if( !GAMESTATE->IsHumanPlayer(p) )
|
||||
continue;
|
||||
|
||||
OFF_COMMAND( m_Received[p] );
|
||||
OFF_COMMAND( m_Trophy[p] );
|
||||
OFF_COMMAND( m_textDescription[p] );
|
||||
}
|
||||
|
||||
StartTransitioning( SM_GoToNextScreen );
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2004 Chris Danford
|
||||
* 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.
|
||||
*/
|
||||
@@ -1,53 +0,0 @@
|
||||
#ifndef SCREEN_AWARD_H
|
||||
#define SCREEN_AWARD_H
|
||||
|
||||
#include "ScreenWithMenuElements.h"
|
||||
#include "BitmapText.h"
|
||||
#include "ActorUtil.h"
|
||||
|
||||
|
||||
class ScreenAward : public ScreenWithMenuElements
|
||||
{
|
||||
public:
|
||||
ScreenAward( CString sName );
|
||||
|
||||
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 );
|
||||
|
||||
virtual void MenuStart( PlayerNumber pn );
|
||||
|
||||
private:
|
||||
bool m_bSavedScreenshot[NUM_PLAYERS];
|
||||
|
||||
AutoActor m_Received[NUM_PLAYERS];
|
||||
AutoActor m_Trophy[NUM_PLAYERS];
|
||||
BitmapText m_textDescription[NUM_PLAYERS];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2003-2004 Chris Danford
|
||||
* 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.
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ IntDir=.\../Debug6
|
||||
TargetDir=\stepmania\stepmania\Program
|
||||
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
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -99,7 +99,7 @@ IntDir=.\../Release6
|
||||
TargetDir=\stepmania\stepmania\Program
|
||||
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
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -2309,14 +2309,6 @@ SOURCE=.\ScreenAttract.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenAward.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenAward.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenBookkeeping.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -175,12 +175,6 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\
|
||||
<File
|
||||
RelativePath="ScreenAttract.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScreenAward.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScreenAward.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScreenBookkeeping.cpp">
|
||||
</File>
|
||||
|
||||
Reference in New Issue
Block a user