From 50724811514baad2078af2c915d634611ac3d94f Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 5 Mar 2011 12:38:04 -0600 Subject: [PATCH 01/13] Added overlay input for ScreenInstallOverlay... commented out the stepmania.com launch for now. --- src/ScreenInstallOverlay.cpp | 11 +++++++++++ src/ScreenInstallOverlay.h | 3 +-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/ScreenInstallOverlay.cpp b/src/ScreenInstallOverlay.cpp index adbe4cbf0f..41ff7e48f0 100644 --- a/src/ScreenInstallOverlay.cpp +++ b/src/ScreenInstallOverlay.cpp @@ -313,6 +313,17 @@ void ScreenInstallOverlay::Init() this->AddChild( &m_textStatus ); } +bool ScreenInstallOverlay::OverlayInput( const InputEventPlus &input ) +{ + if( input.DeviceI.button == g_buttonLogin && input.type == IET_FIRST_PRESS ) + { + //HOOKS->GoToURL("http://www.stepmania.com/launch.php"); + return true; + } + + return false; +} + void ScreenInstallOverlay::Update( float fDeltaTime ) { Screen::Update(fDeltaTime); diff --git a/src/ScreenInstallOverlay.h b/src/ScreenInstallOverlay.h index 313ddd30b6..d3efff3bad 100644 --- a/src/ScreenInstallOverlay.h +++ b/src/ScreenInstallOverlay.h @@ -1,11 +1,10 @@ -/* ScreenInstallOverlay - package installation processing and messaging. */ - #ifndef ScreenInstallOverlay_H #define ScreenInstallOverlay_H #include "Screen.h" #include "BitmapText.h" +/** @brief Package installation processing and messaging. */ class ScreenInstallOverlay : public Screen { public: From 6016d05b52674d32471024d56f8465f503429745 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 6 Mar 2011 00:34:26 -0600 Subject: [PATCH 02/13] fix compile --- src/ScreenInstallOverlay.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ScreenInstallOverlay.h b/src/ScreenInstallOverlay.h index d3efff3bad..90e5179c02 100644 --- a/src/ScreenInstallOverlay.h +++ b/src/ScreenInstallOverlay.h @@ -12,6 +12,7 @@ public: virtual void Init(); void Update( float fDeltaTime ); + bool ScreenInstallOverlay::OverlayInput( const InputEventPlus &input ); private: void UpdateText(); From c3ac117dbe86cf3d4f074bfbdc43b9bcd6fca084 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 6 Mar 2011 00:35:28 -0600 Subject: [PATCH 03/13] fix compile, for real this time --- src/ScreenInstallOverlay.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ScreenInstallOverlay.h b/src/ScreenInstallOverlay.h index 90e5179c02..c939b11eea 100644 --- a/src/ScreenInstallOverlay.h +++ b/src/ScreenInstallOverlay.h @@ -3,6 +3,7 @@ #include "Screen.h" #include "BitmapText.h" +#include "InputEventPlus.h" /** @brief Package installation processing and messaging. */ class ScreenInstallOverlay : public Screen From f7781aa0040d898b76222fc2b3c4d35de191f895 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 6 Mar 2011 00:35:46 -0600 Subject: [PATCH 04/13] forgot this too --- src/ScreenInstallOverlay.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ScreenInstallOverlay.cpp b/src/ScreenInstallOverlay.cpp index 41ff7e48f0..4dc0dbb1c5 100644 --- a/src/ScreenInstallOverlay.cpp +++ b/src/ScreenInstallOverlay.cpp @@ -315,11 +315,13 @@ void ScreenInstallOverlay::Init() bool ScreenInstallOverlay::OverlayInput( const InputEventPlus &input ) { + /* if( input.DeviceI.button == g_buttonLogin && input.type == IET_FIRST_PRESS ) { - //HOOKS->GoToURL("http://www.stepmania.com/launch.php"); + HOOKS->GoToURL("http://www.stepmania.com/launch.php"); return true; } + */ return false; } From 81a8fb2a0921a5cd3427130b7a1f765919616c99 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sun, 6 Mar 2011 01:55:48 -0500 Subject: [PATCH 05/13] Move Lua Bindings to the end for consistency. --- src/Course.cpp | 81 +++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 41 deletions(-) diff --git a/src/Course.cpp b/src/Course.cpp index 278112f490..3dbd02ed67 100644 --- a/src/Course.cpp +++ b/src/Course.cpp @@ -85,47 +85,7 @@ int CourseEntry::GetNumModChanges() const return iNumModChanges; } -// lua start -#include "LuaBinding.h" -/** @brief Allow Lua to have access to the CourseEntry. */ -class LunaCourseEntry: public Luna -{ -public: - static int GetSong( T* p, lua_State *L ) - { - if( p->songID.ToSong() ) - p->songID.ToSong()->PushSelf(L); - else - lua_pushnil(L); - return 1; - } - DEFINE_METHOD( IsSecret, bSecret ); - DEFINE_METHOD( IsFixedSong, IsFixedSong() ); - DEFINE_METHOD( GetGainSeconds, fGainSeconds ); - DEFINE_METHOD( GetGainLives, iGainLives ); - DEFINE_METHOD( GetNormalModifiers, sModifiers ); - // GetTimedModifiers - table - DEFINE_METHOD( GetNumModChanges, GetNumModChanges() ); - DEFINE_METHOD( GetTextDescription, GetTextDescription() ); - - LunaCourseEntry() - { - ADD_METHOD( GetSong ); - // sm-ssc additions: - ADD_METHOD( IsSecret ); - ADD_METHOD( IsFixedSong ); - ADD_METHOD( GetGainSeconds ); - ADD_METHOD( GetGainLives ); - ADD_METHOD( GetNormalModifiers ); - //ADD_METHOD( GetTimedModifiers ); - ADD_METHOD( GetNumModChanges ); - ADD_METHOD( GetTextDescription ); - } -}; - -LUA_REGISTER_CLASS( CourseEntry ) -// lua end Course::Course() @@ -1042,10 +1002,49 @@ bool Course::Matches( RString sGroup, RString sCourse ) const return false; } - // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the CourseEntry. */ +class LunaCourseEntry: public Luna +{ +public: + static int GetSong( T* p, lua_State *L ) + { + if( p->songID.ToSong() ) + p->songID.ToSong()->PushSelf(L); + else + lua_pushnil(L); + return 1; + } + DEFINE_METHOD( IsSecret, bSecret ); + DEFINE_METHOD( IsFixedSong, IsFixedSong() ); + DEFINE_METHOD( GetGainSeconds, fGainSeconds ); + DEFINE_METHOD( GetGainLives, iGainLives ); + DEFINE_METHOD( GetNormalModifiers, sModifiers ); + // GetTimedModifiers - table + DEFINE_METHOD( GetNumModChanges, GetNumModChanges() ); + DEFINE_METHOD( GetTextDescription, GetTextDescription() ); + + LunaCourseEntry() + { + ADD_METHOD( GetSong ); + // sm-ssc additions: + ADD_METHOD( IsSecret ); + ADD_METHOD( IsFixedSong ); + ADD_METHOD( GetGainSeconds ); + ADD_METHOD( GetGainLives ); + ADD_METHOD( GetNormalModifiers ); + //ADD_METHOD( GetTimedModifiers ); + ADD_METHOD( GetNumModChanges ); + ADD_METHOD( GetTextDescription ); + } +}; + +LUA_REGISTER_CLASS( CourseEntry ) + +// Not done with lua yet: still another class. + /** @brief Allow Lua to have access to the Course. */ class LunaCourse: public Luna { From eae575a246f5ff7b1048f97f00f9663c221c5015 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sun, 6 Mar 2011 18:57:29 -0500 Subject: [PATCH 06/13] Experiment: don't restrict halfdouble & routine. I'm sure someone wants to see these in all difficulty levels. Revert this if it becomes too crazy. --- src/Song.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/Song.cpp b/src/Song.cpp index cca9057216..706c06a3ff 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -1055,15 +1055,6 @@ void Song::AutoGen( StepsType ntTo, StepsType ntFrom ) { Steps* pNewNotes = new Steps; pNewNotes->AutogenFrom( pOriginalNotes, ntTo ); - // Only generate Medium difficulty steps for Pump-Halfdouble, as - // that seems to be the only difficulty Half-doubles charts use, - // going by Pump Pro. -aj - if(ntTo == StepsType_pump_halfdouble && pNewNotes->GetDifficulty() != Difficulty_Medium) - continue; - // Only generate Medium difficulty steps for Routine modes. -aj - if( (ntTo == StepsType_dance_routine || ntTo == StepsType_pump_routine ) - && pNewNotes->GetDifficulty() != Difficulty_Medium) - continue; this->AddSteps( pNewNotes ); } } From 526a76dea42276681ca39c6e7c121920de3de1af Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sun, 6 Mar 2011 19:16:24 -0500 Subject: [PATCH 07/13] Experiment: no stretch jumps for pump possible. To the pump players: give this a shot please. --- src/NoteDataUtil.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/NoteDataUtil.cpp b/src/NoteDataUtil.cpp index c4a9165b66..aa2a9df622 100644 --- a/src/NoteDataUtil.cpp +++ b/src/NoteDataUtil.cpp @@ -2020,6 +2020,9 @@ const ValidRow g_ValidRows[] = { StepsType_dance_double, { f,T,T,T,T,f,f,f } }, { StepsType_dance_double, { f,f,f,T,T,T,T,f } }, { StepsType_dance_double, { f,f,f,f,T,T,T,T } }, + { StepsType_pump_double, { T,T,T,T,T,f,f,f,f,f } }, + { StepsType_pump_double, { f,f,T,T,T,T,T,T,f,f } }, + { StepsType_pump_double, { f,f,f,f,f,T,T,T,T,T } }, }; #undef T #undef f From a5d176b0f67b096d3281c0666c21e8238104b740 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 7 Mar 2011 14:42:38 -0600 Subject: [PATCH 08/13] fix position of MIGS/ITG boxes on eval --- .../BGAnimations/ScreenEvaluation overlay/default.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua b/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua index ec06df59a6..f854b172bb 100644 --- a/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua +++ b/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua @@ -1,4 +1,5 @@ local vStats = STATSMAN:GetCurStageStats(); + local function CreateStats( pnPlayer ) -- Actor Templates local aLabel = LoadFont("Common Normal") .. { Text="..."; InitCommand=cmd(zoom,0.5;shadowlength,1;horizalign,left); }; @@ -28,9 +29,8 @@ local function CreateStats( pnPlayer ) MIGS = ( tStats["W1"]*3 + tStats["W2"]*2 + tStats["W3"] - tStats["W5"]*4 - tStats["Miss"]*8 + tStats["Held"]*6 ), -- (marvcount + perfcount + greatcount + goodcount + boocount + misscount)*3 + (okcount + ngcount)*6 MIGS_MAX = ( (tStats["W1"] + tStats["W2"] + tStats["W3"] + tStats["W4"] + tStats["W5"] + tStats["Miss"])*3 + (tStats["Held"] + tStats["LetGo"])*6 ), - }; - -- + local t = Def.ActorFrame {}; t[#t+1] = Def.ActorFrame { InitCommand=cmd(y,-34); @@ -54,10 +54,11 @@ local function CreateStats( pnPlayer ) }; return t end; + +-- xxx: this only currently works for player 1. -aj local t = Def.ActorFrame {}; t[#t+1] = Def.ActorFrame { - InitCommand=cmd(x,math.floor(SCREEN_CENTER_X*0.5)-8;y,SCREEN_CENTER_Y); - -- + InitCommand=cmd(x,WideScale(math.floor(SCREEN_CENTER_X*0.3)-8,math.floor(SCREEN_CENTER_X*0.5)-8);y,SCREEN_CENTER_Y); CreateStats( PLAYER_1 ); }; return t \ No newline at end of file From 3a89fafb8f85215c4d3a208349e2f3452d9f9ff9 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 7 Mar 2011 15:01:33 -0600 Subject: [PATCH 09/13] fix errors with subtitle --- .../ScreenEvaluation decorations/default.lua | 12 ++++++------ .../ScreenEvaluation overlay/default.lua | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Themes/default/BGAnimations/ScreenEvaluation decorations/default.lua b/Themes/default/BGAnimations/ScreenEvaluation decorations/default.lua index 571849adc4..83ab0fd632 100644 --- a/Themes/default/BGAnimations/ScreenEvaluation decorations/default.lua +++ b/Themes/default/BGAnimations/ScreenEvaluation decorations/default.lua @@ -176,23 +176,23 @@ t[#t+1] = StandardDecorationFromFileOptional("SongInformation","SongInformation" local SongOrCourse; if GAMESTATE:GetCurrentSong() then SongOrCourse = GAMESTATE:GetCurrentSong(); - + c.TextTitle:settext( SongOrCourse:GetDisplayMainTitle() or nil ); c.TextSubtitle:settext( SongOrCourse:GetDisplaySubTitle() or nil ); c.TextArtist:settext( SongOrCourse:GetDisplayArtist() or nil ); - + if SongOrCourse:GetDisplaySubTitle() == "" then c.TextTitle:visible(true); c.TextTitle:y(-16.5/2); - c.Subtitle:visible(false); - c.Subtitle:y(0); + c.TextSubtitle:visible(false); + c.TextSubtitle:y(0); c.TextArtist:visible(true); c.TextArtist:y(18/2); else c.TextTitle:visible(true); c.TextTitle:y(-16.5); - c.Subtitle:visible(true); - c.Subtitle:y(0); + c.TextSubtitle:visible(true); + c.TextSubtitle:y(0); c.TextArtist:visible(true); c.TextArtist:y(18); end diff --git a/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua b/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua index f854b172bb..e9267db809 100644 --- a/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua +++ b/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua @@ -2,8 +2,8 @@ local vStats = STATSMAN:GetCurStageStats(); local function CreateStats( pnPlayer ) -- Actor Templates - local aLabel = LoadFont("Common Normal") .. { Text="..."; InitCommand=cmd(zoom,0.5;shadowlength,1;horizalign,left); }; - local aText = LoadFont("Common Normal") .. { Text="..."; InitCommand=cmd(zoom,0.5;shadowlength,1;horizalign,left); }; + local aLabel = LoadFont("Common Normal") .. { InitCommand=cmd(zoom,0.5;shadowlength,1;horizalign,left); }; + local aText = LoadFont("Common Normal") .. { InitCommand=cmd(zoom,0.5;shadowlength,1;horizalign,left); }; -- DA STATS, JIM!! local pnStageStats = vStats:GetPlayerStageStats( pnPlayer ); -- Organized Stats. From c4622d375bed7992fa1ab62c5e8d833577b17282 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 7 Mar 2011 15:19:37 -0600 Subject: [PATCH 10/13] remove a todo of mine that made no sense --- src/GameCommand.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/GameCommand.cpp b/src/GameCommand.cpp index 2bd5c7051a..4083307c14 100644 --- a/src/GameCommand.cpp +++ b/src/GameCommand.cpp @@ -412,7 +412,6 @@ void GameCommand::LoadOne( const Command& cmd ) else if( sName == "fademusic" ) { - // todo: parse things correctly. -aj if( cmd.m_vsArgs.size() == 3 ) { m_bFadeMusic = true; From ba6ab436e50d0b799fa97022600daf69e312c126 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 7 Mar 2011 15:21:03 -0600 Subject: [PATCH 11/13] small whitespace killing --- src/GameManager.cpp | 2 +- src/Grade.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GameManager.cpp b/src/GameManager.cpp index 56a60a5a45..96cafc280f 100644 --- a/src/GameManager.cpp +++ b/src/GameManager.cpp @@ -3064,7 +3064,7 @@ StepsType GameManager::StringToStepsType( RString sStepsType ) for( int i=0; i Date: Mon, 7 Mar 2011 15:22:41 -0600 Subject: [PATCH 12/13] remove another todo of mine --- src/InputMapper.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/InputMapper.cpp b/src/InputMapper.cpp index 3e495b9efc..34c82c783e 100644 --- a/src/InputMapper.cpp +++ b/src/InputMapper.cpp @@ -266,7 +266,6 @@ static const AutoMappings g_AutoMappings[] = AutoMappingEntry( 0, JOY_BUTTON_10, GAME_BUTTON_BACK, false ), AutoMappingEntry( 0, JOY_BUTTON_9, GAME_BUTTON_START, false ) ), - // TODO: add black and white buttons, as well as other missing inputs -aj AutoMappings( "dance", "XBOX Gamepad Plugin V0.01", From 4e0dd3dce42e3ef84d6f17d19b15ab249521545f Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 7 Mar 2011 15:28:45 -0600 Subject: [PATCH 13/13] change comment style --- src/NoteDisplay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NoteDisplay.cpp b/src/NoteDisplay.cpp index 25f224f9c8..1bb1226138 100644 --- a/src/NoteDisplay.cpp +++ b/src/NoteDisplay.cpp @@ -123,7 +123,7 @@ struct NoteResource delete m_pActor; } - const NoteSkinAndPath m_nsap; /* should be refcounted along with g_NoteResource[] */ + const NoteSkinAndPath m_nsap; // should be refcounted along with g_NoteResource[] int m_iRefCount; Actor *m_pActor; // todo: AutoActor me? -aj };