Planeshift
pseffectobjsound.h
Go to the documentation of this file.
1 /*
2  * Author: Andrew Robberts
3  *
4  * Copyright (C) 2003 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 
20 #ifndef PS_EFFECT_OBJ_SOUND_HEADER
21 #define PS_EFFECT_OBJ_SOUND_HEADER
22 
23 #include "pseffectobj.h"
24 
25 class psEffect2DRenderer;
26 struct iSoundManager;
27 
33 {
34 public:
35 
36  psEffectObjSound(iView* parentView, psEffect2DRenderer* renderer2d);
38 
39  // inheritted function overloads
40  bool Load(iDocumentNode* node, iLoaderContext* ldr_context);
41  bool Render(const csVector3 &up);
42  bool Update(csTicks elapsed);
43  bool AttachToAnchor(psEffectAnchor* newAnchor);
44  psEffectObj* Clone() const;
45 
46 
47 private:
48 
52  bool PostSetup();
53 
54  csRef<iSoundManager> soundManager;
55  csString soundName;
56  uint soundID;
57 
58  float minDist;
59  float maxDist;
60 
61  csString effectID;
62 
63  float volumeMultiplier;
64  bool loop;
65  bool playedOnce;
66 };
67 
70 #endif
bool Render(const csVector3 &up)
Renders the effect.
psEffectObj * Clone() const
Clones the effect object.
bool AttachToAnchor(psEffectAnchor *newAnchor)
Attaches this mesh to the given effect anchor.
The manager of all 2D effect elements.
psEffectObjSound(iView *parentView, psEffect2DRenderer *renderer2d)
bool Load(iDocumentNode *node, iLoaderContext *ldr_context)
Loads the effect object from an xml node.
bool Update(csTicks elapsed)
Updates the spell effect – called every frame.
An effect is not much more than a collection of effect objects.
Definition: pseffectobj.h:207
Effect anchors provide a base location / anchor point for all effect objs.
psEffect2DRenderer * renderer2d
Definition: pseffectobj.h:529