- Timestamp:
- Jan 30, 2006, 2:37:22 AM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/particles/sprite_particles.cc
r6812 r6846 103 103 void SpriteParticles::draw() const 104 104 { 105 glPushAttrib(GL_ENABLE_BIT);106 105 107 106 Particle* drawPart = particles; … … 110 109 GLboolean checkLight = false; 111 110 glGetBooleanv(GL_LIGHTING, &checkLight); 111 glPushAttrib(GL_LIGHTING_BIT); 112 112 if (checkLight == GL_TRUE) 113 113 glDisable(GL_LIGHTING); 114 114 115 glEnable(GL_ALPHA_TEST);116 115 glDepthMask(GL_FALSE); 117 116 /* -
trunk/src/lib/sound/sound_engine.cc
r6844 r6846 162 162 // updating the Listeners Position 163 163 if (likely(this->listener != NULL)) 164 165 166 167 168 169 170 171 172 173 174 175 176 164 { 165 alListener3f(AL_POSITION, 166 this->listener->getAbsCoor().x, 167 this->listener->getAbsCoor().y, 168 this->listener->getAbsCoor().z); 169 alListener3f(AL_VELOCITY, 170 this->listener->getVelocity().x, 171 this->listener->getVelocity().y, 172 this->listener->getVelocity().z); 173 Vector absDirV = this->listener->getAbsDirV(); 174 ALfloat orientation [6] = {1,0,0, absDirV.x, absDirV.y, absDirV.z}; 175 alListenerfv(AL_ORIENTATION, orientation); 176 } 177 177 else 178 178 PRINTF(2)("no listener defined\n"); … … 220 220 { 221 221 /// FIXME 222 /* if(this->sourceList && this->bufferList) 223 { 224 tIterator<BaseObject>* bufferIterator = this->bufferList->getIterator(); 225 SoundBuffer* enumBuffer = (SoundBuffer*)bufferIterator->firstElement(); 226 while (enumBuffer) 227 { 228 tIterator<BaseObject>* sourceIterator = this->sourceList->getIterator(); 229 SoundSource* enumSource = (SoundSource*)sourceIterator->firstElement(); 230 while (enumSource) 222 /* if(this->sourceList && this->bufferList) 223 { 224 tIterator<BaseObject>* bufferIterator = this->bufferList->getIterator(); 225 SoundBuffer* enumBuffer = (SoundBuffer*)bufferIterator->firstElement(); 226 while (enumBuffer) 231 227 { 232 if (enumBuffer == enumSource->getBuffer()) 233 break; 234 enumSource = (SoundSource*)sourceIterator->nextElement(); 228 tIterator<BaseObject>* sourceIterator = this->sourceList->getIterator(); 229 SoundSource* enumSource = (SoundSource*)sourceIterator->firstElement(); 230 while (enumSource) 231 { 232 if (enumBuffer == enumSource->getBuffer()) 233 break; 234 enumSource = (SoundSource*)sourceIterator->nextElement(); 235 } 236 delete sourceIterator; 237 if (enumSource == NULL) 238 ResourceManager::getInstance()->unload(enumBuffer); 239 enumBuffer = (SoundBuffer*)bufferIterator->nextElement(); 235 240 } 236 delete sourceIterator; 237 if (enumSource == NULL) 238 ResourceManager::getInstance()->unload(enumBuffer); 239 enumBuffer = (SoundBuffer*)bufferIterator->nextElement(); 240 } 241 delete bufferIterator; 242 }*/ /// FIXME 241 delete bufferIterator; 242 }*/ /// FIXME 243 243 } 244 244 … … 278 278 const char* deviceList = (const char*)alcGetString(NULL,ALC_DEVICE_SPECIFIER); 279 279 const char* devWalk = deviceList; 280 // if (alcIsExtensionPresent(NULL, (const ALCchar*)"ALC_ENUMERATION_EXT") == AL_TRUE)281 { // try out enumeration extension280 // if (alcIsExtensionPresent(NULL, (const ALCchar*)"ALC_ENUMERATION_EXT") == AL_TRUE) 281 { // try out enumeration extension 282 282 PRINTF(3)("Enumeration-extension found\n"); 283 283 … … 287 287 PRINTF(3)("%s\n", devWalk); 288 288 devWalk += strlen(devWalk)+1; 289 } while (devWalk[0] != '\0'); 289 } 290 while (devWalk[0] != '\0'); 290 291 291 292 … … 293 294 } 294 295 // INITIALIZING THE DEVICE: 295 /*296 #ifdef AL_VERSION_1_1297 ALCchar deviceName[] =298 299 #ifdef __WIN32__300 "Direct3D";301 #else302 "'( ( devices '( native null ) ) )";303 #endif304 //305 this->device = alcOpenDevice(deviceName);306 307 this->context = alcCreateContext(this->device, NULL);308 309 alcMakeContextCurrent(this->context);310 #else*/296 /* 297 #ifdef AL_VERSION_1_1 298 ALCchar deviceName[] = 299 300 #ifdef __WIN32__ 301 "Direct3D"; 302 #else 303 "'( ( devices '( native null ) ) )"; 304 #endif 305 // 306 this->device = alcOpenDevice(deviceName); 307 308 this->context = alcCreateContext(this->device, NULL); 309 310 alcMakeContextCurrent(this->context); 311 #else*/ 311 312 this->device = alcOpenDevice(NULL); 312 313 SoundEngine::checkError("Error opening Device", __LINE__); … … 315 316 alcMakeContextCurrent(this->context); 316 317 this->checkError("Making Context Current", __LINE__); 317 // #endif318 // #endif 318 319 319 320 if ((result = alGetError()) != AL_NO_ERROR) … … 378 379 { 379 380 switch(err) 380 381 { 381 382 case AL_NO_ERROR: 382 383 return ("AL_NO_ERROR"); … … 391 392 case AL_OUT_OF_MEMORY: 392 393 return ("AL_OUT_OF_MEMORY"); 393 394 }; 394 395 } 395 396 -
trunk/src/world_entities/weapons/ammo_container.cc
r6669 r6846 32 32 this->setClassID(CL_AMMO_CONTAINER, "AmmoContainer"); 33 33 34 this->projectileType = projectileType; 35 this->maxEnergy = maxEnergy; 36 34 37 this->energy = 0.0; 35 this->maxEnergy = maxEnergy;36 38 } 37 39
Note: See TracChangeset
for help on using the changeset viewer.