From 6cca66a1ab6dad8247678a115a65c9f56f0812a5 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 4 Jul 2005 23:38:07 +0000 Subject: [PATCH] allow running a command before initting gameplay --- stepmania/src/ScreenGameplay.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 939b348911..76dddb2913 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -62,6 +62,7 @@ #define SONG_POSITION_METER_WIDTH THEME->GetMetricF(m_sName,"SongPositionMeterWidth") #define PLAYER_X( p, styleType ) THEME->GetMetricF(m_sName,ssprintf("PlayerP%d%sX",p+1,StyleTypeToString(styleType).c_str())) #define STOP_COURSE_EARLY THEME->GetMetricB(m_sName,"StopCourseEarly") // evaluate this every time it's used +#define PRE_INIT_COMMAND THEME->GetMetricA(m_sName,"ScreenPreInitCommand") static ThemeMetric INITIAL_BACKGROUND_BRIGHTNESS ("ScreenGameplay","InitialBackgroundBrightness"); static ThemeMetric SECONDS_BETWEEN_COMMENTS ("ScreenGameplay","SecondsBetweenComments"); @@ -103,6 +104,10 @@ ScreenGameplay::ScreenGameplay( CString sName ) : ScreenWithMenuElements(sName) void ScreenGameplay::Init() { + // Experimental: run a pre-command on the screen itself, to allow setting up + // state before initializing actors. + this->RunCommands( PRE_INIT_COMMAND ); + ScreenWithMenuElements::Init(); /* Pause MEMCARDMAN. If a memory card is remove, we don't want to interrupt the