Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3120 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Dec 7, 2004, 12:34:57 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/images: efficiency fixes

Location:
orxonox/branches/images/importer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/images/importer/framework.cc

    r3115 r3120  
    11#include "framework.h"
    22
    3 int verbose = 2;
     3int verbose = 4;
    44
    55void DrawGLScene()
  • orxonox/branches/images/importer/material.cc

    r3119 r3120  
    387387    {
    388388      printf("IMG_Load: %s\n", IMG_GetError());
     389      return false;
    389390    }
    390391  pImage->height = map->h;
  • orxonox/branches/images/importer/object.cc

    r3119 r3120  
    219219  if (verbose >= 2)
    220220    printf("Adding new Group\n");
    221   group->name = "";
     221  group->name = NULL;
    222222  group->faceMode = -1;
    223223  group->faceCount = 0; 
     
    370370{
    371371  char* fileName = new char [strlen(objPath)+strlen(objFileName)+1];
    372   fileName[0]='\0';
    373372  if (objFileName != NULL && !strcmp(objFileName, ""))
    374373    return false;
    375   strcat(fileName, objPath);
     374  strcpy(fileName, objPath);
    376375  strcat(fileName, objFileName);
    377376
     
    381380      if (verbose >=1)
    382381        printf ("unable to open .OBJ file: %s\n Loading Box Object instead.\n", fileName);
    383       exit(0);
    384382      BoxObject();
     383      delete []fileName;
    385384      return false;
    386385    }
     
    440439    }
    441440  OBJ_FILE->close();
     441  delete []fileName;
    442442  return true;
    443443
     
    452452bool Object::readGroup (char* groupString)
    453453{
     454  if (verbose >=3)
     455    printf ("Read Group: %s.\n", groupString);
    454456  // setting the group name if not default.
    455457  if (strcmp(currentGroup->name, "default"))
     
    464466      initGroup(currentGroup);
    465467    }
    466 
    467468  ++groupCount;
    468469
     
    593594  strcpy(mtlFileName, mtlFile);
    594595  char* fileName = new char [strlen(objPath) + strlen(mtlFileName)+1];
    595   fileName[0] = '\0';
    596   strcat(fileName, objPath);
     596  strcpy(fileName, objPath);
    597597  strcat(fileName, mtlFileName);
    598598 
     
    606606      if (verbose >= 1)
    607607        printf ("unable to open file: %s\n", fileName);
     608      delete []fileName;
    608609      return false;
    609610    }
     
    678679
    679680    }
     681  delete []fileName;
    680682  return true;
    681683}
     
    687689bool Object::readUseMtl (char* matString)
    688690{
    689   if (!strcmp (mtlFileName, ""))
     691  if (mtlFileName)
    690692    {
    691693      if (verbose >= 1)
Note: See TracChangeset for help on using the changeset viewer.