Changeset 5120 in orxonox.OLD
- Timestamp:
- Aug 25, 2005, 12:08:04 AM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/collision_detection/bounding_volume.cc
r5116 r5120 30 30 this->center = new Vector(); 31 31 this->bOrigVertices = true; 32 this->vertices = NULL; 32 33 } 33 34 … … 43 44 44 45 if( this->vertices && !this->bOrigVertices) 45 { 46 delete this->vertices; 47 this->vertices = NULL; 48 } 46 delete[] this->vertices; 49 47 } -
trunk/src/lib/collision_detection/obb.cc
r5116 r5120 32 32 this->halfLength = new float[3]; 33 33 this->bCollided = false; 34 this->vertices = NULL;35 34 } 36 35 -
trunk/src/lib/util/list.h
r5118 r5120 465 465 * grabs the iterator entity from another iterator 466 466 * @param iterator the iterator to grab the local currentEl from 467 * @returns the grabbed element (current). 467 * @returns the grabbed element (current). NULL if not found, or not defined 468 * 469 * Both iterators must be from the same List! 468 470 */ 469 471 template<class T> 470 472 T* tIterator<T>::iteratorElement(const tIterator<T>* iterator) 471 473 { 472 if (iterator != NULL )474 if (iterator != NULL && iterator->list == this->list) 473 475 { 474 476 this->currentEl = iterator->currentEl; -
trunk/src/util/shell.cc
r5119 r5120 185 185 this->bufferText[i] = TextEngine::getInstance()->createText("fonts/Aniron_Bold.ttf", this->textSize, TEXT_DYNAMIC, 255, 0, 0); 186 186 this->bufferText[i]->setAlignment(TEXT_ALIGN_LEFT); 187 this->bufferText[i]->setRelCoor2D( 5, (this->textSize + this->lineSpacing)*(bufferDisplaySize - i -1));187 this->bufferText[i]->setRelCoor2D(calculateLinePosition(i)); 188 188 this->bufferText[i]->setText(NULL); 189 189 this->bufferText[i]->setParent2D(this); … … 282 282 { 283 283 Text* lastText = this->bufferText[this->bufferDisplaySize-1]; 284 Vector firstCoord = this->bufferText[0]->getRelCoorSoft2D();285 284 286 285 Text* swapText; 287 286 Text* moveText = this->bufferText[0]; 288 this->bufferText[0]->setRelCoorSoft2D(this-> bufferText[1]->getRelCoorSoft2D(), 5);287 this->bufferText[0]->setRelCoorSoft2D(this->calculateLinePosition(1),10); 289 288 for (unsigned int i = 1; i < this->bufferDisplaySize; i++) 290 289 { 291 290 if ( i < this->bufferDisplaySize-1) 292 this->bufferText[i]->setRelCoorSoft2D(this-> bufferText[i+1]->getRelCoorSoft2D(),5);291 this->bufferText[i]->setRelCoorSoft2D(this->calculateLinePosition(i+1),5); 293 292 swapText = this->bufferText[i]; 294 293 this ->bufferText[i] = moveText; 295 294 moveText = swapText; 296 295 } 297 lastText->setRelCoor2D( firstCoord);296 lastText->setRelCoor2D(this->calculateLinePosition(0)); 298 297 this->bufferText[0] = lastText; 299 298 … … 739 738 } 740 739 740 741 /////////////////////// 742 // HELPER FUNCTIONS // 743 /////////////////////// 744 Vector Shell::calculateLinePosition(unsigned int lineNumber) 745 { 746 return Vector(5, (this->textSize + this->lineSpacing)*(this->bufferDisplaySize - lineNumber -1), 0); 747 } 748 749 750 741 751 /** 742 752 * displays some nice output from the Shell -
trunk/src/util/shell.h
r5119 r5120 83 83 const tList<const char>* Shell::createCompleteList(const tList<BaseObject>* inputList, const char* classNameBegin); 84 84 85 // helpers // 86 Vector calculateLinePosition(unsigned int lineNumber); 87 85 88 86 89 private:
Note: See TracChangeset
for help on using the changeset viewer.