Changeset 8317 in orxonox.OLD for branches/bsp_model/src/lib/graphics/importer
- Timestamp:
- Jun 11, 2006, 2:15:24 PM (19 years ago)
- Location:
- branches/bsp_model/src/lib/graphics/importer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/bsp_file.cc
r8233 r8317 214 214 bspFile.read(this->visData, size); 215 215 216 PRINTF( 4)("BSP FILE: VisDataSize: %i Bytes. \n", size);217 PRINTF( 4)("BSP FILE: NumVisData: %i. \n", size /1 - 8);218 PRINTF( 4)("BSP FILE: Remainder: %i. \n", size % 1);219 PRINTF( 4)("BSP FILE: VisDataOffset: %i. \n", offset);216 PRINTF(0)("BSP FILE: VisDataSize: %i Bytes. \n", size); 217 PRINTF(0)("BSP FILE: NumVisData: %i. \n", size /1 - 8); 218 PRINTF(0)("BSP FILE: Remainder: %i. \n", size % 1); 219 PRINTF(0)("BSP FILE: VisDataOffset: %i. \n", offset); 220 220 221 221 // Get the Textures … … 391 391 { 392 392 ::std::string absFileName; 393 char* baseName = "/worlds/bsp";393 char* baseName = "/worlds/bsp/"; 394 394 395 395 char fileName [500]; -
branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc
r8288 r8317 103 103 const void BspManager::tick(float time) 104 104 { 105 //if(!this->bspFile->MovieMaterials.empty()) 106 //this->bspFile->MovieMaterials.front()->tick(time ); 107 105 106 if(!this->bspFile->MovieMaterials.empty()) 107 { 108 ::std::vector<MoviePlayer *>::iterator it = this->bspFile->MovieMaterials.begin() ; 109 while(it != this->bspFile->MovieMaterials.end()) 110 { 111 (*it)->tick(time); 112 it++; 113 } 114 //this->bspFile->MovieMaterials.front()->tick(time ); 115 116 117 } 118 108 119 } 109 120 const void BspManager::draw() … … 302 313 return; 303 314 } 304 if(curFace.type != 1) return;315 // if(curFace.type != 1) return; 305 316 if((char*)(this->bspFile->textures)[curFace.texture*72]== 0) return; 306 317 307 318 if(this->lastTex != curFace.texture) { 308 319 if(this->bspFile->Materials[curFace.texture].animated) { 309 glBlendFunc(GL_ZERO,GL_ONE); 310 //glEnable(GL_BLEND); 320 // glBlendFunc(GL_ZERO,GL_ONE); 321 322 323 311 324 if(this->bspFile->Materials[curFace.texture].aviMat->getStatus() == 2) this->bspFile->Materials[curFace.texture].aviMat->start(0); 312 325 //this->bspFile->Materials[curFace.texture].aviMat->tick(0.005); … … 314 327 glActiveTextureARB(GL_TEXTURE0_ARB); 315 328 glBindTexture(GL_TEXTURE_2D, n ); 316 // glDisable(GL_BLEND); 329 this->lastTex = curFace.texture; 330 317 331 } else { 318 332 this->bspFile->Materials[curFace.texture].mat->select(); … … 322 336 323 337 if(curFace.lm_index < 0) { 338 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 324 339 glActiveTextureARB(GL_TEXTURE1_ARB); 325 340 glBindTexture(GL_TEXTURE_2D, this->bspFile->whiteLightMap ); … … 922 937 923 938 this->checkCollisionRayN(this->root,0.0f,1.0f, &position, &dest ); 924 if(this->outputFraction == 1.0f) out = dest; 939 if(this->outputFraction == 1.0f) 940 { 941 if(this->outputAllSolid) collision = true; 942 else collision = false; 943 out = dest; 944 945 } 925 946 else { 947 926 948 collision = true; 927 949 out.x = position.x + (dest.x -position.x) * this->outputFraction; … … 944 966 // Return the normal here: Normal's stored in this->collPlane; 945 967 946 if(collision ) {968 if(collision ) { 947 969 PRINTF(0)("We got a collision!! Are you sure: outputFraction = %f\n", this->outputFraction); 948 970 worldEntity->registerCollision(this->parent, worldEntity, Vector(this->collPlane->x, this->collPlane->y, this->collPlane->z), out); -
branches/bsp_model/src/lib/graphics/importer/bsp_manager.h
r8219 r8317 109 109 Vector out1; //!< For debugging only 110 110 Vector out2; //!< For debugging only 111 112 int tgl; 111 113 }; 112 114
Note: See TracChangeset
for help on using the changeset viewer.