| 1 |
// ____ _ __ |
| 2 |
// / __ )____ _____ | | / /___ ___________ |
| 3 |
// / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/ |
| 4 |
// / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ ) |
| 5 |
// /_____/\____/____/ |__/|__/\__,_/_/ /____/ |
| 6 |
// |
| 7 |
// A futuristic real-time strategy game. |
| 8 |
// This file is part of Bos Wars. |
| 9 |
// |
| 10 |
/**@name unitsound.h - The unit sounds headerfile. */ |
| 11 |
// |
| 12 |
// (c) Copyright 1999-2007 by Lutz Sammer, Fabrice Rossi, |
| 13 |
// and Jimmy Salmon |
| 14 |
// |
| 15 |
// This program is free software; you can redistribute it and/or modify |
| 16 |
// it under the terms of the GNU General Public License as published by |
| 17 |
// the Free Software Foundation; only version 2 of the License. |
| 18 |
// |
| 19 |
// This program is distributed in the hope that it will be useful, |
| 20 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 |
// GNU General Public License for more details. |
| 23 |
// |
| 24 |
// You should have received a copy of the GNU General Public License |
| 25 |
// along with this program; if not, write to the Free Software |
| 26 |
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 27 |
// 02111-1307, USA. |
| 28 |
|
| 29 |
#ifndef __UNITSOUND_H__ |
| 30 |
#define __UNITSOUND_H__ |
| 31 |
|
| 32 |
//@{ |
| 33 |
|
| 34 |
/*---------------------------------------------------------------------------- |
| 35 |
-- Includes |
| 36 |
----------------------------------------------------------------------------*/ |
| 37 |
|
| 38 |
#include "upgrade_structs.h" |
| 39 |
|
| 40 |
/*---------------------------------------------------------------------------- |
| 41 |
-- Declarations |
| 42 |
----------------------------------------------------------------------------*/ |
| 43 |
|
| 44 |
class CSound; |
| 45 |
|
| 46 |
/** |
| 47 |
** Sound definition |
| 48 |
*/ |
| 49 |
class SoundConfig |
| 50 |
{ |
| 51 |
public: |
| 52 |
SoundConfig() : Sound(NULL) {} |
| 53 |
SoundConfig(std::string name) : Name(name), Sound(NULL) {} |
| 54 |
|
| 55 |
std::string Name; /// config sound name |
| 56 |
CSound *Sound; /// identifier send to sound server |
| 57 |
}; |
| 58 |
|
| 59 |
/** |
| 60 |
** The sounds of the units. |
| 61 |
** |
| 62 |
** Played for the various events. |
| 63 |
*/ |
| 64 |
class CUnitSound { |
| 65 |
public: |
| 66 |
SoundConfig Selected; /// selected by user |
| 67 |
SoundConfig Acknowledgement; /// acknowledge of use command |
| 68 |
SoundConfig Ready; /// unit training... ready |
| 69 |
SoundConfig Help; /// unit is attacked |
| 70 |
SoundConfig Dead; /// unit is killed |
| 71 |
}; |
| 72 |
|
| 73 |
/*---------------------------------------------------------------------------- |
| 74 |
-- Variables |
| 75 |
----------------------------------------------------------------------------*/ |
| 76 |
|
| 77 |
/*---------------------------------------------------------------------------- |
| 78 |
-- Functions |
| 79 |
----------------------------------------------------------------------------*/ |
| 80 |
|
| 81 |
/** |
| 82 |
** Loads sounds defined in unitsound.c. Should be replaced by ccl loading of |
| 83 |
** sounds. |
| 84 |
*/ |
| 85 |
extern void LoadUnitSounds(void); |
| 86 |
|
| 87 |
/** |
| 88 |
** Performs the mapping between sound names and CSound* for each unit type. |
| 89 |
** Set ranges for some sounds (infinite range for acknowledge and help sounds). |
| 90 |
*/ |
| 91 |
extern void MapUnitSounds(void); |
| 92 |
|
| 93 |
//@} |
| 94 |
|
| 95 |
#endif // !__UNITSOUND_H__ |