00001 /* BGAnimationLayer - layer elements used by BGAnimation */ 00002 00003 #ifndef BGANIMATIONLAYER_H 00004 #define BGANIMATIONLAYER_H 00005 00006 #include "GameConstantsAndTypes.h" 00007 #include "ActorFrame.h" 00008 #include <map> 00009 00010 struct XNode; 00011 00012 class BGAnimationLayer : public ActorFrame 00013 { 00014 public: 00015 BGAnimationLayer( bool Generic ); 00016 ~BGAnimationLayer(); 00017 void Init(); 00018 void Unload(); 00019 00020 void LoadFromAniLayerFile( const CString& sPath ); 00021 void LoadFromNode( const CString& sDir, const XNode* pNode ); 00022 00023 void Update( float fDeltaTime ); 00024 void DrawPrimitives(); 00025 bool EarlyAbortDraw(); 00026 00027 float GetMaxTweenTimeLeft() const; 00028 void GainFocus( float fRate, bool bRewindMovie, bool bLoop ); 00029 00030 protected: 00031 vector<RageVector3> m_vParticleVelocity; 00032 00033 enum Type 00034 { 00035 TYPE_SPRITE, 00036 TYPE_PARTICLES, 00037 TYPE_TILES, 00038 NUM_TYPES, 00039 } m_Type; 00040 00041 00042 00043 // 00044 // loaded prefs 00045 // 00046 00047 // common stuff 00048 bool m_bGeneric; 00049 float m_fUpdateRate; // set by GainFocus 00050 float m_fFOV; // -1 = no change 00051 bool m_bLighting; 00052 00053 CString m_sDrawCond; 00054 00055 // stretch stuff 00056 float m_fTexCoordVelocityX; 00057 float m_fTexCoordVelocityY; 00058 00059 // particles stuff 00060 bool m_bParticlesBounce; 00061 00062 // tiles stuff 00063 int m_iNumTilesWide; 00064 int m_iNumTilesHigh; 00065 float m_fTilesStartX; 00066 float m_fTilesStartY; 00067 float m_fTilesSpacingX; 00068 float m_fTilesSpacingY; 00069 float m_fTileVelocityX; 00070 float m_fTileVelocityY; 00071 }; 00072 00073 #endif 00074 00075 /* 00076 * (c) 2001-2004 Ben Nordstrom, Chris Danford, Glenn Maynard 00077 * All rights reserved. 00078 * 00079 * Permission is hereby granted, free of charge, to any person obtaining a 00080 * copy of this software and associated documentation files (the 00081 * "Software"), to deal in the Software without restriction, including 00082 * without limitation the rights to use, copy, modify, merge, publish, 00083 * distribute, and/or sell copies of the Software, and to permit persons to 00084 * whom the Software is furnished to do so, provided that the above 00085 * copyright notice(s) and this permission notice appear in all copies of 00086 * the Software and that both the above copyright notice(s) and this 00087 * permission notice appear in supporting documentation. 00088 * 00089 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00090 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00091 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00092 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00093 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00094 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00095 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00096 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00097 * PERFORMANCE OF THIS SOFTWARE. 00098 */