From 0f7b5c2a6b48dacf83bef2f3153c3827e7209e6f Mon Sep 17 00:00:00 2001 From: Andrew Livy Date: Sun, 12 Jan 2003 00:57:53 +0000 Subject: [PATCH] Started on Pump How To Play screen. Changes to BGAnimations: Metric Configurable Stuff: 1. you can rotate your BGA's 2. You can specify their X 3. You can specify their Y 4. You can make them appear (once) after a set time 5. You can make them hide (once) after a set time (useful if you want an item to show and appear just once) 6. You can set how ZOOMED in the element is. This will only work for sprite 0 in the BGAnimation Layer, I have currently done NO checking should there be more than one sprite in the layer (I suspect only sprite 0 will change and the rest will be unaffected) But again fairly untested. Check out the Pump How To Play screen to see it running. In the works: Tweening With BGAnimations. Haven't quite figured this one yet. --- stepmania/src/BGAnimationLayer.cpp | 80 +++++++++++++++++++++++++++++- stepmania/src/BGAnimationLayer.h | 11 ++++ 2 files changed, 89 insertions(+), 2 deletions(-) diff --git a/stepmania/src/BGAnimationLayer.cpp b/stepmania/src/BGAnimationLayer.cpp index e43d532d74..e93b606a43 100644 --- a/stepmania/src/BGAnimationLayer.cpp +++ b/stepmania/src/BGAnimationLayer.cpp @@ -92,6 +92,16 @@ void BGAnimationLayer::LoadFromVisualization( CString sMoviePath ) void BGAnimationLayer::LoadFromAniLayerFile( CString sPath, CString sSongBGPath ) { sPath.MakeLower(); + m_PosX = 0; + m_PosY = 0; + m_Zoom = 0; + m_Rot = 0; + m_ShowTime = 0; + m_HideTime = 0; + m_TweenStartTime = 0; + m_TweenX = 0.0; + m_TweenY = 0.0; + m_TweenSpeed = 0; if( sPath.Find("usesongbg") != -1 ) { @@ -310,11 +320,42 @@ found_effect: ini.SetPath( sIniPath ); if( ini.ReadFile() ) { + ini.GetValueF( "BGAnimationLayer", "SetXpos", m_PosX ); + ini.GetValueF( "BGAnimationLayer", "SetYpos", m_PosY ); + ini.GetValueF( "BGAnimationLayer", "SetZoom", m_Zoom ); + ini.GetValueF( "BGAnimationLayer", "SetRot", m_Rot ); + ini.GetValueF( "BGAnimationLayer", "TweenStartTime", m_TweenStartTime ); + ini.GetValueF( "BGAnimationLayer", "TweenX", m_TweenX ); + ini.GetValueF( "BGAnimationLayer", "TweenY", m_TweenY ); + ini.GetValueF( "BGAnimationLayer", "TweenSpeed", m_TweenSpeed ); + ini.GetValueF( "BGAnimationLayer", "ShowTime", m_ShowTime ); + ini.GetValueF( "BGAnimationLayer", "HideTime", m_HideTime ); ini.GetValueF( "BGAnimationLayer", "TexCoordVelocityX", m_vTexCoordVelocity.x ); ini.GetValueF( "BGAnimationLayer", "TexCoordVelocityY", m_vTexCoordVelocity.y ); ini.GetValueF( "BGAnimationLayer", "RotationalVelocity", m_fRotationalVelocity ); ini.GetValueF( "BGAnimationLayer", "SetY", m_fStretchScrollH_Y ); } + + if(m_ShowTime != 0) // they don't want to show until a certain point... hide it all + { + m_Sprites[0].SetDiffuse(RageColor(0,0,0,0)); + } + if(m_PosX != 0) + { + m_Sprites[0].SetX(m_PosX); + } + if(m_PosY != 0) + { + m_Sprites[0].SetY(m_PosY); + } + if(m_Zoom != 0) + { + m_Sprites[0].SetZoom(m_Zoom); + } + if(m_Rot != 0) + { + m_Sprites[0].SetRotation(m_Rot); + } } void BGAnimationLayer::Update( float fDeltaTime ) @@ -463,7 +504,7 @@ void BGAnimationLayer::Update( float fDeltaTime ) case EFFECT_TILE_SCROLL_LEFT: for( i=0; i