Skip to content

Commit

Permalink
kill everything course related until game compiles
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed May 3, 2017
1 parent c208c31 commit 2afc922
Show file tree
Hide file tree
Showing 109 changed files with 231 additions and 10,031 deletions.
12 changes: 0 additions & 12 deletions src/ActorUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "LuaManager.h"
#include "Foreach.h"
#include "Song.h"
#include "Course.h"
#include "GameState.h"

#include "arch/Dialog/Dialog.h"
Expand Down Expand Up @@ -152,17 +151,6 @@ namespace
pActor->AppendAttrFrom("Texture", pVal, false);
return "Sprite";
}
else if (sFile.EqualsNoCase("coursebanner"))
{
XNodeStringValue *pVal = new XNodeStringValue;
Course *pCourse = GAMESTATE->m_pCurCourse;
if (pCourse && pCourse->HasBanner())
pVal->SetValue(pCourse->GetBannerPath());
else
pVal->SetValue(THEME->GetPathG("Common", "fallback banner"));
pActor->AppendAttrFrom("Texture", pVal, false);
return "Sprite";
}
}

// Fallback: use XML tag name for actor class
Expand Down
11 changes: 0 additions & 11 deletions src/AdjustSync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ void AdjustSync::ResetAutosync()
bool AdjustSync::IsSyncDataChanged()
{
// Can't sync in course modes
if( GAMESTATE->IsCourseMode() )
return false;
vector<RString> vs;
AdjustSync::GetSyncChangeTextGlobal( vs );
AdjustSync::GetSyncChangeTextSong( vs );
Expand All @@ -94,9 +92,6 @@ bool AdjustSync::IsSyncDataChanged()

void AdjustSync::SaveSyncChanges()
{
if( GAMESTATE->IsCourseMode() )
return;

/* TODO: Save all of the timing data changes.
* Luckily, only the song timing data needs comparing here. */
if( GAMESTATE->m_pCurSong && s_vpTimingDataOriginal[0] != GAMESTATE->m_pCurSong->m_SongTiming )
Expand All @@ -119,8 +114,6 @@ void AdjustSync::SaveSyncChanges()

void AdjustSync::RevertSyncChanges()
{
if( GAMESTATE->IsCourseMode() )
return;
PREFSMAN->m_fGlobalOffsetSeconds.Set( s_fGlobalOffsetSecondsOriginal );

// The first one is ALWAYS the song timing.
Expand All @@ -143,8 +136,6 @@ static LocalizedString AUTOSYNC_CORRECTION_APPLIED ( "AdjustSync", "Autosync: Co
static LocalizedString AUTOSYNC_CORRECTION_NOT_APPLIED ( "AdjustSync", "Autosync: Correction NOT applied. Deviation too high." );
void AdjustSync::HandleAutosync( float fNoteOffBySeconds, float fStepTime )
{
if( GAMESTATE->IsCourseMode() )
return;
AutosyncType type = GAMESTATE->m_SongOptions.GetCurrent().m_AutosyncType;
switch( type ) {
case AutosyncType_Off:
Expand Down Expand Up @@ -174,8 +165,6 @@ void AdjustSync::HandleAutosync( float fNoteOffBySeconds, float fStepTime )

void AdjustSync::HandleSongEnd()
{
if( GAMESTATE->IsCourseMode() )
return;
if( GAMESTATE->m_SongOptions.GetCurrent().m_AutosyncType == AutosyncType_Tempo )
{
AutosyncTempo();
Expand Down
45 changes: 0 additions & 45 deletions src/BPMDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "RageUtil.h"
#include "GameConstantsAndTypes.h"
#include "GameState.h"
#include "Course.h"
#include "Style.h"
#include "ActorUtil.h"
#include "CommonMetrics.h"
Expand Down Expand Up @@ -210,29 +209,6 @@ void BPMDisplay::SetBpmFromSteps( const Steps* pSteps )
m_fCycleTime = 1.0f;
}

void BPMDisplay::SetBpmFromCourse( const Course* pCourse )
{
ASSERT( pCourse != NULL );
ASSERT( GAMESTATE->GetCurrentStyle(PLAYER_INVALID) != NULL );

StepsType st = GAMESTATE->GetCurrentStyle(PLAYER_INVALID)->m_StepsType;
Trail *pTrail = pCourse->GetTrail( st );
// GetTranslitFullTitle because "Crashinfo.txt is garbled because of the ANSI output as usual." -f
ASSERT_M( pTrail != NULL, ssprintf("Course '%s' has no trail for StepsType '%s'", pCourse->GetTranslitFullTitle().c_str(), StringConversion::ToString(st).c_str() ) );

m_fCycleTime = (float)COURSE_CYCLE_SPEED;

if( (int)pTrail->m_vEntries.size() > CommonMetrics::MAX_COURSE_ENTRIES_BEFORE_VARIOUS )
{
SetVarious();
return;
}

DisplayBpms bpms;
pTrail->GetDisplayBpms( bpms );
SetBPMRange( bpms );
}

void BPMDisplay::SetConstantBpm( float fBPM )
{
DisplayBpms bpms;
Expand All @@ -257,16 +233,6 @@ void BPMDisplay::SetFromGameState()
SetBpmFromSong( GAMESTATE->m_pCurSong );
return;
}
if( GAMESTATE->m_pCurCourse.Get() )
{
if( GAMESTATE->GetCurrentStyle(PLAYER_INVALID) == NULL )
; // This is true when backing out from ScreenSelectCourse to ScreenTitleMenu. So, don't call SetBpmFromCourse where an assert will fire.
else
SetBpmFromCourse( GAMESTATE->m_pCurCourse );

return;
}

NoBPM();
}

Expand Down Expand Up @@ -328,24 +294,13 @@ class LunaBPMDisplay: public Luna<BPMDisplay>
}
COMMON_RETURN_SELF;
}
static int SetFromCourse( T* p, lua_State *L )
{
if( lua_isnil(L,1) ) { p->NoBPM(); }
else
{
const Course* pCourse = Luna<Course>::check( L, 1, true );
p->SetBpmFromCourse(pCourse);
}
COMMON_RETURN_SELF;
}
static int GetText( T* p, lua_State *L ) { lua_pushstring( L, p->GetText() ); return 1; }

LunaBPMDisplay()
{
ADD_METHOD( SetFromGameState );
ADD_METHOD( SetFromSong );
ADD_METHOD( SetFromSteps );
ADD_METHOD( SetFromCourse );
ADD_METHOD( GetText );
}
};
Expand Down
6 changes: 0 additions & 6 deletions src/BPMDisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "LocalizedString.h"
class Song;
class Steps;
class Course;
struct DisplayBpms;

/** @brief Displays a BPM or a range of BPMs. */
Expand Down Expand Up @@ -36,11 +35,6 @@ class BPMDisplay : public BitmapText
* @param pSteps the steps in question.
*/
void SetBpmFromSteps( const Steps* pSteps );
/**
* @brief Use the BPM[s] from a course.
* @param pCourse the course in question.
*/
void SetBpmFromCourse( const Course* pCourse );
/**
* @brief Use a specified, constant BPM.
* @param fBPM the constant BPM.
Expand Down
22 changes: 0 additions & 22 deletions src/Banner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "RageUtil.h"
#include "Song.h"
#include "RageTextureManager.h"
#include "Course.h"
#include "Character.h"
#include "ThemeMetric.h"
#include "CharacterManager.h"
Expand Down Expand Up @@ -130,15 +129,6 @@ void Banner::LoadFromSongGroup( const RString &sSongGroup )
m_bScrolling = false;
}

void Banner::LoadFromCourse( const Course *pCourse ) // NULL means no course
{
if( pCourse == NULL ) LoadFallback();
else if( pCourse->GetBannerPath() != "" ) Load( pCourse->GetBannerPath() );
else LoadCourseFallback();

m_bScrolling = false;
}

void Banner::LoadCardFromCharacter( const Character *pCharacter )
{
if( pCharacter == NULL ) LoadFallback();
Expand Down Expand Up @@ -196,11 +186,6 @@ void Banner::LoadGroupFallback()
Load( THEME->GetPathG("Banner","group fallback") );
}

void Banner::LoadCourseFallback()
{
Load( THEME->GetPathG("Banner","course fallback") );
}

void Banner::LoadFallbackCharacterIcon()
{
Character *pCharacter = CHARMAN->GetDefaultCharacter();
Expand Down Expand Up @@ -252,12 +237,6 @@ class LunaBanner: public Luna<Banner>
else { Song *pS = Luna<Song>::check(L,1); p->LoadFromSong( pS ); }
COMMON_RETURN_SELF;
}
static int LoadFromCourse( T* p, lua_State *L )
{
if( lua_isnil(L,1) ) { p->LoadFromCourse( NULL ); }
else { Course *pC = Luna<Course>::check(L,1); p->LoadFromCourse( pC ); }
COMMON_RETURN_SELF;
}
static int LoadFromCachedBanner( T* p, lua_State *L )
{
p->LoadFromCachedBanner( SArg(1) );
Expand Down Expand Up @@ -311,7 +290,6 @@ class LunaBanner: public Luna<Banner>
ADD_METHOD( scaletoclipped );
ADD_METHOD( ScaleToClipped );
ADD_METHOD( LoadFromSong );
ADD_METHOD( LoadFromCourse );
ADD_METHOD( LoadFromCachedBanner );
ADD_METHOD( LoadIconFromCharacter );
ADD_METHOD( LoadCardFromCharacter );
Expand Down
3 changes: 0 additions & 3 deletions src/Banner.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "RageTextureID.h"
#include "GameConstantsAndTypes.h"
class Song;
class Course;
class Character;
class UnlockEntry;

Expand All @@ -32,7 +31,6 @@ class Banner : public Sprite
void LoadFromSong( Song* pSong );
void LoadMode();
void LoadFromSongGroup( const RString &sSongGroup );
void LoadFromCourse( const Course *pCourse );
void LoadCardFromCharacter( const Character *pCharacter );
void LoadIconFromCharacter( const Character *pCharacter );
void LoadBannerFromUnlockEntry( const UnlockEntry* pUE );
Expand All @@ -43,7 +41,6 @@ class Banner : public Sprite
void LoadFallback();
void LoadFallbackBG();
void LoadGroupFallback();
void LoadCourseFallback();
void LoadFallbackCharacterIcon();

void SetScrolling( bool bScroll, float Percent = 0 );
Expand Down
41 changes: 0 additions & 41 deletions src/CommonMetrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ ThemeMetric<RString> CommonMetrics::OPERATOR_MENU_SCREEN ("Common","OperatorMe
ThemeMetric<RString> CommonMetrics::FIRST_ATTRACT_SCREEN ("Common","FirstAttractScreen");
ThemeMetric<RString> CommonMetrics::DEFAULT_MODIFIERS ("Common","DefaultModifiers" );
LocalizedString CommonMetrics::WINDOW_TITLE ("Common","WindowTitle");
ThemeMetric<int> CommonMetrics::MAX_COURSE_ENTRIES_BEFORE_VARIOUS("Common","MaxCourseEntriesBeforeShowVarious");
ThemeMetric<float> CommonMetrics::TICK_EARLY_SECONDS ("ScreenGameplay","TickEarlySeconds");
ThemeMetric<RString> CommonMetrics::DEFAULT_NOTESKIN_NAME ("Common","DefaultNoteSkinName");
ThemeMetricDifficultiesToShow CommonMetrics::DIFFICULTIES_TO_SHOW ("Common","DifficultiesToShow");
ThemeMetricCourseDifficultiesToShow CommonMetrics::COURSE_DIFFICULTIES_TO_SHOW ("Common","CourseDifficultiesToShow");
ThemeMetricStepsTypesToShow CommonMetrics::STEPS_TYPES_TO_SHOW ("Common","StepsTypesToHide");
ThemeMetric<bool> CommonMetrics::AUTO_SET_STYLE ("Common","AutoSetStyle");
ThemeMetric<int> CommonMetrics::PERCENT_SCORE_DECIMAL_PLACES ("Common","PercentScoreDecimalPlaces");
Expand Down Expand Up @@ -59,45 +57,6 @@ void ThemeMetricDifficultiesToShow::Read()
}
const vector<Difficulty>& ThemeMetricDifficultiesToShow::GetValue() const { return m_v; }


ThemeMetricCourseDifficultiesToShow::ThemeMetricCourseDifficultiesToShow( const RString& sGroup, const RString& sName ) :
ThemeMetric<RString>(sGroup,sName)
{
// re-read because ThemeMetric::ThemeMetric calls ThemeMetric::Read, not the derived one
if( IsLoaded() )
Read();
}
void ThemeMetricCourseDifficultiesToShow::Read()
{
ASSERT( GetName().Right(6) == "ToShow" );

ThemeMetric<RString>::Read();

m_v.clear();

vector<RString> v;
split( ThemeMetric<RString>::GetValue(), ",", v );
if(v.empty())
{
LuaHelpers::ReportScriptError("CourseDifficultiesToShow must have at least one entry.");
return;
}

FOREACH_CONST( RString, v, i )
{
CourseDifficulty d = StringToDifficulty( *i );
if( d == Difficulty_Invalid )
{
LuaHelpers::ReportScriptErrorFmt("Unknown CourseDifficulty \"%s\" in CourseDifficultiesToShow.", i->c_str());
}
else
{
m_v.push_back( d );
}
}
}
const vector<CourseDifficulty>& ThemeMetricCourseDifficultiesToShow::GetValue() const { return m_v; }

static void RemoveStepsTypes( vector<StepsType>& inout, RString sStepsTypesToRemove )
{
vector<RString> v;
Expand Down
14 changes: 0 additions & 14 deletions src/CommonMetrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ class ThemeMetricDifficultiesToShow : public ThemeMetric<RString>
private:
vector<Difficulty> m_v;
};
class ThemeMetricCourseDifficultiesToShow : public ThemeMetric<RString>
{
public:
ThemeMetricCourseDifficultiesToShow(): m_v() { }
ThemeMetricCourseDifficultiesToShow( const RString& sGroup, const RString& sName );
void Read();
const vector<CourseDifficulty> &GetValue() const;
private:
vector<CourseDifficulty> m_v;
};
class ThemeMetricStepsTypesToShow : public ThemeMetric<RString>
{
public:
Expand All @@ -54,16 +44,12 @@ namespace CommonMetrics
extern ThemeMetric<RString> DEFAULT_MODIFIERS;
/** @brief The caption on the title bar. */
extern LocalizedString WINDOW_TITLE;
/** @brief How many entries should be shown before showing "Various" instead. */
extern ThemeMetric<int> MAX_COURSE_ENTRIES_BEFORE_VARIOUS;
/** @brief Adjusts the assist tick sound's playback time. */
extern ThemeMetric<float> TICK_EARLY_SECONDS;
/** @brief the name of the default noteskin. */
extern ThemeMetric<RString> DEFAULT_NOTESKIN_NAME;
/** @brief Which difficulties are to be shown? */
extern ThemeMetricDifficultiesToShow DIFFICULTIES_TO_SHOW;
/** @brief Which course difficulties are to be shown? */
extern ThemeMetricCourseDifficultiesToShow COURSE_DIFFICULTIES_TO_SHOW;
/**
* @brief Which step types are to be shown?
*
Expand Down
Loading

0 comments on commit 2afc922

Please sign in to comment.