- Timestamp:
- Apr 29, 2006, 1:21:47 AM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine/font.cc
r7428 r7429 380 380 &miY, &maY, 381 381 &adv); 382 printf("%c:: %d %d %d %d %d\n", rg->character, miX, maX, miY, maY, adv); 382 383 rg->minX = (float)miX / (float)this->renderSize; 383 384 rg->maxX = (float)maX / (float)this->renderSize; … … 471 472 tmpRect.y = tmp; 472 473 473 tmpGlyph->texCoord[0] = (float)( tmpRect.x)/(float)tmpSurf->w;474 tmpGlyph->texCoord[1] = (float)( tmpRect.x + tmpGlyph->width*(float)this->renderSize)/(float)tmpSurf->w;474 tmpGlyph->texCoord[0] = (float)((float)tmpRect.x + tmpGlyph->minX*(float)this->renderSize)/(float)tmpSurf->w; 475 tmpGlyph->texCoord[1] = (float)((float)tmpRect.x + tmpGlyph->maxX*(float)this->renderSize)/(float)tmpSurf->w; 475 476 tmpGlyph->texCoord[2] = (float)(tmpRect.y)/(float)tmpSurf->w; 476 tmpGlyph->texCoord[3] = (float)( tmpRect.y+this->getMaxHeight())/(float)tmpSurf->w;477 tmpGlyph->texCoord[3] = (float)((float)tmpRect.y+(float)this->getMaxHeight())/(float)tmpSurf->w; 477 478 SDL_FreeSurface(glyphSurf); 478 tmpRect.x += (int)(tmpGlyph->advance * this->renderSize)+1;479 tmpRect.x += glyphSurf->w+1; //(int)(tmpGlyph->advance * this->renderSize); 479 480 480 481 /* … … 492 493 } 493 494 // outputting the GLYPH-table 494 //char outName[1024];495 //sprintf( outName, "%s-glyphs.bmp", this->getName());496 //SDL_SaveBMP(tmpSurf, outName);495 char outName[1024]; 496 sprintf( outName, "%s-glyphs.bmp", this->getName()); 497 SDL_SaveBMP(tmpSurf, outName); 497 498 498 499 if (this->setSurface(tmpSurf)) -
trunk/src/lib/graphics/text_engine/text.cc
r7426 r7429 164 164 { 165 165 glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[2]); 166 glVertex2d(posX+tmpGlyph-> width*this->getSizeY2D(), 0);166 glVertex2d(posX+tmpGlyph->advance*this->getSizeY2D(), 0); 167 167 168 168 glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[3]); 169 glVertex2d(posX+tmpGlyph-> width*this->getSizeY2D(), this->getSizeY2D());169 glVertex2d(posX+tmpGlyph->advance*this->getSizeY2D(), this->getSizeY2D()); 170 170 171 171 glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[3]); 172 glVertex2d(posX , this->getSizeY2D());172 glVertex2d(posX+tmpGlyph->minX*this->getSizeY2D(), this->getSizeY2D()); 173 173 174 174 glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[2]); 175 glVertex2d(posX , 0);175 glVertex2d(posX+tmpGlyph->minX*this->getSizeY2D(), 0); 176 176 177 177 posX += tmpGlyph->advance * this->getSizeY2D(); -
trunk/src/lib/lang/base_object.cc
r7230 r7429 41 41 this->xmlElem = NULL; 42 42 43 //ClassList::addToClassList(this, this->classID, "BaseObject");43 //ClassList::addToClassList(this, this->classID, "BaseObject"); 44 44 } 45 45 -
trunk/src/lib/lang/class_list.cc
r7428 r7429 21 21 #include "compiler.h" 22 22 #include "debug.h" 23 #include <string.h>24 23 #include <cmath> 25 #include <algorithm> 24 26 25 using namespace std; 27 26 -
trunk/src/lib/lang/class_list.h
r7403 r7429 11 11 #include <list> 12 12 #include <string> 13 #ifndef NULL14 #define NULL 0 //!< NULL15 #endif16 13 17 14 // FORWARD DECLARATION
Note: See TracChangeset
for help on using the changeset viewer.