no need to template Luna specializations
This commit is contained in:
@@ -1087,8 +1087,7 @@ void Actor::SubscribeToMessage( Message message )
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaActor : public Luna<T>
|
||||
class LunaActor : public Luna<Actor>
|
||||
{
|
||||
public:
|
||||
LunaActor() { LUA->Register( Register ); }
|
||||
|
||||
@@ -328,8 +328,7 @@ void ActorFrame::SetDrawByZPosition( bool b )
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaActorFrame : public Luna<T>
|
||||
class LunaActorFrame : public Luna<ActorFrame>
|
||||
{
|
||||
public:
|
||||
LunaActorFrame() { LUA->Register( Register ); }
|
||||
|
||||
@@ -281,8 +281,7 @@ void ActorScroller::DrawPrimitives()
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaActorScroller : public Luna<T>
|
||||
class LunaActorScroller: public Luna<ActorScroller>
|
||||
{
|
||||
public:
|
||||
LunaActorScroller() { LUA->Register( Register ); }
|
||||
|
||||
@@ -841,8 +841,7 @@ void ColorBitmapText::SetMaxLines( int iNumLines, int iDirection )
|
||||
|
||||
// lua start
|
||||
|
||||
template<class T>
|
||||
class LunaBitmapText : public Luna<T>
|
||||
class LunaBitmapText: public Luna<BitmapText>
|
||||
{
|
||||
public:
|
||||
LunaBitmapText() { LUA->Register( Register ); }
|
||||
|
||||
@@ -166,8 +166,7 @@ bool Character::Has2DElems()
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaCharacter : public Luna<T>
|
||||
class LunaCharacter: public Luna<Character>
|
||||
{
|
||||
public:
|
||||
LunaCharacter() { LUA->Register( Register ); }
|
||||
|
||||
@@ -1330,8 +1330,7 @@ void Course::CalculateRadarValues()
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaCourse : public Luna<T>
|
||||
class LunaCourse: public Luna<Course>
|
||||
{
|
||||
public:
|
||||
LunaCourse() { LUA->Register( Register ); }
|
||||
|
||||
@@ -255,8 +255,7 @@ void DifficultyMeter::SetInternal( int iMeter, Difficulty dc, const CString &sDi
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaDifficultyMeter : public Luna<T>
|
||||
class LunaDifficultyMeter: public Luna<DifficultyMeter>
|
||||
{
|
||||
public:
|
||||
LunaDifficultyMeter() { LUA->Register( Register ); }
|
||||
|
||||
@@ -211,8 +211,7 @@ void FadingBanner::LoadFallback()
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaFadingBanner : public Luna<T>
|
||||
class LunaFadingBanner: public Luna<FadingBanner>
|
||||
{
|
||||
public:
|
||||
LunaFadingBanner() { LUA->Register( Register ); }
|
||||
|
||||
@@ -650,8 +650,7 @@ void GameSoundManager::SetPlayerBalance( PlayerNumber pn, RageSoundParams ¶m
|
||||
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaGameSoundManager: public Luna<T>
|
||||
class LunaGameSoundManager: public Luna<GameSoundManager>
|
||||
{
|
||||
public:
|
||||
LunaGameSoundManager() { LUA->Register( Register ); }
|
||||
|
||||
@@ -1975,8 +1975,7 @@ void GameState::RevertSyncChanges()
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaGameState : public Luna<T>
|
||||
class LunaGameState: public Luna<GameState>
|
||||
{
|
||||
public:
|
||||
LunaGameState() { LUA->Register( Register ); }
|
||||
|
||||
@@ -76,8 +76,7 @@ void HelpDisplay::Update( float fDeltaTime )
|
||||
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaHelpDisplay : public Luna<T>
|
||||
class LunaHelpDisplay: public Luna<HelpDisplay>
|
||||
{
|
||||
public:
|
||||
LunaHelpDisplay() { LUA->Register( Register ); }
|
||||
|
||||
@@ -17,9 +17,13 @@ struct RegType
|
||||
void CreateGlobalTable( lua_State *L, const CString &szName );
|
||||
bool CheckType( lua_State *L, int narg, const char *szType );
|
||||
|
||||
template <typename T>
|
||||
template <typename Type>
|
||||
class Luna
|
||||
{
|
||||
protected:
|
||||
typedef Type T;
|
||||
|
||||
private:
|
||||
typedef struct { T *pT; } userdataType;
|
||||
|
||||
public:
|
||||
@@ -169,9 +173,9 @@ private:
|
||||
#define LUA_REGISTER_DERIVED_CLASS( T, B ) \
|
||||
template<> const char *Luna<T>::m_sClassName = #T; \
|
||||
template<> const char *Luna<T>::m_sBaseClassName = #B; \
|
||||
template<> Luna<T>::RegTypeVector* Luna<T>::s_pvMethods = NULL; \
|
||||
static Luna##T<T> registera; \
|
||||
void T::PushSelf( lua_State *L ) { Luna##T<T>::Push( L, this ); } \
|
||||
Luna<T>::RegTypeVector* Luna<T>::s_pvMethods = NULL; \
|
||||
static Luna##T registera; \
|
||||
void T::PushSelf( lua_State *L ) { Luna##T::Push( L, this ); } \
|
||||
/* Call PushSelf, so we always call the derived Luna<T>::Push. */ \
|
||||
namespace LuaHelpers { template<> void Push( T *pObject, lua_State *L ) { pObject->PushSelf( L ); } }
|
||||
|
||||
|
||||
@@ -111,8 +111,7 @@ void MessageManager::Broadcast( Message m ) const
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaMessageManager: public Luna<T>
|
||||
class LunaMessageManager: public Luna<MessageManager>
|
||||
{
|
||||
public:
|
||||
LunaMessageManager() { LUA->Register( Register ); }
|
||||
|
||||
@@ -834,8 +834,7 @@ bool Model::MaterialsNeedNormals() const
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaModel : public Luna<T>
|
||||
class LunaModel: public Luna<Model>
|
||||
{
|
||||
public:
|
||||
LunaModel() { LUA->Register( Register ); }
|
||||
|
||||
@@ -304,8 +304,7 @@ CString NoteSkinManager::GetPathFromDirAndFile( const CString &sDir, const CStri
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaNoteSkinManager : public Luna<T>
|
||||
class LunaNoteSkinManager: public Luna<NoteSkinManager>
|
||||
{
|
||||
public:
|
||||
LunaNoteSkinManager() { LUA->Register( Register ); }
|
||||
|
||||
@@ -451,8 +451,7 @@ LuaFunction( GetGradeFromPercent, PlayerStageStats::GetGradeFromPercent( FArg(1)
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaPlayerStageStats : public Luna<T>
|
||||
class LunaPlayerStageStats: public Luna<PlayerStageStats>
|
||||
{
|
||||
public:
|
||||
LunaPlayerStageStats() { LUA->Register( Register ); }
|
||||
|
||||
@@ -425,8 +425,7 @@ CString PrefsManager::GetLightsDriver() {
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaPrefsManager : public Luna<T>
|
||||
class LunaPrefsManager: public Luna<PrefsManager>
|
||||
{
|
||||
public:
|
||||
LunaPrefsManager() { LUA->Register( Register ); }
|
||||
|
||||
@@ -1830,8 +1830,7 @@ bool Profile::CreateNewProfile( CString sProfileDir, CString sName )
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaProfile : public Luna<T>
|
||||
class LunaProfile: public Luna<Profile>
|
||||
{
|
||||
public:
|
||||
LunaProfile() { LUA->Register( Register ); }
|
||||
|
||||
@@ -623,8 +623,7 @@ bool ProfileManager::IsPersistentProfile( ProfileSlot slot ) const
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaProfileManager : public Luna<T>
|
||||
class LunaProfileManager: public Luna<ProfileManager>
|
||||
{
|
||||
public:
|
||||
LunaProfileManager() { LUA->Register( Register ); }
|
||||
|
||||
@@ -56,8 +56,7 @@ void RageInput::AddHandler( InputHandler *pHandler )
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaRageInput : public Luna<T>
|
||||
class LunaRageInput: public Luna<RageInput>
|
||||
{
|
||||
public:
|
||||
LunaRageInput() { LUA->Register( Register ); }
|
||||
|
||||
@@ -60,8 +60,7 @@ void RollingNumbers::UpdateText()
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaRollingNumbers : public Luna<T>
|
||||
class LunaRollingNumbers: public Luna<RollingNumbers>
|
||||
{
|
||||
public:
|
||||
LunaRollingNumbers() { LUA->Register( Register ); }
|
||||
|
||||
@@ -61,8 +61,7 @@ void ScoreDisplayAliveTime::UpdateNumber()
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaScoreDisplayAliveTime : public Luna<T>
|
||||
class LunaScoreDisplayAliveTime: public Luna<ScoreDisplayAliveTime>
|
||||
{
|
||||
public:
|
||||
LunaScoreDisplayAliveTime() { LUA->Register( Register ); }
|
||||
|
||||
@@ -70,8 +70,7 @@ void ScoreDisplayCalories::UpdateNumber()
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaScoreDisplayCalories : public Luna<T>
|
||||
class LunaScoreDisplayCalories: public Luna<ScoreDisplayCalories>
|
||||
{
|
||||
public:
|
||||
LunaScoreDisplayCalories() { LUA->Register( Register ); }
|
||||
|
||||
@@ -1512,8 +1512,7 @@ void Song::MakeUniqueEditDescription( StepsType st, CString &sPreferredDescripti
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaSong : public Luna<T>
|
||||
class LunaSong: public Luna<Song>
|
||||
{
|
||||
public:
|
||||
LunaSong() { LUA->Register( Register ); }
|
||||
|
||||
@@ -1296,8 +1296,7 @@ int SongManager::GetNumStepsLoadedFromProfile()
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaSongManager : public Luna<T>
|
||||
class LunaSongManager: public Luna<SongManager>
|
||||
{
|
||||
public:
|
||||
LunaSongManager() { LUA->Register( Register ); }
|
||||
|
||||
@@ -925,8 +925,7 @@ void Sprite::SetPlaybackRate( float f ) { GetTexture()->SetPlaybackRate(f); }
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaSprite : public Luna<T>
|
||||
class LunaSprite: public Luna<Sprite>
|
||||
{
|
||||
public:
|
||||
LunaSprite() { LUA->Register( Register ); }
|
||||
|
||||
@@ -105,8 +105,7 @@ float StageStats::GetTotalPossibleStepsSeconds() const
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaStageStats : public Luna<T>
|
||||
class LunaStageStats: public Luna<StageStats>
|
||||
{
|
||||
public:
|
||||
LunaStageStats() { LUA->Register( Register ); }
|
||||
|
||||
@@ -190,8 +190,7 @@ void StatsManager::CommitStatsToProfiles()
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaStatsManager : public Luna<T>
|
||||
class LunaStatsManager: public Luna<StatsManager>
|
||||
{
|
||||
public:
|
||||
LunaStatsManager() { LUA->Register( Register ); }
|
||||
|
||||
@@ -369,8 +369,7 @@ void Steps::SetCachedRadarValues( const RadarValues& v )
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaSteps : public Luna<T>
|
||||
class LunaSteps: public Luna<Steps>
|
||||
{
|
||||
public:
|
||||
LunaSteps() { LUA->Register( Register ); }
|
||||
|
||||
@@ -911,8 +911,7 @@ CString ThemeManager::GetBlankGraphicPath()
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaThemeManager : public Luna<T>
|
||||
class LunaThemeManager: public Luna<ThemeManager>
|
||||
{
|
||||
public:
|
||||
LunaThemeManager() { LUA->Register( Register ); }
|
||||
|
||||
@@ -186,8 +186,7 @@ bool Trail::ContainsSong( Song* pSong ) const
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaTrail : public Luna<T>
|
||||
class LunaTrail: public Luna<Trail>
|
||||
{
|
||||
public:
|
||||
LunaTrail() { LUA->Register( Register ); }
|
||||
|
||||
@@ -504,8 +504,7 @@ void UnlockManager::GetStepsUnlockedByCode( vector<Song *> &apSongsOut, vector<D
|
||||
|
||||
#include "LuaBinding.h"
|
||||
|
||||
template<class T>
|
||||
class LunaUnlockManager: public Luna<T>
|
||||
class LunaUnlockManager: public Luna<UnlockManager>
|
||||
{
|
||||
public:
|
||||
LunaUnlockManager() { LUA->Register( Register ); }
|
||||
|
||||
Reference in New Issue
Block a user