Control: Change controls to use new callback infrastrucure.
[gemrb.git] / gemrb / core / Ambient.h
blobec4f9be2229f0c17fdac94b758f7260035e0ab57
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.
21 #ifndef AMBIENT_H
22 #define AMBIENT_H
24 #include "exports.h"
25 #include "globals.h"
26 #include "ie_types.h"
28 #include <bitset>
29 #include <string>
30 #include <vector>
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 {
38 public:
39 Ambient();
40 ~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];
53 return NULL;
55 ieDword getInterval() const { return interval; }
56 ieDword getPerset() const { return perset; }
57 ieDword getAppearance() const { return appearance; }
58 ieDword getFlags() const { return flags; }
60 void setActive();
61 void setInactive();
63 public:
64 char name[32];
65 Point origin;
66 ieWord radius;
67 ieWord height;
68 ieWord gain; // percent
69 std::vector<char *> sounds;
70 ieDword interval; // no pauses if zero
71 ieDword perset;
72 ieDword appearance;
73 ieDword flags;
77 #endif