Planeshift
|
00001 /* 00002 * psemitter.h 00003 * 00004 * Copyright (C) 2001-2010 Atomic Blue ([email protected], http://www.planeshift.it) 00005 * 00006 * Credits : Saul Leite <[email protected]> 00007 * Mathias 'AgY' Voeroes <[email protected]> 00008 * and all past and present planeshift coders 00009 * 00010 * This program is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU General Public License 00012 * as published by the Free Software Foundation (version 2 of the License. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 * 00022 */ 00023 00024 00025 #ifndef _PSEMITTER_H_ 00026 #define _PSEMITTER_H_ 00027 00036 class psEmitter 00037 { 00038 public: 00039 csString resource; 00040 float minvol; 00041 float maxvol; 00042 int fadedelay; 00043 float minrange; 00044 float maxrange; 00045 float probability; 00046 csString factory; 00047 float factory_prob; 00048 bool loop; 00049 csVector3 position; 00050 csVector3 direction; 00051 bool active; 00052 bool dopplerEffect; 00053 int timeofday; 00054 int timeofdayrange; 00055 SoundHandle* handle; 00056 00060 psEmitter(); 00065 ~psEmitter(); 00072 psEmitter(psEmitter* const &emitter); 00079 bool CheckRange(csVector3 listenerPos); 00086 bool CheckTimeOfDay(int time); 00092 bool Play(SoundControl* &ctrl); 00096 void Stop(); 00102 static void StopCallback(void* object); 00103 }; 00104 00105 #endif /*_PSEMITTER_H_*/