From 2af845a248868a09bac7f95842413a51cdbd4749 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 15 Oct 2006 02:42:33 +0000 Subject: [PATCH] ActorUtil::ResolvePath --- stepmania/src/ActorUtil.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index b7a6ef249b..4d38b552f5 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -643,10 +643,22 @@ FileType ActorUtil::GetFileType( const RString &sPath ) namespace { int GetFileType( lua_State *L ) { Enum::Push( L, ActorUtil::GetFileType(SArg(1)) ); return 1; } + int ResolvePath( lua_State *L ) + { + RString sPath( SArg(1) ); + + LUA->YieldLua(); + ActorUtil::ResolvePath( sPath, "" ); + LUA->UnyieldLua(); + + LuaHelpers::Push( L, sPath ); + return 1; + } const luaL_Reg ActorUtilTable[] = { LIST_METHOD( GetFileType ), + LIST_METHOD( ResolvePath ), { NULL, NULL } }; }