/*---------------------------------------------------------------------------* Project: NintendoWare File: gfx_ResParticleAnimationOption.h Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Revision: 19618 $ *---------------------------------------------------------------------------*/ #ifndef NW_GFX_RESPARTICLEANIMATIONOPTION_H_ #define NW_GFX_RESPARTICLEANIMATIONOPTION_H_ #include #include #include #include namespace nw { namespace gfx { namespace res { //! @details :private struct ResParticleAnimationOptionData { nw::ut::ResTypeInfo typeInfo; nw::ut::ResF32 m_AnimationDuration; }; //-------------------------------------------------------------------------- //! @brief パーティクルアニメーションのオプションを表すバイナリリソースクラスです。 //--------------------------------------------------------------------------- class ResParticleAnimationOption : public nw::ut::ResCommon< ResParticleAnimationOptionData > { public: enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleAnimationOption) }; enum { SIGNATURE = NW_RES_SIGNATURE32('AOPT') }; NW_RES_CTOR( ResParticleAnimationOption ) NW_RES_FIELD_PRIMITIVE_DECL( f32, AnimationDuration ) //--------------------------------------------------------------------------- //! @brief インスタンスの型情報を取得します。 //! //! @return 型情報です。 //--------------------------------------------------------------------------- nw::ut::ResTypeInfo GetTypeInfo() const { return ref().typeInfo; } static u32 GetHash(u32 key1, u32 key2, u32 key3, u32 key4); ParticleTime EvaluateAnimationFrame(u32 id, ParticleTime birth, ParticleTime life, ParticleTime time, int updaterIndex) const; }; //! @details :private struct ResParticleFittingAnimationOptionData : public ResParticleAnimationOptionData { }; //-------------------------------------------------------------------------- //! @brief パーティクルフィッティングアニメーションのオプションを表すバイナリリソースクラスです。 //--------------------------------------------------------------------------- class ResParticleFittingAnimationOption : public ResParticleAnimationOption { public: enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleFittingAnimationOption) }; enum { SIGNATURE = NW_RES_SIGNATURE32('FITT') }; NW_RES_CTOR_INHERIT( ResParticleFittingAnimationOption, ResParticleAnimationOption ) }; //! @details :private struct ResParticleFrameLoopAnimationOptionData : public ResParticleAnimationOptionData { nw::ut::ResU32 m_LoopDuration; nw::ut::ResBool m_RandomOffset; u8 padding_0[3]; }; //-------------------------------------------------------------------------- //! @brief パーティクルフレームループアニメーションのオプションを表すバイナリリソースクラスです。 //--------------------------------------------------------------------------- class ResParticleFrameLoopAnimationOption : public ResParticleAnimationOption { public: enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleFrameLoopAnimationOption) }; enum { SIGNATURE = NW_RES_SIGNATURE32('FLOO') }; NW_RES_CTOR_INHERIT( ResParticleFrameLoopAnimationOption, ResParticleAnimationOption ) NW_RES_FIELD_PRIMITIVE_DECL( u32, LoopDuration ) NW_RES_FIELD_PRIMITIVE_DECL( bool, RandomOffset ) }; //! @details :private struct ResParticleRandomAnimationOptionData : public ResParticleAnimationOptionData { }; //-------------------------------------------------------------------------- //! @brief パーティクルランダムアニメーションのオプションを表すバイナリリソースクラスです。 //--------------------------------------------------------------------------- class ResParticleRandomAnimationOption : public ResParticleAnimationOption { public: enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleRandomAnimationOption) }; enum { SIGNATURE = NW_RES_SIGNATURE32('RAND') }; NW_RES_CTOR_INHERIT( ResParticleRandomAnimationOption, ResParticleAnimationOption ) }; } // namespace res } // namespace gfx } // namespace nw #endif // NW_GFX_RESPARTICLEANIMATIONOPTION_H_