Commit Graph

17276 Commits

Author SHA1 Message Date
Glenn Maynard 438b712da2 Previously, theme paths searched fallback classes before themes: each class
fallback was checked with the main theme, then each class fallback was checked
with the base theme, and so on.

Reverse this: check the class name with each theme, then check the class
fallback with each theme, and so on.

This is faster, since we only look up each class Fallback at most once, not
once per fallback theme, and groups together theme lookups (which may allow
further optimizations).  More importantly, this matches the metric lookup
scheme.

This also makes more sense--if "ScreenWithMenuElements header" is overridden by
"ScreenMenu header" in the base theme, overriding "ScreenWithMenuElements header"
in a derived theme should change the same in the base theme (changing the
default) but not change the specialized "ScreenMenu header".
2005-09-07 01:42:47 +00:00
Glenn Maynard a0a61d4519 implement without (deep) recursion 2005-09-07 00:52:31 +00:00
Glenn Maynard f60693ffa1 no fallback for no class 2005-09-07 00:35:16 +00:00
Glenn Maynard 80e5cd8dbe cleanup 2005-09-07 00:34:02 +00:00
Glenn Maynard c872cea5ab cleanup 2005-09-07 00:08:39 +00:00
Glenn Maynard a03eba0767 cleanup 2005-09-07 00:07:53 +00:00
Glenn Maynard 0691258deb fix toasty 2005-09-06 23:46:58 +00:00
Glenn Maynard f30533431d parse fix 2005-09-06 23:39:45 +00:00
Glenn Maynard 59f9941445 Previously, theme metric lookups follows Fallback at every place; for
example, if a base theme had:

[Derived]
Fallback=Base1

[Base1]
A=1

and a derived theme had:

[Derived]
Fallback=Base2

[Base2]

then the lookup "Derived", "A" would find 1.  This is confusing and inconsistent:
it means that the value of Derived::Fallback has two values, both Base1 and Base2,
and Base1 is only accessible by the internal metric lookup.  Every metric should
have only one value; "Fallback=Base1" should be completely overridden here.

(This also reduces the difference between theme lookups and path lookups; path
lookups did not have this anomaly, as they did not have access to the extra Fallback
value.)
2005-09-06 22:57:37 +00:00
Glenn Maynard 05a2409659 move function 2005-09-06 22:14:06 +00:00
Glenn Maynard dc4c4a254d remove 2005-09-06 20:58:50 +00:00
Glenn Maynard e362389b0f prefer std::string calls over CStdString compat calls 2005-09-06 20:33:55 +00:00
Chris Danford 2d061d4938 use Lua params directly instead of @s 2005-09-06 19:11:03 +00:00
Chris Danford 67a6647c06 cleanup 2005-09-06 19:01:14 +00:00
Glenn Maynard 1c5ce3bf8b use CString 2005-09-06 18:25:16 +00:00
Glenn Maynard 6670c55a07 oops. Multiple attributes with the same name aren't allowed. Transition
back to a child node.
2005-09-06 05:56:59 +00:00
Glenn Maynard d16efc6684 better diags 2005-09-06 05:41:59 +00:00
Glenn Maynard 6a26d48403 oops. Multiple attributes with the same name aren't allowed. Transition
back to a child node.
2005-09-06 05:22:13 +00:00
Glenn Maynard c6a10c1d7a no need for :: or &expr; in param names 2005-09-06 04:39:36 +00:00
Glenn Maynard aaf2705f68 no need for :: or &expr; in command names 2005-09-06 04:38:37 +00:00
Glenn Maynard faf1ee5808 ReplaceMarkers, :: (no RunAtExpressionS). 2005-09-06 04:36:20 +00:00
Glenn Maynard f5f2f4a885 ThemeManager::EvaluateString was called here for three things:
- RunAtExpressionS.  Using @ to generate command lists is no longer allowed; it's
   too expensive and clumsy, and is no longer needed.
 - "::" for newlines.  This isn't needed, since the string is a Lua expression;
   use "\n".
 - FontCharAliases::ReplaceMarkers.  This only makes sense for settext calls.
