/*---------------------------------------------------------------------------* Project: NintendoWare File: gfx_ResParticleForm.h Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo and/or its licensed developers and are protected by national and international copyright laws. 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. The content herein is highly confidential and should be handled accordingly. $Revision: $ *---------------------------------------------------------------------------*/ #ifndef NW_GFX_RESPARTICLEFORM_H_ #define NW_GFX_RESPARTICLEFORM_H_ #include #include #include #include namespace nw { namespace gfx { namespace res { //! @details :private struct ResParticleFormData { nw::ut::ResTypeInfo typeInfo; nw::ut::ResBool m_IsResourceCopyEnabled; u8 padding_0[3]; }; //-------------------------------------------------------------------------- //! @brief パーティクルの発生形状を表すバイナリリソースクラスです。 //--------------------------------------------------------------------------- class ResParticleForm : public nw::ut::ResCommon< ResParticleFormData > { public: enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleForm) }; enum { SIGNATURE = NW_RES_SIGNATURE32('INIT') }; NW_RES_CTOR( ResParticleForm ) NW_RES_FIELD_PRIMITIVE_DECL( bool, IsResourceCopyEnabled ) //--------------------------------------------------------------------------- //! @brief インスタンスの型情報を取得します。 //! //! @return 型情報です。 //--------------------------------------------------------------------------- nw::ut::ResTypeInfo GetTypeInfo() const { return ref().typeInfo; } void Setup(); }; //! @details :private struct ResParticleCubeFormData : public ResParticleFormData { nw::ut::ResF32 m_Inner; nw::ut::ResVec3 m_Scale; nw::ut::ResBool m_EvenInterval; u8 padding_0[3]; }; //-------------------------------------------------------------------------- //! @brief パーティクルの発生形状(キューブ)を表すバイナリリソースクラスです。 //--------------------------------------------------------------------------- class ResParticleCubeForm : public ResParticleForm { public: enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleCubeForm) }; enum { SIGNATURE = NW_RES_SIGNATURE32('CUBE') }; NW_RES_CTOR_INHERIT( ResParticleCubeForm, ResParticleForm ) NW_RES_FIELD_PRIMITIVE_DECL( f32, Inner ) NW_RES_FIELD_VECTOR3_DECL( nw::math::VEC3, Scale ) NW_RES_FIELD_PRIMITIVE_DECL( bool, EvenInterval ) void Setup(); }; //! @details :private struct ResParticleCylinderFormData : public ResParticleFormData { nw::ut::ResF32 m_Inner; nw::ut::ResF32 m_AngleWidth; nw::ut::ResF32 m_AngleOffset; nw::ut::ResF32 m_AngleSwing; nw::ut::ResVec3 m_Scale; nw::ut::ResBool m_FixedOffset; nw::ut::ResBool m_EvenInterval; u8 padding_0[2]; }; //-------------------------------------------------------------------------- //! @brief パーティクルの発生形状(シリンダー)を表すバイナリリソースクラスです。 //--------------------------------------------------------------------------- class ResParticleCylinderForm : public ResParticleForm { public: enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleCylinderForm) }; enum { SIGNATURE = NW_RES_SIGNATURE32('CYLI') }; NW_RES_CTOR_INHERIT( ResParticleCylinderForm, ResParticleForm ) NW_RES_FIELD_PRIMITIVE_DECL( f32, Inner ) NW_RES_FIELD_PRIMITIVE_DECL( f32, AngleWidth ) NW_RES_FIELD_PRIMITIVE_DECL( f32, AngleOffset ) NW_RES_FIELD_PRIMITIVE_DECL( f32, AngleSwing ) NW_RES_FIELD_VECTOR3_DECL( nw::math::VEC3, Scale ) NW_RES_FIELD_PRIMITIVE_DECL( bool, FixedOffset ) NW_RES_FIELD_PRIMITIVE_DECL( bool, EvenInterval ) void Setup(); }; //! @details :private struct ResParticleDiscFormData : public ResParticleFormData { nw::ut::ResF32 m_Inner; nw::ut::ResF32 m_AngleWidth; nw::ut::ResF32 m_AngleOffset; nw::ut::ResF32 m_AngleSwing; nw::ut::ResVec2 m_Scale; nw::ut::ResBool m_FixedOffset; nw::ut::ResBool m_EvenInterval; u8 padding_0[2]; }; //-------------------------------------------------------------------------- //! @brief パーティクルの発生形状(ディスク)を表すバイナリリソースクラスです。 //--------------------------------------------------------------------------- class ResParticleDiscForm : public ResParticleForm { public: enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleDiscForm) }; enum { SIGNATURE = NW_RES_SIGNATURE32('DISC') }; NW_RES_CTOR_INHERIT( ResParticleDiscForm, ResParticleForm ) NW_RES_FIELD_PRIMITIVE_DECL( f32, Inner ) NW_RES_FIELD_PRIMITIVE_DECL( f32, AngleWidth ) NW_RES_FIELD_PRIMITIVE_DECL( f32, AngleOffset ) NW_RES_FIELD_PRIMITIVE_DECL( f32, AngleSwing ) NW_RES_FIELD_VECTOR2_DECL( nw::math::VEC2, Scale ) NW_RES_FIELD_PRIMITIVE_DECL( bool, FixedOffset ) NW_RES_FIELD_PRIMITIVE_DECL( bool, EvenInterval ) void Setup(); }; //! @details :private struct ResParticlePointFormData : public ResParticleFormData { }; //-------------------------------------------------------------------------- //! @brief パーティクルの発生形状(ポイント)を表すバイナリリソースクラスです。 //--------------------------------------------------------------------------- class ResParticlePointForm : public ResParticleForm { public: enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticlePointForm) }; enum { SIGNATURE = NW_RES_SIGNATURE32('POIN') }; NW_RES_CTOR_INHERIT( ResParticlePointForm, ResParticleForm ) void Setup(); }; //! @details :private struct ResParticleRectangleFormData : public ResParticleFormData { nw::ut::ResF32 m_Inner; nw::ut::ResVec2 m_Scale; nw::ut::ResBool m_EvenInterval; u8 padding_0[3]; }; //-------------------------------------------------------------------------- //! @brief パーティクルの発生形状(レクタングル)を表すバイナリリソースクラスです。 //--------------------------------------------------------------------------- class ResParticleRectangleForm : public ResParticleForm { public: enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleRectangleForm) }; enum { SIGNATURE = NW_RES_SIGNATURE32('RECT') }; NW_RES_CTOR_INHERIT( ResParticleRectangleForm, ResParticleForm ) NW_RES_FIELD_PRIMITIVE_DECL( f32, Inner ) NW_RES_FIELD_VECTOR2_DECL( nw::math::VEC2, Scale ) NW_RES_FIELD_PRIMITIVE_DECL( bool, EvenInterval ) void Setup(); }; //! @details :private struct ResParticleSphereFormData : public ResParticleFormData { nw::ut::ResF32 m_Inner; nw::ut::ResF32 m_AngleWidth; nw::ut::ResF32 m_AngleOffset; nw::ut::ResF32 m_AngleSwing; nw::ut::ResVec3 m_Scale; nw::ut::ResBool m_FixedOffset; nw::ut::ResBool m_EvenInterval; u8 padding_0[2]; }; //-------------------------------------------------------------------------- //! @brief パーティクルの発生形状(スフィア)を表すバイナリリソースクラスです。 //--------------------------------------------------------------------------- class ResParticleSphereForm : public ResParticleForm { public: enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleSphereForm) }; enum { SIGNATURE = NW_RES_SIGNATURE32('SPHE') }; NW_RES_CTOR_INHERIT( ResParticleSphereForm, ResParticleForm ) NW_RES_FIELD_PRIMITIVE_DECL( f32, Inner ) NW_RES_FIELD_PRIMITIVE_DECL( f32, AngleWidth ) NW_RES_FIELD_PRIMITIVE_DECL( f32, AngleOffset ) NW_RES_FIELD_PRIMITIVE_DECL( f32, AngleSwing ) NW_RES_FIELD_VECTOR3_DECL( nw::math::VEC3, Scale ) NW_RES_FIELD_PRIMITIVE_DECL( bool, FixedOffset ) NW_RES_FIELD_PRIMITIVE_DECL( bool, EvenInterval ) void Setup(); }; } // namespace res } // namespace gfx } // namespace nw #endif // NW_GFX_RESPARTICLEFORM_H_