From bedaf07e510f13208300d75dbbc40e79aa2ae490 Mon Sep 17 00:00:00 2001 From: Kyzentun Date: Thu, 28 Aug 2014 05:53:37 -0600 Subject: [PATCH] Reverted some changes that should not have been part of the merge from Midiman. --- Themes/_fallback/Scripts/02 Colors.lua | 2 +- Themes/_fallback/Scripts/02 ThemePrefs.lua | 10 +++++----- src/GameManager.cpp | 9 ++++----- src/NoteData.cpp | 7 ------- 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/Themes/_fallback/Scripts/02 Colors.lua b/Themes/_fallback/Scripts/02 Colors.lua index 95c684010e..09df67523b 100644 --- a/Themes/_fallback/Scripts/02 Colors.lua +++ b/Themes/_fallback/Scripts/02 Colors.lua @@ -136,7 +136,7 @@ function PlayerScoreColor( pn ) return color("1,1,1,1") end -function CustomDifficultyToColor( sCustomDifficulty ) +function CustomDifficultyToColor( sCustomDifficulty ) return GameColor.Difficulty[sCustomDifficulty] end diff --git a/Themes/_fallback/Scripts/02 ThemePrefs.lua b/Themes/_fallback/Scripts/02 ThemePrefs.lua index 47c58c393e..dec746da7f 100644 --- a/Themes/_fallback/Scripts/02 ThemePrefs.lua +++ b/Themes/_fallback/Scripts/02 ThemePrefs.lua @@ -82,17 +82,17 @@ ThemePrefs = -- If we don't have IniFile, we can't read/write from/to disk if not IniFile then Warn( GetString("IniFileMissing") ) end - Trace( ("ThemePrefs.Init(prefs, %s)"):format(tostring(bLoadFromDisk)) ) +-- Trace( ("ThemePrefs.Init(prefs, %s)"):format(tostring(bLoadFromDisk)) ) if bLoadFromDisk then Trace( "ThemePrefs.Init: loading from disk" ) if not ThemePrefs.Load() then return false end end - Trace( "ThemePrefs.Init: not loading from disk" ) +-- Trace( "ThemePrefs.Init: not loading from disk" ) -- create the section if it doesn't exist local section = GetThemeName() - Trace( ("ThemePrefs.Init: Theme name is \"%s\""):format(section) ) +-- Trace( ("ThemePrefs.Init: Theme name is \"%s\""):format(section) ) PrefsTable[section] = PrefsTable[section] and PrefsTable[section] or { } --Trace( "Using section " .. section ) @@ -105,7 +105,7 @@ ThemePrefs = end end - PrintTable( PrefsTable[section] ) +-- PrintTable( PrefsTable[section] ) end, Load = function() @@ -115,7 +115,7 @@ ThemePrefs = end, Save = function() - Trace( "ThemePrefs.Save" ) +-- Trace( "ThemePrefs.Save" ) if not IniFile then return false end if not NeedsSaved then return end NeedsSaved = false diff --git a/src/GameManager.cpp b/src/GameManager.cpp index 047453a8de..7d7a77f12a 100644 --- a/src/GameManager.cpp +++ b/src/GameManager.cpp @@ -3181,13 +3181,12 @@ public: { vector aGames; p->GetEnabledGames( aGames ); - vector vsGames; - FOREACH( const Game*, aGames, g ) + lua_createtable(L, aGames.size(), 0); + for(size_t i= 0; i < aGames.size(); ++i) { - RString sGameName = (*g)->m_szName; - vsGames.push_back( sGameName ); + lua_pushstring(L, aGames[i]->m_szName); + lua_rawseti(L, -2, i+1); } - LuaHelpers::CreateTableFromArray( vsGames, L ); return 1; } diff --git a/src/NoteData.cpp b/src/NoteData.cpp index ece1d84872..bd8de09ef2 100644 --- a/src/NoteData.cpp +++ b/src/NoteData.cpp @@ -1178,19 +1178,12 @@ void NoteData::LoadFromNode( const XNode* pNode ) void NoteData::AddATIToList(all_tracks_iterator* iter) const { - // mapconv crashes on windows an apparently this function is the cause. - // So windows will still crash on courses that use transform mods until - // mapconv can be fixed. -Kyz -#ifndef WIN32 m_atis.insert(iter); -#endif } void NoteData::AddATIToList(all_tracks_const_iterator* iter) const { -#ifndef WIN32 m_const_atis.insert(iter); -#endif } void NoteData::RemoveATIFromList(all_tracks_iterator* iter) const