ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

ambient.h

Go to the documentation of this file.
00001 /* ResidualVM - A 3D game interpreter
00002  *
00003  * ResidualVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the AUTHORS
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #ifndef AMBIENT_H_
00024 #define AMBIENT_H_
00025 
00026 #include "common/array.h"
00027 
00028 namespace Myst3 {
00029 
00030 class Myst3Engine;
00031 
00032 class Ambient {
00033 public:
00034     Ambient(Myst3Engine *vm);
00035     virtual ~Ambient();
00036 
00037     void playCurrentNode(uint32 volume, uint32 fadeOutDelay);
00038     void loadNode(uint32 node, uint32 room, uint32 age);
00039     void applySounds(uint32 fadeOutDelay);
00040     void scaleVolume(uint32 volume);
00041 
00042     void addSound(uint32 id, int32 volume, int32 heading, int32 headingAngle, int32 u1, int32 fadeOutDelay);
00043 
00044     void setCueSheet(uint32 id, int32 volume, int32 heading, int32 headingAngle);
00045     void updateCue();
00046 
00047     uint32 _scriptAge;
00048     uint32 _scriptRoom;
00049 
00050 private:
00051     Myst3Engine *_vm;
00052 
00053     struct AmbientSound {
00054         uint32 id;
00055         //char name[32];
00056 
00057         int32 volume;
00058         int32 volumeFlag;
00059         int32 heading;
00060         int32 headingAngle;
00061         int32 u1;
00062         int32 fadeOutDelay;
00063 
00064         void reset() {
00065             id = 0;
00066             volume = 0;
00067             volumeFlag = 0;
00068             heading = 0;
00069             headingAngle = 0;
00070             u1 = 0;
00071             fadeOutDelay = 0;
00072         }
00073     };
00074 
00075     uint16 delayForCue(uint32 id);
00076     uint32 nextCueSound(uint32 id);
00077 
00078     Common::Array<AmbientSound> _sounds;
00079 
00080     AmbientSound _cueSheet;
00081     uint32 _cueStartTick;
00082 };
00083 
00084 } // End of namespace Myst3
00085 
00086 #endif // AMBIENT_H_


Generated on Sat Mar 16 2019 05:01:18 for ResidualVM by doxygen 1.7.1
curved edge   curved edge