From 502f6fa0b681b086fadd0db9add7aaadab7e9592 Mon Sep 17 00:00:00 2001 From: Andrew Livy Date: Sun, 11 May 2003 22:19:40 +0000 Subject: [PATCH] Some rather massive changes to Evaluation to allow for theming of Pump It Up style Evaluation Screens. In Short: A sound plays each time a judgement appears on the screen. I've made a fair few options available for themers on this one... hence so many redir files. --- stepmania/Data/Unlocks.dat | 7 +-- stepmania/Themes/default/metrics.ini | 72 ++++++++++++++++++++++++++++ stepmania/src/Actor.cpp | 6 ++- stepmania/src/Actor.h | 4 +- stepmania/src/ScreenEvaluation.cpp | 30 +++++++++++- stepmania/src/ScreenEvaluation.h | 5 ++ stepmania/src/StepMania.RC | 7 +++ stepmania/src/StepMania.dsp | 10 ++-- stepmania/src/resource.h | 3 +- 9 files changed, 129 insertions(+), 15 deletions(-) diff --git a/stepmania/Data/Unlocks.dat b/stepmania/Data/Unlocks.dat index 6d6a499801..6de9c313b1 100644 --- a/stepmania/Data/Unlocks.dat +++ b/stepmania/Data/Unlocks.dat @@ -1,4 +1,5 @@ //Test file for Miryo's new Unlock system. Songs are matched by name, not folder name -[DP]500|Gamelan de Couple -[DP]7500|Exotic Ethnic -[DP]10000|Maxx Unlimited \ No newline at end of file +// [DP]500|Gamelan de Couple +// [DP]7500|Exotic Ethnic +// [DP]10000|Maxx Unlimited +[DP]4000|Paranoia Survivor Max \ No newline at end of file diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 2cfe30a545..9b11f79117 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -861,6 +861,15 @@ TickEarlySeconds=0.05 [ScreenEvaluation] BannerWidth=248 BannerHeight=92 +JudgeSoundTimeMarvelous=-1 +JudgeSoundTimePerfect=-1 +JudgeSoundTimeGreat=-1 +JudgeSoundTimeGood=-1 +JudgeSoundTimeBoo=-1 +JudgeSoundTimeMiss=-1 +JudgeSoundTimeOK=-1 +JudgeSoundTimeMaxCombo=-1 // how long to wait until we play the sound after the screen appears.... -1 means play no sound ever. +JudgeSoundIfJudgeGraphicsFullAlpha=0 // only play the sound if one of the judge graphics for the associated sound are full alpha LargeBannerX=320 LargeBannerY=100 LargeBannerOnCommand=addy,480;sleep,0.0;decelerate,0.3;addy,-480 @@ -1230,6 +1239,15 @@ ShowScoreArea=1 ShowTimeArea=0 HelpText=Press START to continue TimerSeconds=15 +JudgeSoundTimeMarvelous=-1 +JudgeSoundTimePerfect=-1 +JudgeSoundTimeGreat=-1 +JudgeSoundTimeGood=-1 +JudgeSoundTimeBoo=-1 +JudgeSoundTimeMiss=-1 +JudgeSoundTimeOK=-1 +JudgeSoundTimeMaxCombo=-1 +JudgeSoundIfJudgeGraphicsFullAlpha=0 [ScreenEvaluationSummary] NextScreen=ScreenNameEntry @@ -1252,6 +1270,15 @@ ShowScoreArea=1 ShowTimeArea=0 HelpText=Press START to continue TimerSeconds=30 +JudgeSoundTimeMarvelous=-1 +JudgeSoundTimePerfect=-1 +JudgeSoundTimeGreat=-1 +JudgeSoundTimeGood=-1 +JudgeSoundTimeBoo=-1 +JudgeSoundTimeMiss=-1 +JudgeSoundTimeOK=-1 +JudgeSoundTimeMaxCombo=-1 +JudgeSoundIfJudgeGraphicsFullAlpha=0 [ScreenEvaluationNonstop] NextScreen=ScreenNameEntry @@ -1274,6 +1301,15 @@ ShowScoreArea=1 ShowTimeArea=0 HelpText=Press START to continue TimerSeconds=30 +JudgeSoundTimeMarvelous=-1 +JudgeSoundTimePerfect=-1 +JudgeSoundTimeGreat=-1 +JudgeSoundTimeGood=-1 +JudgeSoundTimeBoo=-1 +JudgeSoundTimeMiss=-1 +JudgeSoundTimeOK=-1 +JudgeSoundTimeMaxCombo=-1 +JudgeSoundIfJudgeGraphicsFullAlpha=0 [ScreenEvaluationOni] NextScreen=ScreenNameEntry @@ -1296,6 +1332,15 @@ ShowScoreArea=0 ShowTimeArea=1 HelpText=Press START to continue TimerSeconds=30 +JudgeSoundTimeMarvelous=-1 +JudgeSoundTimePerfect=-1 +JudgeSoundTimeGreat=-1 +JudgeSoundTimeGood=-1 +JudgeSoundTimeBoo=-1 +JudgeSoundTimeMiss=-1 +JudgeSoundTimeOK=-1 +JudgeSoundTimeMaxCombo=-1 +JudgeSoundIfJudgeGraphicsFullAlpha=0 [ScreenEvaluationEndless] NextScreen=ScreenNameEntry @@ -1318,6 +1363,15 @@ ShowScoreArea=0 ShowTimeArea=1 HelpText=Press START to continue TimerSeconds=30 +JudgeSoundTimeMarvelous=-1 +JudgeSoundTimePerfect=-1 +JudgeSoundTimeGreat=-1 +JudgeSoundTimeGood=-1 +JudgeSoundTimeBoo=-1 +JudgeSoundTimeMiss=-1 +JudgeSoundTimeOK=-1 +JudgeSoundTimeMaxCombo=-1 +JudgeSoundIfJudgeGraphicsFullAlpha=0 [ScreenEvaluationBattle] NextScreen=ScreenSelectMusic @@ -1340,6 +1394,15 @@ ShowScoreArea=1 ShowTimeArea=0 HelpText=Press START to continue TimerSeconds=15 +JudgeSoundTimeMarvelous=-1 +JudgeSoundTimePerfect=-1 +JudgeSoundTimeGreat=-1 +JudgeSoundTimeGood=-1 +JudgeSoundTimeBoo=-1 +JudgeSoundTimeMiss=-1 +JudgeSoundTimeOK=-1 +JudgeSoundTimeMaxCombo=-1 +JudgeSoundIfJudgeGraphicsFullAlpha=0 [ScreenEvaluationRave] NextScreen=ScreenSelectMusic @@ -1362,6 +1425,15 @@ ShowScoreArea=1 ShowTimeArea=0 HelpText=Press START to continue TimerSeconds=15 +JudgeSoundTimeMarvelous=-1 +JudgeSoundTimePerfect=-1 +JudgeSoundTimeGreat=-1 +JudgeSoundTimeGood=-1 +JudgeSoundTimeBoo=-1 +JudgeSoundTimeMiss=-1 +JudgeSoundTimeOK=-1 +JudgeSoundTimeMaxCombo=-1 +JudgeSoundIfJudgeGraphicsFullAlpha=0 [ScreenMusicScroll] ScrollDelay=0.2 diff --git a/stepmania/src/Actor.cpp b/stepmania/src/Actor.cpp index e2da5303d8..1b7db45ac8 100644 --- a/stepmania/src/Actor.cpp +++ b/stepmania/src/Actor.cpp @@ -18,6 +18,7 @@ #include "RageMath.h" #include "GameConstantsAndTypes.h" #include "RageLog.h" +#include "ThemeManager.h" /* This is Reset instead of Init since many derived classes have Init() functions * that shouldn't change the position of the actor. */ @@ -280,6 +281,7 @@ void Actor::Update( float fDeltaTime ) if( m_bFirstUpdate ) m_bFirstUpdate = false; + } void Actor::BeginTweening( float time, TweenType tt ) @@ -646,6 +648,8 @@ void Actor::Command( CString sCommandString ) CStringArray asCommands; split( sCommandString, ";", asCommands, true ); + float fTimeElapsed=0; + for( unsigned c=0; c m_TweenStates; vector m_TweenInfo; + TweenState& LatestTween() { ASSERT(m_TweenStates.size()>0); return m_TweenStates.back(); }; // @@ -277,8 +277,6 @@ protected: // TweenState m_temp; - - bool m_bFirstUpdate; // diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index af0a131687..211c3f24a0 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -25,6 +25,7 @@ #include "ThemeManager.h" #include "RageSoundManager.h" #include "ActorUtil.h" +#include "RageTimer.h" const int NUM_SCORE_DIGITS = 9; @@ -87,6 +88,8 @@ const char* JUDGE_STRING[NUM_JUDGE_LINES] = { "Marvelous", "Perfect", "Great", " #define TRY_EXTRA_STAGE_UtilOffCommand THEME->GetMetric ("ScreenEvaluation",ssprintf("TryExtraStageUtilOffCommand")) */ +#define JUDGE_SOUND_TIME( name ) THEME->GetMetricF( m_sName, ssprintf("JudgeSoundTime%s", name) ); +#define SOUND_ON_FULL_ALPHA THEME->GetMetricB( m_sName, "JudgeSoundIfJudgeGraphicsFullAlpha" ) // metrics that are specific to classes derived from ScreenEvaluation #define NEXT_SCREEN THEME->GetMetric (m_sName,"NextScreen") #define END_SCREEN THEME->GetMetric (m_sName,"EndScreen") @@ -130,7 +133,6 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl m_sName = sClassName; m_Type = type; - int p; @@ -521,6 +523,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl int l; for( l=0; lm_bMarvelousTiming ) continue; // skip @@ -533,6 +536,9 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl UtilSetXYAndOnCommand( m_sprJudgeLabels[l], "ScreenEvaluation" ); this->AddChild( &m_sprJudgeLabels[l] ); + m_soundJudgeSound[l].Load( THEME->GetPathToS( ssprintf("ScreenEvaluation JudgeSound %s", JUDGE_STRING[l]) ) ); + m_TimeToPlayJudgeSound[l] = JUDGE_SOUND_TIME( JUDGE_STRING[l] ); + for( p=0; pIsPlayerEnabled( (PlayerNumber)p ) ) @@ -680,6 +686,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl SOUNDMAN->PlayMusic( THEME->GetPathToS("ScreenEvaluation music") ); + m_fScreenCreateTime = RageTimer::GetTimeSinceStart(); } @@ -798,10 +805,29 @@ void ScreenEvaluation::TweenOffScreen() UtilOffCommand( m_sprTryExtraStage, "ScreenEvaluation" ); } - void ScreenEvaluation::Update( float fDeltaTime ) { Screen::Update( fDeltaTime ); + + for( int l=0; l -# Microsoft Developer Studio Generated Build File, Format Version 60000 +# Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Application" 0x0101 @@ -57,10 +57,10 @@ LINK32=link.exe # SUBTRACT LINK32 /verbose /pdb:none # 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 @@ -92,10 +92,10 @@ LINK32=link.exe # SUBTRACT LINK32 /verbose /profile /pdb:none /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 diff --git a/stepmania/src/resource.h b/stepmania/src/resource.h index 7e2799270d..2dd9b7b30c 100644 --- a/stepmania/src/resource.h +++ b/stepmania/src/resource.h @@ -9,6 +9,7 @@ #define BITMAP_CRASH 121 #define IDD_DIALOG1 126 #define IDD_DIALOG2 127 +#define IDC_CURSOR1 128 #define BITMAP_ERROR 129 #define IDD_DISASM_CRASH 199 #define IDC_SHOCKWAVEFLASH1 1000 @@ -40,7 +41,7 @@ // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 128 +#define _APS_NEXT_RESOURCE_VALUE 129 #define _APS_NEXT_COMMAND_VALUE 40009 #define _APS_NEXT_CONTROL_VALUE 1015 #define _APS_NEXT_SYMED_VALUE 101