Changeset 5113 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Aug 23, 2005, 11:18:39 PM (19 years ago)
- Location:
- trunk/src/lib/graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/render2D/element_2d.cc
r5111 r5113 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 } 216 221 this->relCoordinate = relCoord; 217 222 this->bRelCoorChanged = true; … … 227 232 void Element2D::setRelCoor2D (float x, float y, float z) 228 233 { 229 this->set AbsCoor2D(Vector(x,y,z));234 this->setRelCoor2D(Vector(x,y,z)); 230 235 } 231 236 … … 288 293 void Element2D::setAbsCoor2D (const Vector& absCoord) 289 294 { 295 if (this->toCoordinate!= NULL) 296 { 297 delete this->toCoordinate; 298 this->toCoordinate = NULL; 299 } 300 290 301 if( likely(this->parentMode & E2D_PARENT_MOVEMENT)) 291 302 { … … 362 373 void Element2D::setRelDir2D (float relDir) 363 374 { 375 if (this->toDirection!= NULL) 376 { 377 delete this->toDirection; 378 this->toDirection = NULL; 379 } 380 364 381 this->relDirection = relDir; 365 382 this->bRelDirChanged = true; … … 386 403 void Element2D::setAbsDir2D (float absDir) 387 404 { 405 if (this->toDirection!= NULL) 406 { 407 delete this->toDirection; 408 this->toDirection = NULL; 409 } 410 388 411 if (likely(this->parent != NULL)) 389 412 this->relDirection = absDir - this->parent->getAbsDir2D(); … … 712 735 { 713 736 tIterator<Element2D>* iterator = this->children->getIterator(); 714 //PNode* pn = this->children->enumerate ();715 737 Element2D* pn = iterator->nextElement(); 716 738 while( pn != NULL) -
trunk/src/lib/graphics/render2D/element_2d.h
r5111 r5113 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; }; 110 112 const Vector& getRelCoor2Dpx() const; 111 113 void setAbsCoor2D (const Vector& absCoord); … … 123 125 /** @returns the relative Direction */ 124 126 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; }; 125 129 void setAbsDir2D (float absDir); 126 130 /** @returns the absolute Direction */ -
trunk/src/lib/graphics/text_engine.cc
r5111 r5113 592 592 if( glyphSurf != NULL ) 593 593 { 594 595 594 SDL_SetAlpha(glyphSurf, 0, 0); 596 595 … … 598 597 TexCoord tmpTexCoord; 599 598 tmpTexCoord.minU = (float)tmpRect.x/(float)tmpSurf->w; 600 tmpTexCoord.maxU = (float)(tmpRect.x +1 + tmpGlyph->width)/(float)tmpSurf->w;599 tmpTexCoord.maxU = (float)(tmpRect.x +1 + tmpGlyph->width)/(float)tmpSurf->w; 601 600 tmpTexCoord.minV = (float)tmpRect.y/(float)tmpSurf->w; 602 601 tmpTexCoord.maxV = (float)(tmpRect.y+tmpGlyph->height)/(float)tmpSurf->w; … … 620 619 621 620 // Outputting Glyphs to BMP-files. 622 623 char outname[ 64];621 /* 622 char outname[512]; 624 623 if (i < 10) 625 sprintf( outname, " glyph-00%d.bmp", i );624 sprintf( outname, "%s-glyph-00%d.bmp", this->getName(), i ); 626 625 else if (i <100) 627 sprintf( outname, "glyph-0%d.bmp", i );626 sprintf( outname, "%s-glyph-0%d.bmp", this->getName(), i ); 628 627 else 629 sprintf( outname, "glyph-%d.bmp", i );630 SDL_SaveBMP(tmpSurf, outname); 631 */ 628 sprintf( outname, "%s-glyph-%d.bmp", this->getName(), i ); 629 SDL_SaveBMP(tmpSurf, outname);*/ 630 632 631 } 633 632 } … … 712 711 x = 0; 713 712 y = y + maxLineHeight; 714 maxLineHeight = 0;713 //maxLineHeight = 0; 715 714 } 716 715 if (y + maxLineHeight + 1 > size)
Note: See TracChangeset
for help on using the changeset viewer.