- Even though these strings are in the context of the table, we still prefix them
with the enum name ("UnlockRequirement_ArcadePoints", not "ArcadePoints"). The typical
use is as a simple string (obj:Call("Type")), not as an index into the table, and
this makes the type clear and easy to search for in that case.
- no "NUM_UnlockRequirement"; use #UnlockRequirement.
- no UnlockRequirement_Invalid; use nil
- Enum<X>::Check always returns a valid X; no additional error checking is
needed and Lua code can no longer introduce invalid enum values into C
- This does not support enum types with holes; neither does FOREACH.
- This is typesafe. If you give "GAME_CONTROLLER_1" to a function expecting an
UnlockRequirement, we can detect the error and show a meaningful error message.
- Lua strings are always merged, and comparisons are as cheap as integers, so
this isn't slow (and may be faster).
- Can iterate: for i,j in ipairs(UnlockEntry) do func(j) end
(This is a bit clumsy; probably want a foreach() iterator that doesn't return i)
- ThemeMetric<UnlockRequirement> just works.
This is normally statically linked in releases. Lua also needs
some patching in Linux x86 to fix performance issues related
to alignment, will need patching if we want fine-grained threading,
and generally has an odd "build it yourself" design, so let's
just add embed this one. (note: disable PCH for these files
in VC, and don't add lua.c, luac.c, or print.c to the project)
This patch finally gets Xbox colors and tex. corruption problems out, and a running product in.
1- Only one texture color mode will be allowed.
2- No palletized textures on Xbox.
3- Manually invert colors.
Thanks to Andis, the author.