Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5099 in orxonox.OLD for trunk


Ignore:
Timestamp:
Aug 22, 2005, 1:06:39 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Background for the Shell

Location:
trunk/src/util
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/loading/load_param.cc

    r4860 r5099  
    197197LoadParamDescription::~LoadParamDescription()
    198198{
    199   for(int i = 0; i < this->paramCount; i++)
     199  if (this->types != NULL)
    200200  {
    201     delete this->types[i];
     201    for(int i = 0; i < this->paramCount; i++)
     202    {
     203      delete []this->types[i];
     204    }
    202205  }
    203   for(int i = 0; i < this->paramCount; i++)
     206  if (this->defaultValues != NULL)
    204207  {
    205     delete this->defaultValues[i];
     208    for(int i = 0; i < this->paramCount; i++)
     209    {
     210      delete []this->defaultValues[i];
     211    }
    206212  }
    207213
  • trunk/src/util/loading/load_param.h

    r5039 r5099  
    135135        PRINTF(4)("Not loaded parameter %s of %s\n", paramName, pt2Object->getClassName()); \
    136136    }
    137 
    138137
    139138// 2. TYPES
  • trunk/src/util/shell.cc

    r5097 r5099  
    7272Shell::~Shell ()
    7373{
    74   // delete what has to be deleted here
     74  // delete the displayable Buffers
    7575  for (int i = 0; i < this->bufferDisplaySize; i++)
    7676    delete this->bufferText[i];
    7777  delete this->bufferText;
    7878
     79  // delete the inputLine
    7980  delete this->inputLineText;
    8081  delete this->inputLine;
     82
     83  // delete all the Chars in the Buffers
     84  tIterator<char>* charIterator = this->buffer->getIterator();
     85  char* charElem = charIterator->nextElement();
     86  while (charElem != NULL)
     87  {
     88    delete charElem;
     89    charElem = charIterator->nextElement();
     90  }
     91  delete charIterator;
    8192
    8293  Shell::singletonRef = NULL;
     
    397408void Shell::draw() const
    398409{
     410  glPushMatrix();
     411  // transform for alignment.
     412  // setting the Blending effects
     413
     414  glColor4f(0.0f, 0.0f, 0.8f, .4);
     415  glEnable(GL_BLEND);
     416  glDisable(GL_TEXTURE_2D);
     417  glBlendFunc(GL_SRC_ALPHA, GL_ONE);
     418
     419//  glBindTexture(GL_TEXTURE_2D, this->texture);
     420  glBegin(GL_QUADS);
     421
     422//  glTexCoord2f(this->texCoord.minU, this->texCoord.minV);
     423  glVertex2f(this->getAbsCoor2D().x,   this->getAbsCoor2D().y  );
     424
     425//  glTexCoord2f(this->texCoord.maxU, this->texCoord.minV);
     426  glVertex2f(this->getAbsCoor2D().x + 800, this->getAbsCoor2D().y  );
     427
     428//  glTexCoord2f(this->texCoord.maxU, this->texCoord.maxV);
     429  glVertex2f(this->getAbsCoor2D().x + 800, this->getAbsCoor2D().y + 150);
     430
     431//  glTexCoord2f(this->texCoord.minU, this->texCoord.maxV);
     432  glVertex2f(this->getAbsCoor2D().x, this->getAbsCoor2D().y + 150);
     433
     434  glEnd();
    399435}
    400436
Note: See TracChangeset for help on using the changeset viewer.