Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3790 in orxonox.OLD for orxonox/trunk/src/story_entities


Ignore:
Timestamp:
Apr 13, 2005, 12:33:07 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the textEngine back into the trunk.
merged with command:
svn merge -r 3681:HEAD branches/textEngine/ trunk/

conflicts in:
world.cc/h orxonox.cc NEWS
changed in favor of the trunk

Location:
orxonox/trunk/src/story_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r3763 r3790  
    3333#include "terrain.h"
    3434#include "light.h"
     35#include "text_engine.h"
    3536
    3637#include "track_manager.h"
     
    4041#include "command_node.h"
    4142#include "glmenu_imagescreen.h"
    42 #include "fontset.h"
    4343#include "list.h"
    4444
     
    157157  delete this->lightMan;
    158158  delete this->trackManager;
     159  TextEngine::getInstance()->flush();
    159160
    160161  delete this->simpleAnimation;
    161162  //delete garbagecollecor
    162163  //delete animator
     164
     165
    163166}
    164167
     
    207210    {
    208211      // initializing Font
    209       testFont = new FontSet();
    210       testFont->buildFont("../data/pictures/font.tga");
    211212      this->glmis->step();
    212 
    213213      // initializing the TrackManager
    214214      trackManager = TrackManager::getInstance();
     
    309309            this->spawn (this->localPlayer);
    310310            /*monitor progress*/
    311             //this->glmis->step();         
     311            //this->glmis->step();
    312312            this->glmis->step();
    313313
     
    363363            this->glmis->step();
    364364
     365            this->testText = TextEngine::getInstance()->createText("fonts/earth.ttf", 30, TEXT_DYNAMIC, 0, 255, 0);
     366            testText->setText("TEXT  rocks");
     367            testText->setBlending(1.0);
     368            testText->setBindNode(tn);
     369
     370            /*     
     371                   tmpAnim = new Animation<Text>(testText, &Text::setBlending);
     372                   tmpAnim->addKeyFrame(0.0, 1.0, ANIM_LINEAR);
     373                   tmpAnim->addKeyFrame(1.0, 1.0, ANIM_LINEAR);
     374                   tmpAnim->addKeyFrame(0.0, 1.0, ANIM_LINEAR);
     375                   tmpAnim->addKeyFrame(1.0, 1.0, ANIM_LINEAR);
     376                   tmpAnim->setInfinity(ANIM_INF_CONSTANT, ANIM_INF_REWIND);
     377            */
    365378            break;
    366379          }
     
    553566  glNewList (objectList, GL_COMPILE);
    554567 
    555   trackManager->drawGraph(.01);
     568  //  trackManager->drawGraph(.01);
    556569  trackManager->debug(2);
    557570  glEndList();
     
    740753  glCallList (objectList);
    741754
    742   testFont->printText(0, 0, 1, "orxonox_" PACKAGE_VERSION);
    743 
     755  TextEngine::getInstance()->draw();
    744756  lightMan->draw(); // must be at the end of the drawing procedure, otherwise Light cannot be handled as PNodes //
    745757}
     
    892904        {
    893905          float fps = 1000/dt;
    894           PRINTF(3)("fps = %f\n", fps);
     906
     907          // temporary, only for showing how fast the text-engine is
     908          char tmpChar[20];
     909          sprintf(tmpChar, "fps: %4.0f", fps);
    895910        }
    896911      else
     
    924939      this->garbageCollector->tick(seconds);
    925940      this->simpleAnimation->tick(seconds);
     941
    926942    }
    927943  this->lastFrame = currentFrame;
  • orxonox/trunk/src/story_entities/world.h

    r3727 r3790  
    2121class Skysphere;
    2222class LightManager;
    23 class FontSet;
    2423class Terrain;
    2524class GarbageCollector;
    2625class SimpleAnimation;
     26
     27class Text;
    2728
    2829//! The game world Interface
     
    9697  bool bPause;                        //!< pause mode
    9798
    98   FontSet* testFont;                  //!< A test Font. \todo fix this, so it is for real.
    9999  GLMenuImageScreen* glmis;           //!< The Level-Loader Display
     100
     101  Text* testText;                     //!< A text to Test the TextEngine;
    100102
    101103  char* worldName;                    //!< The name of this World
Note: See TracChangeset for help on using the changeset viewer.