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 ec06df59a6..e9267db809 100644 --- a/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua +++ b/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua @@ -1,8 +1,9 @@ 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. @@ -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 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 { 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; 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; iAddChild( &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..c939b11eea 100644 --- a/src/ScreenInstallOverlay.h +++ b/src/ScreenInstallOverlay.h @@ -1,11 +1,11 @@ -/* ScreenInstallOverlay - package installation processing and messaging. */ - #ifndef ScreenInstallOverlay_H #define ScreenInstallOverlay_H #include "Screen.h" #include "BitmapText.h" +#include "InputEventPlus.h" +/** @brief Package installation processing and messaging. */ class ScreenInstallOverlay : public Screen { public: @@ -13,6 +13,7 @@ public: virtual void Init(); void Update( float fDeltaTime ); + bool ScreenInstallOverlay::OverlayInput( const InputEventPlus &input ); private: void UpdateText(); 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 ); } }