[TimingData] Add HasDelays() Lua binding; HasStops() now only checks stops.
This commit is contained in:
@@ -12,6 +12,7 @@ StepMania 5.0 Preview 3 | 20110???
|
|||||||
----------
|
----------
|
||||||
* [LifeMeterBattery] Added LostLife param to LifeChanged message. [AJ]
|
* [LifeMeterBattery] Added LostLife param to LifeChanged message. [AJ]
|
||||||
* [LifeMeterBattery] Converted LifeMeterBattery lives to an AutoActor. [AJ]
|
* [LifeMeterBattery] Converted LifeMeterBattery lives to an AutoActor. [AJ]
|
||||||
|
* [TimingData] Add HasDelays() Lua binding; HasStops() now only checks stops. [AJ]
|
||||||
|
|
||||||
2011/08/06
|
2011/08/06
|
||||||
----------
|
----------
|
||||||
|
|||||||
+8
-4
@@ -1367,12 +1367,14 @@ bool TimingData::HasBpmChanges() const
|
|||||||
return this->allTimingSegments[SEGMENT_BPM].size()>1;
|
return this->allTimingSegments[SEGMENT_BPM].size()>1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Think about splitting this up into HasStops and HasDelays.
|
|
||||||
bool TimingData::HasStops() const
|
bool TimingData::HasStops() const
|
||||||
{
|
{
|
||||||
return
|
return this->allTimingSegments[SEGMENT_STOP].size()>0;
|
||||||
this->allTimingSegments[SEGMENT_STOP].size()>0 ||
|
}
|
||||||
this->allTimingSegments[SEGMENT_DELAY].size()>0;
|
|
||||||
|
bool TimingData::HasDelays() const
|
||||||
|
{
|
||||||
|
return this->allTimingSegments[SEGMENT_DELAY].size()>0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TimingData::HasWarps() const
|
bool TimingData::HasWarps() const
|
||||||
@@ -1454,6 +1456,7 @@ class LunaTimingData: public Luna<TimingData>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static int HasStops( T* p, lua_State *L ) { lua_pushboolean(L, p->HasStops()); return 1; }
|
static int HasStops( T* p, lua_State *L ) { lua_pushboolean(L, p->HasStops()); return 1; }
|
||||||
|
static int HasDelays( T* p, lua_State *L ) { lua_pushboolean(L, p->HasDelays()); return 1; }
|
||||||
static int HasBPMChanges( T* p, lua_State *L ) { lua_pushboolean(L, p->HasBpmChanges()); return 1; }
|
static int HasBPMChanges( T* p, lua_State *L ) { lua_pushboolean(L, p->HasBpmChanges()); return 1; }
|
||||||
static int HasWarps( T* p, lua_State *L ) { lua_pushboolean(L, p->HasWarps()); return 1; }
|
static int HasWarps( T* p, lua_State *L ) { lua_pushboolean(L, p->HasWarps()); return 1; }
|
||||||
static int HasFakes( T* p, lua_State *L ) { lua_pushboolean(L, p->HasFakes()); return 1; }
|
static int HasFakes( T* p, lua_State *L ) { lua_pushboolean(L, p->HasFakes()); return 1; }
|
||||||
@@ -1548,6 +1551,7 @@ public:
|
|||||||
LunaTimingData()
|
LunaTimingData()
|
||||||
{
|
{
|
||||||
ADD_METHOD( HasStops );
|
ADD_METHOD( HasStops );
|
||||||
|
ADD_METHOD( HasDelays );
|
||||||
ADD_METHOD( HasBPMChanges );
|
ADD_METHOD( HasBPMChanges );
|
||||||
ADD_METHOD( HasWarps );
|
ADD_METHOD( HasWarps );
|
||||||
ADD_METHOD( HasFakes );
|
ADD_METHOD( HasFakes );
|
||||||
|
|||||||
+5
-2
@@ -714,11 +714,14 @@ public:
|
|||||||
bool HasBpmChanges() const;
|
bool HasBpmChanges() const;
|
||||||
/**
|
/**
|
||||||
* @brief View the TimingData to see if there is at least one stop at any point.
|
* @brief View the TimingData to see if there is at least one stop at any point.
|
||||||
*
|
|
||||||
* For the purposes of this function, Stops and Delays are considered the same.
|
|
||||||
* @return true if there is at least one stop, false otherwise.
|
* @return true if there is at least one stop, false otherwise.
|
||||||
*/
|
*/
|
||||||
bool HasStops() const;
|
bool HasStops() const;
|
||||||
|
/**
|
||||||
|
* @brief View the TimingData to see if there is at least one delay at any point.
|
||||||
|
* @return true if there is at least one delay, false otherwise.
|
||||||
|
*/
|
||||||
|
bool HasDelays() const;
|
||||||
/**
|
/**
|
||||||
* @brief View the TimingData to see if there is at least one warp at any point.
|
* @brief View the TimingData to see if there is at least one warp at any point.
|
||||||
* @return true if there is at least one warp, false otherwise.
|
* @return true if there is at least one warp, false otherwise.
|
||||||
|
|||||||
Reference in New Issue
Block a user