Lua::RunExpression support
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
#include "ThemeManager.h"
|
#include "ThemeManager.h"
|
||||||
#include "RageFile.h"
|
#include "RageFile.h"
|
||||||
#include "ActorUtil.h"
|
#include "ActorUtil.h"
|
||||||
|
#include "LuaHelpers.h"
|
||||||
#include "arch/ArchHooks/ArchHooks.h"
|
#include "arch/ArchHooks/ArchHooks.h"
|
||||||
|
|
||||||
const int MAX_LAYERS = 1000;
|
const int MAX_LAYERS = 1000;
|
||||||
@@ -66,6 +67,15 @@ void AddLayersFromAniDir( CString sAniDir, vector<Actor*> &layersAddTo, bool Gen
|
|||||||
IniFile ini(sPathToIni);
|
IniFile ini(sPathToIni);
|
||||||
ini.ReadFile();
|
ini.ReadFile();
|
||||||
|
|
||||||
|
{
|
||||||
|
CString expr;
|
||||||
|
if( ini.GetValue( "BGAnimation", "Cond", expr ) )
|
||||||
|
{
|
||||||
|
if( !Lua::RunExpression( expr ) )
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for( i=0; i<MAX_LAYERS; i++ )
|
for( i=0; i<MAX_LAYERS; i++ )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#include "arch/ArchHooks/ArchHooks.h"
|
#include "arch/ArchHooks/ArchHooks.h"
|
||||||
#include "RageTextureManager.h"
|
#include "RageTextureManager.h"
|
||||||
#include "RageFile.h"
|
#include "RageFile.h"
|
||||||
|
#include "LuaHelpers.h"
|
||||||
|
|
||||||
|
|
||||||
const float PARTICLE_SPEED = 300;
|
const float PARTICLE_SPEED = 300;
|
||||||
@@ -458,6 +459,15 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
CString expr;
|
||||||
|
if( ini.GetValue( sLayer, "Cond", expr ) )
|
||||||
|
{
|
||||||
|
if( !Lua::RunExpression( expr ) )
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool Stretch = false;
|
bool Stretch = false;
|
||||||
{
|
{
|
||||||
CString type = "sprite";
|
CString type = "sprite";
|
||||||
|
|||||||
Reference in New Issue
Block a user