Lots of updates today. Nice.

This commit is contained in:
Jason Felds
2011-06-13 14:49:06 -04:00
6 changed files with 15 additions and 19 deletions
+1
View File
@@ -15,6 +15,7 @@ StepMania 5.0 Preview 2 | 20110???
* TapHoldRollOnRowMeansHold: bool, true means hold and false means roll
* No noteskins should require updating, as these were placed in common/common
for ease of use. [Wolfman2000]
* [LifeMeterBattery] Added ChangeLives(int) Lua binding. [AJ]
* [LifeMeterBattery] Added DangerThreshold metric. [AJ]
* [LifeMeterBattery] Added some important metrics. [AJ]
* MinScoreToKeepLife='TapNoteScore_*' - any score below this = loss of life.
+1 -9
View File
@@ -20,12 +20,4 @@ local _screen = {
h = SCREEN_HEIGHT,
cx = SCREEN_CENTER_X,
cy = SCREEN_CENTER_Y
}
if Screen.String then
ScreenString = Screen.String
end
if Screen.Metric then
ScreenMetric = Screen.Metric
end
}
-9
View File
@@ -56,15 +56,6 @@ function ActorScroller:setfastcatchup(bFastCatchup)
self:SetFastCatchup(bFastCatchup)
end
-- renaming various StepMania functions to sm-ssc ones:
if ScreenString then
ScreenString = Screen.String
end
if ScreenMetric then
ScreenMetric = Screen.Metric
end
--[[ GameState ]]
--Aliases for old GAMESTATE timing functions.
--These have been converted to SongPosition, but most themes still use these old functions.
+2
View File
@@ -102,11 +102,13 @@ Screen.Metric = function ( sName )
local sClass = Var "LoadingScreen"
return THEME:GetMetric( sClass, sName )
end
ScreenMetric = Screen.Metric
Screen.String = function ( sName )
local sClass = Var "LoadingScreen";
return THEME:GetString( sClass, sName )
end
ScreenString = Screen.String
function TextBannerAfterSet(self,param)
local Title=self:GetChild("Title");
+10 -1
View File
@@ -137,6 +137,14 @@ void LifeMeterBattery::AddLives( int iLives )
m_fBatteryBlinkTime = 0;
}
void LifeMeterBattery::ChangeLives(int iLifeDiff)
{
if( iLifeDiff < 0 )
SubtractLives( abs(iLifeDiff) );
else if( iLifeDiff > 0 )
AddLives(iLifeDiff);
}
void LifeMeterBattery::ChangeLife( TapNoteScore score )
{
if( m_iLivesLeft == 0 )
@@ -254,13 +262,14 @@ class LunaLifeMeterBattery: public Luna<LifeMeterBattery>
{
public:
static int GetLivesLeft( T* p, lua_State *L ) { lua_pushnumber( L, p->GetLivesLeft() ); return 1; }
// is this right? wtf -q2x
static int GetTotalLives( T* p, lua_State *L ) { lua_pushnumber( L, GAMESTATE->m_SongOptions.GetSong().m_iBatteryLives ); return 1; }
static int ChangeLives( T* p, lua_State *L ) { p->ChangeLives(IArg(1)); return 0; }
LunaLifeMeterBattery()
{
ADD_METHOD( GetLivesLeft );
ADD_METHOD( GetTotalLives );
ADD_METHOD( ChangeLives );
}
};
+1
View File
@@ -32,6 +32,7 @@ public:
void Refresh();
int GetLivesLeft() { return m_iLivesLeft; }
void ChangeLives(int iLifeDiff);
// Lua
virtual void PushSelf( lua_State *L );