Changeset 3120 in orxonox.OLD for orxonox/branches
- Timestamp:
- Dec 7, 2004, 12:34:57 AM (20 years ago)
- Location:
- orxonox/branches/images/importer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/images/importer/framework.cc
r3115 r3120 1 1 #include "framework.h" 2 2 3 int verbose = 2;3 int verbose = 4; 4 4 5 5 void DrawGLScene() -
orxonox/branches/images/importer/material.cc
r3119 r3120 387 387 { 388 388 printf("IMG_Load: %s\n", IMG_GetError()); 389 return false; 389 390 } 390 391 pImage->height = map->h; -
orxonox/branches/images/importer/object.cc
r3119 r3120 219 219 if (verbose >= 2) 220 220 printf("Adding new Group\n"); 221 group->name = "";221 group->name = NULL; 222 222 group->faceMode = -1; 223 223 group->faceCount = 0; … … 370 370 { 371 371 char* fileName = new char [strlen(objPath)+strlen(objFileName)+1]; 372 fileName[0]='\0';373 372 if (objFileName != NULL && !strcmp(objFileName, "")) 374 373 return false; 375 strc at(fileName, objPath);374 strcpy(fileName, objPath); 376 375 strcat(fileName, objFileName); 377 376 … … 381 380 if (verbose >=1) 382 381 printf ("unable to open .OBJ file: %s\n Loading Box Object instead.\n", fileName); 383 exit(0);384 382 BoxObject(); 383 delete []fileName; 385 384 return false; 386 385 } … … 440 439 } 441 440 OBJ_FILE->close(); 441 delete []fileName; 442 442 return true; 443 443 … … 452 452 bool Object::readGroup (char* groupString) 453 453 { 454 if (verbose >=3) 455 printf ("Read Group: %s.\n", groupString); 454 456 // setting the group name if not default. 455 457 if (strcmp(currentGroup->name, "default")) … … 464 466 initGroup(currentGroup); 465 467 } 466 467 468 ++groupCount; 468 469 … … 593 594 strcpy(mtlFileName, mtlFile); 594 595 char* fileName = new char [strlen(objPath) + strlen(mtlFileName)+1]; 595 fileName[0] = '\0'; 596 strcat(fileName, objPath); 596 strcpy(fileName, objPath); 597 597 strcat(fileName, mtlFileName); 598 598 … … 606 606 if (verbose >= 1) 607 607 printf ("unable to open file: %s\n", fileName); 608 delete []fileName; 608 609 return false; 609 610 } … … 678 679 679 680 } 681 delete []fileName; 680 682 return true; 681 683 } … … 687 689 bool Object::readUseMtl (char* matString) 688 690 { 689 if ( !strcmp (mtlFileName, ""))691 if (mtlFileName) 690 692 { 691 693 if (verbose >= 1)
Note: See TracChangeset
for help on using the changeset viewer.