Planeshift
instrumentmngr.h
Go to the documentation of this file.
1 /*
2  * instrumentmngr.h, Author: Andrea Rizzi <88whacko@gmail.com>
3  *
4  * Copyright (C) 2001-2011 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 INSTRMNGR_H
21 #define INSTRMNGR_H
22 
23 
24 //====================================================================================
25 // Crystal Space Includes
26 //====================================================================================
27 #include <cssysdef.h>
28 #include <csutil/ref.h>
29 #include <csutil/hash.h>
30 
31 //------------------------------------------------------------------------------------
32 // Forward Declarations
33 //------------------------------------------------------------------------------------
34 class csVector3;
35 class Instrument;
36 class SoundHandle;
37 class SoundControl;
38 struct iDocument;
39 struct iObjectRegistry;
40 
45 {
46 public:
47 
52 
57 
64  bool Initialize(iObjectRegistry* objectReg);
65 
77  bool PlaySong(SoundControl* sndCtrl, csVector3 pos, csVector3 dir, SoundHandle* &songHandle,
78  csRef<iDocument> musicalSheet, const char* instrName);
79 
80 private:
81  csHash<Instrument*, csString> instruments;
82 };
83 
84 #endif /* INSTRMNGR_H */
This class keeps and manage the musical instruments.
bool Initialize(iObjectRegistry *objectReg)
Reads the instruments definitions.
InstrumentManager()
Constructor.
bool PlaySong(SoundControl *sndCtrl, csVector3 pos, csVector3 dir, SoundHandle *&songHandle, csRef< iDocument > musicalSheet, const char *instrName)
Play the song in the given musical sheet with the given instruments.
~InstrumentManager()
Destructor.
A Volume and Sound control class.
Definition: control.h:40
This class represent a musical instrument.
Definition: instrument.h:68