LuaHelpers -> LuaManager

This commit is contained in:
Chris Danford
2005-01-24 02:26:55 +00:00
parent f4de06361d
commit cd9c48d645
14 changed files with 44 additions and 11 deletions
+8
View File
@@ -9,6 +9,14 @@
#include "arch/Dialog/Dialog.h" #include "arch/Dialog/Dialog.h"
#include "Foreach.h" #include "Foreach.h"
#include "XmlFile.h" #include "XmlFile.h"
#include "LuaBinding.h"
#include "LuaManager.h"
// lua start
//LUA_REGISTER_CLASS( Actor, null )
// lua end
float Actor::g_fCurrentBGMTime = 0, Actor::g_fCurrentBGMBeat; float Actor::g_fCurrentBGMTime = 0, Actor::g_fCurrentBGMBeat;
+10
View File
@@ -13,6 +13,16 @@ struct XNode;
#define DRAW_ORDER_TRANSITIONS 100 #define DRAW_ORDER_TRANSITIONS 100
#define DRAW_ORDER_AFTER_EVERYTHING 200 #define DRAW_ORDER_AFTER_EVERYTHING 200
/*
#define LUA_Actor_METHODS( T ) \
static int GetX( T* p, lua_State *L ) { lua_pushnumber(L, p->GetX()); return 1; } \
static int SetX( T* p, lua_State *L ) { p->SetX(luaL_checknumber(L, 1)); return 0; } \
#define LUA_Actor_METHODS_MAP( T ) \
LUA_METHOD_MAP( T, GetX ) \
LUA_METHOD_MAP( T, SetX ) \
*/
class Actor class Actor
{ {
public: public:
+1 -1
View File
@@ -14,7 +14,7 @@
#include "Course.h" #include "Course.h"
#include "XmlFile.h" #include "XmlFile.h"
#include "FontCharAliases.h" #include "FontCharAliases.h"
#include "LuaHelpers.h" #include "LuaManager.h"
#include "arch/Dialog/Dialog.h" #include "arch/Dialog/Dialog.h"
+1 -1
View File
@@ -4,7 +4,7 @@
#include "BGAnimationLayer.h" #include "BGAnimationLayer.h"
#include "RageUtil.h" #include "RageUtil.h"
#include "ActorUtil.h" #include "ActorUtil.h"
#include "LuaHelpers.h" #include "LuaManager.h"
#include "Foreach.h" #include "Foreach.h"
+1 -1
View File
@@ -10,7 +10,7 @@
#include "RageDisplay.h" #include "RageDisplay.h"
#include "ActorUtil.h" #include "ActorUtil.h"
#include "arch/ArchHooks/ArchHooks.h" #include "arch/ArchHooks/ArchHooks.h"
#include "LuaHelpers.h" #include "LuaManager.h"
const float PARTICLE_SPEED = 300; const float PARTICLE_SPEED = 300;
+1 -1
View File
@@ -3,7 +3,7 @@
#include "RageUtil.h" #include "RageUtil.h"
#include "RageLog.h" #include "RageLog.h"
#include "arch/Dialog/Dialog.h" #include "arch/Dialog/Dialog.h"
#include "LuaHelpers.h" #include "LuaManager.h"
void IncorrectNumberArgsWarning( const Command &command, int iMaxIndexAccessed ) void IncorrectNumberArgsWarning( const Command &command, int iMaxIndexAccessed )
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef LUA_FUNCTIONS_H #ifndef LUA_FUNCTIONS_H
#define LUA_FUNCTIONS_H #define LUA_FUNCTIONS_H
#include "LuaHelpers.h" #include "LuaManager.h"
#include "RageUtil.h" /* for ssprintf */ #include "RageUtil.h" /* for ssprintf */
extern "C" extern "C"
+1 -1
View File
@@ -1,5 +1,5 @@
#include "global.h" #include "global.h"
#include "LuaHelpers.h" #include "LuaManager.h"
#include "LuaFunctions.h" #include "LuaFunctions.h"
#include "RageUtil.h" #include "RageUtil.h"
#include "RageLog.h" #include "RageLog.h"
+1 -1
View File
@@ -3,7 +3,7 @@
#include "RageLog.h" #include "RageLog.h"
#include "ScreenManager.h" #include "ScreenManager.h"
#include "ThemeManager.h" #include "ThemeManager.h"
#include "LuaHelpers.h" #include "LuaManager.h"
#include "GameCommand.h" #include "GameCommand.h"
#include "RageUtil.h" #include "RageUtil.h"
+1 -1
View File
@@ -21,7 +21,7 @@
#include "RageSoundManager.h" #include "RageSoundManager.h"
#include "ProfileManager.h" #include "ProfileManager.h"
#include "StepsUtil.h" #include "StepsUtil.h"
#include "LuaHelpers.h" #include "LuaManager.h"
#define LINE_NAMES THEME->GetMetric (m_sName,"LineNames") #define LINE_NAMES THEME->GetMetric (m_sName,"LineNames")
#define OPTION_MENU_FLAGS THEME->GetMetric (m_sName,"OptionMenuFlags") #define OPTION_MENU_FLAGS THEME->GetMetric (m_sName,"OptionMenuFlags")
+7
View File
@@ -12,6 +12,13 @@
#include "ActorUtil.h" #include "ActorUtil.h"
#include "arch/Dialog/Dialog.h" #include "arch/Dialog/Dialog.h"
#include "Foreach.h" #include "Foreach.h"
#include "LuaBinding.h"
#include "LuaManager.h"
// lua start
//LUA_REGISTER_CLASS( Sprite, Actor )
// lua end
Sprite::Sprite() Sprite::Sprite()
{ {
+8
View File
@@ -8,6 +8,14 @@
class RageTexture; class RageTexture;
/*
#define LUA_Sprite_METHODS( T ) \
LUA_Actor_METHODS( T ) \
#define LUA_Sprite_METHODS_MAP( T ) \
LUA_Actor_METHODS_MAP( T ) \
*/
class Sprite: public Actor class Sprite: public Actor
{ {
public: public:
+1 -1
View File
@@ -44,7 +44,7 @@
#include "ProfileManager.h" #include "ProfileManager.h"
#include "MemoryCardManager.h" #include "MemoryCardManager.h"
#include "ScreenManager.h" #include "ScreenManager.h"
#include "LuaHelpers.h" #include "LuaManager.h"
#include "GameManager.h" #include "GameManager.h"
#include "FontManager.h" #include "FontManager.h"
#include "InputFilter.h" #include "InputFilter.h"
+2 -2
View File
@@ -17,7 +17,7 @@
#include "StepMania.h" #include "StepMania.h"
#include "Foreach.h" #include "Foreach.h"
#include "ThemeMetric.h" #include "ThemeMetric.h"
#include "LuaHelpers.h" #include "LuaManager.h"
#include "ScreenDimensions.h" #include "ScreenDimensions.h"
@@ -715,7 +715,7 @@ float ThemeManager::GetMetricF( const CString &sClassName, const CString &sValue
return LUA->RunExpressionF( sValue ); return LUA->RunExpressionF( sValue );
} }
// #include "LuaHelpers.h" // #include "LuaManager.h"
bool ThemeManager::GetMetricB( const CString &sClassName, const CString &sValueName ) bool ThemeManager::GetMetricB( const CString &sClassName, const CString &sValueName )
{ {
CString sValue = GetMetricRaw( sClassName,sValueName ); CString sValue = GetMetricRaw( sClassName,sValueName );