Commit Graph
22748 Commits
Author SHA1 Message Date
Glenn Maynard d720b18eaa use LuaHelpers::FromStack to generalize metrics 2006-09-22 20:05:37 +00:00
Glenn Maynard 593e2af79a fix "RageColor x = 0" silently compiles and crashes 2006-09-22 19:51:51 +00:00
Glenn Maynard 1f5114b193 LuaHelpers::FromStack binding for references 2006-09-22 19:46:30 +00:00
Glenn Maynard 3130411629 use LuaHelpers::RunExpression 2006-09-22 19:45:37 +00:00
Glenn Maynard 40eef3c600 cleanup 2006-09-22 19:40:32 +00:00
Glenn Maynard d55c71f5cf Don't ReplaceMarkers metrics. Only do that for language strings. 2006-09-22 19:36:17 +00:00
Glenn Maynard eb016b06d7 move into Languages 2006-09-22 19:22:06 +00:00
Glenn Maynard 16d78d5f05 type check 2006-09-22 19:08:16 +00:00
Glenn Maynard 32ccbbbb99 LuaHelpers::FromStack 2006-09-22 19:07:56 +00:00
Glenn Maynard f8b3a17c6f split out ThemeManager::PushMetric 2006-09-22 19:05:56 +00:00
Glenn Maynard 874a4fc2bb use ParseActorCommands(L) and RunExpression 2006-09-22 19:01:13 +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 494c3cd485 LuaHelpers::RunExpression 2006-09-22 18:53:39 +00:00
Jason Felds a7a6d643a4 Add the *Workout* files. 2006-09-22 14:56:39 +00:00
Chris Danford 58603a48f2 add Workout files 2006-09-22 11:36:12 +00:00
Glenn Maynard d98c17eac6 move code 2006-09-22 09:52:08 +00:00
Glenn Maynard 85d8006257 remove LuaReference name; keep LuaReference lightweight 2006-09-22 09:46:31 +00:00
Glenn Maynard 8cb1c66023 remove SetName 2006-09-22 09:43:12 +00:00
Glenn Maynard 709a790f1c change arg order 2006-09-22 08:48:49 +00:00
Glenn Maynard f29762c59e change arg order 2006-09-22 08:38:30 +00:00
Glenn Maynard 557563e81d cleanup 2006-09-22 08:33:20 +00:00
Glenn Maynard 04e9fcc2bf remove SubscriptionManager 2006-09-22 07:54:46 +00:00
Glenn Maynard bd2dd513b8 copy the name 2006-09-22 07:53:51 +00:00
Glenn Maynard 1bb569f8c4 LuaReference and apActorCommands are the same thing; apActorCommands
just sticks the result in AutoPtrCopyOnWrite.  apActorCommands might be
eliminated; it's reference counting a garbage collected object.  (It
used to be more useful, when we stored actual command lists; now I'm
not sure whether it is.  Need to benchmark LuaRef copying to see.)

So, we shouldn't be treating them differently, but we are:
GetMetric(apActorCommands) parses actor commands, and GetMetric(LuaRef)
does not.  I don't like that distinction; actor commands can be passed
around as a LuaReference, and other references can be put in
apActorCommands.  "Whether it's in a smart pointer" is a strange
way to decide which overload to use.

Also, we should have a consistent way to know whether a metric is to
be parsed as a command or as a Lua expression, based on the data
itself and not the code being used to read it.  Let's use the name:
all commands end with "Command".  We already depend on this elsewhere,
in ActorUtil::LoadAllCommandsFromName.

Note that "actor commands" are not specific to the Actor system,
other than a few compatibility hacks; they're just a shorthand
for writing Lua functions.
2006-09-22 07:50:05 +00:00
Glenn Maynard 0006a92712 commands end with Command 2006-09-22 07:46:21 +00:00
Glenn Maynard 13937cf7eb bools 2006-09-22 07:21:34 +00:00
Glenn Maynard 607cf44b31 old comment 2006-09-22 07:18:37 +00:00
Glenn Maynard 305d9a86f5 remove hack; no longer necessary 2006-09-22 07:18:20 +00:00
Glenn Maynard ec69abca83 use DynamicThemeMetric 2006-09-22 07:14:56 +00:00
Glenn Maynard 09a0981eaf handle Fallback metrics like the rest 2006-09-22 07:00:26 +00:00
Steve Checkoway 930af9db5c Add file. 2006-09-22 06:58:14 +00:00
Glenn Maynard 59ad3f8222 ThemeManager::GetClassFallback 2006-09-22 06:41:27 +00:00
Jason Felds d0c97aa6ed File update (untestable: normal updater hasn't been around). 2006-09-22 05:31:21 +00:00
Glenn Maynard 7f974f428b double quotes look cleaner than single quotes 2006-09-22 05:02:27 +00:00
Glenn Maynard f8c1675309 allocate later
don't set name for binary chunks
2006-09-22 04:56:35 +00:00
Glenn Maynard 4a9b1736f5 flip GetMetric(ref) and GetMetricR(), so there's an interface exposed that doens't
copy the reference.  Copying refs isn't expensive, but it does lock Lua.
2006-09-22 04:46:47 +00:00
Glenn Maynard 6b89313b09 cleanup 2006-09-22 04:38:42 +00:00
Glenn Maynard 6d616e8a86 major format update. This was done mostly by grepping the source
for ThemeMetric<RString> and GetMetric, and then doing a runthrough;
I probably missed some.
2006-09-22 04:36:53 +00:00
Glenn Maynard f90088d616 Currently all metrics except for strings and commands are valid
Lua expressions, and commands simply allow a shorthand that generates
valid Lua expressions.  Make strings Lua expressions.

This essentially reverses strings; rather than:
  Metric1=Text
  Metric2=@Text()

specify:

  Metric1="Text"
  Metric2=Text()

This means that every metric (except Fallback, currently) can be
treated as a Lua expression, except for Command metrics that just
need a bit of preprocessing.
2006-09-22 04:35:11 +00:00
Glenn Maynard 5bab52b368 use GetMetricR 2006-09-22 04:34:47 +00:00
Glenn Maynard 284ce49366 fix FromStack for negative iPos 2006-09-22 04:26:43 +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 53c831701d fixup colors 2006-09-22 04:20:48 +00:00
Glenn Maynard 38328196a3 use GetMetricR 2006-09-22 03:53:42 +00:00
Glenn Maynard 7a683dd839 unused 2006-09-22 03:49:19 +00:00
Glenn Maynard ce3ebd0293 use GetMetricR 2006-09-22 03:38:47 +00:00
Glenn Maynard d89cbcd133 SetTransformFromReference 2006-09-22 03:34:06 +00:00
Glenn Maynard 4ed3cb5970 Don't pass transform functions through a string metric; read it as
a Lua expression directly.
2006-09-22 03:32:50 +00:00
Glenn Maynard 494053c420 set the expression directly 2006-09-22 03:32:18 +00:00