2004-06-01 00:53:06 +00:00
|
|
|
/* BGAnimationLayer - layer elements used by BGAnimation */
|
|
|
|
|
|
2002-11-16 08:07:38 +00:00
|
|
|
#ifndef BGANIMATIONLAYER_H
|
|
|
|
|
#define BGANIMATIONLAYER_H
|
2002-09-29 05:06:18 +00:00
|
|
|
|
2003-03-05 02:52:40 +00:00
|
|
|
#include "GameConstantsAndTypes.h"
|
2004-01-25 22:22:40 +00:00
|
|
|
#include "ActorFrame.h"
|
|
|
|
|
#include <map>
|
2002-09-29 05:06:18 +00:00
|
|
|
|
2005-12-16 04:16:09 +00:00
|
|
|
class XNode;
|
2004-12-27 10:24:54 +00:00
|
|
|
|
2004-01-25 22:22:40 +00:00
|
|
|
class BGAnimationLayer : public ActorFrame
|
2002-09-29 05:06:18 +00:00
|
|
|
{
|
|
|
|
|
public:
|
2005-08-31 22:15:33 +00:00
|
|
|
BGAnimationLayer();
|
2003-03-17 01:15:42 +00:00
|
|
|
~BGAnimationLayer();
|
2002-09-29 05:06:18 +00:00
|
|
|
|
2004-12-27 10:24:54 +00:00
|
|
|
void LoadFromAniLayerFile( const CString& sPath );
|
2005-01-17 05:28:16 +00:00
|
|
|
void LoadFromNode( const CString& sDir, const XNode* pNode );
|
2002-09-29 05:06:18 +00:00
|
|
|
|
2005-06-11 10:32:58 +00:00
|
|
|
void UpdateInternal( float fDeltaTime );
|
2005-08-25 00:57:53 +00:00
|
|
|
bool EarlyAbortDraw() const;
|
2002-09-29 05:06:18 +00:00
|
|
|
|
2003-03-17 01:34:12 +00:00
|
|
|
float GetMaxTweenTimeLeft() const;
|
2003-07-10 03:37:13 +00:00
|
|
|
|
2002-09-29 05:06:18 +00:00
|
|
|
protected:
|
2003-10-24 07:25:13 +00:00
|
|
|
vector<RageVector3> m_vParticleVelocity;
|
2002-09-29 05:06:18 +00:00
|
|
|
|
2003-03-05 02:52:40 +00:00
|
|
|
enum Type
|
|
|
|
|
{
|
|
|
|
|
TYPE_SPRITE,
|
|
|
|
|
TYPE_PARTICLES,
|
|
|
|
|
TYPE_TILES,
|
|
|
|
|
NUM_TYPES,
|
|
|
|
|
} m_Type;
|
2002-09-29 05:06:18 +00:00
|
|
|
|
2003-01-12 00:57:53 +00:00
|
|
|
|
2003-01-12 18:41:24 +00:00
|
|
|
|
2003-03-05 02:52:40 +00:00
|
|
|
//
|
|
|
|
|
// loaded prefs
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
// common stuff
|
2004-03-27 00:23:29 +00:00
|
|
|
CString m_sDrawCond;
|
|
|
|
|
|
2003-03-05 02:52:40 +00:00
|
|
|
// stretch stuff
|
2003-10-31 00:01:16 +00:00
|
|
|
float m_fTexCoordVelocityX;
|
|
|
|
|
float m_fTexCoordVelocityY;
|
2003-03-05 02:52:40 +00:00
|
|
|
|
|
|
|
|
// particles stuff
|
|
|
|
|
bool m_bParticlesBounce;
|
|
|
|
|
|
|
|
|
|
// tiles stuff
|
|
|
|
|
int m_iNumTilesWide;
|
|
|
|
|
int m_iNumTilesHigh;
|
|
|
|
|
float m_fTilesStartX;
|
|
|
|
|
float m_fTilesStartY;
|
|
|
|
|
float m_fTilesSpacingX;
|
|
|
|
|
float m_fTilesSpacingY;
|
|
|
|
|
float m_fTileVelocityX;
|
|
|
|
|
float m_fTileVelocityY;
|
2002-09-29 05:06:18 +00:00
|
|
|
};
|
2002-11-16 08:07:38 +00:00
|
|
|
|
|
|
|
|
#endif
|
2004-06-01 00:53:06 +00:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* (c) 2001-2004 Ben Nordstrom, Chris Danford, Glenn Maynard
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
|
* distribute, and/or sell copies of the Software, and to permit persons to
|
|
|
|
|
* whom the Software is furnished to do so, provided that the above
|
|
|
|
|
* copyright notice(s) and this permission notice appear in all copies of
|
|
|
|
|
* the Software and that both the above copyright notice(s) and this
|
|
|
|
|
* permission notice appear in supporting documentation.
|
|
|
|
|
*
|
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
|
|
|
|
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
|
|
|
|
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
|
|
|
|
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
|
|
|
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
|
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
*/
|