Commit Graph
61 Commits
Author SHA1 Message Date
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 6323ca88d4 remove BLEND_INVALID 2006-09-27 05:44:30 +00:00
Glenn Maynard 4f057b4feb bind types 2006-09-26 09:06:21 +00:00
Glenn Maynard 562a801a39 cleanup 2006-09-26 08:44:55 +00:00
Glenn Maynard 593e2af79a fix "RageColor x = 0" silently compiles and crashes 2006-09-22 19:51:51 +00:00
Glenn Maynard 32ccbbbb99 LuaHelpers::FromStack 2006-09-22 19:07:56 +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
Glenn Maynard 9ed6603349 add BLEND_WEIGHTED_MULTIPLY and BLEND_INVERT_DEST blend modes 2006-07-27 01:34:57 +00:00
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Steve Checkoway 1f8ee7124c Use SM_ALIGN. Cleanup spacing. 2006-01-15 12:55:38 +00:00
Steve Checkoway 9ef6cff623 cleanup 2005-10-31 01:56:42 +00:00
Steve Checkoway 8221c2f20d Let SM play nice with OS X's headers. 2005-10-31 01:56:15 +00:00
Chris Danford c885d87f4a Use a lua transform function to position SOptions rows instead of having a Y metric for each row 2005-08-15 07:51:16 +00:00
Chris Danford f3783a3d1b fix tweening of LAYOUT_SHOW_ONE_IN_ROW 2005-02-24 07:12:43 +00:00
Glenn Maynard fa32951449 cleanup 2005-02-13 03:05:19 +00:00
Glenn Maynard 9ba9a842ad add TextureMatrixScale vertex attribute; disable X texture animation with
1, Y with 2
2005-02-01 02:45:15 +00:00
Glenn Maynard 583eaf5532 fix syntax problem in some compilers 2005-01-20 14:53:22 +00:00
Glenn Maynard d58fa5178c remove GlowMode 2005-01-08 22:40:42 +00:00
Glenn Maynard 8a188e1a13 try to align 16-byte types to 16 bytes 2005-01-02 23:08:42 +00:00
Glenn Maynard f60254ba0e don't waste time zeroing RageVColor by default 2005-01-02 23:04:25 +00:00
Glenn Maynard fbdf19445c cleanup 2005-01-02 23:03:08 +00:00
Glenn Maynard a8f8095d10 Don't zero RageSpriteVertex in the ctor; it's wasteful when declaring large arrays, because we almost always immediately overwrite that with real data. (We should do this for all basic RageTypes, but this one matters due to StripBuffer for hold note rendering.) 2005-01-01 23:29:13 +00:00
Chris Danford d544ea4972 scale pulse effect by EffectColors for added control 2004-12-27 03:25:09 +00:00
Chris Danford 48408e4da5 move all graphics API calls into RageDisplay_* 2004-06-19 21:12:55 +00:00
Chris Danford 9ec4c6be91 add "draw on z fail" mode 2004-05-15 09:26:21 +00:00
Glenn Maynard 17207ba6b5 model types 2004-05-11 20:35:21 +00:00
Glenn Maynard f9f10e2372 more license updates 2004-05-06 02:40:33 +00:00
Glenn Maynard 3285433fb9 optimize FTOC (about 7x faster in g++, not benchmarked in VC) 2004-05-01 05:21:39 +00:00
Glenn Maynard 9707e6bb0c allow omitting alpha from "1,1,1", like #FFFFFF 2004-04-26 00:07:25 +00:00
Chris Danford 7de8269a67 pack all geometry for a Model into one set of vertex buffers 2004-04-16 05:09:02 +00:00
Chris Danford ef998e5e84 move vertex buffers into a separate object in perparation for HW vertex buffers 2004-04-08 08:35:38 +00:00
Glenn Maynard 330ba5ab27 make scale(RageColor) available 2004-03-06 07:20:21 +00:00
Chris Danford 9ca4de158f optimization: don't make a temp copy of vertices if the model has no bones 2004-02-08 04:58:43 +00:00
Chris Danford 3ca8601390 add front face culling 2004-02-04 11:05:33 +00:00
Chris Danford 68ff50636d add 2-pass support for models 2004-01-28 08:53:40 +00:00
Chris Danford e3cc4e3ff5 cleanup Model, remove MathUtil files, fix col major/row major errors 2003-12-24 12:30:41 +00:00
Glenn Maynard 5cac8f0a91 cleanup 2003-12-20 03:06:30 +00:00
Glenn Maynard ac5102613c fix alpha 2003-11-18 04:25:05 +00:00
Glenn Maynard 8ac946be70 add RageColor::FromString 2003-11-18 04:05:58 +00:00
Glenn Maynard 400f8a45a5 cleanup 2003-11-14 17:21:02 +00:00
Glenn Maynard f4b70646ce Add Color * Color = Color.
Remove Color * F.
2003-10-03 06:33:02 +00:00
Chris Danford c67d78d948 let Actor subclasses have first crack at parsing commands
allow Models and BitmapTexts in BGAnimationLayer (detected through file extension)
add RageModelVertex, which doesn't have a color property
add "stretch" file name hint for textures
2003-07-07 01:29:18 +00:00
Glenn Maynard ee50591124 initialize vertices and VColors by default, to avoid sending bogus
data to the renderer
2003-05-29 08:34:18 +00:00
Glenn Maynard 2ddc78909a Combine binaries, so we can choose the renderer. No actual selection
yet; change CreateDisplay if you want to do that for the next few hours.
2003-05-26 19:42:04 +00:00
Chris Danford 02016ae442 Reorganize RageDisplay
Add Direct3D renderer (separate project configuration)
Add Xbox project config (doesn't yet compile)
2003-05-22 05:28:37 +00:00
Chris Danford 54bedc3eba clean up RageDisplay methods, add ability to mask song banner
The masking uses the Z-buffer under the assumption that some cards don't have a stencil.  Should we be using the stencil instead?  It doesn't really matter because we never need both the Z buffer and stencil buffer simultaneously.
2003-05-15 06:09:19 +00:00
Glenn Maynard c4269307c1 add glow modes 2003-05-04 22:21:57 +00:00
Glenn Maynard dfe4f09141 move stuff out of headers
get rid of nonstandard anonymous unions
2003-04-24 01:00:31 +00:00
Chris Danford 5ecd3afdd7 improved editor playback performance by not drawing unncessary Actors
fixed crash in Big transform
fixed ugly area highlight alignment
2003-02-19 07:59:00 +00:00
Glenn Maynard 82a4960bd9 switch vector types
add average-FPS-during-this-screen; i'm using it for benchmarking
2003-01-11 05:12:17 +00:00