afxPhraseEffect.h
Engine/source/afx/ce/afxPhraseEffect.h
Classes:
Public Typedefs
afxPhraseEffect_MatchType
afxPhraseEffect_PhraseType
afxPhraseEffect_StateType
Public Functions
Detailed Description
Public Typedefs
typedef afxPhraseEffectData::MatchType afxPhraseEffect_MatchType
typedef afxPhraseEffectData::PhraseType afxPhraseEffect_PhraseType
typedef afxPhraseEffectData::StateType afxPhraseEffect_StateType
Public Functions
DefineEnumType(afxPhraseEffect_MatchType )
DefineEnumType(afxPhraseEffect_PhraseType )
DefineEnumType(afxPhraseEffect_StateType )
1 2 3//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// 4// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames 5// Copyright (C) 2015 Faust Logic, Inc. 6// 7// Permission is hereby granted, free of charge, to any person obtaining a copy 8// of this software and associated documentation files (the "Software"), to 9// deal in the Software without restriction, including without limitation the 10// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 11// sell copies of the Software, and to permit persons to whom the Software is 12// furnished to do so, subject to the following conditions: 13// 14// The above copyright notice and this permission notice shall be included in 15// all copies or substantial portions of the Software. 16// 17// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 23// IN THE SOFTWARE. 24// 25//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// 26 27#ifndef _AFX_PHRASE_EFFECT_H_ 28#define _AFX_PHRASE_EFFECT_H_ 29 30#include "console/typeValidators.h" 31 32#include "afx/ce/afxComponentEffect.h" 33#include "afx/afxEffectDefs.h" 34#include "afx/afxEffectWrapper.h" 35#include "afx/afxPhrase.h" 36 37class afxPhraseEffectData : public GameBaseData, public afxEffectDefs, public afxComponentEffectData 38{ 39 typedef GameBaseData Parent; 40 41 class ewValidator : public TypeValidator 42 { 43 U32 id; 44 public: 45 ewValidator(U32 id) { this->id = id; } 46 void validateType(SimObject *object, void *typePtr); 47 }; 48 49 bool do_id_convert; 50 51public: 52 enum MatchType { 53 MATCH_ANY = 0, 54 MATCH_ALL = 1 55 }; 56 enum StateType { 57 STATE_ON = 1, 58 STATE_OFF = 2, 59 STATE_ON_AND_OFF = STATE_ON | STATE_OFF 60 }; 61 enum PhraseType 62 { 63 PHRASE_TRIGGERED = 0, 64 PHRASE_CONTINUOUS = 1 65 }; 66 67public: 68 afxEffectList fx_list; 69 F32 duration; 70 S32 n_loops; 71 U32 trigger_mask; 72 U32 match_type; 73 U32 match_state; 74 U32 phrase_type; 75 76 bool no_choreographer_trigs; 77 bool no_cons_trigs; 78 bool no_player_trigs; 79 80 StringTableEntry on_trig_cmd; 81 82 afxEffectBaseData* dummy_fx_entry; 83 84private: 85 void pack_fx(BitStream* stream, const afxEffectList& fx, bool packed); 86 void unpack_fx(BitStream* stream, afxEffectList& fx); 87 88public: 89 /*C*/ afxPhraseEffectData(); 90 /*C*/ afxPhraseEffectData(const afxPhraseEffectData&, bool = false); 91 92 virtual void reloadReset(); 93 94 virtual bool onAdd(); 95 virtual void packData(BitStream*); 96 virtual void unpackData(BitStream*); 97 98 bool preload(bool server, String &errorStr); 99 100 virtual void gather_cons_defs(Vector<afxConstraintDef>& defs); 101 102 virtual bool allowSubstitutions() const { return true; } 103 104 static void initPersistFields(); 105 106 DECLARE_CONOBJECT(afxPhraseEffectData); 107 DECLARE_CATEGORY("AFX"); 108}; 109 110typedef afxPhraseEffectData::MatchType afxPhraseEffect_MatchType; 111DefineEnumType( afxPhraseEffect_MatchType ); 112 113typedef afxPhraseEffectData::StateType afxPhraseEffect_StateType; 114DefineEnumType( afxPhraseEffect_StateType ); 115 116typedef afxPhraseEffectData::PhraseType afxPhraseEffect_PhraseType; 117DefineEnumType( afxPhraseEffect_PhraseType ); 118 119//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// 120 121#endif // _AFX_PHRASE_EFFECT_H_ 122