1 /* GemRB - Infinity Engine Emulator
2 * Copyright (C) 2004 The GemRB Project
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
32 #define IE_AMBI_ENABLED 1
33 #define IE_AMBI_POINT 2
34 #define IE_AMBI_MAIN 4
35 #define IE_AMBI_AREA 8
37 class GEM_EXPORT Ambient
{
42 /* there is a good reason to have these in the header:
43 * they are automatically inlined, so we have
44 * no roundtrips and no overhead for accessors --Divide */
45 const char *getName() const { return name
; }
46 const Point
&getOrigin() const { return origin
; }
47 ieWord
getRadius() const { return radius
; }
48 ieWord
getHeight() const { return height
; }
49 ieWord
getGain() const { return gain
; }
50 char *getSound(ieDword i
) const
52 if(i
<sounds
.size()) return sounds
[i
];
55 ieDword
getInterval() const { return interval
; }
56 ieDword
getPerset() const { return perset
; }
57 ieDword
getAppearance() const { return appearance
; }
58 ieDword
getFlags() const { return flags
; }
68 ieWord gain
; // percent
69 std::vector
<char *> sounds
;
70 ieDword interval
; // no pauses if zero