1 /*---------------------------------------------------------------------------* 2 Project: NintendoWare 3 File: gfx_ResParticleAnimation.h 4 5 Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Revision: 15291 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NW_GFX_RESPARTICLEANIMATION_H_ 17 #define NW_GFX_RESPARTICLEANIMATION_H_ 18 19 #include <nw/ut/ut_ResUtil.h> 20 #include <nw/ut/ut_ResDictionary.h> 21 #include <nw/gfx/res/gfx_ResParticleAnimationOption.h> 22 #include <nw/gfx/res/gfx_ResTypeInfo.h> 23 24 namespace nw { 25 namespace gfx { 26 namespace res { 27 28 //! @details :private 29 struct ResParticleAnimationData 30 { 31 nw::ut::ResTypeInfo typeInfo; 32 nw::ut::Offset toParticleAnimationOption; 33 nw::ut::ResS32 m_AnimationLength; 34 nw::ut::ResS32 m_AnimationDimension; 35 nw::ut::ResS32 m_AnimationStride; 36 nw::ut::ResS32 m_AnimationEnabledTableCount; 37 nw::ut::Offset toAnimationEnabledTable; 38 nw::ut::ResS32 m_AnimationDataTableCount; 39 nw::ut::Offset toAnimationDataTable; 40 }; 41 42 //-------------------------------------------------------------------------- 43 //! @brief パーティクルアニメーションを表すバイナリリソースクラスです。 44 //--------------------------------------------------------------------------- 45 class ResParticleAnimation : public nw::ut::ResCommon< ResParticleAnimationData > 46 { 47 public: 48 enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleAnimation) }; 49 enum { SIGNATURE = NW_RES_SIGNATURE32('ANIM') }; 50 51 NW_RES_CTOR( ResParticleAnimation ) 52 NW_RES_FIELD_CLASS_DECL(ResParticleAnimationOption,ParticleAnimationOption)53 NW_RES_FIELD_CLASS_DECL( ResParticleAnimationOption, ParticleAnimationOption ) 54 NW_RES_FIELD_PRIMITIVE_DECL( s32, AnimationLength ) 55 NW_RES_FIELD_PRIMITIVE_DECL( s32, AnimationDimension ) 56 NW_RES_FIELD_PRIMITIVE_DECL( s32, AnimationStride ) 57 NW_RES_FIELD_PRIMITIVE_LIST_DECL( bool, AnimationEnabled ) 58 NW_RES_FIELD_PRIMITIVE_LIST_DECL( f32, AnimationData ) 59 60 //--------------------------------------------------------------------------- 61 //! @brief インスタンスの型情報を取得します。 62 //! 63 //! @return 型情報です。 64 //--------------------------------------------------------------------------- 65 nw::ut::ResTypeInfo GetTypeInfo() const { return ref().typeInfo; } 66 }; 67 68 } // namespace res 69 } // namespace gfx 70 } // namespace nw 71 72 #endif // NW_GFX_RESPARTICLEANIMATION_H_ 73