Commit Graph

19 Commits

Author SHA1 Message Date
Steve Checkoway e3e5cf77e5 Don't include Foreach.h in RageUtil.h which does not use it. Instead, include it in the individual files that actually use it. 2006-11-01 11:18:46 +00:00
Steve Checkoway 4590dea0b3 Partial revert. Glenn knew what he was doing with lua_next(), even if I did not. =) 2006-10-15 08:47:31 +00:00
Steve Checkoway a183541eed Use FOREACH_LUATABLE. 2006-10-15 03:16:06 +00:00
Glenn Maynard fd2ff3481c remove special "Command" processing 2006-10-12 09:57:46 +00:00
Glenn Maynard 33a4b55076 fix stack imbalance on error; RunExpression does this 2006-10-11 04:52:22 +00:00
Steve Checkoway 9ad5ac4b3e Fix warning. 2006-10-09 08:25:28 +00:00
Glenn Maynard 7d795e5703 first-pass: actor descriptions in Lua 2006-10-09 05:51:12 +00:00
Glenn Maynard 3cae60d6fd Currently, expression handling in XML is spotting and inconsistent.
Each actor type needs to evaluate attributes; only a few do.  Strings
are handled with the "@foo()" notation.

Instead, after loading an XML file for loading as an actor,
precompile all XML attributes as Lua expressions.

The primary difference to code is:
 - previously, Attr="string" would act as a string if it was being
   read as one.  Now, specify Attr='"string"'.  Attr="@string" is
   a shorthand.  (note that @strings will not be parsed as Lua
   strings, so can not use Lua escape characters)
 - previously, Attr="@func()" would evaluate func(), and the value
   of the attribute would be the return value of the function.  This
   was only supported for a few attributes.  Now, say Attr="func()",
   and this will work for all fields.
 - Attributes of other types are unchanged, except that all attributes
   may be Lua expressions, eg. Width="SCREEN_WIDTH".
 - Attributes names ending with "Command" are special, like metrics.
   Prefix "%" to disable this.

This brings XML handling in line with metric handling.  (This is an intermediary
step; I have another idea that follows from this that should eliminate the annoying
"'foo'"/"@foo".)
2006-10-09 00:49:30 +00:00
Steve Checkoway 0a88ac65f2 Narrow the Load() interface--there's no need to expose the initial offset or the returned offset. Call InitEntities() to make sure those are set up. 2006-10-08 23:44:58 +00:00
Glenn Maynard ba82cc8002 m_Value -> base pointer 2006-10-06 06:38:46 +00:00
Glenn Maynard 6808723b85 XNodeValue base class, Copy() 2006-10-06 06:26:53 +00:00
Glenn Maynard 1a89ddfccd pointer to attributes 2006-10-03 00:07:01 +00:00
Glenn Maynard 65d23319f1 api update 2006-10-02 22:47:53 +00:00
Glenn Maynard 76af4dba2f use GetName 2006-10-02 22:42:40 +00:00
Glenn Maynard 19e7328d78 move XML loading and saving into XmlFileUtil, reducing XNode
to a data structure
2006-10-02 05:53:56 +00:00
Steve Checkoway 08155c351a Simplify. 2006-10-01 12:52:00 +00:00
Steve Checkoway d778966fc6 The existence of an error is signaled by error_string being nonempty. 2006-10-01 12:39:50 +00:00
Steve Checkoway 9f9f61579c Unused. 2006-10-01 12:22:28 +00:00
Chris Danford 353e0c5b6e break up arch stuff into smaller .cpp files to fix smpackage build and not pull in unnecessary stuff 2005-12-16 04:16:09 +00:00