From 6b55d6840cf7d418a13ba93d2ed0517c35efed03 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 14 Feb 2004 23:22:23 +0000 Subject: [PATCH] Lua::RunExpression support --- stepmania/src/BGAnimation.cpp | 10 ++++++++++ stepmania/src/BGAnimationLayer.cpp | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/stepmania/src/BGAnimation.cpp b/stepmania/src/BGAnimation.cpp index d4924c1f8b..5c85ed089b 100644 --- a/stepmania/src/BGAnimation.cpp +++ b/stepmania/src/BGAnimation.cpp @@ -21,6 +21,7 @@ #include "ThemeManager.h" #include "RageFile.h" #include "ActorUtil.h" +#include "LuaHelpers.h" #include "arch/ArchHooks/ArchHooks.h" const int MAX_LAYERS = 1000; @@ -66,6 +67,15 @@ void AddLayersFromAniDir( CString sAniDir, vector &layersAddTo, bool Gen IniFile ini(sPathToIni); ini.ReadFile(); + { + CString expr; + if( ini.GetValue( "BGAnimation", "Cond", expr ) ) + { + if( !Lua::RunExpression( expr ) ) + return; + } + } + int i; for( i=0; i