Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5074 in orxonox.OLD for trunk


Ignore:
Timestamp:
Aug 19, 2005, 1:52:25 AM (19 years ago)
Author:
bensch
Message:

Shell: the shell outputs one Line now :)

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/util/list.h

    r5073 r5074  
    131131
    132132  void add(T* entity);
    133   void addFirst(T* entity);
     133  void addAtBeginning(T* entity); //!< @todo This should be made with an ENUM
    134134  void remove(T* entity);
    135135  void removeLast();
     
    212212 */
    213213template<class T>
    214     inline void tList<T>::addFirst(T* entity)
     214    inline void tList<T>::addAtBeginning(T* entity)
    215215{
    216216  if( unlikely(entity == NULL)) return;
  • trunk/src/orxonox.cc

    r5072 r5074  
    150150  if( initInput() == -1) return -1;
    151151  if( initNetworking () == -1) return -1;
     152  if( initMisc () == -1) return -1;
    152153
    153154  return 0;
     
    249250
    250251  CDEngine::getInstance();
     252  return 0;
     253}
     254
     255/**
     256 * initializes miscelaneous features
     257 * @return -1 on failure
     258 */
     259int Orxonox::initMisc()
     260{
    251261  Shell::getInstance();
    252 
    253262  return 0;
    254263}
  • trunk/src/orxonox.h

    r5024 r5074  
    3434  void parseIniFile(const char* fileName);
    3535
     36  int initResources ();
    3637  int initVideo ();
    3738  int initSound ();
    3839  int initInput ();
    3940  int initNetworking ();
    40   int initResources ();
     41  int initMisc ();
    4142
    4243  const char* getConfigFile ();
  • trunk/src/util/shell.cc

    r5073 r5074  
    3535  this->buffer = new tList<char>;
    3636
     37  //this->bufferSize = 0;
     38  //this->bufferDisplaySize = 0;
    3739  this->setBufferSize(100);
    3840  this->setBufferDisplaySize(5);
    39 }
    40 
     41
     42
     43  this->addBufferLine("asjflksjdvklasmv", NULL);
     44  TextEngine::getInstance()->debug();
     45  //exit(-1);
     46}
    4147
    4248Shell* Shell::singletonRef = NULL;
     
    5258}
    5359
     60/**
     61 * sets The count of Lines to display in the buffer.
     62 * @param bufferDisplaySize the count of lines to display in the Shell-Buffer.
     63 */
    5464void Shell::setBufferDisplaySize(unsigned int bufferDisplaySize)
    5565{
     
    6474  {
    6575    Text* newText = TextEngine::getInstance()->createText("fonts/earth.ttf", 30, TEXT_DYNAMIC, 0, 255, 0);
     76    newText->setAlignment(TEXT_ALIGN_LEFT);
     77    newText->setPosition2D(5, 5);
     78    newText->setText("");
    6679    this->bufferText->add(newText);
    6780    // add the Text here
     
    115128  strcpy(newLine, tmp);
    116129
    117   this->buffer->add(newLine);
     130  this->buffer->addAtBeginning(newLine);
    118131
    119132  if (this->buffer->getSize() > this->bufferSize)
     
    123136  }
    124137
     138  this->bufferText->firstElement()->setText(newLine);
    125139
    126140}
     
    230244 * @param dt the elapsed time since the last tick();
    231245 */
    232 void Shell::tick(float dt)
    233 {
    234 }
     246//void Shell::tick(float dt)
     247//{
     248//}
    235249
    236250/**
  • trunk/src/util/shell.h

    r5072 r5074  
    5959
    6060    // Element2D-functions
    61     void tick(float dt);
     61//    void tick(float dt);
    6262    virtual void draw() const;
    6363
Note: See TracChangeset for help on using the changeset viewer.