- Timestamp:
- Aug 1, 2011, 4:37:38 PM (13 years ago)
- Location:
- code/branches/output/src
- Files:
-
- 61 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/output/src/libraries/tools/BillboardSet.cc
r6417 r8809 80 80 catch (...) 81 81 { 82 COUT(1) << "Error: Couln't load billboard \"" << file << '"' << std::endl;82 orxout(internal_error) << "Couldn't load billboard \"" << file << '"' << endl; 83 83 this->billboardSet_ = 0; 84 84 } … … 103 103 catch (...) 104 104 { 105 COUT(1) << "Error: Couln't load billboard \"" << file << '"' << std::endl;105 orxout(internal_error) << "Couldn't load billboard \"" << file << '"' << endl; 106 106 this->billboardSet_ = 0; 107 107 } -
code/branches/output/src/libraries/tools/Mesh.cc
r8351 r8809 72 72 catch (...) 73 73 { 74 COUT(1) << "Error: Couln't load mesh \"" << meshsource << '"' << std::endl;74 orxout(internal_error) << "Couldn't load mesh \"" << meshsource << '"' << endl; 75 75 this->entity_ = 0; 76 76 } -
code/branches/output/src/libraries/tools/ParticleInterface.cc
r7166 r8809 78 78 catch (...) 79 79 { 80 COUT(1) << "Error: Couln't load particle system \"" << templateName << '"' << std::endl;80 orxout(internal_error) << "Couldn't load particle system \"" << templateName << '"' << endl; 81 81 this->particleSystem_ = 0; 82 82 } -
code/branches/output/src/libraries/tools/ResourceCollection.cc
r8351 r8809 62 62 if (resourceGroup.empty()) 63 63 { 64 COUT(2) << "Warning: \"\" is not a valid resource group." << std::endl;64 orxout(internal_warning) << "\"\" is not a valid resource group." << endl; 65 65 return; 66 66 } -
code/branches/output/src/libraries/tools/ResourceLocation.cc
r8366 r8809 80 80 else 81 81 { 82 COUT(2) << "Warning: ResourceLocation '" << this->getPath() << "' does not seem to exist" << std::endl;82 orxout(internal_warning) << "ResourceLocation '" << this->getPath() << "' does not seem to exist" << endl; 83 83 return; 84 84 } … … 101 101 catch (const Ogre::Exception& ex) 102 102 { 103 COUT(1) << "Removing of a ResourceLocation failed: " << ex.what() << std::endl;103 orxout(internal_error) << "Removing of a ResourceLocation failed: " << ex.what() << endl; 104 104 } 105 105 } -
code/branches/output/src/libraries/tools/Shader.cc
r8079 r8809 141 141 } 142 142 else 143 COUT(2) << "Warning: Couldn't load compositor with name \"" << this->compositorName_ << "\"." << std::endl;143 orxout(internal_warning) << "Couldn't load compositor with name \"" << this->compositorName_ << "\"." << endl; 144 144 } 145 145 this->oldcompositorName_ = this->compositorName_; … … 217 217 } 218 218 else 219 COUT(2) << "Warning: No pass " << it->pass_ << " in technique " << it->technique_ << " in compositor \"" << this->compositorName_ << "\" or pass has no shader." << std::endl;219 orxout(internal_warning) << "No pass " << it->pass_ << " in technique " << it->technique_ << " in compositor \"" << this->compositorName_ << "\" or pass has no shader." << endl; 220 220 } 221 221 else 222 COUT(2) << "Warning: No technique " << it->technique_ << " in compositor \"" << this->compositorName_ << "\" or technique has no pass with shader." << std::endl;222 orxout(internal_warning) << "No technique " << it->technique_ << " in compositor \"" << this->compositorName_ << "\" or technique has no pass with shader." << endl; 223 223 } 224 224 this->parameters_.clear(); -
code/branches/output/src/libraries/tools/Timer.h
r8729 r8809 66 66 void MyClass::myFunction() 67 67 { 68 COUT(0) << "Hello World" << std::endl;68 orxout() << "Hello World" << endl; 69 69 } 70 70 @endcode -
code/branches/output/src/libraries/util/output/OutputDefinitions.h
r8808 r8809 97 97 REGISTER_OUTPUT_CONTEXT(packets); 98 98 REGISTER_OUTPUT_CONTEXT(master_server); 99 REGISTER_OUTPUT_CONTEXT(sound); 100 REGISTER_OUTPUT_CONTEXT(lod); 101 REGISTER_OUTPUT_CONTEXT(pickups); 102 REGISTER_OUTPUT_CONTEXT(quests); 103 REGISTER_OUTPUT_CONTEXT(notifications); 104 REGISTER_OUTPUT_CONTEXT(trigger); 105 REGISTER_OUTPUT_CONTEXT(docking); 99 106 } 100 107 } -
code/branches/output/src/orxonox/ChatHistory.cc
r8327 r8809 131 131 /* output the line to the file if logging is enabled */ 132 132 if( this->hist_log_enabled ) 133 this->hist_logfile << toadd << std::endl;133 this->hist_logfile << toadd << endl; 134 134 return 0; 135 135 } … … 154 154 { this->hist_log_enabled = false; 155 155 #ifndef CHATTEST 156 COUT(2) << "Warning: Could not open logfile." << std::endl;156 orxout(internal_warning) << "Could not open logfile." << endl; 157 157 #endif 158 158 } … … 185 185 for( it = this->hist_buffer.begin(); it != this->hist_buffer.end(); 186 186 ++it ) 187 std::cout << *it << std::endl;187 orxout(debug_output) << *it << endl; 188 188 189 189 /* output size */ 190 std::cout << "Size: " << hist_buffer.size() << std::endl;190 orxout(debug_output) << "Size: " << hist_buffer.size() << endl; 191 191 } 192 192 -
code/branches/output/src/orxonox/ChatInputHandler.cc
r8327 r8809 199 199 /* sanity checks */ 200 200 if( !tocolor ) 201 COUT(2) << "Empty ListBoxTextItem given to "202 "ChatInputhandler::sub_setcolor(). \n";201 orxout(internal_warning) << "Empty ListBoxTextItem given to " 202 "ChatInputhandler::sub_setcolor()." << endl; 203 203 204 204 /* "hash" the name */ -
code/branches/output/src/orxonox/Level.cc
r7648 r8809 88 88 void Level::networkcallback_applyXMLFile() 89 89 { 90 COUT(0) << "Loading level \"" << this->xmlfilename_ << "\"..." << std::endl;90 orxout(user_status) << "Loading level \"" << this->xmlfilename_ << "\"..." << endl; 91 91 92 92 ClassTreeMask mask; … … 115 115 if (!identifier || !identifier->isA(Class(Gametype))) 116 116 { 117 COUT(0) << "Error: \"" << gametype << "\" is not a valid gametype." << std::endl;117 orxout(internal_error) << "\"" << gametype << "\" is not a valid gametype." << endl; 118 118 identifier = Class(Gametype); 119 119 this->gametype_ = "Gametype"; … … 157 157 // this->lodInformation_.insert(std::make_pair(meshName,lodInformation)); 158 158 if( this->lodInformation_.find(meshName) != this->lodInformation_.end()) 159 CCOUT(4) << "replacing lod information for " << meshName << endl;159 orxout(verbose, context::lod) << "replacing lod information for " << meshName << endl; 160 160 this->lodInformation_[meshName] = lodInformation; 161 161 } … … 171 171 void Level::playerEntered(PlayerInfo* player) 172 172 { 173 COUT(3) << "player entered level (id: " << player->getClientID() << ", name: " << player->getName() << ')' << std::endl;173 orxout(internal_info) << "player entered level (id: " << player->getClientID() << ", name: " << player->getName() << ')' << endl; 174 174 player->setGametype(this->getGametype()); 175 175 } … … 177 177 void Level::playerLeft(PlayerInfo* player) 178 178 { 179 COUT(3) << "player left level (id: " << player->getClientID() << ", name: " << player->getName() << ')' << std::endl;179 orxout(internal_info) << "player left level (id: " << player->getClientID() << ", name: " << player->getName() << ')' << endl; 180 180 player->setGametype(0); 181 181 } -
code/branches/output/src/orxonox/LevelInfo.cc
r7652 r8809 125 125 if(!this->validateTag(tag)) 126 126 { 127 COUT(2) << "Bad LevelInfo tag '" << tag << "' in " << this->getXMLFilename() << ". Ignoring..." << std::endl;127 orxout(internal_warning) << "Bad LevelInfo tag '" << tag << "' in " << this->getXMLFilename() << ". Ignoring..." << endl; 128 128 return false; 129 129 } -
code/branches/output/src/orxonox/LevelManager.cc
r8706 r8809 251 251 252 252 // Iterate over all the found *.oxw files 253 COUT(3) << "Loading LevelInfos..." << std::endl;253 orxout(internal_info) << "Loading LevelInfos..." << endl; 254 254 std::set<std::string> names; 255 255 for (Ogre::StringVector::const_iterator it = levels->begin(); it != levels->end(); ++it) … … 281 281 // Warn about levels with the same name. 282 282 if(!names.insert(info->getName()).second) 283 COUT(2) << "Warning: Multiple levels (" << info->getXMLFilename() << ") with name '" << info->getName() << "' found!" << std::endl;283 orxout(internal_warning) << "Multiple levels (" << info->getXMLFilename() << ") with name '" << info->getName() << "' found!" << endl; 284 284 285 285 // Warn about multiple items so that it gets fixed quickly 286 286 if(availableLevels_.find(info) != availableLevels_.end()) 287 287 { 288 COUT(2) << "Warning: Multiple levels (" << info->getXMLFilename() << ") with same name '" << info->getName() << "' and filename found! Exluding..." << std::endl;288 orxout(internal_warning) << "Multiple levels (" << info->getXMLFilename() << ") with same name '" << info->getName() << "' and filename found! Exluding..." << endl; 289 289 // Delete LevelInfoItem to avoid a dangling pointer 290 290 delete info; -
code/branches/output/src/orxonox/MoodManager.cc
r8706 r8809 54 54 { 55 55 // TODO: Non-fatal error handling (non-critical resource missing) 56 COUT(2) << "Mood Warning: Folder for default mood (" << MoodManager::defaultMood_ << ") does not exist!" << std::endl;56 orxout(internal_warning) << "Mood Warning: Folder for default mood (" << MoodManager::defaultMood_ << ") does not exist!" << endl; 57 57 } 58 58 … … 82 82 if (!Resource::exists(path)) 83 83 { 84 COUT(3) << "Mood " << mood_ << " does not exist. Will not change." << std::endl;84 orxout(internal_warning) << "Mood " << mood_ << " does not exist. Will not change." << endl; 85 85 this->setMood(oldMood_); 86 86 } 87 87 else 88 88 { 89 COUT(3) << "Mood changed to " << mood_ << std::endl;89 orxout(internal_info) << "Mood changed to " << mood_ << endl; 90 90 MoodListener::changedMood(mood_); 91 91 } -
code/branches/output/src/orxonox/PlayerManager.cc
r8327 r8809 57 57 { 58 58 if (clientID != 0) 59 COUT(3) << "client connected" << std::endl;59 orxout(internal_info) << "client connected" << endl; 60 60 61 61 // create new HumanPlayer instance … … 77 77 { 78 78 if (clientID != 0) 79 COUT(3) << "client disconnected" << std::endl;79 orxout(internal_info) << "client disconnected" << endl; 80 80 81 81 // remove from clients-map -
code/branches/output/src/orxonox/Radar.cc
r7284 r8809 195 195 void Radar::listObjects() const 196 196 { 197 COUT(3) << "List of RadarObjects:\n";197 orxout(debug_output) << "List of RadarObjects:" << endl; 198 198 // iterate through all Radar Objects 199 199 unsigned int i = 0; 200 200 for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it, ++i) 201 201 { 202 COUT(3) << i++ << ": " << (*it)->getRVWorldPosition() << std::endl;202 orxout(debug_output) << i++ << ": " << (*it)->getRVWorldPosition() << endl; 203 203 } 204 204 } -
code/branches/output/src/orxonox/Scene.cc
r7163 r8809 141 141 if (range.length() < 10.0f) 142 142 { 143 CCOUT(2) << "Warning:Setting the negative world range to a very small value: "144 << multi_cast<std::string>(range) << std::endl;145 } 146 if (this->hasPhysics()) 147 { 148 CCOUT(2) << "Warning:Attempting to set the physical world range at run time. "149 << "This causes a complete physical reload which might take some time." << std::endl;143 orxout(internal_warning) << "Setting the negative world range to a very small value: " 144 << multi_cast<std::string>(range) << endl; 145 } 146 if (this->hasPhysics()) 147 { 148 orxout(internal_warning) << "Attempting to set the physical world range at run time. " 149 << "This causes a complete physical reload which might take some time." << endl; 150 150 this->setPhysicalWorld(false); 151 151 this->negativeWorldRange_ = range; … … 160 160 if (range.length() < 10.0f) 161 161 { 162 CCOUT(2) << "Warning:Setting the positive world range to a very small value: "163 << multi_cast<std::string>(range) << std::endl;164 } 165 if (this->hasPhysics()) 166 { 167 CCOUT(2) << "Warning:Attempting to set the physical world range at run time. "168 << "This causes a complete physical reload which might take some time." << std::endl;162 orxout(internal_warning) << "Setting the positive world range to a very small value: " 163 << multi_cast<std::string>(range) << endl; 164 } 165 if (this->hasPhysics()) 166 { 167 orxout(internal_warning) << "Attempting to set the physical world range at run time. " 168 << "This causes a complete physical reload which might take some time." << endl; 169 169 this->setPhysicalWorld(false); 170 170 this->positiveWorldRange_ = range; -
code/branches/output/src/orxonox/Test.cc
r7284 r8809 127 127 // mt2.importData( temp ); 128 128 // assert( temp-mem == mt1.getNetworkSize() ); 129 // COUT(0) << mt2 << endl;129 // orxout() << mt2 << endl; 130 130 // if(!Core::isMaster()) 131 131 // call2(0, "bal", "a", "n", "ce"); … … 135 135 void Test::printBlaBla(std::string s1, std::string s2, std::string s3, std::string s4, std::string s5) 136 136 { 137 COUT(0) << s1 << s2 << s3 << s4 << s5 << endl;137 orxout() << s1 << s2 << s3 << s4 << s5 << endl; 138 138 } 139 139 140 void Test::checkU1(){ COUT(1) << "U1 changed: " << u1 << std::endl; }141 void Test::checkU2(){ COUT(1) << "U2 changed: " << u2 << std::endl; }142 void Test::checkU3(){ COUT(1) << "U3 changed: " << u3 << std::endl; }143 void Test::checkU4(){ COUT(1) << "U4 changed: " << u4 << std::endl; }140 void Test::checkU1(){ orxout() << "U1 changed: " << u1 << endl; } 141 void Test::checkU2(){ orxout() << "U2 changed: " << u2 << endl; } 142 void Test::checkU3(){ orxout() << "U3 changed: " << u3 << endl; } 143 void Test::checkU4(){ orxout() << "U4 changed: " << u4 << endl; } 144 144 145 void Test::checkS1(){ COUT(1) << "S1 changed: " << s1 << std::endl; }146 void Test::checkS2(){ COUT(1) << "S2 changed: " << s2 << std::endl; }147 void Test::checkS3(){ COUT(1) << "S3 changed: " << s3 << std::endl; }148 void Test::checkS4(){ COUT(1) << "S4 changed: " << s4 << std::endl; }145 void Test::checkS1(){ orxout() << "S1 changed: " << s1 << endl; } 146 void Test::checkS2(){ orxout() << "S2 changed: " << s2 << endl; } 147 void Test::checkS3(){ orxout() << "S3 changed: " << s3 << endl; } 148 void Test::checkS4(){ orxout() << "S4 changed: " << s4 << endl; } 149 149 150 void Test::printPointer(){ CCOUT(1) << "pointer: " << this->pointer_ << endl; }150 void Test::printPointer(){ orxout() << "pointer: " << this->pointer_ << endl; } 151 151 152 152 } -
code/branches/output/src/orxonox/Test.h
r7163 r8809 108 108 109 109 void blub2() 110 { for( std::set<uint32_t>::iterator it=mySet_.begin(); it!=mySet_.end(); ++it ) COUT(0) << *it << endl; }110 { for( std::set<uint32_t>::iterator it=mySet_.begin(); it!=mySet_.end(); ++it ) orxout() << *it << endl; } 111 111 }; 112 112 } -
code/branches/output/src/orxonox/collisionshapes/CollisionShape.cc
r8706 r8809 203 203 if(scale_.crossProduct(scale).squaredLength() != 0.0f) 204 204 { 205 CCOUT(2) << "Warning:Non-uniform scaling is not yet supported." << endl;205 orxout(internal_warning) << "Non-uniform scaling is not yet supported." << endl; 206 206 return; 207 207 } -
code/branches/output/src/orxonox/collisionshapes/CompoundCollisionShape.cc
r8706 r8809 98 98 if (this->attachedShapes_.find(shape) != this->attachedShapes_.end()) 99 99 { 100 CCOUT(2) << "Warning: Attaching a CollisionShape twice is not yet supported." << std::endl;100 orxout(internal_warning) << "Attaching a CollisionShape twice is not yet supported." << endl; 101 101 return; 102 102 } … … 139 139 } 140 140 else 141 CCOUT(2) << "Warning: Cannot detach non child collision shape" << std::endl;141 orxout(internal_warning) << "Cannot detach non child collision shape" << endl; 142 142 } 143 143 … … 168 168 if (it == this->attachedShapes_.end()) 169 169 { 170 CCOUT(2) << "Warning: Cannot update child shape: Instance not a child." << std::endl;170 orxout(internal_warning) << "Cannot update child shape: Instance not a child." << endl; 171 171 return; 172 172 } -
code/branches/output/src/orxonox/controllers/ArtificialController.cc
r8706 r8809 98 98 if (it->myMaster_ == this) 99 99 { 100 COUT(1) << "error: " << this << " is still master in " << (*it) << std::endl;100 orxout(internal_error) << this << " is still master in " << (*it) << endl; 101 101 it->myMaster_ = 0; 102 102 } … … 107 107 if (it2 != it->slaves_.end()) 108 108 { 109 COUT(1) << "error: " << this << " is still slave in " << (*it) << std::endl;109 orxout(internal_error) << this << " is still slave in " << (*it) << endl; 110 110 it->slaves_.erase(it2); 111 111 } … … 737 737 float speedDiv = this->getControllableEntity()->getVelocity().squaredLength() - this->target_->getVelocity().squaredLength(); 738 738 739 COUT(0) << "~follow distance: " << distance << "SpeedCounter: " << this->speedCounter_ << "~speedDiv: " << speedDiv << std::endl;739 orxout() << "~follow distance: " << distance << "SpeedCounter: " << this->speedCounter_ << "~speedDiv: " << speedDiv << endl; 740 740 if (distance < 800) 741 741 { -
code/branches/output/src/orxonox/controllers/HumanController.cc
r8706 r8809 93 93 Camera* camera = HumanController::localController_s->controllableEntity_->getCamera(); 94 94 if (!camera) 95 COUT(3) << "HumanController, Warning: Using a ControllableEntity without Camera" << std::endl;95 orxout(internal_warning) << "HumanController, Warning: Using a ControllableEntity without Camera" << endl; 96 96 } 97 97 } … … 197 197 198 198 this->controllableEntity_->boost(this->boosting_); 199 COUT(4) << "Start boosting" << endl;199 // orxout() << "Start boosting" << endl; 200 200 } 201 201 } … … 211 211 212 212 this->controllableEntity_->boost(this->boosting_); 213 COUT(4) << "Stop boosting" << endl;213 // orxout() << "Stop boosting" << endl; 214 214 } 215 215 … … 257 257 const Quaternion& orientation = HumanController::localController_s->controllableEntity_->getOrientation(); 258 258 259 COUT(0) << "position=\"" << position.x << ", " << position.y << ", " << position.z << "\" ";260 COUT(0) << "orientation=\"" << orientation.w << ", " << orientation.x << ", " << orientation.y << ", " << orientation.z << "\"" << std::endl;259 orxout(message) << "position=\"" << position.x << ", " << position.y << ", " << position.z << "\" " 260 << "orientation=\"" << orientation.w << ", " << orientation.x << ", " << orientation.y << ", " << orientation.z << "\"" << endl; 261 261 } 262 262 } -
code/branches/output/src/orxonox/controllers/NewHumanController.cc
r8436 r8809 388 388 for (itr = result.begin(); itr != result.end(); ++itr) 389 389 { 390 // CCOUT(0) << "testing object as target" << endl;390 // orxout() << "testing object as target" << endl; 391 391 if (itr->movable->isInScene() && itr->movable->getMovableType() == "Entity" && itr->distance > 200) 392 392 { -
code/branches/output/src/orxonox/gamestates/GSLevel.cc
r8729 r8809 155 155 156 156 // call the loader 157 COUT(0) << "Loading level..." << std::endl;157 orxout(user_status) << "Loading level..." << endl; 158 158 startFile_ = new XMLFile(LevelManager::getInstance().getDefaultLevel()); 159 159 bool loaded = Loader::open(startFile_); … … 169 169 delete startFile_; 170 170 171 COUT(3) << "Unloaded level. Remaining objects:" << std::endl; 171 orxout(user_status) << "Unloaded level" << endl; 172 orxout(internal_info) << "Remaining objects:" << endl; 172 173 unsigned int i = 0; 173 174 for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it) … … 176 177 if (find == this->staticObjects_.end()) 177 178 { 178 COUT(3) << ++i << ": " << it->getIdentifier()->getName() << " (" << *it << "), references: " << it->getReferenceCount() << std::endl;179 orxout(internal_info) << ++i << ": " << it->getIdentifier()->getName() << " (" << *it << "), references: " << it->getReferenceCount() << endl; 179 180 } 180 181 } 181 COUT(3) << i << " objects remaining.";182 orxout(internal_info) << i << " objects remaining."; 182 183 if (i == 0) 183 COUT(3) << " Well done!" << std::endl;184 orxout(internal_info) << " Well done!" << endl; 184 185 else 185 COUT(3) << " Try harder!" << std::endl;186 orxout(internal_info) << " Try harder!" << endl; 186 187 } 187 188 -
code/branches/output/src/orxonox/gamestates/GSMasterServer.cc
r8788 r8809 54 54 55 55 this->mserver = new MasterServer(); 56 COUT(0) << "Loading masterserver mode" << std::endl;56 orxout(user_status) << "Loading masterserver mode" << endl; 57 57 58 58 this->mserver->run(); -
code/branches/output/src/orxonox/gamestates/GSRoot.cc
r8706 r8809 77 77 { 78 78 if (dynamic_cast<Synchronisable*>(*it)) 79 COUT(0) << "object: " << it->getIdentifier()->getName() << " id: " << dynamic_cast<Synchronisable*>(*it)->getObjectID() << std::endl;79 orxout(debug_output) << "object: " << it->getIdentifier()->getName() << " id: " << dynamic_cast<Synchronisable*>(*it)->getObjectID() << endl; 80 80 else 81 COUT(0) << "object: " << it->getIdentifier()->getName() << std::endl;81 orxout(debug_output) << "object: " << it->getIdentifier()->getName() << endl; 82 82 nr++; 83 83 } 84 COUT(0) << "currently got " << nr << " objects" << std::endl;84 orxout(debug_output) << "currently got " << nr << " objects" << endl; 85 85 } 86 86 -
code/branches/output/src/orxonox/gamestates/GSServer.cc
r8788 r8809 57 57 58 58 this->server_ = new Server(CommandLineParser::getValue("port")); 59 COUT(0) << "Loading scene in server mode" << std::endl;59 orxout(user_status) << "Loading scene in server mode" << endl; 60 60 61 61 server_->open(); -
code/branches/output/src/orxonox/gametypes/Asteroids.cc
r7655 r8809 74 74 75 75 std::string message("The match has started! Reach the first chekpoint within 15 seconds! But be aware, there may be pirates around..."); 76 COUT(0) << message << std::endl;76 orxout(level::message) << message << endl; 77 77 Host::Broadcast(message); 78 78 … … 84 84 85 85 std::string message("The match has ended."); 86 COUT(0) << message << std::endl;86 orxout(level::message) << message << endl; 87 87 Host::Broadcast(message); 88 88 } -
code/branches/output/src/orxonox/gametypes/Deathmatch.cc
r6417 r8809 48 48 49 49 std::string message("The match has started!"); 50 COUT(0) << message << std::endl;50 orxout(level::message) << message << endl; 51 51 Host::Broadcast(message); 52 52 } … … 57 57 58 58 std::string message("The match has ended."); 59 COUT(0) << message << std::endl;59 orxout(level::message) << message << endl; 60 60 Host::Broadcast(message); 61 61 } … … 66 66 67 67 const std::string& message = player->getName() + " entered the game"; 68 COUT(0) << message << std::endl;68 orxout(level::message) << message << endl; 69 69 Host::Broadcast(message); 70 70 } … … 77 77 { 78 78 const std::string& message = player->getName() + " left the game"; 79 COUT(0) << message << std::endl;79 orxout(level::message) << message << endl; 80 80 Host::Broadcast(message); 81 81 } … … 91 91 { 92 92 const std::string& message = player->getOldName() + " changed name to " + player->getName(); 93 COUT(0) << message << std::endl;93 orxout(level::message) << message << endl; 94 94 Host::Broadcast(message); 95 95 } … … 113 113 message = victim->getPlayer()->getName() + " died"; 114 114 115 COUT(0) << message << std::endl;115 orxout(level::message) << message << endl; 116 116 Host::Broadcast(message); 117 117 } … … 127 127 { 128 128 const std::string& message = player->getName() + " scores!"; 129 COUT(0) << message << std::endl;129 orxout(level::message) << message << endl; 130 130 Host::Broadcast(message); 131 131 } -
code/branches/output/src/orxonox/gametypes/Dynamicmatch.cc
r8729 r8809 342 342 numberOf[chaser]++; 343 343 Gametype::playerEntered(player); 344 const std::string& message 6= player->getName() + " entered the game";345 COUT(0) << message6 << std::endl;346 Host::Broadcast(message 6);344 const std::string& message = player->getName() + " entered the game"; 345 orxout(level::message) << message << endl; 346 Host::Broadcast(message); 347 347 } 348 348 … … 359 359 } 360 360 const std::string& message = player->getName() + " left the game"; 361 COUT(0) << message << std::endl;361 orxout(level::message) << message << endl; 362 362 Host::Broadcast(message); 363 363 //remove player from map … … 617 617 { 618 618 const std::string& message = player->getOldName() + " changed name to " + player->getName(); 619 COUT(0) << message << std::endl;619 orxout(level::message) << message << endl; 620 620 Host::Broadcast(message); 621 621 } … … 630 630 { 631 631 std::string message("Dynamicmatch started!"); 632 COUT(0) << message << std::endl;632 orxout(level::message) << message << endl; 633 633 Host::Broadcast(message); 634 634 } … … 647 647 { 648 648 std::string message("Earn points:\n\n\n\tIf you're red: Chase the blue player!\n\n\tIf you're blue shoot at a red player or hide.\n\n\tIf you're green: You've got the licence to kill red players!"); 649 COUT(0) << message << std::endl;649 orxout(level::message) << message << endl; 650 650 Host::Broadcast(message); 651 651 callInstructions_.setTimer(10, false, createExecutor(createFunctor(&Dynamicmatch::furtherInstructions, this))); … … 655 655 { 656 656 std::string message("After 3 Minutes the game is over."); 657 COUT(0) << message << std::endl;657 orxout(level::message) << message << endl; 658 658 Host::Broadcast(message); 659 659 }*/ … … 663 663 664 664 std::string message("Time out. Press F2 to see the points you scored."); 665 COUT(0) << message << std::endl;665 orxout(level::message) << message << endl; 666 666 Host::Broadcast(message); 667 667 } -
code/branches/output/src/orxonox/gametypes/Gametype.cc
r8706 r8809 297 297 } 298 298 else 299 COUT(2) << "Warning: Killed Pawn was not in the playerlist" << std::endl;299 orxout(internal_warning) << "Killed Pawn was not in the playerlist" << endl; 300 300 } 301 301 } … … 344 344 } 345 345 346 COUT(2) << "Warning: Fallback SpawnPoint was used,because there were no active SpawnPoints." << endl;346 orxout(internal_warning) << "Fallback SpawnPoint was used because there were no active SpawnPoints." << endl; 347 347 return fallbackSpawnPoint; 348 348 } … … 444 444 else 445 445 { 446 COUT(1) << "Error: No SpawnPoints in current Gametype" << std::endl;446 orxout(user_error) << "No SpawnPoints in current Gametype" << endl; 447 447 abort(); 448 448 } … … 461 461 else 462 462 { 463 COUT(1) << "Error: No SpawnPoints in current Gametype" << std::endl;463 orxout(user_error) << "No SpawnPoints in current Gametype" << endl; 464 464 abort(); 465 465 } -
code/branches/output/src/orxonox/gametypes/LastManStanding.cc
r8327 r8809 105 105 this->playersAlive--; 106 106 const std::string& message = victim->getPlayer()->getName() + " has lost all lives"; 107 COUT(0) << message << std::endl;107 orxout(level::message) << message << endl; 108 108 Host::Broadcast(message); 109 109 } -
code/branches/output/src/orxonox/gametypes/LastTeamStanding.cc
r8706 r8809 119 119 this->teamsAlive--; 120 120 const std::string& message = victim->getPlayer()->getName() + " has lost all lives"; 121 COUT(0) << message << std::endl;121 orxout(level::message) << message << endl; 122 122 Host::Broadcast(message); 123 123 } -
code/branches/output/src/orxonox/gametypes/TeamBaseMatch.cc
r8327 r8809 141 141 return; 142 142 143 COUT(0) << "Points standing:" << std::endl << "Team 1: "<< pointsTeam1_ << std::endl << "Team 2: " << pointsTeam2_ << std::endl;144 if(pointsTeam1_ >=1700 && pointsTeam1_ < 2000) COUT(0) << "Team 1 is near victory!" << std::endl;145 if(pointsTeam2_ >=1700 && pointsTeam2_ < 2000) COUT(0) << "Team 2 is near victory!" << std::endl;143 orxout(message) << "Points standing:" << '\n' << "Team 1: "<< pointsTeam1_ << '\n' << "Team 2: " << pointsTeam2_ << endl; 144 if(pointsTeam1_ >=1700 && pointsTeam1_ < 2000) orxout(message) << "Team 1 is near victory!" << endl; 145 if(pointsTeam2_ >=1700 && pointsTeam2_ < 2000) orxout(message) << "Team 2 is near victory!" << endl; 146 146 } 147 147 … … 179 179 if (this->pointsTeam1_ > this->pointsTeam2_) 180 180 { 181 COUT(0) << "Team 1 has won the match" << std::endl;181 orxout(message) << "Team 1 has won the match" << endl; 182 182 winningteam = 0; 183 183 } 184 184 else 185 185 { 186 COUT(0) << "Team 2 has won the match" << std::endl;186 orxout(message) << "Team 2 has won the match" << endl; 187 187 winningteam = 1; 188 188 } -
code/branches/output/src/orxonox/gametypes/UnderAttack.cc
r8327 r8809 70 70 this->end(); //end gametype 71 71 std::string message("Ship destroyed! Team 0 has won!"); 72 COUT(0) << message << std::endl;72 orxout(level::message) << message << endl; 73 73 Host::Broadcast(message); 74 74 this->gameEnded_ = true; … … 153 153 this->end(); 154 154 std::string message("Time is up! Team 1 has won!"); 155 COUT(0) << message << std::endl;155 orxout(level::message) << message << endl; 156 156 Host::Broadcast(message); 157 157 … … 173 173 const std::string& message = multi_cast<std::string>(timesequence_) + " seconds left!"; 174 174 /* 175 COUT(0) << message << std::endl;175 orxout(level::message) << message << endl; 176 176 Host::Broadcast(message); 177 177 */ -
code/branches/output/src/orxonox/graphics/Model.cc
r8079 r8809 142 142 if( this->numLodLevels_>10 ) 143 143 { 144 CCOUT(2) << "More than 10 LoD levels requested. Creating only 10." << endl;144 orxout(internal_warning, context::lod) << "More than 10 LoD levels requested. Creating only 10." << endl; 145 145 this->numLodLevels_ = 10; 146 146 } … … 158 158 creatorPtr = creatorPtr->getCreator(); 159 159 } 160 COUT(0) << "name: " << this->meshSrc_ << "scaleFactor: " << scaleFactor << ", volume: " << volume << endl;160 orxout() << "name: " << this->meshSrc_ << "scaleFactor: " << scaleFactor << ", volume: " << volume << endl; 161 161 */ 162 COUT(4) << "Setting lodLevel for " << this->meshSrc_<< " with lodLevel_: " << this->lodLevel_ <<" and volume: "<< volume << ":" << std::endl;162 orxout(verbose, context::lod) << "Setting lodLevel for " << this->meshSrc_<< " with lodLevel_: " << this->lodLevel_ <<" and volume: "<< volume << ":" << endl; 163 163 164 164 #if OGRE_VERSION >= 0x010700 … … 173 173 float factor = pow(volume, 2.0f / 3.0f) * 15.0f / lodLevel_; 174 174 175 COUT(4) << "LodLevel set with factor: " << factor << endl;175 orxout(verbose, context::lod) << "LodLevel set with factor: " << factor << endl; 176 176 177 177 distList.push_back(70.0f*factor); … … 200 200 what = "<0"; 201 201 202 COUT(4)<<"LodLevel not set because lodLevel("<<lodLevel_<<") was "<<what<<"." << endl;202 orxout(verbose, context::lod) << "LodLevel not set because lodLevel(" << lodLevel_ << ") was " << what << "." << endl; 203 203 } 204 204 } 205 205 else 206 COUT(4) << "LodLevel for " << this->meshSrc_ << " not set because is disabled." << endl;206 orxout(verbose, context::lod) << "LodLevel for " << this->meshSrc_ << " not set because is disabled." << endl; 207 207 } 208 208 } -
code/branches/output/src/orxonox/graphics/ParticleEmitter.cc
r7174 r8809 116 116 catch (const std::exception& ex) 117 117 { 118 COUT(1) << "Error: Couln't load particle effect \"" << this->source_ << "\" because:" << std::endl119 << ex.what() << std::endl;118 orxout(internal_error) << "Couldn't load particle effect \"" << this->source_ << "\" because:" << endl 119 << ex.what() << endl; 120 120 } 121 121 } -
code/branches/output/src/orxonox/interfaces/PickupCarrier.cc
r8351 r8809 75 75 if(it != this->pickups_.end() && temp == *it) // Infinite loop avoidance, in case the pickup wasn't removed from the carrier somewhere in the carrierDestroy() procedure. 76 76 { 77 COUT(2) << "Oops. In a PickupCarrier, while cleaning up, a Pickupable (&" << temp << ") didn't unregister itself as it should have." << std::endl;;77 orxout(internal_warning, context::pickups) << "Oops. In a PickupCarrier, while cleaning up, a Pickupable (&" << temp << ") didn't unregister itself as it should have." << endl;; 78 78 it++; 79 79 } … … 158 158 bool PickupCarrier::addPickup(Pickupable* pickup) 159 159 { 160 COUT(4) << "Adding Pickupable (&" << pickup << ") to PickupCarrier (&" << this << ")" << std::endl;160 orxout(verbose, context::pickups) << "Adding Pickupable (&" << pickup << ") to PickupCarrier (&" << this << ")" << endl; 161 161 return this->pickups_.insert(pickup).second; 162 162 } … … 172 172 bool PickupCarrier::removePickup(Pickupable* pickup) 173 173 { 174 COUT(4) << "Removing Pickupable (&" << pickup << ") from PickupCarrier (&" << this << ")" << std::endl;174 orxout(verbose, context::pickups) << "Removing Pickupable (&" << pickup << ") from PickupCarrier (&" << this << ")" << endl; 175 175 return this->pickups_.erase(pickup) == 1; 176 176 } -
code/branches/output/src/orxonox/interfaces/Pickupable.cc
r8464 r8809 71 71 if(this->pickupIdentifier_ != NULL) 72 72 { 73 COUT(4) << "Pickupable (&" << this << ") destroyed." << std::endl;73 orxout(verbose, context::pickups) << "Pickupable (&" << this << ") destroyed." << endl; 74 74 this->pickupIdentifier_->destroy(); 75 75 } … … 107 107 this->OrxonoxClass::destroy(); 108 108 else 109 COUT(2) << this->getIdentifier()->getName() << " may be unsafe. " << std::endl;109 orxout(internal_warning, context::pickups) << this->getIdentifier()->getName() << " may be unsafe. " << endl; 110 110 } 111 111 … … 126 126 return false; 127 127 128 COUT(4) << "Pickupable (&" << this << ") set to used " << used << "." << std::endl;128 orxout(verbose, context::pickups) << "Pickupable (&" << this << ") set to used " << used << "." << endl; 129 129 130 130 this->used_ = used; … … 201 201 return false; 202 202 203 COUT(4) << "Target " << target->getName() << " added to Pickupable (" << this->getIdentifier()->getName() << ") (&" << this << ")." << std::endl;203 orxout(verbose, context::pickups) << "Target " << target->getName() << " added to Pickupable (" << this->getIdentifier()->getName() << ") (&" << this << ")." << endl; 204 204 this->targets_.push_back(target); 205 205 return true; … … 221 221 if(!this->setCarrier(carrier)) 222 222 { 223 COUT(3) << "A Pickupable (&" << this << ") was trying to be added to a PickupCarrier, but was already present." << std::endl;223 orxout(internal_warning, context::pickups) << "A Pickupable (&" << this << ") was trying to be added to a PickupCarrier, but was already present." << endl; 224 224 return false; 225 225 } 226 226 227 227 this->setPickedUp(true); 228 COUT(4) << "Pickupable (&" << this << ") got picked up by a PickupCarrier (&" << carrier << ")." << std::endl;228 orxout(verbose, context::pickups) << "Pickupable (&" << this << ") got picked up by a PickupCarrier (&" << carrier << ")." << endl; 229 229 return true; 230 230 } … … 245 245 assert(this->getCarrier()); // The Carrier cannot be NULL at this point. 246 246 if(!this->getCarrier()->removePickup(this)) //TODO Shouldn't this be a little later? 247 COUT(2) << "Pickupable (&" << this << ", " << this->getIdentifier()->getName() << ") is being dropped, but it was not present in the PickupCarriers list of pickups." << std::endl;248 249 COUT(4) << "Pickupable (&" << this << ") got dropped up by a PickupCarrier (&" << this->getCarrier() << ")." << std::endl;247 orxout(internal_warning, context::pickups) << "Pickupable (&" << this << ", " << this->getIdentifier()->getName() << ") is being dropped, but it was not present in the PickupCarriers list of pickups." << endl; 248 249 orxout(verbose, context::pickups) << "Pickupable (&" << this << ") got dropped up by a PickupCarrier (&" << this->getCarrier() << ")." << endl; 250 250 this->setUsed(false); 251 251 this->setPickedUp(false); … … 276 276 return false; 277 277 278 COUT(4) << "Pickupable (&" << this << ") set to pickedUp " << pickedUp << "." << std::endl;278 orxout(verbose, context::pickups) << "Pickupable (&" << this << ") set to pickedUp " << pickedUp << "." << endl; 279 279 280 280 this->pickedUp_ = pickedUp; … … 305 305 return false; 306 306 307 COUT(4) << "Pickupable (&" << this << ") changed Carrier (& " << carrier << ")." << std::endl;307 orxout(verbose, context::pickups) << "Pickupable (&" << this << ") changed Carrier (& " << carrier << ")." << endl; 308 308 309 309 if(carrier != NULL && tell) … … 340 340 Pickupable* pickup = dynamic_cast<Pickupable*>(item); 341 341 342 COUT(4) << "Pickupable (&" << this << ") cloned. Clone is new Pickupable (&" << pickup << ")." << std::endl;342 orxout(verbose, context::pickups) << "Pickupable (&" << this << ") cloned. Clone is new Pickupable (&" << pickup << ")." << endl; 343 343 return pickup; 344 344 } -
code/branches/output/src/orxonox/interfaces/RadarViewable.cc
r8738 r8809 83 83 // else 84 84 // { 85 // CCOUT(2) << "Attempting to access the radar, but the radar is non existent." << std::endl;85 // orxout(internal_warning) << "Attempting to access the radar, but the radar is non existent." << endl; 86 86 // } 87 87 // this->radarObjectDescription_ = str; … … 106 106 if (!object) 107 107 { 108 COUT(1) << "Assertion: Every RadarViewable has to be assigned a WorldEntity pointer!" << std::endl;108 orxout(user_error) << "Assertion: Every RadarViewable has to be assigned a WorldEntity pointer!" << endl; 109 109 assert(0); 110 110 } -
code/branches/output/src/orxonox/items/Engine.cc
r8727 r8809 261 261 if(!this->engineTemplate_.empty()) 262 262 { 263 COUT(4)<<"Loading an engine template: "<<this->engineTemplate_<<"\n";263 orxout(verbose, context::templates) << "Loading an engine template: " << this->engineTemplate_ << endl; 264 264 Template *temp = Template::getTemplate(this->engineTemplate_); 265 265 if(temp) -
code/branches/output/src/orxonox/overlays/InGameConsole.cc
r8805 r8809 263 263 this->consoleOverlayContainer_->setTop(-1.3f * this->relativeHeight); 264 264 265 COUT(4) << "Info: InGameConsole initialized" << std::endl;265 orxout(internal_info) << "InGameConsole initialized" << endl; 266 266 } 267 267 -
code/branches/output/src/orxonox/overlays/OrxonoxOverlay.cc
r8706 r8809 147 147 148 148 if (OrxonoxOverlay::overlays_s.find(this->getName()) != OrxonoxOverlay::overlays_s.end()) 149 COUT(1) << "Overlay names should be unique or you cannnot access them via console. Name: \"" << this->getName() << '"' << std::endl;149 orxout(internal_warning) << "Overlay names should be unique or you cannnot access them via console. Name: \"" << this->getName() << '"' << endl; 150 150 151 151 OrxonoxOverlay::overlays_s[this->getName()] = this; … … 362 362 { 363 363 overlay->hide(); 364 COUT(4) << "HIDE " << name << std::endl;364 orxout(internal_info) << "HIDE " << name << endl; 365 365 } 366 366 else 367 367 { 368 368 overlay->show(); 369 COUT(4) << "SHOW " << name << std::endl;369 orxout(internal_info) << "SHOW " << name << endl; 370 370 } 371 371 } -
code/branches/output/src/orxonox/pickup/PickupIdentifier.cc
r7494 r8809 51 51 52 52 if(pickup == NULL) 53 COUT(1) << "Error, PickupIdentifier was created without a valid Pickupable." << std::endl;53 orxout(internal_error, context::pickups) << "PickupIdentifier was created without a valid Pickupable." << endl; 54 54 55 55 this->pickup_ = pickup; … … 83 83 if(!(this->parameters_.size() == identifier->parameters_.size())) 84 84 { 85 COUT(1) << "Something went wrong in PickupIdentifier!" << std::endl;85 orxout(internal_error, context::pickups) << "Something went wrong in PickupIdentifier!" << endl; 86 86 return this->parameters_.size()-identifier->parameters_.size(); 87 87 } … … 93 93 if(identifier->parameters_.find(it->first) == identifier->parameters_.end()) 94 94 { 95 COUT(1) << "Something went wrong in PickupIdentifier!" << std::endl;95 orxout(internal_error, context::pickups) << "Something went wrong in PickupIdentifier!" << endl; 96 96 return -1; 97 97 } … … 115 115 bool PickupIdentifier::addParameter(std::string & name, std::string & value) 116 116 { 117 COUT(4) << "PickupIdentifier " << name << ", " << value << std::endl;117 orxout(verbose, context::pickups) << "PickupIdentifier " << name << ", " << value << endl; 118 118 119 119 if(!(this->parameters_.find(name) == this->parameters_.end())) 120 120 { 121 COUT(4) << "Request for adding a parameter that already exists for the PickupIdentififer was denied. name: '" << name << "', value: '" << value << "'."<< std::endl;121 orxout(verbose, context::pickups) << "Request for adding a parameter that already exists for the PickupIdentififer was denied. name: '" << name << "', value: '" << value << "'."<< endl; 122 122 return false; 123 123 } -
code/branches/output/src/orxonox/sound/AmbientSound.cc
r8706 r8809 94 94 this->setSource(path); 95 95 else 96 COUT(3) << "Sound: " << this->ambientSource_ << ": Not a valid name! Ambient sound will not change." << std::endl;96 orxout(internal_warning, context::sound) << this->ambientSource_ << ": Not a valid name! Ambient sound will not change." << endl; 97 97 } 98 98 } -
code/branches/output/src/orxonox/sound/BaseSound.cc
r8729 r8809 94 94 alSourcePlay(this->audioSource_); 95 95 if (int error = alGetError()) 96 COUT(2) << "Sound: Error playing sound: " << SoundManager::getALErrorString(error) << std::endl;96 orxout(internal_error, context::sound) << "Error playing sound: " << SoundManager::getALErrorString(error) << endl; 97 97 } 98 98 } … … 147 147 alSource3f(this->audioSource_, AL_DIRECTION, 0, 0, 0); 148 148 if (ALint error = alGetError()) 149 COUT(2) << "Sound Warning:Setting source parameters to 0 failed: "150 << SoundManager::getALErrorString(error) << std::endl;149 orxout(internal_warning, context::sound) << "Setting source parameters to 0 failed: " 150 << SoundManager::getALErrorString(error) << endl; 151 151 assert(this->soundBuffer_ != NULL); 152 152 alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer()); 153 153 if (ALuint error = alGetError()) 154 COUT(1) << "Sound Error: Could not set buffer \"" << this->source_ << "\": " << SoundManager::getALErrorString(error) << std::endl;154 orxout(internal_error, context::sound) << "Could not set buffer \"" << this->source_ << "\": " << SoundManager::getALErrorString(error) << endl; 155 155 } 156 156 … … 159 159 this->volume_ = clamp(vol, 0.0f, 1.0f); 160 160 if (this->volume_ != vol) 161 COUT(2) << "Sound warning: volume out of range, clamping value." << std::endl;161 orxout(internal_warning, context::sound) << "Volume out of range, clamping value." << endl; 162 162 this->updateVolume(); 163 163 } … … 170 170 alSourcef(this->audioSource_, AL_GAIN, volume); 171 171 if (int error = alGetError()) 172 COUT(2) << "Sound:Error setting volume to " << volume173 << ": " << SoundManager::getALErrorString(error) << std::endl;172 orxout(internal_error, context::sound) << "Error setting volume to " << volume 173 << ": " << SoundManager::getALErrorString(error) << endl; 174 174 } 175 175 } … … 186 186 if (pitch > 2 || pitch < 0.5f) 187 187 { 188 COUT(2) << "Sound warning: pitch out of range, cropping value." << std::endl;188 orxout(internal_warning, context::sound) << "Pitch out of range, cropping value." << endl; 189 189 pitch = pitch > 2.0f ? 2.0f : pitch; 190 190 pitch = pitch < 0.5f ? 0.5f : pitch; … … 195 195 alSourcef(this->audioSource_, AL_PITCH, pitch); 196 196 if (int error = alGetError()) 197 COUT(2) << "Sound: Error setting pitch: " << SoundManager::getALErrorString(error) << std::endl;197 orxout(internal_error, context::sound) << "Error setting pitch: " << SoundManager::getALErrorString(error) << endl; 198 198 } 199 199 } … … 240 240 if (ALuint error = alGetError()) 241 241 { 242 COUT(1) << "Sound Error: Could not set buffer \"" << source << "\": " << SoundManager::getALErrorString(error) << std::endl;242 orxout(internal_error, context::sound) << "Could not set buffer \"" << source << "\": " << SoundManager::getALErrorString(error) << endl; 243 243 return; 244 244 } … … 248 248 alSourcePlay(this->audioSource_); 249 249 if (int error = alGetError()) 250 COUT(2) << "Sound: Error playing sound: " << SoundManager::getALErrorString(error) << std::endl;250 orxout(internal_error, context::sound) << "Error playing sound: " << SoundManager::getALErrorString(error) << endl; 251 251 if (this->isPaused()) 252 252 alSourcePause(this->audioSource_); -
code/branches/output/src/orxonox/sound/SoundBuffer.cc
r8351 r8809 51 51 if (fileInfo == NULL) 52 52 { 53 COUT(2) << "Sound: Warning: Sound file '" << filename << "' not found" << std::endl;53 orxout(internal_error, context::sound) << "Sound file '" << filename << "' not found" << endl; 54 54 return; 55 55 } … … 144 144 if (ret < 0) 145 145 { 146 COUT(2) << "Sound: libvorbisfile: File does not seem to be an Ogg Vorbis bitstream" << std::endl;146 orxout(internal_error, context::sound) << "libvorbisfile: File does not seem to be an Ogg Vorbis bitstream" << endl; 147 147 ov_clear(&vf); 148 148 ThrowException(General, "Sound Error: Ogg file loader failed when opening the bitstream"); … … 160 160 else if (ret < 0) 161 161 { 162 COUT(2) << "Sound: libvorbisfile: error reading the file" << std::endl;162 orxout(internal_error, context::sound) << "libvorbisfile: error reading the file" << endl; 163 163 ov_clear(&vf); 164 164 ThrowException(General, "Sound Error: Ogg file loader failed when decoding the file"); -
code/branches/output/src/orxonox/sound/SoundManager.cc
r8521 r8809 89 89 std::string renderDevice; 90 90 SetConfigValue(renderDevice, std::string(device)).description("Sound device used for rendering"); 91 COUT(4) << "Sound: Available devices: ";91 orxout(verbose, context::sound) << "Sound: Available devices: "; 92 92 while (true) 93 93 { 94 94 this->deviceNames_.push_back(devices); 95 COUT(4) << '"' << devices << "\", ";95 orxout(verbose, context::sound) << '"' << devices << "\", "; 96 96 devices += strlen(devices) + 1; 97 97 if (*devices == '\0') 98 98 break; 99 99 } 100 COUT(4) << std::endl;100 orxout(verbose, context::sound) << endl; 101 101 102 102 // Open the selected device 103 COUT(3) << "Sound: Opening device \"" << renderDevice << '\' << std::endl;103 orxout(internal_info, context::sound) << "Sound: Opening device \"" << renderDevice << '\' << endl; 104 104 this->device_ = alcOpenDevice(renderDevice.c_str()); 105 105 */ … … 122 122 // Get some information about the sound 123 123 if (const char* version = alGetString(AL_VERSION)) 124 COUT(4) << "Sound: --- OpenAL Version: " << version << std::endl;124 orxout(internal_info, context::sound) << "Sound: --- OpenAL Version: " << version << endl; 125 125 if (const char* vendor = alGetString(AL_VENDOR)) 126 COUT(4) << "Sound: --- OpenAL Vendor : " << vendor << std::endl;126 orxout(internal_info, context::sound) << "Sound: --- OpenAL Vendor : " << vendor << endl; 127 127 if (const char* types = alutGetMIMETypes(ALUT_LOADER_BUFFER)) 128 COUT(4) << "Sound: --- Supported MIME Types: " << types << std::endl;128 orxout(internal_info, context::sound) << "Sound: --- Supported MIME Types: " << types << endl; 129 129 else 130 COUT(2) << "Sound Warning: MIME Type retrieval failed: " << alutGetErrorString(alutGetError()) << std::endl;130 orxout(internal_warning, context::sound) << "MIME Type retrieval failed: " << alutGetErrorString(alutGetError()) << endl; 131 131 132 132 this->mute_[SoundType::All] = 1.0f; … … 152 152 resetPlaysSoundGuard.Dismiss(); 153 153 154 COUT(4) << "Sound: Initialisation complete" << std::endl;154 orxout(internal_status, context::sound) << "Sound: Initialisation complete" << endl; 155 155 } 156 156 … … 164 164 // If there are still used buffers around, well, that's just very bad... 165 165 if (this->soundBuffers_.size() != this->effectsPool_.size()) 166 COUT(1) << "Sound Error: Some sound buffers are still in use but OpenAL is about to shut down. Fix this!" << std::endl;166 orxout(internal_error, context::sound) << "Some sound buffers are still in use but OpenAL is about to shut down. Fix this!" << endl; 167 167 // Empty buffer pool and buffer list 168 168 this->effectsPool_.clear(); … … 171 171 // There should not be any sources in use anymore 172 172 if (!this->usedSoundSources_.empty()) 173 COUT(1) << "Sound Error: Some sound sources are still in use but OpenAL is about to shut down. Fix this!" << std::endl;173 orxout(internal_error, context::sound) << "Some sound sources are still in use but OpenAL is about to shut down. Fix this!" << endl; 174 174 while (!this->availableSoundSources_.empty()) 175 175 { … … 182 182 // Relieve context to destroy it 183 183 if (!alcMakeContextCurrent(NULL)) 184 COUT(1) << "Sound Error: Could not unset ALC context" << std::endl;184 orxout(internal_error, context::sound) << "Could not unset ALC context" << endl; 185 185 alcDestroyContext(this->context_); 186 186 if (ALCenum error = alcGetError(this->device_)) 187 187 { 188 188 if (error == AL_INVALID_OPERATION) 189 COUT(1) << "Sound Error: Could not destroy ALC context because it is the current one" << std::endl;189 orxout(internal_error, context::sound) << "Could not destroy ALC context because it is the current one" << endl; 190 190 else 191 COUT(1) << "Sound Error: Could not destroy ALC context because it is invalid" << std::endl;191 orxout(internal_error, context::sound) << "Could not destroy ALC context because it is invalid" << endl; 192 192 } 193 193 #ifdef AL_VERSION_1_1 194 194 if (!alcCloseDevice(this->device_)) 195 COUT(1) << "Sound Error: Could not destroy ALC device. This might be because there are still buffers in use!" << std::endl;195 orxout(internal_error, context::sound) << "Could not destroy ALC device. This might be because there are still buffers in use!" << endl; 196 196 #else 197 197 alcCloseDevice(this->device_); 198 198 #endif 199 199 if (!alutExit()) 200 COUT(1) << "Sound Error: Closing ALUT failed: " << alutGetErrorString(alutGetError()) << std::endl;200 orxout(internal_error, context::sound) << "Closing ALUT failed: " << alutGetErrorString(alutGetError()) << endl; 201 201 } 202 202 … … 244 244 if (crossFadeStep_ <= 0.0 || crossFadeStep_ >= 1.0 ) 245 245 { 246 COUT(2) << "Sound warning: fade step out of range, ignoring change." << std::endl;246 orxout(internal_warning, context::sound) << "Fade step out of range, ignoring change." << endl; 247 247 ResetConfigValue(crossFadeStep_); 248 248 } … … 253 253 float clampedVolume = clamp(this->volume_[type], 0.0f, 1.0f); 254 254 if (clampedVolume != this->volume_[type]) 255 COUT(2) << "Sound warning: Volume setting (" << type << ") out of range, clamping." << std::endl;255 orxout(internal_warning, context::sound) << "Volume setting (" << type << ") out of range, clamping." << endl; 256 256 this->updateVolume(type); 257 257 } … … 321 321 if (error == AL_INVALID_VALUE) 322 322 // @TODO: Follow this constantly appearing, nerve-racking warning 323 COUT(2) << "Sound: OpenAL: Invalid listener position" << std::endl;323 orxout(internal_error, context::sound) << "OpenAL: Invalid listener position" << endl; 324 324 } 325 325 … … 335 335 ALenum error = alGetError(); 336 336 if (error == AL_INVALID_VALUE) 337 COUT(2) << "Sound: OpenAL: Invalid listener orientation" << std::endl;337 orxout(internal_error, context::sound) << "OpenAL: Invalid listener orientation" << endl; 338 338 } 339 339 … … 346 346 if (it->first == newAmbient) 347 347 { 348 COUT(2) << "Sound warning: Will not play an AmbientSound twice." << std::endl;348 orxout(internal_warning, context::sound) << "Will not play an AmbientSound twice." << endl; 349 349 return; 350 350 } … … 520 520 catch (const std::exception& ex) 521 521 { 522 COUT(1) << ex.what() << std::endl;522 orxout(internal_error, context::sound) << ex.what() << endl; 523 523 return buffer; 524 524 } … … 614 614 alDeleteSources(1, &this->availableSoundSources_.back()); 615 615 if (alGetError()) 616 COUT(1) << "Sound Error: Failed to delete a source --> lost forever" << std::endl;616 orxout(internal_error, context::sound) << "Failed to delete a source --> lost forever" << endl; 617 617 this->availableSoundSources_.pop_back(); 618 618 } -
code/branches/output/src/orxonox/sound/SoundStreamer.cc
r7163 r8809 51 51 if (ret < 0) 52 52 { 53 COUT(2) << "Sound: libvorbisfile: File does not seem to be an Ogg Vorbis bitstream" << std::endl;53 orxout(internal_error, context::sound) << "libvorbisfile: File does not seem to be an Ogg Vorbis bitstream" << endl; 54 54 ov_clear(&vf); 55 55 return; … … 77 77 else if (ret < 0) 78 78 { 79 COUT(2) << "Sound: libvorbisfile: error reading the file" << std::endl;79 orxout(internal_error, context::sound) << "libvorbisfile: error reading the file" << endl; 80 80 ov_clear(&vf); 81 81 return; … … 91 91 alGetSourcei(audioSource, AL_BUFFERS_PROCESSED, &processed); 92 92 if (ALint error = alGetError()) 93 COUT(2) << "Sound Warning:Couldn't get number of processed buffers: "94 << SoundManager::getALErrorString(error) << std::endl;93 orxout(internal_warning, context::sound) << "Couldn't get number of processed buffers: " 94 << SoundManager::getALErrorString(error) << endl; 95 95 96 96 if(processed > 0) … … 99 99 alSourceUnqueueBuffers(audioSource, processed, buffers); 100 100 if (ALint error = alGetError()) 101 COUT(2) << "Sound Warning:Couldn't unqueue buffers: "102 << SoundManager::getALErrorString(error) << std::endl;101 orxout(internal_warning, context::sound) << "Couldn't unqueue buffers: " 102 << SoundManager::getALErrorString(error) << endl; 103 103 104 104 for(int i = 0; i < processed; i++) … … 111 111 else if (ret < 0) 112 112 { 113 COUT(2) << "Sound: libvorbisfile: error reading the file" << std::endl;113 orxout(internal_error, context::sound) << "libvorbisfile: error reading the file" << endl; 114 114 ov_clear(&vf); 115 115 return; … … 121 121 alSourceQueueBuffers(audioSource, processed, buffers); 122 122 if (ALint error = alGetError()) 123 COUT(2) << "Sound Warning:Couldn't queue buffers: "124 << SoundManager::getALErrorString(error) << std::endl;123 orxout(internal_warning, context::sound) << "Couldn't queue buffers: " 124 << SoundManager::getALErrorString(error) << endl; 125 125 } 126 126 } -
code/branches/output/src/orxonox/sound/WorldSound.cc
r8351 r8809 94 94 ALenum error = alGetError(); 95 95 if (error == AL_INVALID_VALUE) 96 COUT(2) << "Sound: OpenAL: Invalid sound position" << std::endl;96 orxout(internal_error, context::sound) << "OpenAL: Invalid sound position" << endl; 97 97 98 98 const Vector3& vel = this->getVelocity(); … … 100 100 error = alGetError(); 101 101 if (error == AL_INVALID_VALUE) 102 COUT(2) << "Sound: OpenAL: Invalid sound velocity" << std::endl;102 orxout(internal_error, context::sound) << "OpenAL: Invalid sound velocity" << endl; 103 103 104 104 const Vector3& direction = -this->getWorldOrientation().zAxis(); … … 106 106 error = alGetError(); 107 107 if (error == AL_INVALID_VALUE) 108 COUT(2) << "Sound: OpenAL: Invalid sound direction" << std::endl;108 orxout(internal_error, context::sound) << "OpenAL: Invalid sound direction" << endl; 109 109 } 110 110 } -
code/branches/output/src/orxonox/weaponsystem/WeaponMode.cc
r8706 r8809 188 188 this->munitiontype_ = identifier; 189 189 else 190 COUT(2) << "Warning: No munition class defined in WeaponMode " << this->getName() << std::endl;190 orxout(internal_warning) << "No munition class defined in WeaponMode " << this->getName() << endl; 191 191 this->updateMunition(); 192 192 } … … 249 249 Vector3 muzzleDirection; 250 250 muzzleDirection = target - this->muzzlePosition_; 251 // COUT(0) << "muzzleDirection " << muzzleDirection << endl;252 251 this->muzzleOrientation_ = (this->weapon_->getWorldOrientation() * WorldEntity::FRONT).getRotationTo(muzzleDirection) * this->weapon_->getWorldOrientation(); 253 252 } -
code/branches/output/src/orxonox/worldentities/BigExplosion.cc
r7284 r8809 61 61 catch (const std::exception& ex) 62 62 { 63 COUT(1) << "Error: Couln't load particle effect in BigExplosion: " << ex.what() << std::endl;63 orxout(internal_error) << "Couldn't load particle effect in BigExplosion: " << ex.what() << endl; 64 64 this->initZero(); 65 65 } -
code/branches/output/src/orxonox/worldentities/ControllableEntity.cc
r8706 r8809 457 457 } 458 458 else 459 COUT(2) << "Warning: ControllableEntity \"" << this->getName() << "\" already has a Controller." << std::endl;459 orxout(internal_warning) << "ControllableEntity \"" << this->getName() << "\" already has a Controller." << endl; 460 460 } 461 461 -
code/branches/output/src/orxonox/worldentities/ExplosionChunk.cc
r7284 r8809 61 61 catch (const std::exception& ex) 62 62 { 63 COUT(1) << "Error: Couln't load particle effect in ExplosionChunk: " << ex.what() << std::endl;63 orxout(internal_error) << "Couldn't load particle effect in ExplosionChunk: " << ex.what() << endl; 64 64 this->fire_ = 0; 65 65 this->smoke_ = 0; -
code/branches/output/src/orxonox/worldentities/MobileEntity.cc
r8727 r8809 189 189 if (type == WorldEntity::Static) 190 190 { 191 CCOUT(1) << "Error: Cannot tell a MobileEntity to have static collision type! Ignoring." << std::endl;191 orxout(internal_warning) << "Cannot tell a MobileEntity to have static collision type! Ignoring." << endl; 192 192 assert(false); // Only in debug mode 193 193 return false; -
code/branches/output/src/orxonox/worldentities/SpawnPoint.cc
r8706 r8809 48 48 this->getGametype()->registerSpawnPoint(this); 49 49 else 50 COUT(1) << "Error: SpawnPoint has no Gametype" << std::endl;50 orxout(internal_error) << "SpawnPoint has no Gametype" << endl; 51 51 52 52 this->setSyncMode(ObjectDirection::None); -
code/branches/output/src/orxonox/worldentities/StaticEntity.cc
r6417 r8809 63 63 if (this->addedToPhysicalWorld()) 64 64 { 65 CCOUT(2) << "Warning: Attempting to change the position of a StaticEntity at physics run time. Ignoring change." << std::endl;65 orxout(internal_warning) << "Attempting to change the position of a StaticEntity at physics run time. Ignoring change." << endl; 66 66 return; 67 67 } … … 80 80 if (this->addedToPhysicalWorld()) 81 81 { 82 CCOUT(2) << "Warning: Attempting to change the orientation of a StaticEntity at physics run time. Ignoring change." << std::endl;82 orxout(internal_warning) << "Attempting to change the orientation of a StaticEntity at physics run time. Ignoring change." << endl; 83 83 return; 84 84 } … … 97 97 if (type == WorldEntity::Kinematic || type == WorldEntity::Dynamic) 98 98 { 99 CCOUT(1) << "Error: Cannot tell a StaticEntity to have kinematic or dynamic collision type! Ignoring." << std::endl;99 orxout(internal_warning) << "Cannot tell a StaticEntity to have kinematic or dynamic collision type! Ignoring." << endl; 100 100 assert(false); // Only in debug mode 101 101 return false; -
code/branches/output/src/orxonox/worldentities/WorldEntity.cc
r8706 r8809 311 311 this->collisionTypeSynchronised_ != None) 312 312 { 313 CCOUT(1) << "Error when collsion Type was received over network. Unknown enum value:" << this->collisionTypeSynchronised_ << std::endl;313 orxout(internal_error) << "Error when collsion Type was received over network. Unknown enum value:" << this->collisionTypeSynchronised_ << endl; 314 314 } 315 315 else if (this->collisionTypeSynchronised_ != collisionType_) 316 316 { 317 317 if (this->parent_) 318 CCOUT(2) << "Warning: Network connection tried to set the collision type of an attached WE. Ignoring." << std::endl;318 orxout(internal_warning) << "Network connection tried to set the collision type of an attached WE. Ignoring." << endl; 319 319 else 320 320 this->setCollisionType(this->collisionTypeSynchronised_); … … 373 373 if (object == this) 374 374 { 375 COUT(2) << "Warning: Can't attach a WorldEntity to itself." << std::endl;375 orxout(internal_warning) << "Can't attach a WorldEntity to itself." << endl; 376 376 return; 377 377 } … … 406 406 if (!newParent->hasPhysics()) 407 407 { 408 COUT(2) << "Warning: Cannot attach a physical object to a non physical one." << std::endl;408 orxout(internal_warning) << " Cannot attach a physical object to a non physical one." << endl; 409 409 return false; 410 410 } 411 411 else if (this->isDynamic()) 412 412 { 413 COUT(2) << "Warning: Cannot attach a dynamic object to a WorldEntity." << std::endl;413 orxout(internal_warning) << "Cannot attach a dynamic object to a WorldEntity." << endl; 414 414 return false; 415 415 } 416 416 else if (this->isKinematic() && newParent->isDynamic()) 417 417 { 418 COUT(2) << "Warning: Cannot attach a kinematic object to a dynamic one." << std::endl;418 orxout(internal_warning) << "Cannot attach a kinematic object to a dynamic one." << endl; 419 419 return false; 420 420 } 421 421 else if (this->isKinematic()) 422 422 { 423 COUT(2) << "Warning: Cannot attach a kinematic object to a static or kinematic one: Not yet implemented." << std::endl;423 orxout(internal_warning) << "Cannot attach a kinematic object to a static or kinematic one: Not yet implemented." << endl; 424 424 return false; 425 425 } … … 455 455 if (it == this->children_.end()) 456 456 { 457 CCOUT(2) << "Warning: Cannot detach an object that is not a child." << std::endl;457 orxout(internal_warning) << "Cannot detach an object that is not a child." << endl; 458 458 return; 459 459 } … … 799 799 if (this->parent_) 800 800 { 801 CCOUT(2) << "Warning: Cannot set the collision type of a WorldEntity with a parent." << std::endl;801 orxout(internal_warning) << "Cannot set the collision type of a WorldEntity with a parent." << endl; 802 802 return; 803 803 } … … 822 822 if (!this->node_->getScale().positionEquals(Vector3(1, 1, 1), 0.001)) 823 823 { 824 CCOUT(2) << "Warning: Cannot create a physical body if there is scaling applied to the node: Not yet implemented." << std::endl;824 orxout(internal_warning) << "Cannot create a physical body if there is scaling applied to the node: Not yet implemented." << endl; 825 825 return; 826 826 } … … 971 971 { 972 972 // Use default values to avoid very large or very small values 973 CCOUT(4) << "Warning: Setting the internal physical mass to 1.0 because mass_ is 0.0" << std::endl;973 orxout(internal_warning) << "Setting the internal physical mass to 1.0 because mass_ is 0.0" << endl; 974 974 btVector3 inertia(0, 0, 0); 975 975 this->collisionShape_->calculateLocalInertia(1.0f, inertia); -
code/branches/output/src/orxonox/worldentities/pawns/FpsPlayer.cc
r7184 r8809 132 132 if (type != WorldEntity::Dynamic) 133 133 { 134 CCOUT(1) << "Error: Cannot tell a FpsPlayer not to be dynamic! Ignoring." << std::endl;134 orxout(internal_warning) << "Cannot tell a FpsPlayer not to be dynamic! Ignoring." << endl; 135 135 assert(false); // Only in debug mode 136 136 return false; -
code/branches/output/src/orxonox/worldentities/pawns/SpaceShip.cc
r8727 r8809 145 145 if (type != WorldEntity::Dynamic) 146 146 { 147 CCOUT(1) << "Error: Cannot tell a SpaceShip not to be dynamic! Ignoring." << std::endl;147 orxout(internal_warning) << "Cannot tell a SpaceShip not to be dynamic! Ignoring." << endl; 148 148 assert(false); // Only in debug mode 149 149 return false; … … 507 507 if (camera == 0) 508 508 { 509 COUT(2) << "Failed to reset camera!";509 orxout(internal_warning) << "Failed to reset camera!" << endl; 510 510 return; 511 511 }
Note: See TracChangeset
for help on using the changeset viewer.