(The latter two will still be supported by settext directly.)
2005-09-06 04:34:44 +00:00
Glenn Maynard 1ab1ba5efc Handle quoting natively.
This is so "settext,'Foo &START; bar';x,10" will be parsed as two commands,
not three.  This hasn't been needed so far, since places that load actor
commands have been calling ReplaceMarkers first, so the entity is replaced
before this; that's going away, so handle it here.
2005-09-06 04:32:12 +00:00
Glenn Maynard 5402482404 remove unused 2005-09-06 03:48:39 +00:00
Glenn Maynard 2fac031f15 const 2005-09-06 03:39:58 +00:00
Glenn Maynard d48dffeaf2 cleanup 2005-09-06 03:37:54 +00:00
Glenn Maynard 76b98ce386 cleanup 2005-09-06 00:58:17 +00:00
Glenn Maynard e676f9449d remove unused escaping stuff (don't think this is even part of XML) 2005-09-05 23:22:15 +00:00
Jared Hendry 83632f4f58 Add files. 2005-09-05 08:52:29 +00:00
Glenn Maynard 5c36adb84d faster, simpler GetFrameDimensionsFromFileName 2005-09-05 05:38:24 +00:00
Glenn Maynard f2984b0dcf support loading precompiled Lua chunks, for faster loading--compiling
Lua can be slow.
2005-09-05 05:32:08 +00:00
Glenn Maynard 4399f2ff0f cleanup 2005-09-05 03:24:14 +00:00
Chris Danford bb10c7c21f pass around InputEventPlus in Screen::Input instead of multiple input structures 2005-09-05 02:26:50 +00:00
Chris Danford 056dd1b1d5 fix crash in ~Character when deleting Characters that failed to load 2005-09-05 02:19:47 +00:00
Chris Danford ca22d71ba4 check invalid values in MultiPlayer conversions 2005-09-05 02:19:01 +00:00
Glenn Maynard 6715dac653 Don't auto-quote command parameters (make it easier to parse commands
from other tools).
2005-09-04 23:54:07 +00:00
Glenn Maynard 26b8e5c0fb do sorting and filtering only once, not once per profile 2005-09-04 23:29:31 +00:00
Glenn Maynard 3ec39c7fc2 Don't refresh note skins every time we reset. 2005-09-04 23:16:38 +00:00
Glenn Maynard 852558eb06 replace slow entity parsing code 2005-09-04 23:05:58 +00:00
Glenn Maynard 7a561fc4d5 move helpers into RageUtil
ToLower attributs, not ToUpper
2005-09-04 23:04:21 +00:00
Glenn Maynard 7c88d5ed88 cleanup 2005-09-04 21:59:00 +00:00
Glenn Maynard a23620b72f fix compiling regex repeatedly 2005-09-04 19:32:58 +00:00
Glenn Maynard 3bd3fabc44 fix Character::UndemandGraphics unloading graphics too early if used
by multiple screens at once
2005-09-04 18:25:09 +00:00
Glenn Maynard e60e016ce8 comment 2005-09-04 18:00:44 +00:00
Chris Danford abaaa199f2 fix output dir 2005-09-04 17:22:40 +00:00
Chris Danford 48ebc53549 return NULL -> return CString() for clarity and efficiency 2005-09-04 16:55:21 +00:00
Chris Danford c414d1bcf8 fix _DEBUG compile errors 2005-09-04 16:45:38 +00:00
Glenn Maynard 5dd7b77246 fix warning 2005-09-04 05:27:11 +00:00
Glenn Maynard fa2fa3d526 rename GetMetricRaw overload to GetMetricRawRecursive for clarity 2005-09-04 05:26:44 +00:00
Glenn Maynard 286c008b41 optimize: take CString&, not char*; passing char* causes a CString to be
constructed from it when we use it, which is a waste, since it often comes from
a CString already
cleanup
2005-09-04 05:12:48 +00:00