From 0f9a035c91027457bb6e0d5c31fed87d9a822025 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 10 May 2011 09:11:44 -0500 Subject: [PATCH 1/5] fix script error --- Themes/_fallback/Scripts/04 Scoring.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Themes/_fallback/Scripts/04 Scoring.lua b/Themes/_fallback/Scripts/04 Scoring.lua index b6d68abb9c..1c8c8df8b5 100644 --- a/Themes/_fallback/Scripts/04 Scoring.lua +++ b/Themes/_fallback/Scripts/04 Scoring.lua @@ -8,10 +8,11 @@ local ZeroIfNotFound = { __index = function() return 0 end; }; -- Retrieve the amount of taps/holds/rolls involved. Used for some formulas. function GetTotalItems(radars) - return radars:GetValue('RadarCategory_TapsAndHolds') - + radars:GetValue('RadarCategory_Holds') - + radars:GetValue('RadarCategory_Rolls'); - + radars:GetValue('RadarCategory_Lifts'); + local total = radars:GetValue('RadarCategory_TapsAndHolds') + total = total + radars:GetValue('RadarCategory_Holds') + total = total + radars:GetValue('RadarCategory_Rolls') + total = total + radars:GetValue('RadarCategory_Lifts') + return total end; -- Determine whether marvelous timing is to be considered. From 8968ccfa45ca2280002feb05c202e5f16d0efede Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 10 May 2011 09:13:31 -0500 Subject: [PATCH 2/5] add missing strings --- Themes/_fallback/Languages/en.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index 51db471be3..d0492d5a94 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -1889,6 +1889,10 @@ Modifier=Modifier Obtain an updated driver from your video card manufacturer.=Obtain an updated driver from your video card manufacturer. GLDirect was detected. GLDirect is not compatible with this game and should be disabled.=GLDirect was detected. GLDirect is not compatible with this game and should be disabled. +[RageDisplay_D3D] +DirectX 8.1 or greater is not installed. You can download it from:=DirectX 8.1 or greater is not installed. You can download it from: +Your system is reporting that Direct3D hardware acceleration is not available. Please obtain an updated driver from your video card manufacturer.=Your system is reporting that Direct3D hardware acceleration is not available. Please obtain an updated driver from your video card manufacturer. + [RageDisplay] SetVideoMode failed:=SetVideoMode failed: From a867b886400ef7706aa31a667a783823b50529d5 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 10 May 2011 09:24:31 -0500 Subject: [PATCH 3/5] add missing endless banner --- Themes/_fallback/Graphics/Banner Endless.redir | 1 + src/BPMDisplay.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Themes/_fallback/Graphics/Banner Endless.redir diff --git a/Themes/_fallback/Graphics/Banner Endless.redir b/Themes/_fallback/Graphics/Banner Endless.redir new file mode 100644 index 0000000000..507050cda9 --- /dev/null +++ b/Themes/_fallback/Graphics/Banner Endless.redir @@ -0,0 +1 @@ +Common fallback banner \ No newline at end of file diff --git a/src/BPMDisplay.cpp b/src/BPMDisplay.cpp index 5bdcbd66f4..4412ee9bcd 100644 --- a/src/BPMDisplay.cpp +++ b/src/BPMDisplay.cpp @@ -204,7 +204,8 @@ void BPMDisplay::SetBpmFromCourse( const Course* pCourse ) StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType; Trail *pTrail = pCourse->GetTrail( st ); - ASSERT( pTrail ); + // GetTranslitFullTitle because "Crashinfo.txt is garbled because of the ANSI output as usual." -f + ASSERT_M( pTrail, ssprintf("Course '%s' has no trail for StepsType '%s'", pCourse->GetTranslitFullTitle(), StringConversion::ToString(st).c_str() ) ); m_fCycleTime = 0.2f; From ce392f003cd9bd1b461cb78cff0f6a9d252cd2fb Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 10 May 2011 09:30:03 -0500 Subject: [PATCH 4/5] [BPMDisplay] Added SetFromCourse Lua binding. --- Docs/Changelog_sm5.txt | 3 ++- src/BPMDisplay.cpp | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 2addb23d65..d6320fef24 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -10,7 +10,8 @@ StepMania 5.0 $NEXT | 20110xyy 2011/05/10 ---------- -* [Sprite] Added SetSecondsIntoAnimation(float) Lua binding. [AJ] +* [Sprite] Added SetSecondsIntoAnimation Lua binding. [AJ] +* [BPMDisplay] Added SetFromCourse Lua binding. [AJ] 2011/05/03 ---------- diff --git a/src/BPMDisplay.cpp b/src/BPMDisplay.cpp index 4412ee9bcd..981976974f 100644 --- a/src/BPMDisplay.cpp +++ b/src/BPMDisplay.cpp @@ -305,12 +305,23 @@ public: } return 0; } + static int SetFromCourse( T* p, lua_State *L ) + { + if( lua_isnil(L,1) ) { p->NoBPM(); } + else + { + const Course* pCourse = Luna::check( L, 1, true ); + p->SetBpmFromCourse(pCourse); + } + return 0; + } static int GetText( T* p, lua_State *L ) { lua_pushstring( L, p->GetText() ); return 1; } LunaBPMDisplay() { ADD_METHOD( SetFromGameState ); ADD_METHOD( SetFromSong ); + ADD_METHOD( SetFromCourse ); ADD_METHOD( GetText ); } }; From a6ea7bdf501aea1438f279164a01469578d420a2 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 10 May 2011 14:46:20 -0500 Subject: [PATCH 5/5] attempt to get rid of some madness --- src/JsonUtil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/JsonUtil.cpp b/src/JsonUtil.cpp index e7eb597e21..be736ea4b5 100644 --- a/src/JsonUtil.cpp +++ b/src/JsonUtil.cpp @@ -4,8 +4,8 @@ #include "RageUtil.h" #include "RageLog.h" #include "arch/Dialog/Dialog.h" -#include "../extern/jsoncpp/include/json/reader.h" -#include "../extern/jsoncpp/include/json/writer.h" +#include "json/reader.h" +#include "json/writer.h" bool JsonUtil::LoadFromString(Json::Value &root, RString sData, RString &sErrorOut) {