Prepare for Steps Attacks.

No changelog entry yet: it's not complete.
This commit is contained in:
Jason Felds
2011-06-24 11:09:49 -04:00
parent 6e1d5cf10b
commit cde793dc57
4 changed files with 34 additions and 2 deletions
+1
View File
@@ -1380,6 +1380,7 @@
<Function name='GetRadarValues'/>
<Function name='GetStepsType'/>
<Function name='GetTimingData'/>
<Function name='HasAttacks'/>
<Function name='HasSignificantTimingChanges'/>
<Function name='IsAPlayerEdit'/>
<Function name='IsAnEdit'/>
+4 -1
View File
@@ -3466,8 +3466,11 @@
<Function name='GetMeter' return='int' arguments=''>
Returns the numerical difficulty of the Steps.
</Function>
<Function name='HasAttacks' return='bool' arguments=''>
Returns <code>true</code> if the Steps has any attacks.
</Function>
<Function name='HasSignificantTimingChanges' return='bool' arguments=''>
returns <code>true</code> if the song has significant timing changes.
Returns <code>true</code> if the Steps pattern has significant timing changes.
</Function>
<Function name='GetRadarValues' return='RadarValues' arguments='PlayerNumber pn'>
Returns the complete list of RadarValues for player <code>pn</code>. Use <Link class='RadarValues' function='GetValue' /> to grab a specific value.
+18 -1
View File
@@ -40,6 +40,11 @@ Steps::~Steps()
{
}
bool Steps::HasAttacks() const
{
return !this->m_Attacks.empty();
}
unsigned Steps::GetHash() const
{
if( parent )
@@ -463,7 +468,18 @@ public:
DEFINE_METHOD( IsAPlayerEdit, IsAPlayerEdit() )
DEFINE_METHOD( UsesSplitTiming, UsesSplitTiming() )
static int HasSignificantTimingChanges( T* p, lua_State *L ) { lua_pushboolean(L, p->HasSignificantTimingChanges()); return 1; }
static int HasSignificantTimingChanges( T* p, lua_State *L )
{
lua_pushboolean(L, p->HasSignificantTimingChanges());
return 1;
}
static int HasAttacks( T* p, lua_State *L )
{
lua_pushboolean(L, p->HasAttacks());
return 1;
}
static int GetRadarValues( T* p, lua_State *L )
{
@@ -500,6 +516,7 @@ public:
ADD_METHOD( GetHash );
ADD_METHOD( GetMeter );
ADD_METHOD( HasSignificantTimingChanges );
ADD_METHOD( HasAttacks );
ADD_METHOD( GetRadarValues );
ADD_METHOD( GetTimingData );
//ADD_METHOD( GetSMNoteData );
+11
View File
@@ -1,6 +1,7 @@
#ifndef STEPS_H
#define STEPS_H
#include "Attack.h"
#include "GameConstantsAndTypes.h"
#include "PlayerNumber.h"
#include "Grade.h"
@@ -92,6 +93,11 @@ public:
*/
RString GetCredit() const { return Real()->m_sCredit; }
/** @brief The list of attacks. */
AttackArray m_Attacks;
/** @brief The stringified list of attacks. */
vector<RString> m_sAttackString;
void SetFilename( RString fn ) { m_sFilename = fn; }
RString GetFilename() const { return m_sFilename; }
void SetSavedToDisk( bool b ) { DeAutogen(); m_bSavedToDisk = b; }
@@ -128,6 +134,11 @@ public:
* @brief Determine if the Steps have any major timing changes during gameplay.
* @return true if it does, or false otherwise. */
bool HasSignificantTimingChanges() const;
/**
* @brief Determine if the Steps have any attacks.
* @return true if it does, or false otherwise. */
bool HasAttacks() const;
// Lua
void PushSelf( lua_State *L );