/*---------------------------------------------------------------------------* Project: NintendoWare File: gfx_ResParticleEmitter.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_RESPARTICLEEMITTER_H_ #define NW_GFX_RESPARTICLEEMITTER_H_ #include #include #include #include #include #include namespace nw { namespace gfx { namespace res { //! @details :private struct ResParticleEmitterData : public ResTransformNodeData { nw::ut::ResU32 m_Id; nw::ut::BinString toParticleSetPath; nw::ut::Offset toParticleForm; nw::ut::ResBool m_IsResourceCopyEnabled; u8 padding_0[3]; nw::ut::ResF32 m_EmissionRatio; nw::ut::ResF32 m_EmissionRatioRandom; nw::ut::ResS32 m_EmissionInterval; nw::ut::ResF32 m_EmissionIntervalRandom; nw::ut::ResBool m_EmissionSpanInfinity; u8 padding_1[3]; nw::ut::ResS32 m_EmissionSpan; nw::ut::ResS32 m_EmissionStart; }; //! @details :private // リソースコピー用 struct ResParticleEmitterParameterData { nw::ut::ResBool m_IsResourceCopyEnabled; u8 padding_0[3]; nw::ut::ResF32 m_EmissionRatio; nw::ut::ResF32 m_EmissionRatioRandom; nw::ut::ResS32 m_EmissionInterval; nw::ut::ResF32 m_EmissionIntervalRandom; nw::ut::ResBool m_EmissionSpanInfinity; u8 padding_1[3]; nw::ut::ResS32 m_EmissionSpan; nw::ut::ResS32 m_EmissionStart; }; //-------------------------------------------------------------------------- //! @brief パーティクルエミッタを表すバイナリリソースクラスです。 //--------------------------------------------------------------------------- class ResParticleEmitter : public ResTransformNode { public: enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleEmitter) }; enum { SIGNATURE = NW_RES_SIGNATURE32('PEMT') }; NW_RES_CTOR_INHERIT( ResParticleEmitter, ResTransformNode ) NW_RES_FIELD_PRIMITIVE_DECL( u32, Id ) // GetId(), SetId() NW_RES_FIELD_STRING_DECL( ParticleSetPath ) // GetParticleSetPath() NW_RES_FIELD_CLASS_DECL( ResParticleForm, ParticleForm) // GetParticleForm() NW_RES_FIELD_PRIMITIVE_DECL( bool, IsResourceCopyEnabled) NW_RES_FIELD_PRIMITIVE_DECL( f32, EmissionRatio ) // GetEmissionRatio(), SetEmissionRatio() NW_RES_FIELD_PRIMITIVE_DECL( f32, EmissionRatioRandom ) // GetEmissionRatioRandom(), SetEmissionRatioRandom() NW_RES_FIELD_PRIMITIVE_DECL( s32, EmissionInterval ) // GetEmissionInterval(), SetEmissionInterval() NW_RES_FIELD_PRIMITIVE_DECL( f32, EmissionIntervalRandom ) // GetEmissionIntervalRandom(), SetEmissionIntervalRandom() NW_RES_FIELD_PRIMITIVE_DECL( bool, EmissionSpanInfinity) // GetEmissionSpanInfinity(), SetEmissionSpanInfinity() NW_RES_FIELD_PRIMITIVE_DECL( s32, EmissionSpan) // GetEmissionSpan(), SetEmissionSpan() NW_RES_FIELD_PRIMITIVE_DECL( s32, EmissionStart) // GetEmissionStart(), SetEmissionStart() }; //-------------------------------------------------------------------------- //! @brief パーティクルエミッタのパラメータを表すバイナリリソースクラスです。 //--------------------------------------------------------------------------- class ResParticleEmitterParameter : public nw::ut::ResCommon { public: // enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleEmitterParameter) }; // enum { SIGNATURE = NW_RES_SIGNATURE32('PEMT') }; NW_RES_CTOR( ResParticleEmitterParameter ) NW_RES_FIELD_PRIMITIVE_DECL( bool, IsResourceCopyEnabled) //--------------------------------------------------------------------------- //! @fn f32 GetEmissionRatio() //! @brief 放出量を取得します。 //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //! @fn void SetEmissionRatio(f32 emissionRatio) //! @brief 放出量を設定します。 //--------------------------------------------------------------------------- NW_RES_FIELD_PRIMITIVE_DECL( f32, EmissionRatio ) // GetEmissionRatio(), SetEmissionRatio() //--------------------------------------------------------------------------- //! @fn f32 GetEmissionRatioRandom() //! @brief 放出量のランダムを取得します。 //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //! @fn void SetEmissionRatioRandom(f32 emissionRatioRandom) //! @brief 放出量のランダムを設定します。 //--------------------------------------------------------------------------- NW_RES_FIELD_PRIMITIVE_DECL( f32, EmissionRatioRandom ) // GetEmissionRatioRandom(), SetEmissionRatioRandom() //--------------------------------------------------------------------------- //! @fn s32 GetEmissionInterval() //! @brief 放出間隔を取得します。 //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //! @fn void SetEmissionInterval(s32 emissionInterval) //! @brief 放出間隔を設定します。 //--------------------------------------------------------------------------- NW_RES_FIELD_PRIMITIVE_DECL( s32, EmissionInterval ) // GetEmissionInterval(), SetEmissionInterval() //--------------------------------------------------------------------------- //! @fn f32 GetEmissionIntervalRandom() //! @brief 放出間隔のランダムを取得します。 //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //! @fn void SetEmissionIntervalRandom(f32 emissionIntervalRandom) //! @brief 放出間隔のランダムを設定します。 //--------------------------------------------------------------------------- NW_RES_FIELD_PRIMITIVE_DECL( f32, EmissionIntervalRandom ) // GetEmissionIntervalRandom(), SetEmissionIntervalRandom() //--------------------------------------------------------------------------- //! @fn bool GetEmissionSpanInfinity() //! @brief 放出時間が無限かどうかのフラグを取得します。 //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //! @fn void SetEmissionSpanInfinity(bool emissionSpanInfinity) //! @brief 放出時間が無限かどうかのフラグを設定します。 //--------------------------------------------------------------------------- NW_RES_FIELD_PRIMITIVE_DECL( bool, EmissionSpanInfinity) // GetEmissionSpanInfinity(), SetEmissionSpanInfinity() //--------------------------------------------------------------------------- //! @fn s32 GetEmissionSpan() //! @brief 放出時間を取得します。 //! @details 放出時間が無限の場合は無効です。 //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //! @fn s32 SetEmissionSpan(s32 emissionSapn) //! @brief 放出時間を設定します。 //! @details 放出時間が無限の場合は無効です。 //--------------------------------------------------------------------------- NW_RES_FIELD_PRIMITIVE_DECL( s32, EmissionSpan) // GetEmissionSpan(), SetEmissionSpan() //--------------------------------------------------------------------------- //! @fn s32 GetEmissionStart() //! @brief 放出開始時間を取得します。 //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //! @fn s32 SetEmissionStart(s32 emissionStart) //! @brief 放出開始時間を設定します。 //--------------------------------------------------------------------------- NW_RES_FIELD_PRIMITIVE_DECL( s32, EmissionStart) // GetEmissionStart(), SetEmissionStart() }; typedef nw::ut::ResArrayPatricia::type ResEmitterArray; } // namespace res } // namespace gfx } // namespace nw #endif // NW_GFX_RESPARTICLEEMITTER_H_