Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3548 in orxonox.OLD for orxonox/trunk/src


Ignore:
Timestamp:
Mar 14, 2005, 8:57:25 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: debug information in importer set like they should be

Location:
orxonox/trunk/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/defs/debug.h

    r3511 r3548  
    2727#define INFO            3
    2828#define DEBUGING        4
     29#define vDEBUGING       5
    2930
    3031#if HAVE_CONFIG_H
     
    7677#endif
    7778     
    78      
     79#if DEBUG >= vDEBUGING
     80#define PRINTF5 \
     81     if (verbose >= vDEBUGING) \
     82       printf("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && printf
     83#else
     84#define PRINTF5 if (NO)
     85#endif
     86   
    7987#else 
    8088#define PRINTF(x) if (NO)
     
    124132#else
    125133#define PRINT4 if (NO)
     134#endif
     135
     136#if DEBUG >= vDEBUGING
     137#define PRINT5 \
     138     if (verbose >= vDEBUGING) \
     139       printf("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && printf
     140#else
     141#define PRINT5 if (NO)
    126142#endif
    127143
  • orxonox/trunk/src/lib/graphics/font/fontset.cc

    r3478 r3548  
    4545#include <stdarg.h>
    4646
    47 #include "../importer/texture.h"
     47#include "texture.h"
     48#include <string.h>
    4849
    4950/**
  • orxonox/trunk/src/lib/graphics/importer/array.cc

    r3206 r3548  
    3030Array::~Array()
    3131{
    32   PRINTF(2)("deleting array\n");
     32  PRINTF(4)("deleting array\n");
    3333  Entry* walker = this->firstEntry;
    3434  Entry* previous;
     
    4949void Array::initializeArray ()
    5050{
    51   PRINTF(2)("crating new Array\n");
     51  PRINTF(4)("crating new Array\n");
    5252  this->firstEntry = new Entry;
    5353  this->firstEntry->next =NULL;
     
    6464void Array::finalizeArray (void)
    6565{
    66   PRINTF(3)("Finalizing array. Length: %i\n", entryCount); 
     66  PRINTF(4)("Finalizing array. Length: %i\n", entryCount); 
    6767  //  if ((array = (GLfloat*)malloc( entryCount* sizeof(GLfloat))) == NULL)
    6868  if (!(this->array = new GLfloat [this->entryCount]))
     
    8787  if (!this->finalized)
    8888    {
    89       PRINTF(3)("adding new Entry to Array: %f\n", entry);
     89      PRINTF(5)("adding new Entry to Array: %f\n", entry);
    9090     
    9191      this->currentEntry->value = entry;
     
    9696    }
    9797  else
    98     PRINTF(1)("adding failed, because list has been finalized\n");
     98    PRINTF(2)("adding failed, because list has been finalized\n");
    9999}
    100100
     
    131131void Array::debug ()
    132132{
    133   PRINTF(0)("entryCount=%i, address=%p\n", this->entryCount, this->array);
     133  PRINT(0)("entryCount=%i, address=%p\n", this->entryCount, this->array);
    134134}
  • orxonox/trunk/src/lib/graphics/importer/material.cc

    r3536 r3548  
    1818
    1919#include "texture.h"
     20#include "debug.h"
    2021#include <stdlib.h>
    2122#include <string.h>
     
    5152Material::~Material()
    5253{
    53   PRINTF(2)("delete Material %s.\n", this->name);
     54  PRINTF(4)("delete Material %s.\n", this->name);
    5455  if (this->name)
    5556    delete []this->name;
     
    8384void Material::init(void)
    8485{
    85   PRINTF(2)("initializing new Material.\n");
     86  PRINTF(4)("initializing new Material.\n");
    8687  this->nextMat = NULL;
    8788  this->name ="";
     
    112113Material* Material::search(char* mtlName)
    113114{
    114   PRINTF(2)("Searching for material %s", mtlName);
     115  PRINTF(5)("Searching for material %s", mtlName);
    115116  Material* searcher = this;
    116117  while (searcher != NULL)
    117118    {
    118       PRINT(2)(".");
     119      PRINT(5)(".");
    119120      if (!strcmp (searcher->getName(), mtlName))
    120121        {
    121           PRINT(2)("found.\n");
     122          PRINT(5)("found.\n");
    122123          return searcher;
    123124        }
    124125      searcher = searcher->nextMat;
    125126    }
    126   PRINT(2)("not found\n");
     127  PRINT(2)("material %s not found\n", mtlName);
    127128  return NULL;
    128129}
     
    171172void Material::setName (char* mtlName)
    172173{
    173   PRINTF(3)("setting Material Name to %s.\n", this->name);
     174  PRINTF(4)("setting Material Name to %s.\n", this->name);
    174175  this->name = new char [strlen(mtlName)+1];
    175176  strcpy(this->name, mtlName);
     
    190191void Material::setIllum (int illum)
    191192{
    192   PRINTF(3)("setting illumModel of Material %s to %i\n", this->name, illum);
     193  PRINTF(4)("setting illumModel of Material %s to %i\n", this->name, illum);
    193194  this->illumModel = illum;
    194   //  PRINTF(3)("setting illumModel to: %i\n", illumModel);
    195195}
    196196/**
     
    210210void Material::setDiffuse (float r, float g, float b)
    211211{
    212   PRINTF(3)("setting Diffuse Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
     212  PRINTF(4)("setting Diffuse Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
    213213  this->diffuse[0] = r;
    214214  this->diffuse[1] = g;
     
    236236void Material::setAmbient (float r, float g, float b)
    237237{
    238   PRINTF(3)("setting Ambient Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
     238  PRINTF(4)("setting Ambient Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
    239239  this->ambient[0] = r;
    240240  this->ambient[1] = g;
     
    261261void Material::setSpecular (float r, float g, float b)
    262262{
    263   PRINTF(3)("setting Specular Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
     263  PRINTF(4)("setting Specular Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
    264264  this->specular[0] = r;
    265265  this->specular[1] = g;
     
    301301void Material::setTransparency (float trans)
    302302{
    303   PRINTF(3)("setting Transparency of Material %s to %f.\n", this->name, trans);
     303  PRINTF(4)("setting Transparency of Material %s to %f.\n", this->name, trans);
    304304  this->transparency = trans;
    305305}
     
    330330void Material::setDiffuseMap(char* dMap)
    331331{
    332   PRINTF(3)("setting Diffuse Map %s\n", dMap);
     332  PRINTF(4)("setting Diffuse Map %s\n", dMap);
    333333  diffuseTexture = new Texture();
    334334  this->diffuseTextureSet = diffuseTexture->loadImage(dMap);
  • orxonox/trunk/src/lib/graphics/importer/model.cc

    r3495 r3548  
    8080Model::~Model(void)
    8181{
    82   PRINTF(3)("Deleting Model ");
     82  PRINTF(4)("Deleting Model ");
    8383  if (this->name)
    8484    {
    85       PRINT(3)("%s\n", this->name);
     85      PRINT(4)("%s\n", this->name);
    8686      delete []this->name;
    8787    }
    8888  else
    89       PRINT(3)("\n");
    90 
    91   PRINTF(3)("Deleting display Lists.\n");
     89      PRINT(4)("\n");
     90
     91  PRINTF(4)("Deleting display Lists.\n");
    9292  Group* walker = this->firstGroup;
    9393  while (walker != NULL)
     
    9999    }
    100100
    101   PRINTF(3)("Deleting Materials.\n");
     101  PRINTF(4)("Deleting Materials.\n");
    102102  if (this->material)
    103103    delete this->material;
     
    122122void Model::draw (void) const
    123123{
    124   PRINTF(2)("drawing the 3D-Models\n");
     124  PRINTF(4)("drawing the 3D-Models\n");
    125125  Group* walker = this->firstGroup;
    126126  while (walker != NULL)
    127127    {
    128       PRINTF(3)("Drawing model %s\n", walker->name);
     128      PRINTF(5)("Drawing model %s\n", walker->name);
    129129      glCallList (walker->listNumber);
    130130      walker = walker->next;
     
    142142  if (groupNumber >= this->groupCount)
    143143    {
    144       PRINTF(1)("You requested model number %i, but this File only contains of %i Models.\n", groupNumber-1, this->groupCount);
     144      PRINTF(2)("You requested model number %i, but this File only contains of %i Models.\n", groupNumber-1, this->groupCount);
    145145      return;
    146146    }
    147   PRINTF(2)("drawing the requested 3D-Models if found.\n");
     147  PRINTF(4)("drawing the requested 3D-Models if found.\n");
    148148  Group* walker = this->firstGroup;
    149149  int counter = 0;
     
    152152      if (counter == groupNumber)
    153153        {
    154           PRINTF(2)("Drawing model number %i named %s\n", counter, walker->name);
     154          PRINTF(4)("Drawing model number %i named %s\n", counter, walker->name);
    155155          glCallList (walker->listNumber);
    156156          return;
     
    159159      walker = walker->next;
    160160    }
    161   PRINTF(1)("Model number %i in %s not Found.\n", groupNumber, this->name);
     161  PRINTF(2)("Model number %i in %s not Found.\n", groupNumber, this->name);
    162162  return;
    163163
     
    172172void Model::draw (char* groupName) const
    173173{
    174   PRINTF(2)("drawing the requested 3D-Models if found.\n");
     174  PRINTF(4)("drawing the requested 3D-Models if found.\n");
    175175  Group* walker = this->firstGroup;
    176176  while (walker != NULL)
     
    178178      if (!strcmp(walker->name, groupName))
    179179        {
    180           PRINTF(2)("Drawing model %s\n", walker->name);
     180          PRINTF(4)("Drawing model %s\n", walker->name);
    181181          glCallList (walker->listNumber);
    182182          return;
     
    184184      walker = walker->next;
    185185    }
    186   PRINTF(1)("Model Named %s in %s not Found.\n", groupName, this->name);
     186  PRINTF(2)("Model Named %s in %s not Found.\n", groupName, this->name);
    187187  return;
    188188}
     
    204204bool Model::initialize (void)
    205205{
    206   PRINTF(2)("new 3D-Model is being created\n");
     206  PRINTF(4)("new 3D-Model is being created\n");
    207207
    208208  this->name = NULL;
     
    243243bool Model::initGroup(Group* group)
    244244{
    245   PRINTF(3)("Adding new Group\n");
     245  PRINTF(4)("Adding new Group\n");
    246246  group->name = "";
    247247  group->faceMode = -1;
     
    277277bool Model::cleanup(void)
    278278{
    279   PRINTF(3)("cleaning up the 3D-Model to save Memory.\n");
     279  PRINTF(4)("cleaning up the 3D-Model to save Memory.\n");
    280280
    281281  if (this->vertices)
     
    296296bool Model::cleanupGroup (Group* group)
    297297{
    298   PRINTF(3)("Cleaning up group\n");
     298  PRINTF(5)("Cleaning up group\n");
    299299  if (group->firstFace != NULL)
    300300    {
     
    314314bool Model::cleanupFace (Face* face)
    315315{
    316   PRINTF(3)("Cleaning up Face\n");
     316  PRINTF(5)("Cleaning up Face\n");
    317317
    318318  if (face->materialString != NULL)
     
    355355bool Model::addGroup (char* groupString)
    356356{
    357   PRINTF(3)("Read Group: %s.\n", groupString);
     357  PRINTF(5)("Read Group: %s.\n", groupString);
    358358  if (this->groupCount != 0 && this->currentGroup->faceCount>0)
    359359    {
     
    384384  float subbuffer3;
    385385  sscanf (vertexString, "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
    386   PRINTF(3)("reading in a vertex: %f %f %f\n", &subbuffer1, &subbuffer2, &subbuffer3);
     386  PRINTF(5)("reading in a vertex: %f %f %f\n", &subbuffer1, &subbuffer2, &subbuffer3);
    387387  this->vertices->addEntry(subbuffer1*scaleFactor, subbuffer2*scaleFactor, subbuffer3*scaleFactor);
    388388  return true;
     
    398398bool Model::addVertex(const float x, const float y, const float z)
    399399{
    400   PRINTF(4)("reading in a vertex: %f %f %f\n", x, y, z);
     400  PRINTF(5)("reading in a vertex: %f %f %f\n", x, y, z);
    401401  this->vertices->addEntry(x*scaleFactor, y*scaleFactor, z*scaleFactor);
    402402  return true;
     
    513513  float subbuffer3;
    514514  sscanf (normalString, "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
    515   PRINTF(3)("found vertex-Normal %f, %f, %f\n", &subbuffer1,&subbuffer2,&subbuffer3);
     515  PRINTF(5)("found vertex-Normal %f, %f, %f\n", &subbuffer1,&subbuffer2,&subbuffer3);
    516516  this->normals->addEntry(subbuffer1, subbuffer2, subbuffer3);
    517517  return true;
     
    544544  float subbuffer2;
    545545  sscanf (vTextureString, "%f %f", &subbuffer1, &subbuffer2);
    546   PRINTF(3)("found vertex-Texture %f, %f\n", &subbuffer1, &subbuffer2);
     546  PRINTF(5)("found vertex-Texture %f, %f\n", &subbuffer1, &subbuffer2);
    547547  this->vTexture->addEntry(subbuffer1);
    548548  this->vTexture->addEntry(subbuffer2);
     
    610610      if ((this->currentGroup->listNumber = glGenLists(1)) == 0)
    611611        {
    612           PRINTF(1)("list could not be created for this Model\n");
     612          PRINTF(2)("glList could not be created for this Model\n");
    613613          return false;
    614614        }
     
    628628                {
    629629                  tmpMat->select();
    630                   PRINTF(2)("using material %s for coming Faces.\n", tmpFace->materialString);
     630                  PRINTF(5)("using material %s for coming Faces.\n", tmpFace->materialString);
    631631                }
    632632              else
    633                 PRINTF(1)("material %s not found.\n", tmpFace->materialString);
     633                PRINTF(2)("material %s not found.\n", tmpFace->materialString);
    634634
    635635
     
    646646             
    647647              this->currentGroup->faceMode = 3;
    648               PRINTF(3)("found triag.\n");
     648              PRINTF(5)("found triag.\n");
    649649            }
    650650         
     
    658658                }
    659659              this->currentGroup->faceMode = 4;
    660               PRINTF(3)("found quad.\n");
     660              PRINTF(5)("found quad.\n");
    661661            }
    662662         
     
    666666                glEnd();
    667667              glBegin(GL_POLYGON);
    668               PRINTF(3)("Polygon with %i faces found.", tmpFace->vertexCount);
     668              PRINTF(5)("Polygon with %i faces found.", tmpFace->vertexCount);
    669669              this->currentGroup->faceMode = tmpFace->vertexCount;
    670670            }
     
    698698bool Model::addGLElement (FaceElement* elem)
    699699{
    700   PRINTF(3)("importing grafical Element to openGL.\n");
     700  PRINTF(5)("importing grafical Element to openGL.\n");
    701701
    702702  if (elem->texCoordNumber != -1)
     
    721721{
    722722 
    723   PRINTF(2)("Normals are being calculated.\n");
     723  PRINTF(4)("Normals are being calculated.\n");
    724724
    725725  Vector* normArray = new Vector [vertices->getCount()/3];
     
    778778    {
    779779      normArray[i].normalize();
    780       PRINTF(3)("Found Normale number %d: (%f; %f, %f).\n", i, normArray[i].x, normArray[i].y, normArray[i].z);
     780      PRINTF(5)("Found Normale number %d: (%f; %f, %f).\n", i, normArray[i].x, normArray[i].y, normArray[i].z);
    781781     
    782782      this->normals->addEntry(normArray[i].x, normArray[i].y, normArray[i].z);
     
    881881        //printf ("%f %f\n", vz, sin (vz));
    882882        if (i==0.0)
    883                   printf("%f, %f\n", j/df*2.0*PI, cos(j/df*PI));
     883          PRINTF(0)("%f, %f\n", j/df*2.0*PI, cos(j/df*PI));
    884884      }
    885885    }
  • orxonox/trunk/src/lib/graphics/importer/objModel.cc

    r3475 r3548  
    8686bool OBJModel::importFile (char* fileName)
    8787{
    88   PRINTF(3)("preparing to read in file: %s\n", fileName);
     88  PRINTF(4)("preparing to read in file: %s\n", fileName);
    8989
    9090
     
    107107  strncpy(this->objPath, fileName, name-fileName);
    108108  this->objPath[name-fileName] = '\0';
    109   if (verbose>=2)
    110     if (strlen(objPath)> 0)
    111       PRINTF(0)("Resolved file %s to folder: %s.\n", name, objPath);
    112     else
    113       PRINTF(0)("Resolved file %s.\n", name);
     109  if (strlen(objPath)> 0)
     110    PRINTF(5)("Resolved file %s to folder: %s.\n", name, objPath);
     111  else
     112    PRINTF(5)("Resolved file %s.\n", name);
    114113 
    115114  this->setName(name);
     
    144143      return false;
    145144    }
    146   PRINTF(2)("Reading from opened file %s\n", fileName);
     145  PRINTF(4)("Reading from opened file %s\n", fileName);
    147146  char Buffer[10000];
    148147  while(!OBJ_FILE->eof())
    149148    {
    150149      OBJ_FILE->getline(Buffer, 10000);
    151       PRINTF(3)("Read input line: %s\n", Buffer);
     150      PRINTF(5)("Read input line: %s\n", Buffer);
    152151     
    153152
     
    192191      else if (!strncmp(Buffer, "s ", 2)) //! \todo smoothing groups have to be implemented
    193192        {
    194           if (verbose >= 2)
    195             PRINTF(2)("smoothing groups not supportet yet. line: %s\n", Buffer);
     193          PRINTF(3)("smoothing groups not supportet yet. line: %s\n", Buffer);
    196194        }
    197195    }
     
    221219 
    222220
    223   PRINTF(3)("Opening mtlFile: %s\n", fileName);
     221  PRINTF(4)("Opening mtlFile: %s\n", fileName);
    224222
    225223  ifstream* MTL_FILE = new ifstream (fileName);
    226224  if (MTL_FILE->fail())
    227225    {
    228       PRINTF(1)("unable to open file: %s\n", fileName);
     226      PRINTF(2)("unable to open file: %s\n", fileName);
    229227      MTL_FILE->close();
    230228      delete []fileName;
     
    237235    {
    238236      MTL_FILE->getline(Buffer, 500);
    239       PRINTF(4)("found line in mtlFile: %s\n", Buffer);
     237      PRINTF(5)("found line in mtlFile: %s\n", Buffer);
    240238     
    241239
  • orxonox/trunk/src/lib/graphics/importer/texture.cc

    r3454 r3548  
    8787  if (pName[0] == '\0')
    8888    {
    89       PRINTF(3)("not Adding empty Path to the List.\n");
     89      PRINTF(2)("not Adding empty Path to the List.\n");
    9090      return;
    9191    }
     
    9999      if (status.st_mode & S_IFDIR)
    100100        {
    101           PRINTF(2)("Adding Path %s to the PathList.\n", pName);
     101          PRINTF(4)("Adding Path %s to the PathList.\n", pName);
    102102          PathList* tmpPathList = this;
    103103          while (tmpPathList->next)
     
    193193bool Texture::loadTexToGL (Image* pImage)
    194194{
    195   PRINTF(2)("Loading texture to OpenGL-Environment.\n");
     195  PRINTF(4)("Loading texture to OpenGL-Environment.\n");
    196196  glGenTextures(1, &this->texture);
    197197  glBindTexture(GL_TEXTURE_2D, this->texture);
     
    229229        pImage->format = GL_RGBA;
    230230         
    231       PRINTF(0)("Bits Per Pixel: %d\n", pImage->bpp);
    232231      if( !IMG_isPNG(SDL_RWFromFile(imgNameWithPath, "rb")) && !IMG_isJPG(SDL_RWFromFile(imgNameWithPath, "rb")))
    233232        for (int i=0;i<map->h * map->w *3;i+=3)
     
    249248  else
    250249    {
    251       PRINTF(1)("Image not Found: %s\n", imgNameWithPath);
     250      PRINTF(2)("Image not Found: %s\n", imgNameWithPath);
    252251      return false;
    253252    }
     
    268267      if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".bmp", 4))
    269268        {
    270           PRINTF(3)("Requested bmp-image. Trying to Import.\n");
     269          PRINTF(4)("Requested bmp-image. Trying to Import.\n");
    271270          return this->loadBMP(imgNameWithPath);
    272271        }
     
    274273      else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".jpg", 4) || !strncmp(imgNameWithPath+strlen(imgNameWithPath)-5, ".jpg", 5))
    275274        {
    276           PRINTF(3)("Requested jpeg-image. Trying to Import\n");
     275          PRINTF(4)("Requested jpeg-image. Trying to Import\n");
    277276          return this->loadJPG(imgNameWithPath);
    278277        }
    279278      else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".tga", 4))
    280279        {
    281           PRINTF(3)("Requested tga-image. Trying to Import\n");
     280          PRINTF(4)("Requested tga-image. Trying to Import\n");
    282281          return this->loadTGA(imgNameWithPath);
    283282        }
    284283      else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".png", 4))
    285284        {
    286           PRINTF(3)("Requested png-image. Trying to Import\n");
     285          PRINTF(4)("Requested png-image. Trying to Import\n");
    287286          return this->loadPNG(imgNameWithPath);
    288287        }
    289288      else
    290289        {
    291           PRINTF(1)("Requested Image was not recognized in its type. (Maybe a type-Cast-error.)\n FileName: %s", imgNameWithPath);
     290          PRINTF(2)("Requested Image was not recognized in its type. (Maybe a type-Cast-error.)\n FileName: %s", imgNameWithPath);
    292291          return false;
    293292        }
     
    295294  else
    296295    {
    297       PRINTF(1)("Image not Found: %s\n", imgNameWithPath);
     296      PRINTF(2)("Image not Found: %s\n", imgNameWithPath);
    298297      return false;
    299298    }
     
    316315  if ((file = fopen(bmpName, "rb"))==NULL)
    317316    {
    318       PRINTF(1)("File Not Found : %s\n",bmpName);
     317      PRINTF(2)("File Not Found : %s\n",bmpName);
    319318      return false;
    320319    }
     
    325324  if ((i = fread(&pImage->width, 4, 1, file)) != 1)
    326325    {
    327       PRINTF(1)("Error reading width from %s.\n", bmpName);
     326      PRINTF(2)("Error reading width from %s.\n", bmpName);
    328327      return false;
    329328    }
     
    331330  if ((i = fread(&pImage->height, 4, 1, file)) != 1)
    332331    {
    333       PRINTF(1)("Error reading height from %s.\n", bmpName);
     332      PRINTF(2)("Error reading height from %s.\n", bmpName);
    334333      return false;
    335334    }
     
    341340  if ((fread(&planes, 2, 1, file)) != 1)
    342341    {
    343       PRINTF(1)("Error reading planes from %s.\n", bmpName);
     342      PRINTF(2)("Error reading planes from %s.\n", bmpName);
    344343      return false;
    345344    }
     
    353352  if ((i = fread(&bpp, 2, 1, file)) != 1)
    354353    {
    355       PRINTF(1)("Error reading bpp from %s.\n", bmpName);
     354      PRINTF(2)("Error reading bpp from %s.\n", bmpName);
    356355      return false;
    357356    }
    358357  if (bpp != 24)
    359358    {
    360       PRINTF(1)("Bpp from %s is not 24: %u\n", bmpName, bpp);
     359      PRINTF(2)("Bpp from %s is not 24: %u\n", bmpName, bpp);
    361360      return false;
    362361    }
     
    369368  if (pImage->data == NULL)
    370369    {
    371       PRINTF(1)("Error allocating memory for color-corrected image data");
     370      PRINTF(2)("Error allocating memory for color-corrected image data");
    372371      return false;     
    373372    }
     
    375374  if ((i = fread(pImage->data, size, 1, file)) != 1)
    376375    {
    377       PRINTF(1)("Error reading image data from %s.\n", bmpName);
     376      PRINTF(2)("Error reading image data from %s.\n", bmpName);
    378377      return false;
    379378    }
     
    418417    {
    419418      // Display an error message saying the file was not found, then return NULL
    420       PRINTF(1)("Unable to load JPG File %s.\n", jpgName);
     419      PRINTF(2)("Unable to load JPG File %s.\n", jpgName);
    421420      return false;
    422421    }
     
    521520  if(fTGA == NULL)
    522521    {
    523       PRINTF(1)("Error could not open texture file: %s\n", tgaName);
     522      PRINTF(2)("Error could not open texture file: %s\n", tgaName);
    524523      return false;
    525524    }
     
    527526  if(fread(&tgaHeader, sizeof(TGAHeader), 1, fTGA) == 0)
    528527    {
    529       PRINTF(1)("Error could not read file header of %s\n", tgaName);
     528      PRINTF(2)("Error could not read file header of %s\n", tgaName);
    530529      if(fTGA != NULL)
    531530        {
     
    549548  else
    550549    {
    551       PRINTF(1)("Error TGA file be type 2 or type 10\n");
     550      PRINTF(2)("Error TGA file be type 2 or type 10\n");
    552551      if (fTGA)
    553552        fclose(fTGA);
     
    576575  if(fread(header, sizeof(header), 1, fTGA) == 0)
    577576    {
    578       PRINTF(1)("Error could not read info header\n");
     577      PRINTF(2)("Error could not read info header\n");
    579578      return false;
    580579    }
     
    586585  if((pImage->width <= 0) || (pImage->height <= 0) || ((pImage->bpp != 24) && (pImage->bpp !=32)))
    587586    {
    588       PRINTF(1)("Error invalid texture information\n");
     587      PRINTF(2)("Error invalid texture information\n");
    589588      return false;
    590589    }
     
    605604  if(pImage->data == NULL)
    606605    {
    607       PRINTF(1)("Error could not allocate memory for image\n");
     606      PRINTF(2)("Error could not allocate memory for image\n");
    608607      return false;
    609608    }
     
    611610  if(fread(pImage->data, 1, imageSize, fTGA) != imageSize)
    612611    {
    613       PRINTF(1)("Error could not read image data\n");
     612      PRINTF(2)("Error could not read image data\n");
    614613      if(pImage->data != NULL)
    615614        {
     
    648647  if(fread(header, sizeof(header), 1, fTGA) == 0)
    649648    {
    650       PRINTF(1)("Error could not read info header\n");
     649      PRINTF(2)("Error could not read info header\n");
    651650      return false;
    652651    }
     
    664663  if((pImage->width <= 0) || (pImage->height <= 0) || ((pImage->bpp != 24) && (pImage->bpp !=32)))
    665664    {
    666       PRINTF(1)("Error Invalid pImage information\n");
     665      PRINTF(2)("Error Invalid pImage information\n");
    667666      return false;
    668667    }
     
    674673  if(pImage->data == NULL)
    675674    {
    676       PRINTF(1)("Error could not allocate memory for image\n");
     675      PRINTF(2)("Error could not allocate memory for image\n");
    677676      return false;
    678677    }
     
    684683      if(fread(&chunkheader, sizeof(GLubyte), 1, fTGA) == 0)
    685684        {
    686           PRINTF(1)("Error could not read RLE header\n");
     685          PRINTF(2)("Error could not read RLE header\n");
    687686          if(pImage->data != NULL)
    688687            {
     
    702701              if(fread(colorbuffer, 1, bytesPerPixel, fTGA) != bytesPerPixel)
    703702                {
    704                   PRINTF(1)("Error could not read image data\n");
     703                  PRINTF(2)("Error could not read image data\n");
    705704                  if(colorbuffer != NULL)
    706705                    {
     
    732731              if(currentpixel > pixelcount)     
    733732                {
    734                   PRINTF(1)("Error too many pixels read\n");
     733                  PRINTF(2)("Error too many pixels read\n");
    735734                  if(colorbuffer != NULL)
    736735                    {
     
    754753          if(fread(colorbuffer, 1, bytesPerPixel, fTGA) != bytesPerPixel) // Attempt to read following color values
    755754            {
    756               PRINTF(1)("Error could not read from file");
     755              PRINTF(2)("Error could not read from file");
    757756              if(colorbuffer != NULL)
    758757                {
     
    785784              if(currentpixel > pixelcount)
    786785                {
    787                   PRINTF(1)("Error too many pixels read\n");
     786                  PRINTF(2)("Error too many pixels read\n");
    788787                  if(colorbuffer != NULL)
    789788                    {
  • orxonox/trunk/src/lib/graphics/importer/texture.h

    r3475 r3548  
    1010#define _TEXTURE_H
    1111
    12 #include "stdincl.h"
     12#include "glincl.h"
     13
     14#include "debug.h"
     15
    1316#ifdef HAVE_SDL_SDL_IMAGE_H
    1417#include <SDL/SDL_image.h>
  • orxonox/trunk/src/orxonox.cc

    r3546 r3548  
    3131#include "game_loader.h"
    3232#include <string.h>
    33 int verbose = 2;
     33int verbose = 3;
    3434
    3535using namespace std;
  • orxonox/trunk/src/story_entities/world.cc

    r3546 r3548  
    701701      // Draw
    702702      this->display ();
     703
     704      (TrackNode::getInstance()->getAbsCoor() - localPlayer->getAbsCoor()).debug();
    703705 
    704706      for( int i = 0; i < 5000000; i++) {}
Note: See TracChangeset for help on using the changeset viewer.