Changeset 5111 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Aug 23, 2005, 11:13:56 PM (19 years ago)
- Location:
- trunk/src/lib/graphics
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/model.cc
r5110 r5111 192 192 193 193 tIterator<Material>* tmpIt = this->materialList->getIterator(); 194 Material* material = tmpIt-> firstElement();194 Material* material = tmpIt->nextElement(); 195 195 //! @todo do we really have to delete this material?? 196 196 while(material) … … 413 413 { 414 414 tIterator<Material>* tmpIt = this->materialList->getIterator(); 415 Material* material = tmpIt-> firstElement();415 Material* material = tmpIt->nextElement(); 416 416 while(material) 417 417 { -
trunk/src/lib/graphics/render2D/element_2d.cc
r5110 r5111 55 55 56 56 tIterator<Element2D>* iterator = this->children->getIterator(); 57 Element2D* pn = iterator-> firstElement();57 Element2D* pn = iterator->nextElement(); 58 58 while( pn != NULL) 59 59 { … … 214 214 void Element2D::setRelCoor2D (const Vector& relCoord) 215 215 { 216 if (this->toCoordinate!= NULL)217 {218 delete this->toCoordinate;219 this->toCoordinate = NULL;220 }221 216 this->relCoordinate = relCoord; 222 217 this->bRelCoorChanged = true; … … 232 227 void Element2D::setRelCoor2D (float x, float y, float z) 233 228 { 234 this->set RelCoor2D(Vector(x,y,z));229 this->setAbsCoor2D(Vector(x,y,z)); 235 230 } 236 231 … … 293 288 void Element2D::setAbsCoor2D (const Vector& absCoord) 294 289 { 295 if (this->toCoordinate!= NULL)296 {297 delete this->toCoordinate;298 this->toCoordinate = NULL;299 }300 301 290 if( likely(this->parentMode & E2D_PARENT_MOVEMENT)) 302 291 { … … 373 362 void Element2D::setRelDir2D (float relDir) 374 363 { 375 if (this->toDirection!= NULL)376 {377 delete this->toDirection;378 this->toDirection = NULL;379 }380 381 364 this->relDirection = relDir; 382 365 this->bRelDirChanged = true; … … 403 386 void Element2D::setAbsDir2D (float absDir) 404 387 { 405 if (this->toDirection!= NULL)406 {407 delete this->toDirection;408 this->toDirection = NULL;409 }410 411 388 if (likely(this->parent != NULL)) 412 389 this->relDirection = absDir - this->parent->getAbsDir2D(); … … 479 456 { 480 457 tIterator<Element2D>* iterator = this->children->getIterator(); 481 Element2D* pn = iterator-> firstElement();458 Element2D* pn = iterator->nextElement(); 482 459 483 460 while( pn != NULL) … … 687 664 { 688 665 tIterator<Element2D>* iterator = this->children->getIterator(); 689 Element2D* pn = iterator-> firstElement();666 Element2D* pn = iterator->nextElement(); 690 667 while( pn != NULL) 691 668 { … … 697 674 698 675 pn->update2D(dt); 676 //pn = this->children->nextElement(); 699 677 pn = iterator->nextElement(); 700 678 } … … 734 712 { 735 713 tIterator<Element2D>* iterator = this->children->getIterator(); 736 Element2D* pn = iterator->firstElement(); 714 //PNode* pn = this->children->enumerate (); 715 Element2D* pn = iterator->nextElement(); 737 716 while( pn != NULL) 738 717 { -
trunk/src/lib/graphics/render2D/element_2d.h
r5109 r5111 108 108 /** @returns the relative position */ 109 109 inline const Vector& getRelCoor2D () const { return this->prevRelCoordinate; }; 110 /** @returns the Relative Coordinate Destination */111 inline const Vector& getRelCoorSoft2D() const { return (this->toCoordinate)?*this->toCoordinate:this->relCoordinate; };112 110 const Vector& getRelCoor2Dpx() const; 113 111 void setAbsCoor2D (const Vector& absCoord); … … 125 123 /** @returns the relative Direction */ 126 124 inline float getRelDir2D () const { return this->prevRelDirection; }; 127 /** @returns the Relative Directional Destination */128 inline float getRelDirSoft2D() const { return (this->toDirection)?*this->toDirection:this->relDirection; };129 125 void setAbsDir2D (float absDir); 130 126 /** @returns the absolute Direction */ -
trunk/src/lib/graphics/render2D/render_2d.cc
r5110 r5111 105 105 { 106 106 tIterator<Element2D>* iterator = this->element2DList[i]->getIterator(); 107 Element2D* elem = iterator-> firstElement();107 Element2D* elem = iterator->nextElement(); 108 108 while (elem != NULL) 109 109 { … … 131 131 { 132 132 tIterator<Element2D>* iterator = this->element2DList[i]->getIterator(); 133 Element2D* elem = iterator-> firstElement();133 Element2D* elem = iterator->nextElement(); 134 134 while (elem != NULL) 135 135 { -
trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
r5110 r5111 253 253 counter = 0; 254 254 iterator = listA->getIterator(); 255 tempTri = iterator-> firstElement();255 tempTri = iterator->nextElement(); 256 256 while( tempTri) 257 257 { … … 262 262 counter = 0; 263 263 iterator = listB->getIterator(); 264 tempTri = iterator-> firstElement();264 tempTri = iterator->nextElement(); 265 265 while( tempTri) 266 266 { … … 271 271 counter = 0; 272 272 iterator = listC->getIterator(); 273 tempTri = iterator-> firstElement();273 tempTri = iterator->nextElement(); 274 274 while( tempTri) 275 275 { … … 280 280 counter = 0; 281 281 iterator = listD->getIterator(); 282 tempTri = iterator-> firstElement();282 tempTri = iterator->nextElement(); 283 283 while( tempTri) 284 284 { -
trunk/src/lib/graphics/text_engine.cc
r5110 r5111 592 592 if( glyphSurf != NULL ) 593 593 { 594 594 595 SDL_SetAlpha(glyphSurf, 0, 0); 595 596 … … 597 598 TexCoord tmpTexCoord; 598 599 tmpTexCoord.minU = (float)tmpRect.x/(float)tmpSurf->w; 599 tmpTexCoord.maxU = (float)(tmpRect.x +1 + 600 tmpTexCoord.maxU = (float)(tmpRect.x +1 +tmpGlyph->width)/(float)tmpSurf->w; 600 601 tmpTexCoord.minV = (float)tmpRect.y/(float)tmpSurf->w; 601 602 tmpTexCoord.maxV = (float)(tmpRect.y+tmpGlyph->height)/(float)tmpSurf->w; … … 619 620 620 621 // Outputting Glyphs to BMP-files. 621 /*622 char outname[ 512];622 /* 623 char outname[64]; 623 624 if (i < 10) 624 sprintf( outname, " %s-glyph-00%d.bmp", this->getName(), i );625 sprintf( outname, "glyph-00%d.bmp", i ); 625 626 else if (i <100) 626 sprintf( outname, "%s-glyph-0%d.bmp", this->getName(), i );627 sprintf( outname, "glyph-0%d.bmp", i ); 627 628 else 628 sprintf( outname, "%s-glyph-%d.bmp", this->getName(), i );629 SDL_SaveBMP(tmpSurf, outname); */630 629 sprintf( outname, "glyph-%d.bmp", i ); 630 SDL_SaveBMP(tmpSurf, outname); 631 */ 631 632 } 632 633 } … … 711 712 x = 0; 712 713 y = y + maxLineHeight; 713 //maxLineHeight = 0;714 maxLineHeight = 0; 714 715 } 715 716 if (y + maxLineHeight + 1 > size) … … 845 846 846 847 tIterator<BaseObject>* textIterator = ClassList::getList(CL_TEXT)->getIterator(); 847 Text* text = dynamic_cast<Text*>(textIterator-> firstElement());848 Text* text = dynamic_cast<Text*>(textIterator->nextElement()); 848 849 while( text != NULL) 849 850 {
Note: See TracChangeset
for help on using the changeset viewer.