Glenn Maynard
394950b1eb
FileType_Invalid
2006-10-14 02:59:24 +00:00
Glenn Maynard
633adf30b7
if a path ends in a slash, it's always a directory
2006-10-14 02:57:24 +00:00
Glenn Maynard
98a752669f
remove ActorParam
2006-10-14 02:39:52 +00:00
Glenn Maynard
28ff9ee684
simplify
2006-10-13 21:59:19 +00:00
Glenn Maynard
933c87eb21
error handling
2006-10-13 03:36:00 +00:00
Glenn Maynard
f9c5cca641
Don't search globals.
2006-10-13 03:35:24 +00:00
Glenn Maynard
5cdf0e8d7e
Don't set globals for params. This was previously used for filenames. Use P.name.
2006-10-13 03:34:44 +00:00
Glenn Maynard
1c372a918c
move code out of macro
...
move common code into ActorUtil::Create
2006-10-11 07:33:38 +00:00
Glenn Maynard
2201d813b2
cleanup more
2006-10-11 04:58:11 +00:00
Glenn Maynard
0b87622780
tighten up MergeActorXML: only merge commands, fix and clean up
...
warning
2006-10-11 04:54:08 +00:00
Glenn Maynard
e11914d4bb
LoadFromNode(sDir, pNode) -> LoadFromNode(pNode)
2006-10-09 08:24:10 +00:00
Glenn Maynard
8e8a10f56c
ActorUtil::GetWhere
2006-10-09 08:08:17 +00:00
Glenn Maynard
ccf171dbc8
use GetAttrPath
2006-10-09 07:44:37 +00:00
Glenn Maynard
7477cd1e4f
_Source, for real source paths in error messages
2006-10-09 07:42:18 +00:00
Glenn Maynard
255501ead1
use "@path", like the rest of lua
2006-10-09 07:20:40 +00:00
Glenn Maynard
b113467c20
Mark the directory of actor definition XNodes in the nodes themselves.
...
Use ActorUtil::GetAttrPath to look up a path, with automatic
handling of relative paths. This way, we don't need to do it
in every place we look up paths.
(For Lua nodes, this will be set by Lua.)
2006-10-09 06:54:52 +00:00
Glenn Maynard
7d795e5703
first-pass: actor descriptions in Lua
2006-10-09 05:51:12 +00:00
Glenn Maynard
206f731d79
simplify
2006-10-09 05:18:17 +00:00
Glenn Maynard
612e2fa1df
simplify
2006-10-09 05:16:35 +00:00
Glenn Maynard
c54bdfc412
AppendAttrFrom
2006-10-09 05:14:23 +00:00
Glenn Maynard
d7776aba60
evaluate enums directly
2006-10-09 01:34:16 +00:00
Glenn Maynard
e0b788de16
unneeded LuaHelpers::RunAtExpressionS
2006-10-09 01:22:17 +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
Glenn Maynard
6322ded0dc
move command parsing into LuaHelpers. It's not Actor-specific other
...
than a few compatibility hacks.
2006-10-08 22:24:15 +00:00
Glenn Maynard
6808723b85
XNodeValue base class, Copy()
2006-10-06 06:26:53 +00:00
Glenn Maynard
430a794b31
fix copy
2006-10-04 23:42:08 +00:00
Glenn Maynard
1a89ddfccd
pointer to attributes
2006-10-03 00:07:01 +00:00
Glenn Maynard
83defce27b
XML update
2006-10-02 22:52:57 +00:00
Glenn Maynard
d188c2fd12
use GetName, GetValue
2006-10-02 06:12:42 +00:00
Glenn Maynard
85eb3e0a05
more useful error messages
2006-09-29 07:24:40 +00:00
Glenn Maynard
02a4b35d51
bound alignment constants
2006-09-26 20:00:27 +00:00
Glenn Maynard
46b2444705
remove special cases
2006-09-26 09:08:36 +00:00
Glenn Maynard
f567a0fd28
cleanup arg order
2006-09-26 08:54:54 +00:00
Glenn Maynard
3eddfac7fc
nil already pushed
2006-09-23 02:48:12 +00:00
Glenn Maynard
c9045a920c
use RunExpression
2006-09-23 02:25:36 +00:00
Glenn Maynard
0ad4fcf6e2
ParseActorCommands( Lua *, sCommands ) -> onto stack
2006-09-22 18:59:26 +00:00
Glenn Maynard
6da267ae30
make compile errors for commands less fatal
2006-09-22 18:58:00 +00:00
Glenn Maynard
8cb1c66023
remove SetName
2006-09-22 09:43:12 +00:00
Glenn Maynard
f8c1675309
allocate later
...
don't set name for binary chunks
2006-09-22 04:56:35 +00:00
Glenn Maynard
6f1dbf32d5
don't specify a dummy name for the expression, so RunScript
...
shows useful error messages
2006-09-22 04:25:38 +00:00
Glenn Maynard
355fdd7264
ActorCommands -> ActorUtil::ParseActorCommands
2006-09-21 02:36:40 +00:00
Glenn Maynard
3a57dca6c4
ActorCommands -> ActorUtil::ParseActorCommands
2006-09-21 02:24:22 +00:00
Steve Checkoway
6ea2a41b00
Cleanup RageException::Throw(). Do not use ssprintf() inside of Throw() and do not pass it bare error messages. Use RageException::Throw( "%s", sError.c_str() ); instead. Be consistent with quoting file names "%s" and theme metrics as "%s : %s". Try to make them complete English sentences when possible.
2006-09-17 01:19:19 +00:00
Steve Checkoway
6051deb2a8
Comment.
2006-09-16 03:59:02 +00:00
Jason Felds
43bc8400a0
Tab cleanup.
2006-08-18 03:09:42 +00:00
Glenn Maynard
30963ab843
all dialogs are warnings
2006-08-16 01:58:44 +00:00
Glenn Maynard
bf3d73fcef
unwrap
2006-08-16 01:56:54 +00:00
Glenn Maynard
4ab47c8f0c
Throw -> Dialog
2006-08-16 01:56:16 +00:00
Glenn Maynard
8af826fc3f
set parent before calling LoadFromNode
2006-08-15 19:25:45 +00:00
Glenn Maynard
832679370b
remove unused params
2006-08-15 19:19:59 +00:00