Commit Graph

18 Commits

Author SHA1 Message Date
Glenn Maynard 138b96a3b0 Unpremultiply shader 2007-02-24 23:20:25 +00:00
Glenn Maynard ebf4bc5c0e more sensible shader handling, incomplete but functional
add mixing modes
2007-02-19 23:40:19 +00:00
Glenn Maynard 3979202ce0 add EffectMode_ColorBurn 2007-02-14 01:59:41 +00:00
Glenn Maynard 8ac9571d1e add EffectMode 2007-02-14 01:51:50 +00:00
Glenn Maynard d7833bb019 add TextureMode 2007-02-13 03:59:00 +00:00
Glenn Maynard a4bf741f08 LuaHelpers::Push<RageColor> 2007-02-03 22:20:51 +00:00
Glenn Maynard e612c615e0 add RageColor::FromStackCompat 2007-01-31 08:44:26 +00:00
Glenn Maynard 6060175649 use REGISTER_WITH_LUA_FUNCTION 2007-01-14 00:18:12 +00:00
Steve Checkoway e87789da7c Rename XToString2 to XToString. 2006-10-15 00:09:18 +00:00
Glenn Maynard 4b30d3552d A bizarre C++ wart wants us to declare FromStack overloads
before the ThemeMetric templates that use them.  That's broken
and unreasonable, so change this around a bit and make FromStack
(and Push) templates.

Push() takes a bit of a trick.  Some Push overloads push the
actual value: scalars (int, float), RageColor (pushes a table).
Others--most of them--push a reference to a C++ object.  We
want the scalars to have a reference parameter type, so we
don't make extra copies of things like RageColor when we push
them.  We need to pass C++ objects by pointer (we need to
push the actual object's pointer, not a pointer to a copy).
Further, pushing a scalar is a const operation, but pushing
a reference to an object is not.

To do both with the same template, we handle objects with
this slightly odd template:

template<> void LuaHelpers::Push<T*>( lua_State *L, T *const &pObject );

The actual overload (T) is eg. "Actor*"; this fits within the
general prototype, "Push(lua_State *L, const T &object)", giving
us a const reference to a (non-const) pointer to Actor, and we're
conceptually pushing the pointer.

The net effect of this is that 1: what was before compile errors
now becomes link time errors, but 2: these specializations
don't have to be in the headers (except for new ones for
Preference and BroadcastOnChange).
2006-10-07 01:22:28 +00:00
Glenn Maynard e501a5a9cd move color() into RageTypes 2006-09-29 10:04:36 +00:00
Glenn Maynard 8cf7109168 XToString 2006-09-27 06:13:33 +00:00
Glenn Maynard 509de5d97b add missing 2006-09-27 05:45:09 +00:00
Glenn Maynard 4f057b4feb bind types 2006-09-26 09:06:21 +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 284ce49366 fix FromStack for negative iPos 2006-09-22 04:26:43 +00:00
Glenn Maynard a4a8e41974 RageColor::PushTable, RageColor::FromStack
This is PushTable and not PushSelf, to distinguish this from
the PushSelf used in other classes.  Classes that can PushSelf
actually push a reference to itself to Lua, but that's only
valid for objects with a lifetime; many RageColors are temporaries.
2006-09-21 22:04:56 +00:00