- Timestamp:
- Sep 19, 2005, 8:36:45 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine.cc
r5179 r5208 104 104 105 105 tmpFont = (Font*)ResourceManager::getInstance()->load(fontFile, TTF, RP_GAME, &fontSize); 106 if ( !tmpFont)106 if (tmpFont == NULL) 107 107 { 108 108 PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile); -
trunk/src/lib/shell/shell.cc
r5206 r5208 41 41 ->describe("Deactivates the Shell. (moves it into background)") 42 42 ->setAlias("hide"); 43 SHELL_COMMAND(textsize, Shell, setTextSize) 44 ->describe("Sets the size of the Text (size, linespacing)"); 43 45 44 46 /** … … 57 59 this->setAbsCoor2D(3, -400); 58 60 this->textSize = 15; 59 this->lineSpacing = 5;61 this->lineSpacing = 0; 60 62 this->bActive = false; 61 63 … … 72 74 // EVENT-Handler subscription of '`' to all States. 73 75 EventHandler::getInstance()->subscribe(this, ES_ALL, SDLK_BACKQUOTE); 74 75 76 } 76 77 … … 139 140 this->textSize = textSize; 140 141 this->lineSpacing = lineSpacing; 141 142 this->rebuildText(); 142 this->shellInput->setFont("fonts/dpquake_.ttf", this->textSize); 143 144 // this->rebuildText(); 143 145 } 144 146 … … 150 152 void Shell::rebuildText() 151 153 { 152 this->shellInput->setFont("fonts/ Aniron_Bold.ttf", this->textSize);154 this->shellInput->setFont("fonts/dpquake_.ttf", this->textSize); 153 155 this->shellInput->setColor(1, 0, 0); 154 156 this->shellInput->setAlignment(TEXT_ALIGN_LEFT); 155 this->shellInput->setText(NULL);156 157 this->shellInput->setParent2D(this); 157 158 this->shellInput->setRelCoor2D(5, (this->textSize + this->lineSpacing)*this->bufferDisplaySize + this->textSize); … … 176 177 for (unsigned int i = 0; i < bufferDisplaySize; i++) 177 178 { 178 this->bufferText[i] = TextEngine::getInstance()->createText("fonts/ Aniron_Bold.ttf", this->textSize, TEXT_RENDER_DYNAMIC);179 this->bufferText[i] = TextEngine::getInstance()->createText("fonts/dpquake_.ttf", this->textSize, TEXT_RENDER_DYNAMIC); 179 180 this->bufferText[i]->setColor(1, 0, 0); 180 181 this->bufferText[i]->setAlignment(TEXT_ALIGN_LEFT); -
trunk/src/lib/shell/shell.h
r5206 r5208 4 4 * 5 5 * @todo check for smooth deletion process 6 * @todo Buffer Display in different Colors for different debug mode. 6 7 */ 7 8 … … 78 79 unsigned int lineSpacing; //!< The Spacing between lines. 79 80 unsigned int textSize; //!< The size of the text. 81 char* textFont; //!< The file containing the font. 80 82 81 83 // HANDLING TEXT INPUT -
trunk/src/lib/shell/shell_input.h
r5204 r5208 2 2 * @file shell_input.h 3 3 * @brief Definition of ... 4 * @todo AutoCompletion should print nice output 5 * @todo move up and down in Buffer 6 * @todo display old shell Commands 4 7 */ 5 8 -
trunk/src/orxonox.cc
r5207 r5208 196 196 char* icon = ResourceManager::getFullName("pictures/fighter-top-32x32.bmp"); 197 197 GraphicsEngine::getInstance()->setWindowName(PACKAGE_NAME " " PACKAGE_VERSION, icon); 198 delete icon;198 delete[] icon; 199 199 return 0; 200 200 } -
trunk/src/util/loading/game_loader.cc
r5195 r5208 107 107 { 108 108 this->currentCampaign = this->fileToCampaign(campaignName); 109 delete campaignName;109 delete[] campaignName; 110 110 } 111 111 // World* world0 = new World(DEBUG_WORLD_0); -
trunk/src/util/resource_manager.cc
r5121 r5208 96 96 if (isDir(realDir)) 97 97 { 98 delete this->dataDir;98 delete[] this->dataDir; 99 99 this->dataDir = new char[strlen(realDir)+1]; 100 100 strcpy(this->dataDir, realDir); … … 126 126 sprintf(testFile, "%s%s", this->dataDir, fileInside); 127 127 retVal = isFile(testFile); 128 delete testFile;128 delete[] testFile; 129 129 return retVal; 130 130 } … … 382 382 { 383 383 PRINTF(2)("Resource %s could not be loaded\n", fileName); 384 delete[] tmpResource->name; 384 385 delete tmpResource; 385 386 return NULL; … … 456 457 // deleting the List Entry: 457 458 PRINTF(4)("Resource %s safely removed.\n", resource->name); 458 delete []resource->name;459 delete[] resource->name; 459 460 this->resourceList->remove(resource); 460 461 } … … 625 626 else 626 627 { 627 delete tmpDirName;628 delete[] tmpDirName; 628 629 return false; 629 630 } … … 653 654 )) 654 655 { 655 delete tmpFileName;656 delete[] tmpFileName; 656 657 return true; 657 658 } 658 659 else 659 660 { 660 delete tmpFileName;661 delete[] tmpFileName; 661 662 return false; 662 663 } … … 664 665 else 665 666 { 666 delete tmpFileName;667 delete[] tmpFileName; 667 668 return false; 668 669 } … … 682 683 { 683 684 PRINTF(1)("could not open %s fro writing\n", fileName); 685 delete[] tmpName; 684 686 return false; 685 687 } 686 688 fclose(stream); 687 689 688 delete tmpName;690 delete[] tmpName; 689 691 } 690 692 … … 699 701 char* tmpName = ResourceManager::homeDirCheck(fileName); 700 702 unlink(tmpName); 701 delete tmpName;703 delete[] tmpName; 702 704 } 703 705 … … 748 750 else 749 751 { 750 delete retName;752 delete[] retName; 751 753 return NULL; 752 754 } -
trunk/src/world_entities/weapons/weapon_manager.cc
r4992 r5208 90 90 } 91 91 this->currentSlotConfig[i].position.setName(tmpName); 92 delete tmpName;92 delete[] tmpName; 93 93 } 94 94 -
trunk/src/world_entities/world_entity.cc
r5143 r5208 19 19 20 20 #include "world_entity.h" 21 #include "shell_command.h" 21 22 22 23 #include "resource_manager.h" … … 27 28 28 29 using namespace std; 30 31 SHELL_COMMAND(model, WorldEntity, loadModel) 32 ->describe("sets the Model of the WorldEntity") 33 ->defaultValues(1, "models/ships/reaplow.obj"); 34 29 35 30 36 /**
Note: See TracChangeset
for help on using the changeset viewer.