Commit Graph

255 Commits

Author SHA1 Message Date
Glenn Maynard 85d66d4a6c dumb fix 2005-08-12 04:12:33 +00:00
Glenn Maynard b5cca118e0 add TWEEN_SMOOTH 2005-08-12 04:08:51 +00:00
Chris Danford c20c41e7fc load commands from elements (for using Lua to generate the command name) 2005-08-06 05:33:01 +00:00
Chris Danford 2ca9f32459 add GetDiffuseAlpha 2005-08-03 03:12:35 +00:00
Chris Danford 32c3953726 "scale, rotate, translate", not "rotate, scale, translate". It's amazing that this is a day 1 bug. 2005-07-25 17:57:42 +00:00
Chris Danford 1f3ed4d3be replace effect delay/period with RampUp/HoldAtHalf/RampDown/HoldAtZero 2005-07-24 03:19:01 +00:00
Glenn Maynard f9e40278dd fix uninitialized 2005-07-19 08:52:36 +00:00
Glenn Maynard 2dd114942b cleanup 2005-07-19 08:36:02 +00:00
Glenn Maynard 56fa4fe4b2 Don't create a TempState for every actor. If we use it, we always use it
right away, inside DrawPrimitives().  This cuts down the size of Actor by
about 25%.
2005-07-19 07:54:32 +00:00
Glenn Maynard df19b084fd sanity check (m_pTempState points somewhere in the other actor) 2005-07-19 07:52:11 +00:00
Glenn Maynard 2e05545ec7 fix memleak 2005-07-19 07:46:45 +00:00
Glenn Maynard c05cf4806a yuck. implement copy ctor to copy tweening queue 2005-07-19 06:21:10 +00:00
Glenn Maynard c4495e3900 Don't use deque in Actor; it allocates too much. Store pointers; moving
pointers around is cheap enough.
2005-07-19 05:56:36 +00:00
Glenn Maynard 55d6382c49 add virtual Copy() to Actor 2005-07-18 22:00:19 +00:00
Glenn Maynard f47cb7f526 bind GetName 2005-07-12 21:44:30 +00:00
Glenn Maynard 8cc8c66890 baserotation 2005-07-05 06:38:34 +00:00
Glenn Maynard 1607e6320a cleanup 2005-07-05 02:53:41 +00:00
Glenn Maynard 9a6fa1bae8 actor instance tables 2005-07-04 21:45:16 +00:00
Glenn Maynard ff888eaf9e cleanup 2005-06-21 05:23:25 +00:00
Glenn Maynard 9d7f835609 no need to template Luna specializations 2005-06-20 05:02:03 +00:00
Glenn Maynard e2cfba413a update registration for various types 2005-06-20 04:23:36 +00:00
Glenn Maynard c0a65b3503 lua locking 2005-06-16 22:10:24 +00:00
Chris Danford 623dc2512f merge PlayCommand2 and PlayCommand so that Actor derivities only have to override one method to get the correct behavior 2005-06-12 00:35:08 +00:00
Chris Danford 98784d3fb5 Split Update into Update and UpdateInternal so that every class doesn't need to early abort in Update when hibernating 2005-06-11 10:32:58 +00:00
Glenn Maynard 47db6ca9c4 floating-point zbias. For compatibility, 0 is off and 1 is the old "zbias on".
Going beyond 1 is allowed, but the usable/useful range of values is currently
undefined--try to stick to 0..1.
2005-05-06 04:05:02 +00:00
Glenn Maynard 59f6c7848a separately-controllable ZBias 2005-05-06 03:24:41 +00:00
Chris Danford f81516f531 assert -> warning 2005-05-04 19:19:22 +00:00
Chris Danford 80e732f718 assert on doubly defined commands 2005-05-04 09:59:41 +00:00
Glenn Maynard 326a03ff79 fix spin ignores effect clock 2005-05-04 05:25:53 +00:00
Glenn Maynard 72327d7e5d add lua helpers
add auxilliary tweening value; this isn't bound to any effect, so it can
safely be used from Lua.
2005-05-03 20:27:50 +00:00
Chris Danford 0ac5e2b008 add Skew for faux italic fonts 2005-05-02 21:43:27 +00:00
Chris Danford f858e3a5b6 send message on beat crossed 2005-05-01 22:59:00 +00:00
Chris Danford 01d59d97ce add base alpha 2005-04-30 07:48:10 +00:00
Glenn Maynard 4ad1b23244 cleanup 2005-04-29 00:07:33 +00:00
Glenn Maynard 4bba3fbaa8 add lights as an effect source 2005-04-28 23:55:47 +00:00
Glenn Maynard 8b76b5eafd experimental: allow implementing effects in Lua.
The biggest risk here is performance; we rarely call Lua per-frame.  However,
there are lots of places where we can call Lua while rendering (any time we
call a command), and there's little difference between calling Lua once
every ten frames or once every frame; either way you're counting against the
per-frame time quota to hit vsync.  So, this probably isn't much of a stretch.

Usage is simple:

  OnCommand=luaeffect,Foo
  FooCommand=addx,math.random()*10

Actor commands run during the effect will only apply for that frame.  Don't
call tweening commands ("linear") or anything else that doesn't make sense
in this context; you're modifying m_TempState instead of the tweening queue.
This is hoped to replace some of the more esoteric stuff in the effect code.

For this to be of much use, Lua access to m_fSecsIntoEffect and probably
other stuff is needed.
2005-04-28 10:18:36 +00:00
Glenn Maynard b2b3a80625 fix queued commands ending up in m_current, causing all future tweens to inherit it 2005-03-27 18:55:26 +00:00
Glenn Maynard a0877fdab0 Actor::SubscribeToMessage 2005-03-27 05:54:26 +00:00
Chris Danford 6016f34983 multiply the alphas so we can fade even while an effect is playing 2005-03-26 19:30:10 +00:00
Chris Danford a16db4edaa Don't use negative names for booleans: rename Hidden -> Visible, but still support the old interfaces. 2005-03-25 20:30:39 +00:00
Steve Checkoway ae02033893 Fix warnings. 2005-03-23 21:04:40 +00:00
Chris Danford 7ca20486ef use sin lookup table to fix terrible performance with float and tipsy performance on some archs 2005-03-22 00:58:05 +00:00
Chris Danford 1d1a6a95ac add diffuse_ramp effect 2005-03-21 10:49:51 +00:00
Chris Danford d83e8ec60c warn instead of asserting on tween overflow 2005-03-20 20:37:24 +00:00
Chris Danford ca8106297e add HasCommand 2005-03-13 20:34:52 +00:00
Chris Danford 7ab74cdd24 don't keep "Message" in command name
fixes ScoreDisplayCalories
2005-03-08 16:54:48 +00:00
Chris Danford 2cc06cdc27 add 2nd parameter to ActorCommands 2005-03-01 21:56:28 +00:00
Glenn Maynard b76c0edfa9 cleanup 2005-02-28 18:52:38 +00:00
Glenn Maynard 6a20525872 cleanup, comment 2005-02-28 18:16:41 +00:00
Chris Danford 4a2499b0fb fix Model doesn't obey m_bTextureWrapping 2005-02-27 08:31:41 +00:00