00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #error "Deprecated"
00026
00027 #ifndef NL_ENV_EFFECT_H
00028 #define NL_ENV_EFFECT_H
00029
00030 #include "nel/misc/types_nl.h"
00031 #include "nel/misc/stream.h"
00032 #include "bounding_shape.h"
00033
00034 namespace NLSOUND {
00035
00036
00038 enum TEnvEffectPreset
00039 {
00040 ENVEFFECT_GENERIC,
00041 ENVEFFECT_PADDEDCELL,
00042 ENVEFFECT_ROOM,
00043 ENVEFFECT_BATHROOM,
00044 ENVEFFECT_LIVINGROOM,
00045 ENVEFFECT_STONEROOM,
00046 ENVEFFECT_AUDITORIUM,
00047 ENVEFFECT_CONCERTHALL,
00048 ENVEFFECT_CAVE,
00049 ENVEFFECT_ARENA,
00050 ENVEFFECT_HANGAR,
00051 ENVEFFECT_CARPETEDHALLWAY,
00052 ENVEFFECT_HALLWAY,
00053 ENVEFFECT_STONECORRIDOR,
00054 ENVEFFECT_ALLEY,
00055 ENVEFFECT_FOREST,
00056 ENVEFFECT_CITY,
00057 ENVEFFECT_MOUNTAINS,
00058 ENVEFFECT_QUARRY,
00059 ENVEFFECT_PLAIN,
00060 ENVEFFECT_PARKINGLOT,
00061 ENVEFFECT_SEWERPIPE,
00062 ENVEFFECT_UNDERWATER,
00063 ENVEFFECT_DRUGGED,
00064 ENVEFFECT_DIZZY,
00065 ENVEFFECT_PSYCHOTIC,
00066
00067 ENVEFFECT_COUNT
00068 };
00069
00070
00072 struct TEnvEffectRoom
00073 {
00074 TEnvEffectPreset Preset;
00075 float Size;
00076
00078 TEnvEffectRoom( const TEnvEffectPreset& preset=ENVEFFECT_ROOM, float size=7.5 ) : Preset(preset), Size(size) {}
00079
00081 void serial ( NLMISC::IStream& s )
00082 {
00083 uint8 preset8 = (uint8)Preset;
00084 s.serial( preset8 );
00085 Preset = (TEnvEffectPreset)preset8;
00086 s.serial( Size );
00087 }
00088 };
00089
00090
00098 class CEnvEffect
00099 {
00100 public:
00101
00103 CEnvEffect();
00105 virtual ~CEnvEffect() {}
00107 void serial( NLMISC::IStream& s )
00108 {
00109
00110 s.serialPolyPtr( _BoundingShape );
00111 s.serialCont( _EnvNums );
00112 s.serialCont( _Tags );
00113 }
00115 static void serialFileHeader( NLMISC::IStream& s, uint32& nb );
00117 static uint32 load( std::vector<CEnvEffect*>& container, NLMISC::IStream& s );
00118
00120 bool include( const NLMISC::CVector& pos ) { return _BoundingShape->include( pos ); }
00122 void selectEnv( const std::string& tag );
00124 TEnvEffectPreset getEnvNum() const { return _EnvNums[_Current].Preset; }
00126 float getEnvSize() const;
00127
00128
00133 void addEnvNum( TEnvEffectPreset num, const std::string& tag="", float customsize=-1.0f );
00135 IBoundingShape *getBoundingShape() { return _BoundingShape; }
00137 void setBoundingShape( IBoundingShape *bs ) { _BoundingShape = bs; }
00139 static void save( const std::vector<CEnvEffect>& container, NLMISC::IStream& s );
00140
00141
00142 private:
00143
00144
00145 uint8 _Current;
00146
00147
00148 std::vector<TEnvEffectRoom> _EnvNums;
00149
00150
00151 std::vector<std::string> _Tags;
00152
00153
00154 IBoundingShape *_BoundingShape;
00155 };
00156
00157
00158 }
00159
00160
00161 #endif // NL_ENV_EFFECT_H
00162
00163
00164
00165