- Timestamp:
- Aug 22, 2005, 12:01:04 AM (20 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/orxonox.cc
r5078 r5096 80 80 Orxonox::~Orxonox () 81 81 { 82 delete Shell::getInstance(); 82 83 delete GraphicsEngine::getInstance(); // deleting the Graphics 83 84 delete TextEngine::getInstance(); … … 257 258 int Orxonox::initMisc() 258 259 { 260 Shell::getInstance(); 259 261 return 0; 260 262 } -
trunk/src/story_entities/world.cc
r5087 r5096 115 115 World::~World () 116 116 { 117 delete Shell::getInstance();118 117 PRINTF(3)("World::~World() - deleting current world\n"); 119 118 … … 195 194 196 195 /* init the world interface */ 197 Shell::getInstance();198 196 199 197 LightManager::getInstance(); -
trunk/src/util/shell.cc
r5095 r5096 60 60 61 61 EventHandler* evh = EventHandler::getInstance(); 62 evh->subscribe(this, ES_ GAME, SDLK_BACKQUOTE);62 evh->subscribe(this, ES_ALL, SDLK_BACKQUOTE); 63 63 for (int i = 1; i < SDLK_F15; i++) 64 64 evh->subscribe(this, ES_SHELL, i); … … 295 295 this->inputLine = removeCharLine; 296 296 this->inputLineText->setText(inputLine); 297 } 298 299 /** 300 * executes the command stored in the inputLine 301 * @return true if the command was commited successfully, false otherwise 302 */ 303 bool Shell::executeCommand() 304 { 305 306 this->addBufferLineStatic("Execute Command: %s\n", this->inputLine); 307 delete this->inputLine; 308 this->inputLine = new char[1]; 309 this->inputLine[0]='\0'; 310 this->inputLineText->setText(this->inputLine); 311 return false; 297 312 } 298 313 … … 329 344 this->removeCharacters(1); 330 345 } 346 else if (event.type == SDLK_RETURN) 347 this->executeCommand(); 331 348 else if (event.type < 127) 332 349 { … … 384 401 void Shell::debug() const 385 402 { 386 387 } 403 if (this->pressedKey != SDLK_FIRST) 404 printf("%s::%f %f\n", SDLKToKeyname(this->pressedKey), this->delayed, this->repeatDelay); 405 406 } -
trunk/src/util/shell.h
r5095 r5096 52 52 void addCharacters(const char* characters); 53 53 void removeCharacters(unsigned int characterCount = 1); 54 bool executeCommand(); 54 55 55 56
Note: See TracChangeset
for help on using the changeset viewer.