Commit Graph

302 Commits

Author SHA1 Message Date
Glenn Maynard 3da3825e20 remove TWEEN_SMOOTH. Use Bezier. 2006-01-23 06:53:11 +00:00
Glenn Maynard a62788fb9f Split out tween weighting functions. Add tweening from 1d and 2d
bezier curves.

The "bouncebegin" and "bounceend" tweens are now implemented in Lua,
using 2D beziers which approximate the old behavior very closely.
Added "ease" tween, which works like Flash's.

Custom tweens can be used, passing in a table of 4 values for a
1D bezier, or 8 values for 2D.

   tween,.5,TweenBezier,{ 0, p1, p2, 1 }
   tween,.5,TweenBezier,{ 0, 0, x1, y1, x2, y2, 1, 1 }

As with all tweens, the first parameter is the duration.

The 1D bezier { a, b, c, d } is equivalent to the 2D bezier
{ 0, a, 1/3, b, 2/3, c, 1, d }, but a 1D bezier is more efficient.
2006-01-23 05:48:40 +00:00
Glenn Maynard 6e03ec1998 use lerp() 2006-01-23 03:37:25 +00:00
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Glenn Maynard 58c79217df cleanup 2006-01-20 22:16:10 +00:00
Glenn Maynard 7f4b58a2ce cleanup 2006-01-18 05:49:37 +00:00
Glenn Maynard 63c010f94e cleanpu 2006-01-18 05:48:56 +00:00
Glenn Maynard bd9c97583e fix "warning: base class `class IMessageSubscriber' should
be explicitly initialized in the copy constructor"
2006-01-15 20:49:27 +00:00
Chris Danford d507f3fd28 move LuaBinding into namespace 2005-12-27 22:58:30 +00:00
Chris Danford 51fc84e2d2 add shorter "BaseRotationX" 2005-12-08 08:23:57 +00:00
Glenn Maynard a4729f0b80 make ScaleToCover, ScaleToFitInside act reasonably with different horizalign,
vertalign
2005-12-08 01:21:50 +00:00
Glenn Maynard 0a961c49c8 Revert cropping. "scaletocover,0,0,SCREEN_WIDTH,SCREEN_HEIGHT"
achieves the same effect.
2005-11-30 23:29:16 +00:00
Glenn Maynard 76f05625d5 ZoomToWidth/ZoomToHeight obeys crop. This way,
CropToAspectRatio,16/9;
  ZoomToWidth,SCREEN_WIDTH;
  ZoomToHeight,SCREEN_HEIGHT
will zoom to the center 16:9 area of the image.
2005-11-30 23:11:31 +00:00
Glenn Maynard c607f34d3a add Actor::CropToAspectRatio 2005-11-30 23:02:22 +00:00
Glenn Maynard 938bfeb7b0 add ActorUtil::SetParamFromStack, ActorUtil::GetParam. Save params to
a table, not as global variables.  Saving and loading from globals is still
around temporarily.
2005-10-29 01:28:29 +00:00
Glenn Maynard fde59d8464 set the loading screen, so actors can use it as an input variable 2005-10-28 22:47:11 +00:00
Glenn Maynard 17efa3412d Actor::Reset() -> private Actor::InitDefaults(). 2005-10-16 02:22:33 +00:00
Glenn Maynard 64504718d1 move m_sCommandName from TS to TI. Cleaner, and fixes queued commands being wiped
out by LuaExpressionTransform.
2005-10-14 01:46:00 +00:00
Glenn Maynard 9d756b8ba4 Allow optional parameters, for rarely-used params. 2005-10-13 23:12:16 +00:00
Glenn Maynard 64d9c29568 Simplify: store attributes in a simple map<CString,CString>, not in an object.
Makes attributes lighter.
2005-10-11 10:24:07 +00:00
Glenn Maynard f533842452 fix assert 2005-10-11 10:08:55 +00:00
Glenn Maynard 7210e10b89 cleanup 2005-10-11 10:08:54 +00:00
Glenn Maynard c9cb09dd36 ActorUtil::LoadFromActorFile -> ActorUtil::LoadFromNode 2005-10-11 02:51:05 +00:00
Glenn Maynard 0f17b0f9c2 Actor::IsType 2005-10-10 21:52:04 +00:00
Glenn Maynard a411c9d1f4 comment 2005-10-07 02:56:23 +00:00
Glenn Maynard 7a8cf0bb38 cleanup: move code out of header, remove RageUtil.h from Actor.h 2005-10-07 01:59:20 +00:00
Glenn Maynard 4cbf9be85a Add AddCommand and THEME:GetMetricA.
This won't work with theme reloading, but that hasn't worked in a long time anyway
(recreating the Lua environment while it's actually in use is hard).
2005-10-05 07:37:26 +00:00
Glenn Maynard b76d363994 Remove ugly CopyTweening. This is too wildly incompatible with newer
XML features, where there's not necessarily any corrolation between elements
of different graphics.  This didn't work well, anyway: it'd apply the old tweening
queue to the new graphics, but they might have completely different animations.
This will cause transitions between NoteSkins to be more abrupt, but we don't
use that feature anyway.
2005-10-05 04:49:09 +00:00
Glenn Maynard ca1309c49d basealpha 2005-09-28 03:50:00 +00:00
Glenn Maynard a3bdc2e5ff move SetSize to Actor 2005-09-24 06:57:03 +00:00
Chris Danford 65d71a4f23 expermienting with DEFINE_METHOD macro for Lua methods 2005-09-10 02:47:04 +00:00
Glenn Maynard 3db3ff7e51 cleanup 2005-09-07 09:20:00 +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 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 aaf2705f68 no need for :: or &expr; in command names 2005-09-06 04:38:37 +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 90f55ac9c2 Remove old hack. (This was added as a convenience back before actor
commands were used as widely as they are now.)
2005-09-03 07:19:00 +00:00
Glenn Maynard a8d98264e2 fix warnings 2005-09-03 02:09:03 +00:00
Chris Danford 30515ffaa4 iterate over each Attrib only one, not 8 times while searching for name matches 2005-09-02 00:01:58 +00:00
Glenn Maynard 2574a30592 allow Actor as a type directly 2005-09-01 07:28:52 +00:00
Glenn Maynard dda1302604 comment 2005-09-01 06:27:28 +00:00
Chris Danford af79589251 comment cleanup 2005-08-29 15:26:53 +00:00
Glenn Maynard 2a16238734 more convenient: input as attrib, not child 2005-08-29 05:01:34 +00:00
Glenn Maynard 23ea565846 better form: max one param per Input node 2005-08-27 08:26:34 +00:00
Glenn Maynard 60317928f2 Specify input parameters explicitly, to be passed via a <Param> in a
parent object and stored for later use.
2005-08-27 06:08:04 +00:00
Chris Danford 15d263b379 add GetRotationY 2005-08-18 06:15:04 +00:00
Glenn Maynard d01af9bde2 typo 2005-08-12 04:13:08 +00:00
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