Changeset 8030 in orxonox.OLD for branches/bsp_model/src/lib/graphics/importer/bsp_file.cc
- Timestamp:
- May 31, 2006, 3:22:23 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/bsp_file.cc
r7805 r8030 43 43 int BspFile::read(const char* name) 44 44 { 45 this->scale = 0.4; 45 46 int offset; 46 47 int size; … … 598 599 sc = ((unsigned char *)(&lightMapTexture))[i]; 599 600 sc *= 1/255.0; 600 scale = 1. 0;601 scale = 1.4; 601 602 if(sc > 1.0f && (temp = (1.0f/sc)) < scale) scale=temp; 602 603 scale*=255.0; 603 604 sc*=scale; 604 if( sc <= 180)605 if(false) 605 606 ((unsigned char *)(&lightMapTexture))[i] = (unsigned char)sc + 75; 606 607 else … … 983 984 void BspFile::swapAllBspCoordinates() 984 985 { 986 985 987 for(int i = 0; i < this->numVertex ; ++i) 986 988 { … … 1001 1003 { 1002 1004 float sto = this->planes[i].x; 1003 this->planes[i].x = this->planes[i].y;1004 this->planes[i].y = this->planes[i].z;1005 this->planes[i].x = this->planes[i].y; 1006 this->planes[i].y = this->planes[i].z; 1005 1007 this->planes[i].z = sto; 1008 this->planes[i].d = scale * this->planes[i].d ; 1006 1009 } 1007 1010 … … 1021 1024 { 1022 1025 int sto = array[0]; 1023 array[0] = array[1] ;1024 array[1] = array[2];1025 array[2] = sto ;1026 array[0] = array[1] / (int) ( 1/ scale); 1027 array[1] = array[2] / (int) (1/scale); 1028 array[2] = sto / (int) (1/scale); 1026 1029 1027 1030 } … … 1030 1033 { 1031 1034 float sto = array[0]; 1032 array[0] = array[1];1033 array[1] = array[2];1034 array[2] = s to;1035 } 1036 1035 array[0] = scale * array[1]; 1036 array[1] = scale * array[2]; 1037 array[2] = scale * sto; 1038 } 1039
Note: See TracChangeset
for help on using the changeset viewer.