Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 18, 2005, 11:52:15 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: merged trunk back to levelloader
merged with command:
svn merge -r 3499:HEAD trunk branches/levelloader

Conflicts in
C track_manager.h
C world_entities/player.cc
C world_entities/player.h
C world_entities/environment.h
C lib/coord/p_node.cc
C defs/debug.h
C track_manager.cc
C story_entities/campaign.h

solved in merge-favouring. It was quite easy because Chris only worked on the headers, and he didi it quite clean. Thats the spirit :)

Conflits in world.cc are a MESS: fix it

Location:
orxonox/branches/levelloader/src/lib/graphics/importer
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelloader/src/lib/graphics/importer/Makefile.in

    r3563 r3605  
    1 # Makefile.in generated by automake 1.8.2 from Makefile.am.
     1# Makefile.in generated by automake 1.8.5 from Makefile.am.
    22# @configure_input@
    33
     
    4242subdir = src/lib/graphics/importer
    4343DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
    44         $(srcdir)/Makefile.in TODO
     44        $(srcdir)/Makefile.in
    4545ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    4646am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     
    5050CONFIG_HEADER = $(top_builddir)/config.h
    5151CONFIG_CLEAN_FILES =
    52 am__installdirs = $(DESTDIR)$(bindir)
     52am__installdirs = "$(DESTDIR)$(bindir)"
    5353binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
    5454PROGRAMS = $(bin_PROGRAMS)
     
    9898DEFS = @DEFS@
    9999DEPDIR = @DEPDIR@
     100DOCUMENTATION_FALSE = @DOCUMENTATION_FALSE@
     101DOCUMENTATION_TRUE = @DOCUMENTATION_TRUE@
    100102DOXYGEN = @DOXYGEN@
    101103DOXYGEN_FALSE = @DOXYGEN_FALSE@
     
    215217          esac; \
    216218        done; \
    217         echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile'; \
     219        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile'; \
    218220        cd $(top_srcdir) && \
    219           $(AUTOMAKE) --gnu  src/lib/graphics/importer/Makefile
     221          $(AUTOMAKE) --foreign  src/lib/graphics/importer/Makefile
    220222.PRECIOUS: Makefile
    221223Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    237239install-binPROGRAMS: $(bin_PROGRAMS)
    238240        @$(NORMAL_INSTALL)
    239         $(mkdir_p) $(DESTDIR)$(bindir)
     241        test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
    240242        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    241243          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
     
    243245          ; then \
    244246            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
    245            echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
    246            $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
     247           echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
     248           $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
    247249          else :; fi; \
    248250        done
     
    252254        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    253255          f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
    254           echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
    255           rm -f $(DESTDIR)$(bindir)/$$f; \
     256          echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
     257          rm -f "$(DESTDIR)$(bindir)/$$f"; \
    256258        done
    257259
     
    330332          $(AWK) '    { files[$$0] = 1; } \
    331333               END { for (i in files) print i; }'`; \
    332         test -z "$(ETAGS_ARGS)$$tags$$unique" \
    333           || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    334              $$tags $$unique
     334        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
     335          test -n "$$unique" || unique=$$empty_fix; \
     336          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     337            $$tags $$unique; \
     338        fi
    335339ctags: CTAGS
    336340CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     
    387391all-am: Makefile $(PROGRAMS) $(HEADERS)
    388392installdirs:
    389         $(mkdir_p) $(DESTDIR)$(bindir)
     393        for dir in "$(DESTDIR)$(bindir)"; do \
     394          test -z "$$dir" || $(mkdir_p) "$$dir"; \
     395        done
    390396install: install-am
    391397install-exec: install-exec-am
  • orxonox/branches/levelloader/src/lib/graphics/importer/array.cc

    r3499 r3605  
    1313   co-programmer: ...
    1414*/
     15
     16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER
    1517
    1618#include "array.h"
     
    3032Array::~Array()
    3133{
    32   PRINTF(2)("deleting array\n");
     34  PRINTF(4)("deleting array\n");
    3335  Entry* walker = this->firstEntry;
    3436  Entry* previous;
     
    4951void Array::initializeArray ()
    5052{
    51   PRINTF(2)("crating new Array\n");
     53  PRINTF(4)("crating new Array\n");
    5254  this->firstEntry = new Entry;
    5355  this->firstEntry->next =NULL;
     
    6466void Array::finalizeArray (void)
    6567{
    66   PRINTF(3)("Finalizing array. Length: %i\n", entryCount); 
     68  PRINTF(4)("Finalizing array. Length: %i\n", entryCount); 
    6769  //  if ((array = (GLfloat*)malloc( entryCount* sizeof(GLfloat))) == NULL)
    6870  if (!(this->array = new GLfloat [this->entryCount]))
     
    8789  if (!this->finalized)
    8890    {
    89       PRINTF(3)("adding new Entry to Array: %f\n", entry);
     91      PRINTF(5)("adding new Entry to Array: %f\n", entry);
    9092     
    9193      this->currentEntry->value = entry;
     
    9698    }
    9799  else
    98     PRINTF(1)("adding failed, because list has been finalized\n");
     100    PRINTF(2)("adding failed, because list has been finalized\n");
    99101}
    100102
     
    131133void Array::debug ()
    132134{
    133   PRINTF(0)("entryCount=%i, address=%p\n", this->entryCount, this->array);
     135  PRINT(0)("entryCount=%i, address=%p\n", this->entryCount, this->array);
    134136}
  • orxonox/branches/levelloader/src/lib/graphics/importer/array.h

    r3499 r3605  
    88#ifndef _ARRAY_H
    99#define _ARRAY_H
    10 
    11 extern int verbose; //!< will be obsolete soon
    1210
    1311#include "stdincl.h"
  • orxonox/branches/levelloader/src/lib/graphics/importer/material.cc

    r3499 r3605  
    1515*/
    1616
     17#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER
     18
    1719#include "material.h"
    1820
    1921#include "texture.h"
     22#include "debug.h"
    2023#include <stdlib.h>
    2124#include <string.h>
     
    5154Material::~Material()
    5255{
    53   PRINTF(2)("delete Material %s.\n", this->name);
     56  PRINTF(4)("delete Material %s.\n", this->name);
    5457  if (this->name)
    5558    delete []this->name;
     
    6770Material* Material::addMaterial(char* mtlName)
    6871{
    69   PRINTF(2)("adding Material %s.\n", mtlName);
     72  PRINTF(4)("adding Material %s.\n", mtlName);
    7073   Material* tmpMat = this;
    7174  while (tmpMat->nextMat != NULL)
     
    8386void Material::init(void)
    8487{
    85   PRINTF(2)("initializing new Material.\n");
     88  PRINTF(4)("initializing new Material.\n");
    8689  this->nextMat = NULL;
    8790  this->name ="";
     
    112115Material* Material::search(char* mtlName)
    113116{
    114   PRINTF(2)("Searching for material %s", mtlName);
     117  PRINTF(5)("Searching for material %s", mtlName);
    115118  Material* searcher = this;
    116119  while (searcher != NULL)
    117120    {
    118       PRINT(2)(".");
     121      PRINT(5)(".");
    119122      if (!strcmp (searcher->getName(), mtlName))
    120123        {
    121           PRINT(2)("found.\n");
     124          PRINT(5)("found.\n");
    122125          return searcher;
    123126        }
    124127      searcher = searcher->nextMat;
    125128    }
    126   PRINT(2)("not found\n");
     129  PRINT(2)("material %s not found\n", mtlName);
    127130  return NULL;
    128131}
     
    153156
    154157  if (this->diffuseTextureSet)
    155     glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture());
     158    {
     159      glEnable(GL_TEXTURE_2D);
     160      glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture());
     161    }
    156162  else
    157     glBindTexture(GL_TEXTURE_2D, 0);
    158  
     163    {
     164      glDisable(GL_TEXTURE_2D);
     165      glBindTexture(GL_TEXTURE_2D, 0);
     166    }
    159167}
    160168
     
    166174void Material::setName (char* mtlName)
    167175{
    168   PRINTF(3)("setting Material Name to %s.\n", this->name);
     176  PRINTF(4)("setting Material Name to %s.\n", this->name);
    169177  this->name = new char [strlen(mtlName)+1];
    170178  strcpy(this->name, mtlName);
     
    185193void Material::setIllum (int illum)
    186194{
    187   PRINTF(3)("setting illumModel of Material %s to %i\n", this->name, illum);
     195  PRINTF(4)("setting illumModel of Material %s to %i\n", this->name, illum);
    188196  this->illumModel = illum;
    189   //  PRINTF(3)("setting illumModel to: %i\n", illumModel);
    190197}
    191198/**
     
    205212void Material::setDiffuse (float r, float g, float b)
    206213{
    207   PRINTF(3)("setting Diffuse Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
     214  PRINTF(4)("setting Diffuse Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
    208215  this->diffuse[0] = r;
    209216  this->diffuse[1] = g;
     
    231238void Material::setAmbient (float r, float g, float b)
    232239{
    233   PRINTF(3)("setting Ambient Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
     240  PRINTF(4)("setting Ambient Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
    234241  this->ambient[0] = r;
    235242  this->ambient[1] = g;
     
    256263void Material::setSpecular (float r, float g, float b)
    257264{
    258   PRINTF(3)("setting Specular Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
     265  PRINTF(4)("setting Specular Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
    259266  this->specular[0] = r;
    260267  this->specular[1] = g;
     
    296303void Material::setTransparency (float trans)
    297304{
    298   PRINTF(3)("setting Transparency of Material %s to %f.\n", this->name, trans);
     305  PRINTF(4)("setting Transparency of Material %s to %f.\n", this->name, trans);
    299306  this->transparency = trans;
    300307}
     
    325332void Material::setDiffuseMap(char* dMap)
    326333{
    327   PRINTF(3)("setting Diffuse Map %s\n", dMap);
     334  PRINTF(4)("setting Diffuse Map %s\n", dMap);
    328335  diffuseTexture = new Texture();
    329336  this->diffuseTextureSet = diffuseTexture->loadImage(dMap);
  • orxonox/branches/levelloader/src/lib/graphics/importer/material.h

    r3499 r3605  
    99#define _MATERIAL_H
    1010
    11 
    12 
    13 extern int verbose; //!< will be obsolete soon.
    1411
    1512#if HAVE_CONFIG_H
  • orxonox/branches/levelloader/src/lib/graphics/importer/model.cc

    r3499 r3605  
    1313   co-programmer: ...
    1414*/
     15
     16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER
    1517
    1618#include "model.h"
     
    8082Model::~Model(void)
    8183{
    82   PRINTF(3)("Deleting Model ");
     84  PRINTF(4)("Deleting Model ");
    8385  if (this->name)
    8486    {
    85       PRINT(3)("%s\n", this->name);
     87      PRINT(4)("%s\n", this->name);
    8688      delete []this->name;
    8789    }
    8890  else
    89       PRINT(3)("\n");
    90 
    91   PRINTF(3)("Deleting display Lists.\n");
     91      PRINT(4)("\n");
     92
     93  PRINTF(4)("Deleting display Lists.\n");
    9294  Group* walker = this->firstGroup;
    9395  while (walker != NULL)
     
    99101    }
    100102
    101   PRINTF(3)("Deleting Materials.\n");
     103  PRINTF(4)("Deleting Materials.\n");
    102104  if (this->material)
    103105    delete this->material;
     
    122124void Model::draw (void) const
    123125{
    124   PRINTF(2)("drawing the 3D-Models\n");
     126  PRINTF(4)("drawing the 3D-Models\n");
    125127  Group* walker = this->firstGroup;
    126128  while (walker != NULL)
    127129    {
    128       PRINTF(3)("Drawing model %s\n", walker->name);
     130      PRINTF(5)("Drawing model %s\n", walker->name);
    129131      glCallList (walker->listNumber);
    130132      walker = walker->next;
     
    142144  if (groupNumber >= this->groupCount)
    143145    {
    144       PRINTF(1)("You requested model number %i, but this File only contains of %i Models.\n", groupNumber-1, this->groupCount);
     146      PRINTF(2)("You requested model number %i, but this File only contains of %i Models.\n", groupNumber-1, this->groupCount);
    145147      return;
    146148    }
    147   PRINTF(2)("drawing the requested 3D-Models if found.\n");
     149  PRINTF(4)("drawing the requested 3D-Models if found.\n");
    148150  Group* walker = this->firstGroup;
    149151  int counter = 0;
     
    152154      if (counter == groupNumber)
    153155        {
    154           PRINTF(2)("Drawing model number %i named %s\n", counter, walker->name);
     156          PRINTF(4)("Drawing model number %i named %s\n", counter, walker->name);
    155157          glCallList (walker->listNumber);
    156158          return;
     
    159161      walker = walker->next;
    160162    }
    161   PRINTF(1)("Model number %i in %s not Found.\n", groupNumber, this->name);
     163  PRINTF(2)("Model number %i in %s not Found.\n", groupNumber, this->name);
    162164  return;
    163165
     
    172174void Model::draw (char* groupName) const
    173175{
    174   PRINTF(2)("drawing the requested 3D-Models if found.\n");
     176  PRINTF(4)("drawing the requested 3D-Models if found.\n");
    175177  Group* walker = this->firstGroup;
    176178  while (walker != NULL)
     
    178180      if (!strcmp(walker->name, groupName))
    179181        {
    180           PRINTF(2)("Drawing model %s\n", walker->name);
     182          PRINTF(4)("Drawing model %s\n", walker->name);
    181183          glCallList (walker->listNumber);
    182184          return;
     
    184186      walker = walker->next;
    185187    }
    186   PRINTF(1)("Model Named %s in %s not Found.\n", groupName, this->name);
     188  PRINTF(2)("Model Named %s in %s not Found.\n", groupName, this->name);
    187189  return;
    188190}
     
    204206bool Model::initialize (void)
    205207{
    206   PRINTF(2)("new 3D-Model is being created\n");
     208  PRINTF(4)("new 3D-Model is being created\n");
    207209
    208210  this->name = NULL;
     
    243245bool Model::initGroup(Group* group)
    244246{
    245   PRINTF(3)("Adding new Group\n");
     247  PRINTF(4)("Adding new Group\n");
    246248  group->name = "";
    247249  group->faceMode = -1;
     
    277279bool Model::cleanup(void)
    278280{
    279   PRINTF(3)("cleaning up the 3D-Model to save Memory.\n");
     281  PRINTF(4)("cleaning up the 3D-Model to save Memory.\n");
    280282
    281283  if (this->vertices)
     
    296298bool Model::cleanupGroup (Group* group)
    297299{
    298   PRINTF(3)("Cleaning up group\n");
     300  PRINTF(5)("Cleaning up group\n");
    299301  if (group->firstFace != NULL)
    300302    {
     
    314316bool Model::cleanupFace (Face* face)
    315317{
    316   PRINTF(3)("Cleaning up Face\n");
     318  PRINTF(5)("Cleaning up Face\n");
    317319
    318320  if (face->materialString != NULL)
     
    355357bool Model::addGroup (char* groupString)
    356358{
    357   PRINTF(3)("Read Group: %s.\n", groupString);
     359  PRINTF(5)("Read Group: %s.\n", groupString);
    358360  if (this->groupCount != 0 && this->currentGroup->faceCount>0)
    359361    {
     
    384386  float subbuffer3;
    385387  sscanf (vertexString, "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
    386   PRINTF(3)("reading in a vertex: %f %f %f\n", &subbuffer1, &subbuffer2, &subbuffer3);
     388  PRINTF(5)("reading in a vertex: %f %f %f\n", &subbuffer1, &subbuffer2, &subbuffer3);
    387389  this->vertices->addEntry(subbuffer1*scaleFactor, subbuffer2*scaleFactor, subbuffer3*scaleFactor);
    388390  return true;
     
    398400bool Model::addVertex(const float x, const float y, const float z)
    399401{
    400   PRINTF(4)("reading in a vertex: %f %f %f\n", x, y, z);
     402  PRINTF(5)("reading in a vertex: %f %f %f\n", x, y, z);
    401403  this->vertices->addEntry(x*scaleFactor, y*scaleFactor, z*scaleFactor);
    402404  return true;
     
    513515  float subbuffer3;
    514516  sscanf (normalString, "%f %f %f", &subbuffer1, &subbuffer2, &subbuffer3);
    515   PRINTF(3)("found vertex-Normal %f, %f, %f\n", &subbuffer1,&subbuffer2,&subbuffer3);
     517  PRINTF(5)("found vertex-Normal %f, %f, %f\n", &subbuffer1,&subbuffer2,&subbuffer3);
    516518  this->normals->addEntry(subbuffer1, subbuffer2, subbuffer3);
    517519  return true;
     
    544546  float subbuffer2;
    545547  sscanf (vTextureString, "%f %f", &subbuffer1, &subbuffer2);
    546   PRINTF(3)("found vertex-Texture %f, %f\n", &subbuffer1, &subbuffer2);
     548  PRINTF(5)("found vertex-Texture %f, %f\n", &subbuffer1, &subbuffer2);
    547549  this->vTexture->addEntry(subbuffer1);
    548550  this->vTexture->addEntry(subbuffer2);
     
    610612      if ((this->currentGroup->listNumber = glGenLists(1)) == 0)
    611613        {
    612           PRINTF(1)("list could not be created for this Model\n");
     614          PRINTF(2)("glList could not be created for this Model\n");
    613615          return false;
    614616        }
     
    628630                {
    629631                  tmpMat->select();
    630                   PRINTF(2)("using material %s for coming Faces.\n", tmpFace->materialString);
     632                  PRINTF(5)("using material %s for coming Faces.\n", tmpFace->materialString);
    631633                }
    632634              else
    633                 PRINTF(1)("material %s not found.\n", tmpFace->materialString);
     635                PRINTF(2)("material %s not found.\n", tmpFace->materialString);
    634636
    635637
     
    646648             
    647649              this->currentGroup->faceMode = 3;
    648               PRINTF(3)("found triag.\n");
     650              PRINTF(5)("found triag.\n");
    649651            }
    650652         
     
    658660                }
    659661              this->currentGroup->faceMode = 4;
    660               PRINTF(3)("found quad.\n");
     662              PRINTF(5)("found quad.\n");
    661663            }
    662664         
     
    666668                glEnd();
    667669              glBegin(GL_POLYGON);
    668               PRINTF(3)("Polygon with %i faces found.", tmpFace->vertexCount);
     670              PRINTF(5)("Polygon with %i faces found.", tmpFace->vertexCount);
    669671              this->currentGroup->faceMode = tmpFace->vertexCount;
    670672            }
     
    698700bool Model::addGLElement (FaceElement* elem)
    699701{
    700   PRINTF(3)("importing grafical Element to openGL.\n");
     702  PRINTF(5)("importing grafical Element to openGL.\n");
    701703
    702704  if (elem->texCoordNumber != -1)
     
    721723{
    722724 
    723   PRINTF(2)("Normals are being calculated.\n");
     725  PRINTF(4)("Normals are being calculated.\n");
    724726
    725727  Vector* normArray = new Vector [vertices->getCount()/3];
     
    778780    {
    779781      normArray[i].normalize();
    780       PRINTF(3)("Found Normale number %d: (%f; %f, %f).\n", i, normArray[i].x, normArray[i].y, normArray[i].z);
     782      PRINTF(5)("Found Normale number %d: (%f; %f, %f).\n", i, normArray[i].x, normArray[i].y, normArray[i].z);
    781783     
    782784      this->normals->addEntry(normArray[i].x, normArray[i].y, normArray[i].z);
     
    881883        //printf ("%f %f\n", vz, sin (vz));
    882884        if (i==0.0)
    883                   printf("%f, %f\n", j/df*2.0*PI, cos(j/df*PI));
     885          PRINTF(0)("%f, %f\n", j/df*2.0*PI, cos(j/df*PI));
    884886      }
    885887    }
  • orxonox/branches/levelloader/src/lib/graphics/importer/objModel.cc

    r3542 r3605  
    1313   co-programmer: ...
    1414*/
     15
     16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER
    1517
    1618#include "objModel.h"
     
    8688bool OBJModel::importFile (const char* fileName)
    8789{
    88   PRINTF(3)("preparing to read in file: %s\n", fileName);
     90  PRINTF(4)("preparing to read in file: %s\n", fileName);
    8991
    9092
     
    107109  strncpy(this->objPath, fileName, name-fileName);
    108110  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);
     111  if (strlen(objPath)> 0)
     112    PRINTF(5)("Resolved file %s to folder: %s.\n", name, objPath);
     113  else
     114    PRINTF(5)("Resolved file %s.\n", name);
    114115 
    115116  this->setName(name);
     
    144145      return false;
    145146    }
    146   PRINTF(2)("Reading from opened file %s\n", fileName);
     147  PRINTF(4)("Reading from opened file %s\n", fileName);
    147148  char Buffer[10000];
    148149  while(!OBJ_FILE->eof())
    149150    {
    150151      OBJ_FILE->getline(Buffer, 10000);
    151       PRINTF(3)("Read input line: %s\n", Buffer);
     152      PRINTF(5)("Read input line: %s\n", Buffer);
    152153     
    153154
     
    192193      else if (!strncmp(Buffer, "s ", 2)) //! \todo smoothing groups have to be implemented
    193194        {
    194           if (verbose >= 2)
    195             PRINTF(2)("smoothing groups not supportet yet. line: %s\n", Buffer);
     195          PRINTF(3)("smoothing groups not supportet yet. line: %s\n", Buffer);
    196196        }
    197197    }
     
    221221 
    222222
    223   PRINTF(3)("Opening mtlFile: %s\n", fileName);
     223  PRINTF(4)("Opening mtlFile: %s\n", fileName);
    224224
    225225  ifstream* MTL_FILE = new ifstream (fileName);
    226226  if (MTL_FILE->fail())
    227227    {
    228       PRINTF(1)("unable to open file: %s\n", fileName);
     228      PRINTF(2)("unable to open file: %s\n", fileName);
    229229      MTL_FILE->close();
    230230      delete []fileName;
     
    237237    {
    238238      MTL_FILE->getline(Buffer, 500);
    239       PRINTF(4)("found line in mtlFile: %s\n", Buffer);
     239      PRINTF(5)("found line in mtlFile: %s\n", Buffer);
    240240     
    241241
  • orxonox/branches/levelloader/src/lib/graphics/importer/texture.cc

    r3499 r3605  
    1717*/
    1818
     19
     20#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_IMPORTER
    1921
    2022#include "texture.h"
     
    8789  if (pName[0] == '\0')
    8890    {
    89       PRINTF(3)("not Adding empty Path to the List.\n");
     91      PRINTF(2)("not Adding empty Path to the List.\n");
    9092      return;
    9193    }
     
    99101      if (status.st_mode & S_IFDIR)
    100102        {
    101           PRINTF(2)("Adding Path %s to the PathList.\n", pName);
     103          PRINTF(4)("Adding Path %s to the PathList.\n", pName);
    102104          PathList* tmpPathList = this;
    103105          while (tmpPathList->next)
     
    193195bool Texture::loadTexToGL (Image* pImage)
    194196{
    195   PRINTF(2)("Loading texture to OpenGL-Environment.\n");
     197  PRINTF(4)("Loading texture to OpenGL-Environment.\n");
    196198  glGenTextures(1, &this->texture);
    197199  glBindTexture(GL_TEXTURE_2D, this->texture);
     
    229231        pImage->format = GL_RGBA;
    230232         
    231       PRINTF(0)("Bits Per Pixel: %d\n", pImage->bpp);
    232233      if( !IMG_isPNG(SDL_RWFromFile(imgNameWithPath, "rb")) && !IMG_isJPG(SDL_RWFromFile(imgNameWithPath, "rb")))
    233234        for (int i=0;i<map->h * map->w *3;i+=3)
     
    249250  else
    250251    {
    251       PRINTF(1)("Image not Found: %s\n", imgNameWithPath);
     252      PRINTF(2)("Image not Found: %s\n", imgNameWithPath);
    252253      return false;
    253254    }
     
    268269      if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".bmp", 4))
    269270        {
    270           PRINTF(3)("Requested bmp-image. Trying to Import.\n");
     271          PRINTF(4)("Requested bmp-image. Trying to Import.\n");
    271272          return this->loadBMP(imgNameWithPath);
    272273        }
     
    274275      else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".jpg", 4) || !strncmp(imgNameWithPath+strlen(imgNameWithPath)-5, ".jpg", 5))
    275276        {
    276           PRINTF(3)("Requested jpeg-image. Trying to Import\n");
     277          PRINTF(4)("Requested jpeg-image. Trying to Import\n");
    277278          return this->loadJPG(imgNameWithPath);
    278279        }
    279280      else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".tga", 4))
    280281        {
    281           PRINTF(3)("Requested tga-image. Trying to Import\n");
     282          PRINTF(4)("Requested tga-image. Trying to Import\n");
    282283          return this->loadTGA(imgNameWithPath);
    283284        }
    284285      else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".png", 4))
    285286        {
    286           PRINTF(3)("Requested png-image. Trying to Import\n");
     287          PRINTF(4)("Requested png-image. Trying to Import\n");
    287288          return this->loadPNG(imgNameWithPath);
    288289        }
    289290      else
    290291        {
    291           PRINTF(1)("Requested Image was not recognized in its type. (Maybe a type-Cast-error.)\n FileName: %s", imgNameWithPath);
     292          PRINTF(2)("Requested Image was not recognized in its type. (Maybe a type-Cast-error.)\n FileName: %s", imgNameWithPath);
    292293          return false;
    293294        }
     
    295296  else
    296297    {
    297       PRINTF(1)("Image not Found: %s\n", imgNameWithPath);
     298      PRINTF(2)("Image not Found: %s\n", imgNameWithPath);
    298299      return false;
    299300    }
     
    316317  if ((file = fopen(bmpName, "rb"))==NULL)
    317318    {
    318       PRINTF(1)("File Not Found : %s\n",bmpName);
     319      PRINTF(2)("File Not Found : %s\n",bmpName);
    319320      return false;
    320321    }
     
    325326  if ((i = fread(&pImage->width, 4, 1, file)) != 1)
    326327    {
    327       PRINTF(1)("Error reading width from %s.\n", bmpName);
     328      PRINTF(2)("Error reading width from %s.\n", bmpName);
    328329      return false;
    329330    }
     
    331332  if ((i = fread(&pImage->height, 4, 1, file)) != 1)
    332333    {
    333       PRINTF(1)("Error reading height from %s.\n", bmpName);
     334      PRINTF(2)("Error reading height from %s.\n", bmpName);
    334335      return false;
    335336    }
     
    341342  if ((fread(&planes, 2, 1, file)) != 1)
    342343    {
    343       PRINTF(1)("Error reading planes from %s.\n", bmpName);
     344      PRINTF(2)("Error reading planes from %s.\n", bmpName);
    344345      return false;
    345346    }
     
    353354  if ((i = fread(&bpp, 2, 1, file)) != 1)
    354355    {
    355       PRINTF(1)("Error reading bpp from %s.\n", bmpName);
     356      PRINTF(2)("Error reading bpp from %s.\n", bmpName);
    356357      return false;
    357358    }
    358359  if (bpp != 24)
    359360    {
    360       PRINTF(1)("Bpp from %s is not 24: %u\n", bmpName, bpp);
     361      PRINTF(2)("Bpp from %s is not 24: %u\n", bmpName, bpp);
    361362      return false;
    362363    }
     
    369370  if (pImage->data == NULL)
    370371    {
    371       PRINTF(1)("Error allocating memory for color-corrected image data");
     372      PRINTF(2)("Error allocating memory for color-corrected image data");
    372373      return false;     
    373374    }
     
    375376  if ((i = fread(pImage->data, size, 1, file)) != 1)
    376377    {
    377       PRINTF(1)("Error reading image data from %s.\n", bmpName);
     378      PRINTF(2)("Error reading image data from %s.\n", bmpName);
    378379      return false;
    379380    }
     
    418419    {
    419420      // Display an error message saying the file was not found, then return NULL
    420       PRINTF(1)("Unable to load JPG File %s.\n", jpgName);
     421      PRINTF(2)("Unable to load JPG File %s.\n", jpgName);
    421422      return false;
    422423    }
     
    521522  if(fTGA == NULL)
    522523    {
    523       PRINTF(1)("Error could not open texture file: %s\n", tgaName);
     524      PRINTF(2)("Error could not open texture file: %s\n", tgaName);
    524525      return false;
    525526    }
     
    527528  if(fread(&tgaHeader, sizeof(TGAHeader), 1, fTGA) == 0)
    528529    {
    529       PRINTF(1)("Error could not read file header of %s\n", tgaName);
     530      PRINTF(2)("Error could not read file header of %s\n", tgaName);
    530531      if(fTGA != NULL)
    531532        {
     
    549550  else
    550551    {
    551       PRINTF(1)("Error TGA file be type 2 or type 10\n");
     552      PRINTF(2)("Error TGA file be type 2 or type 10\n");
    552553      if (fTGA)
    553554        fclose(fTGA);
     
    576577  if(fread(header, sizeof(header), 1, fTGA) == 0)
    577578    {
    578       PRINTF(1)("Error could not read info header\n");
     579      PRINTF(2)("Error could not read info header\n");
    579580      return false;
    580581    }
     
    586587  if((pImage->width <= 0) || (pImage->height <= 0) || ((pImage->bpp != 24) && (pImage->bpp !=32)))
    587588    {
    588       PRINTF(1)("Error invalid texture information\n");
     589      PRINTF(2)("Error invalid texture information\n");
    589590      return false;
    590591    }
     
    605606  if(pImage->data == NULL)
    606607    {
    607       PRINTF(1)("Error could not allocate memory for image\n");
     608      PRINTF(2)("Error could not allocate memory for image\n");
    608609      return false;
    609610    }
     
    611612  if(fread(pImage->data, 1, imageSize, fTGA) != imageSize)
    612613    {
    613       PRINTF(1)("Error could not read image data\n");
     614      PRINTF(2)("Error could not read image data\n");
    614615      if(pImage->data != NULL)
    615616        {
     
    648649  if(fread(header, sizeof(header), 1, fTGA) == 0)
    649650    {
    650       PRINTF(1)("Error could not read info header\n");
     651      PRINTF(2)("Error could not read info header\n");
    651652      return false;
    652653    }
     
    664665  if((pImage->width <= 0) || (pImage->height <= 0) || ((pImage->bpp != 24) && (pImage->bpp !=32)))
    665666    {
    666       PRINTF(1)("Error Invalid pImage information\n");
     667      PRINTF(2)("Error Invalid pImage information\n");
    667668      return false;
    668669    }
     
    674675  if(pImage->data == NULL)
    675676    {
    676       PRINTF(1)("Error could not allocate memory for image\n");
     677      PRINTF(2)("Error could not allocate memory for image\n");
    677678      return false;
    678679    }
     
    684685      if(fread(&chunkheader, sizeof(GLubyte), 1, fTGA) == 0)
    685686        {
    686           PRINTF(1)("Error could not read RLE header\n");
     687          PRINTF(2)("Error could not read RLE header\n");
    687688          if(pImage->data != NULL)
    688689            {
     
    702703              if(fread(colorbuffer, 1, bytesPerPixel, fTGA) != bytesPerPixel)
    703704                {
    704                   PRINTF(1)("Error could not read image data\n");
     705                  PRINTF(2)("Error could not read image data\n");
    705706                  if(colorbuffer != NULL)
    706707                    {
     
    732733              if(currentpixel > pixelcount)     
    733734                {
    734                   PRINTF(1)("Error too many pixels read\n");
     735                  PRINTF(2)("Error too many pixels read\n");
    735736                  if(colorbuffer != NULL)
    736737                    {
     
    754755          if(fread(colorbuffer, 1, bytesPerPixel, fTGA) != bytesPerPixel) // Attempt to read following color values
    755756            {
    756               PRINTF(1)("Error could not read from file");
     757              PRINTF(2)("Error could not read from file");
    757758              if(colorbuffer != NULL)
    758759                {
     
    785786              if(currentpixel > pixelcount)
    786787                {
    787                   PRINTF(1)("Error too many pixels read\n");
     788                  PRINTF(2)("Error too many pixels read\n");
    788789                  if(colorbuffer != NULL)
    789790                    {
  • orxonox/branches/levelloader/src/lib/graphics/importer/texture.h

    r3499 r3605  
    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/branches/levelloader/src/lib/graphics/importer/windowHandler.h

    r3499 r3605  
    77#ifndef _WINDOWHANDLER_H
    88#define _WINDOWHANDLER_H
    9 
    10 extern int verbose;
    119
    1210#include "stdincl.h"
Note: See TracChangeset for help on using the changeset viewer.