[Character] Added GetDisplayName Lua binding.

This commit is contained in:
AJ Kelly
2011-01-10 16:49:41 -06:00
parent 9e29a843a5
commit 45b1664147
2 changed files with 8 additions and 5 deletions
+5 -1
View File
@@ -10,9 +10,13 @@ supported but exist anyways.)
_____________________________________________________________________________ _____________________________________________________________________________
================================================================================ ================================================================================
sm-ssc in development | 20110??? sm-ssc v1.2.1 | 20110???
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
20110110
--------
* [Character] Added GetDisplayName Lua binding. [freem]
20110109 20110109
-------- --------
* Add the semicolon and apostrophe keys as alternatives to the Page Up and Page * Add the semicolon and apostrophe keys as alternatives to the Page Up and Page
+2 -3
View File
@@ -17,7 +17,6 @@ bool Character::Load( RString sCharDir )
sCharDir += "/"; sCharDir += "/";
m_sCharDir = sCharDir; m_sCharDir = sCharDir;
// save ID // save ID
{ {
vector<RString> as; vector<RString> as;
@@ -70,7 +69,6 @@ bool Character::Load( RString sCharDir )
return true; return true;
} }
RString GetRandomFileInDir( RString sDir ) RString GetRandomFileInDir( RString sDir )
{ {
vector<RString> asFiles; vector<RString> asFiles;
@@ -81,7 +79,6 @@ RString GetRandomFileInDir( RString sDir )
return asFiles[RandomInt(asFiles.size())]; return asFiles[RandomInt(asFiles.size())];
} }
RString Character::GetModelPath() const RString Character::GetModelPath() const
{ {
RString s = m_sCharDir + "model.txt"; RString s = m_sCharDir + "model.txt";
@@ -214,6 +211,7 @@ public:
static int GetDanceAnimationPath( T* p, lua_State *L ) { lua_pushstring(L, p->GetDanceAnimationPath() ); return 1; } static int GetDanceAnimationPath( T* p, lua_State *L ) { lua_pushstring(L, p->GetDanceAnimationPath() ); return 1; }
static int GetCharacterDir( T* p, lua_State *L ) { lua_pushstring(L, p->m_sCharDir ); return 1; } static int GetCharacterDir( T* p, lua_State *L ) { lua_pushstring(L, p->m_sCharDir ); return 1; }
static int GetCharacterID( T* p, lua_State *L ) { lua_pushstring(L, p->m_sCharacterID ); return 1; } static int GetCharacterID( T* p, lua_State *L ) { lua_pushstring(L, p->m_sCharacterID ); return 1; }
static int GetDisplayName( T* p, lua_State *L ) { lua_pushstring(L, p->GetDisplayName() ); return 1; }
LunaCharacter() LunaCharacter()
{ {
@@ -228,6 +226,7 @@ public:
ADD_METHOD( GetDanceAnimationPath ); ADD_METHOD( GetDanceAnimationPath );
ADD_METHOD( GetCharacterDir ); ADD_METHOD( GetCharacterDir );
ADD_METHOD( GetCharacterID ); ADD_METHOD( GetCharacterID );
ADD_METHOD( GetDisplayName );
} }
}; };