Commit Graph
224 Commits
Author SHA1 Message Date
Glenn Maynard 5c93e0f2fc make music sync follow VisualDelaySeconds by default (fixes
receptors flashing off-sync when VDS is used)
2007-06-18 21:02:28 +00:00
Glenn Maynard 0b3db98d00 add timerglobal 2007-05-03 22:59:14 +00:00
Steve Checkoway a856377219 Change these to their floating point counterparts since BitmapText::SetHorizAlign(float) hides Actor::SetHorizAlign(HorizAlign). 2007-04-03 06:51:26 +00:00
Glenn Maynard 6f71043cc9 add SetTextureFiltering 2007-03-24 00:39:19 +00:00
Glenn Maynard 495f80962b expose fractional alignment 2007-03-01 08:14:33 +00:00
Glenn Maynard c371d9f26b Previously, alignment had to be implemented by each actor, so it was
only ever supported by Sprite and BitmapText.  Handle it globally, using
m_size.  This way, an actor only needs to set m_size to support alignment.

This means alignment can be set for non-drawing ActorFrames, if a size
is set explicitly.  This allows stretching from the border of a frame
without playing games with extra nested frames.  "setsize,100,100;valign,4;zoomx,.5"

This adds an extra matrix multiply.  This will only happen for actors
actually set to non-centered alignment, which is the exception.

BitmapText still overrides this behavior a bit.  Alignment for text
does two things: changes the alignment of the bounding box vs. the
X/Y position (the generic behavior), and changes the alignment of
the text within the bounding box.
2007-03-01 04:29:05 +00:00
Glenn Maynard be4efcd0c2 Represent alignment as a float; eliminates selects. (I havn't
yet decided whether these should be -1.0 ... +1.0, indicating
"fully left aligned" and "fully right aligned", or 0.0 ... 1.0,
indicating "anchor to this fractional position in m_size".
It may become the latter.)
2007-03-01 02:19:49 +00:00
Chris Danford 16d3561d08 Message sCommandName -> Message msg 2007-02-22 00:38:05 +00:00
Glenn Maynard 2fa8986ea6 fix RunCommandsRecursively by implementing it directly
distinguish between Run ("call this function") and Play
("look up the function with this name and call it")
2007-02-20 23:49:13 +00:00
Glenn Maynard 0d693a0ccb remove EffectCommand. Use SetDrawFunction instead; it's cleaner
and can modify any property, not just tweened properties.
2007-02-20 02:06:11 +00:00
Chris Danford f7fc9ceaa5 remove Set/GetHidden, leave *Visible
remove hidden from ActorCommands eventually
2007-02-13 06:32:26 +00:00
Glenn Maynard fcf121feb0 add PlayCommandNoRecurse to fix PlayCommand hack 2007-02-10 05:42:25 +00:00
Glenn Maynard 9bc27fb390 Messages and commands are nearly identical: they both have a name,
they can both have parameters stashed in a table, and they both play
stuff out of the actor command list.  Merge them; now the only
difference between playing and broadcasting a command is that playing
plays recursively on a tree and broadcasting sends to all subscribers.

The distinction between "messages" and "commands" is cosmetic now;
everything is a message.  The only thing special about commands intended
to be received as a broadcast is the "Message" suffix, which subscribes it.
2007-02-03 06:17:02 +00:00
Glenn Maynard 7e9ec10f3a work on allowing parameters to messages: pass a Message
struct, not just a string
2006-11-13 23:51:24 +00:00
Glenn Maynard a5f5fa0b78 HandleMessage( Message ) 2006-11-13 23:11:25 +00:00
Steve Checkoway 8588b48a15 Set the perspective when drawing in a subclass of ActorFrame, not just for children of subclasses. 2006-10-26 06:03:12 +00:00
Glenn Maynard 6ff22acb45 remove hacky Actor::IsType 2006-10-11 23:51:40 +00:00
Glenn Maynard e11914d4bb LoadFromNode(sDir, pNode) -> LoadFromNode(pNode) 2006-10-09 08:24:10 +00:00
Glenn Maynard 02a4b35d51 bound alignment constants 2006-09-26 20:00:27 +00:00
Glenn Maynard 9501cb22e5 standard enum convention 2006-09-26 19:50:53 +00:00
Glenn Maynard cc49e8d56d use bound types 2006-09-26 09:09:38 +00:00
Glenn Maynard b3498dbb9f pull in LuaReference; was before from ActorCommands.h, needed
to destruct apActorCommands
2006-09-21 02:55:56 +00:00
Glenn Maynard 8961602964 remove ActorCommands.h 2006-09-21 02:43:57 +00:00
Glenn Maynard d4cbd09737 apActorCommands in Actor.h 2006-09-21 02:35:30 +00:00
Glenn Maynard 416538ca21 GetParent 2006-08-17 06:42:54 +00:00
Glenn Maynard 45ea7b05ed don't overload this 2006-08-15 19:37:44 +00:00
Glenn Maynard 7ca60464b3 cleanup 2006-08-15 19:34:41 +00:00
Glenn Maynard cbc69ea550 remove unused parameter 2006-08-15 19:24:29 +00:00
Glenn Maynard ec683e54d9 remove InitDefaults 2006-08-15 19:06:26 +00:00
Glenn Maynard a872952b8b store parent 2006-08-15 19:02:31 +00:00
Glenn Maynard 89ab444693 Add parent links to actors.
For each actor, create a context table, with an __index link to the
parent's.  This can be used to propagate information down complex
actor trees.

Code needs to be changed to do AddChild() calls before loading,
rather than after, so context links are available during loads.
This will be done as necessary.
2006-08-09 23:22:54 +00:00
Glenn Maynard a3ffee63b6 remove GetCommandsLengthSeconds 2006-08-01 20:32:16 +00:00
Glenn Maynard e550a0fcb5 cleanup, less random order 2006-07-29 06:18:09 +00:00
Chris Danford a5f0d301c9 don't unsubscribe from messages on bgchange 2006-05-30 09:08:00 +00:00
Chris Danford 68425c887e Fix backgrounds always choosing the first random movie. Choose the same random backgrounds every time a song is played. Fix background layer reset after BackgroundTransition. 2006-05-05 19:21:29 +00:00
Glenn Maynard ab08e39204 return a pointer from Actor::GetCommand, so the command not existing
isn't fatal
2006-03-26 05:53:20 +00:00
Glenn Maynard 0ac58078b4 unused 2006-02-27 06:09:08 +00:00
Glenn Maynard 5c6cd59375 add GetCurrentDiffuseAlpha 2006-02-27 03:06:43 +00:00
Chris Danford a05d1e8265 move message helper stuff out of Actor into a new base class so that it can be used w/o deriving from Actor 2006-02-06 01:26:52 +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
Chris Danford 7f821e8cfc CString -> RString 2006-01-22 01:00:06 +00:00
Glenn Maynard a62f9d62f2 cleanup 2006-01-20 08:54:46 +00:00
Glenn Maynard 1d186c481d const fix 2006-01-15 07:12:05 +00:00
Chris Danford 353e0c5b6e break up arch stuff into smaller .cpp files to fix smpackage build and not pull in unnecessary stuff 2005-12-16 04:16:09 +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 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 0f17b0f9c2 Actor::IsType 2005-10-10 21:52:04 +00:00