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