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