woops, merge.

This commit is contained in:
Colby Klein
2011-03-08 11:01:41 -08:00
12 changed files with 75 additions and 69 deletions
+40 -41
View File
@@ -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<CourseEntry>
{
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<CourseEntry>
{
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<Course>
{
-1
View File
@@ -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;
+1 -1
View File
@@ -3064,7 +3064,7 @@ StepsType GameManager::StringToStepsType( RString sStepsType )
for( int i=0; i<NUM_StepsType; i++ )
if( g_StepsTypeInfos[i].szName == sStepsType )
return StepsType(i);
return StepsType_Invalid;
}
+1 -1
View File
@@ -9,7 +9,7 @@
*
* TODO: Look into a more flexible system without a fixed number of grades. -Wolfman2000
*/
enum Grade
enum Grade
{
Grade_Tier01, /**< Usually an AAAA */
Grade_Tier02, /**< Usually an AAA */
-1
View File
@@ -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",
+3
View File
@@ -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
+1 -1
View File
@@ -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
};
+13
View File
@@ -313,6 +313,19 @@ 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);
+3 -2
View File
@@ -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();
-9
View File
@@ -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 );
}
}