[Orxonox-commit 4138] r8809 - in code/branches/output/src: libraries/tools libraries/util/output orxonox orxonox/collisionshapes orxonox/controllers orxonox/gamestates orxonox/gametypes orxonox/graphics orxonox/interfaces orxonox/items orxonox/overlays orxonox/pickup orxonox/sound orxonox/weaponsystem orxonox/worldentities orxonox/worldentities/pawns
landauf at orxonox.net
landauf at orxonox.net
Mon Aug 1 16:37:38 CEST 2011
Author: landauf
Date: 2011-08-01 16:37:38 +0200 (Mon, 01 Aug 2011)
New Revision: 8809
Modified:
code/branches/output/src/libraries/tools/BillboardSet.cc
code/branches/output/src/libraries/tools/Mesh.cc
code/branches/output/src/libraries/tools/ParticleInterface.cc
code/branches/output/src/libraries/tools/ResourceCollection.cc
code/branches/output/src/libraries/tools/ResourceLocation.cc
code/branches/output/src/libraries/tools/Shader.cc
code/branches/output/src/libraries/tools/Timer.h
code/branches/output/src/libraries/util/output/OutputDefinitions.h
code/branches/output/src/orxonox/ChatHistory.cc
code/branches/output/src/orxonox/ChatInputHandler.cc
code/branches/output/src/orxonox/Level.cc
code/branches/output/src/orxonox/LevelInfo.cc
code/branches/output/src/orxonox/LevelManager.cc
code/branches/output/src/orxonox/MoodManager.cc
code/branches/output/src/orxonox/PlayerManager.cc
code/branches/output/src/orxonox/Radar.cc
code/branches/output/src/orxonox/Scene.cc
code/branches/output/src/orxonox/Test.cc
code/branches/output/src/orxonox/Test.h
code/branches/output/src/orxonox/collisionshapes/CollisionShape.cc
code/branches/output/src/orxonox/collisionshapes/CompoundCollisionShape.cc
code/branches/output/src/orxonox/controllers/ArtificialController.cc
code/branches/output/src/orxonox/controllers/HumanController.cc
code/branches/output/src/orxonox/controllers/NewHumanController.cc
code/branches/output/src/orxonox/gamestates/GSLevel.cc
code/branches/output/src/orxonox/gamestates/GSMasterServer.cc
code/branches/output/src/orxonox/gamestates/GSRoot.cc
code/branches/output/src/orxonox/gamestates/GSServer.cc
code/branches/output/src/orxonox/gametypes/Asteroids.cc
code/branches/output/src/orxonox/gametypes/Deathmatch.cc
code/branches/output/src/orxonox/gametypes/Dynamicmatch.cc
code/branches/output/src/orxonox/gametypes/Gametype.cc
code/branches/output/src/orxonox/gametypes/LastManStanding.cc
code/branches/output/src/orxonox/gametypes/LastTeamStanding.cc
code/branches/output/src/orxonox/gametypes/TeamBaseMatch.cc
code/branches/output/src/orxonox/gametypes/UnderAttack.cc
code/branches/output/src/orxonox/graphics/Model.cc
code/branches/output/src/orxonox/graphics/ParticleEmitter.cc
code/branches/output/src/orxonox/interfaces/PickupCarrier.cc
code/branches/output/src/orxonox/interfaces/Pickupable.cc
code/branches/output/src/orxonox/interfaces/RadarViewable.cc
code/branches/output/src/orxonox/items/Engine.cc
code/branches/output/src/orxonox/overlays/InGameConsole.cc
code/branches/output/src/orxonox/overlays/OrxonoxOverlay.cc
code/branches/output/src/orxonox/pickup/PickupIdentifier.cc
code/branches/output/src/orxonox/sound/AmbientSound.cc
code/branches/output/src/orxonox/sound/BaseSound.cc
code/branches/output/src/orxonox/sound/SoundBuffer.cc
code/branches/output/src/orxonox/sound/SoundManager.cc
code/branches/output/src/orxonox/sound/SoundStreamer.cc
code/branches/output/src/orxonox/sound/WorldSound.cc
code/branches/output/src/orxonox/weaponsystem/WeaponMode.cc
code/branches/output/src/orxonox/worldentities/BigExplosion.cc
code/branches/output/src/orxonox/worldentities/ControllableEntity.cc
code/branches/output/src/orxonox/worldentities/ExplosionChunk.cc
code/branches/output/src/orxonox/worldentities/MobileEntity.cc
code/branches/output/src/orxonox/worldentities/SpawnPoint.cc
code/branches/output/src/orxonox/worldentities/StaticEntity.cc
code/branches/output/src/orxonox/worldentities/WorldEntity.cc
code/branches/output/src/orxonox/worldentities/pawns/FpsPlayer.cc
code/branches/output/src/orxonox/worldentities/pawns/SpaceShip.cc
Log:
Replaced COUT() with orxout() in tools and orxonox library. Requires quite some fine-tuning.
Modified: code/branches/output/src/libraries/tools/BillboardSet.cc
===================================================================
--- code/branches/output/src/libraries/tools/BillboardSet.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/libraries/tools/BillboardSet.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -79,7 +79,7 @@
}
catch (...)
{
- COUT(1) << "Error: Couln't load billboard \"" << file << '"' << std::endl;
+ orxout(internal_error) << "Couldn't load billboard \"" << file << '"' << endl;
this->billboardSet_ = 0;
}
@@ -102,7 +102,7 @@
}
catch (...)
{
- COUT(1) << "Error: Couln't load billboard \"" << file << '"' << std::endl;
+ orxout(internal_error) << "Couldn't load billboard \"" << file << '"' << endl;
this->billboardSet_ = 0;
}
Modified: code/branches/output/src/libraries/tools/Mesh.cc
===================================================================
--- code/branches/output/src/libraries/tools/Mesh.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/libraries/tools/Mesh.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -71,7 +71,7 @@
}
catch (...)
{
- COUT(1) << "Error: Couln't load mesh \"" << meshsource << '"' << std::endl;
+ orxout(internal_error) << "Couldn't load mesh \"" << meshsource << '"' << endl;
this->entity_ = 0;
}
}
Modified: code/branches/output/src/libraries/tools/ParticleInterface.cc
===================================================================
--- code/branches/output/src/libraries/tools/ParticleInterface.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/libraries/tools/ParticleInterface.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -77,7 +77,7 @@
}
catch (...)
{
- COUT(1) << "Error: Couln't load particle system \"" << templateName << '"' << std::endl;
+ orxout(internal_error) << "Couldn't load particle system \"" << templateName << '"' << endl;
this->particleSystem_ = 0;
}
}
Modified: code/branches/output/src/libraries/tools/ResourceCollection.cc
===================================================================
--- code/branches/output/src/libraries/tools/ResourceCollection.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/libraries/tools/ResourceCollection.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -61,7 +61,7 @@
{
if (resourceGroup.empty())
{
- COUT(2) << "Warning: \"\" is not a valid resource group." << std::endl;
+ orxout(internal_warning) << "\"\" is not a valid resource group." << endl;
return;
}
if (!resourceLocations_.empty())
Modified: code/branches/output/src/libraries/tools/ResourceLocation.cc
===================================================================
--- code/branches/output/src/libraries/tools/ResourceLocation.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/libraries/tools/ResourceLocation.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -79,7 +79,7 @@
path = PathConfig::getExternalDataPath() / this->getPath();
else
{
- COUT(2) << "Warning: ResourceLocation '" << this->getPath() << "' does not seem to exist" << std::endl;
+ orxout(internal_warning) << "ResourceLocation '" << this->getPath() << "' does not seem to exist" << endl;
return;
}
@@ -100,7 +100,7 @@
}
catch (const Ogre::Exception& ex)
{
- COUT(1) << "Removing of a ResourceLocation failed: " << ex.what() << std::endl;
+ orxout(internal_error) << "Removing of a ResourceLocation failed: " << ex.what() << endl;
}
}
}
Modified: code/branches/output/src/libraries/tools/Shader.cc
===================================================================
--- code/branches/output/src/libraries/tools/Shader.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/libraries/tools/Shader.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -140,7 +140,7 @@
Ogre::CompositorManager::getSingleton().setCompositorEnabled(viewport, this->compositorName_, this->isVisible() && viewport->getCamera() && this->scenemanager_ == viewport->getCamera()->getSceneManager());
}
else
- COUT(2) << "Warning: Couldn't load compositor with name \"" << this->compositorName_ << "\"." << std::endl;
+ orxout(internal_warning) << "Couldn't load compositor with name \"" << this->compositorName_ << "\"." << endl;
}
this->oldcompositorName_ = this->compositorName_;
}
@@ -216,10 +216,10 @@
}
}
else
- COUT(2) << "Warning: No pass " << it->pass_ << " in technique " << it->technique_ << " in compositor \"" << this->compositorName_ << "\" or pass has no shader." << std::endl;
+ orxout(internal_warning) << "No pass " << it->pass_ << " in technique " << it->technique_ << " in compositor \"" << this->compositorName_ << "\" or pass has no shader." << endl;
}
else
- COUT(2) << "Warning: No technique " << it->technique_ << " in compositor \"" << this->compositorName_ << "\" or technique has no pass with shader." << std::endl;
+ orxout(internal_warning) << "No technique " << it->technique_ << " in compositor \"" << this->compositorName_ << "\" or technique has no pass with shader." << endl;
}
this->parameters_.clear();
}
Modified: code/branches/output/src/libraries/tools/Timer.h
===================================================================
--- code/branches/output/src/libraries/tools/Timer.h 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/libraries/tools/Timer.h 2011-08-01 14:37:38 UTC (rev 8809)
@@ -65,7 +65,7 @@
void MyClass::myFunction()
{
- COUT(0) << "Hello World" << std::endl;
+ orxout() << "Hello World" << endl;
}
@endcode
Modified: code/branches/output/src/libraries/util/output/OutputDefinitions.h
===================================================================
--- code/branches/output/src/libraries/util/output/OutputDefinitions.h 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/libraries/util/output/OutputDefinitions.h 2011-08-01 14:37:38 UTC (rev 8809)
@@ -96,6 +96,13 @@
REGISTER_OUTPUT_CONTEXT(network);
REGISTER_OUTPUT_CONTEXT(packets);
REGISTER_OUTPUT_CONTEXT(master_server);
+ REGISTER_OUTPUT_CONTEXT(sound);
+ REGISTER_OUTPUT_CONTEXT(lod);
+ REGISTER_OUTPUT_CONTEXT(pickups);
+ REGISTER_OUTPUT_CONTEXT(quests);
+ REGISTER_OUTPUT_CONTEXT(notifications);
+ REGISTER_OUTPUT_CONTEXT(trigger);
+ REGISTER_OUTPUT_CONTEXT(docking);
}
}
}
Modified: code/branches/output/src/orxonox/ChatHistory.cc
===================================================================
--- code/branches/output/src/orxonox/ChatHistory.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/ChatHistory.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -130,7 +130,7 @@
{
/* output the line to the file if logging is enabled */
if( this->hist_log_enabled )
- this->hist_logfile << toadd << std::endl;
+ this->hist_logfile << toadd << endl;
return 0;
}
@@ -153,7 +153,7 @@
if( !this->hist_logfile )
{ this->hist_log_enabled = false;
#ifndef CHATTEST
- COUT(2) << "Warning: Could not open logfile." << std::endl;
+ orxout(internal_warning) << "Could not open logfile." << endl;
#endif
}
@@ -184,10 +184,10 @@
/* output all the strings */
for( it = this->hist_buffer.begin(); it != this->hist_buffer.end();
++it )
- std::cout << *it << std::endl;
+ orxout(debug_output) << *it << endl;
/* output size */
- std::cout << "Size: " << hist_buffer.size() << std::endl;
+ orxout(debug_output) << "Size: " << hist_buffer.size() << endl;
}
#ifndef CHATTEST
Modified: code/branches/output/src/orxonox/ChatInputHandler.cc
===================================================================
--- code/branches/output/src/orxonox/ChatInputHandler.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/ChatInputHandler.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -198,8 +198,8 @@
{
/* sanity checks */
if( !tocolor )
- COUT(2) << "Empty ListBoxTextItem given to "
- "ChatInputhandler::sub_setcolor().\n";
+ orxout(internal_warning) << "Empty ListBoxTextItem given to "
+ "ChatInputhandler::sub_setcolor()." << endl;
/* "hash" the name */
int hash = 0;
Modified: code/branches/output/src/orxonox/Level.cc
===================================================================
--- code/branches/output/src/orxonox/Level.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/Level.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -87,7 +87,7 @@
void Level::networkcallback_applyXMLFile()
{
- COUT(0) << "Loading level \"" << this->xmlfilename_ << "\"..." << std::endl;
+ orxout(user_status) << "Loading level \"" << this->xmlfilename_ << "\"..." << endl;
ClassTreeMask mask;
mask.exclude(Class(BaseObject));
@@ -114,7 +114,7 @@
if (!identifier || !identifier->isA(Class(Gametype)))
{
- COUT(0) << "Error: \"" << gametype << "\" is not a valid gametype." << std::endl;
+ orxout(internal_error) << "\"" << gametype << "\" is not a valid gametype." << endl;
identifier = Class(Gametype);
this->gametype_ = "Gametype";
}
@@ -156,7 +156,7 @@
std::string meshName = lodInformation->getMeshName();
// this->lodInformation_.insert(std::make_pair(meshName,lodInformation));
if( this->lodInformation_.find(meshName) != this->lodInformation_.end())
- CCOUT(4) << "replacing lod information for " << meshName << endl;
+ orxout(verbose, context::lod) << "replacing lod information for " << meshName << endl;
this->lodInformation_[meshName] = lodInformation;
}
@@ -170,13 +170,13 @@
void Level::playerEntered(PlayerInfo* player)
{
- COUT(3) << "player entered level (id: " << player->getClientID() << ", name: " << player->getName() << ')' << std::endl;
+ orxout(internal_info) << "player entered level (id: " << player->getClientID() << ", name: " << player->getName() << ')' << endl;
player->setGametype(this->getGametype());
}
void Level::playerLeft(PlayerInfo* player)
{
- COUT(3) << "player left level (id: " << player->getClientID() << ", name: " << player->getName() << ')' << std::endl;
+ orxout(internal_info) << "player left level (id: " << player->getClientID() << ", name: " << player->getName() << ')' << endl;
player->setGametype(0);
}
}
Modified: code/branches/output/src/orxonox/LevelInfo.cc
===================================================================
--- code/branches/output/src/orxonox/LevelInfo.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/LevelInfo.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -124,7 +124,7 @@
{
if(!this->validateTag(tag))
{
- COUT(2) << "Bad LevelInfo tag '" << tag << "' in " << this->getXMLFilename() << ". Ignoring..." << std::endl;
+ orxout(internal_warning) << "Bad LevelInfo tag '" << tag << "' in " << this->getXMLFilename() << ". Ignoring..." << endl;
return false;
}
bool success = this->tags_.insert(*LevelInfoItem::possibleTags_s.find(tag)).second;
Modified: code/branches/output/src/orxonox/LevelManager.cc
===================================================================
--- code/branches/output/src/orxonox/LevelManager.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/LevelManager.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -250,7 +250,7 @@
mask.include(Class(LevelInfo));
// Iterate over all the found *.oxw files
- COUT(3) << "Loading LevelInfos..." << std::endl;
+ orxout(internal_info) << "Loading LevelInfos..." << endl;
std::set<std::string> names;
for (Ogre::StringVector::const_iterator it = levels->begin(); it != levels->end(); ++it)
{
@@ -280,12 +280,12 @@
// Warn about levels with the same name.
if(!names.insert(info->getName()).second)
- COUT(2) << "Warning: Multiple levels (" << info->getXMLFilename() << ") with name '" << info->getName() << "' found!" << std::endl;
+ orxout(internal_warning) << "Multiple levels (" << info->getXMLFilename() << ") with name '" << info->getName() << "' found!" << endl;
// Warn about multiple items so that it gets fixed quickly
if(availableLevels_.find(info) != availableLevels_.end())
{
- COUT(2) << "Warning: Multiple levels (" << info->getXMLFilename() << ") with same name '" << info->getName() << "' and filename found! Exluding..." << std::endl;
+ orxout(internal_warning) << "Multiple levels (" << info->getXMLFilename() << ") with same name '" << info->getName() << "' and filename found! Exluding..." << endl;
// Delete LevelInfoItem to avoid a dangling pointer
delete info;
}
Modified: code/branches/output/src/orxonox/MoodManager.cc
===================================================================
--- code/branches/output/src/orxonox/MoodManager.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/MoodManager.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -53,7 +53,7 @@
if (!Resource::exists(path))
{
// TODO: Non-fatal error handling (non-critical resource missing)
- COUT(2) << "Mood Warning: Folder for default mood (" << MoodManager::defaultMood_ << ") does not exist!" << std::endl;
+ orxout(internal_warning) << "Mood Warning: Folder for default mood (" << MoodManager::defaultMood_ << ") does not exist!" << endl;
}
// @TODO
@@ -81,12 +81,12 @@
const std::string& path = "ambient/" + mood_ + "/.";
if (!Resource::exists(path))
{
- COUT(3) << "Mood " << mood_ << " does not exist. Will not change." << std::endl;
+ orxout(internal_warning) << "Mood " << mood_ << " does not exist. Will not change." << endl;
this->setMood(oldMood_);
}
else
{
- COUT(3) << "Mood changed to " << mood_ << std::endl;
+ orxout(internal_info) << "Mood changed to " << mood_ << endl;
MoodListener::changedMood(mood_);
}
}
Modified: code/branches/output/src/orxonox/PlayerManager.cc
===================================================================
--- code/branches/output/src/orxonox/PlayerManager.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/PlayerManager.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -56,7 +56,7 @@
if (GameMode::isMaster())
{
if (clientID != 0)
- COUT(3) << "client connected" << std::endl;
+ orxout(internal_info) << "client connected" << endl;
// create new HumanPlayer instance
HumanPlayer* player = new HumanPlayer(0);
@@ -76,7 +76,7 @@
if (GameMode::isMaster())
{
if (clientID != 0)
- COUT(3) << "client disconnected" << std::endl;
+ orxout(internal_info) << "client disconnected" << endl;
// remove from clients-map
PlayerInfo* player = this->clients_[clientID];
Modified: code/branches/output/src/orxonox/Radar.cc
===================================================================
--- code/branches/output/src/orxonox/Radar.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/Radar.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -194,12 +194,12 @@
void Radar::listObjects() const
{
- COUT(3) << "List of RadarObjects:\n";
+ orxout(debug_output) << "List of RadarObjects:" << endl;
// iterate through all Radar Objects
unsigned int i = 0;
for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it, ++i)
{
- COUT(3) << i++ << ": " << (*it)->getRVWorldPosition() << std::endl;
+ orxout(debug_output) << i++ << ": " << (*it)->getRVWorldPosition() << endl;
}
}
Modified: code/branches/output/src/orxonox/Scene.cc
===================================================================
--- code/branches/output/src/orxonox/Scene.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/Scene.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -140,13 +140,13 @@
{
if (range.length() < 10.0f)
{
- CCOUT(2) << "Warning: Setting the negative world range to a very small value: "
- << multi_cast<std::string>(range) << std::endl;
+ orxout(internal_warning) << "Setting the negative world range to a very small value: "
+ << multi_cast<std::string>(range) << endl;
}
if (this->hasPhysics())
{
- CCOUT(2) << "Warning: Attempting to set the physical world range at run time. "
- << "This causes a complete physical reload which might take some time." << std::endl;
+ orxout(internal_warning) << "Attempting to set the physical world range at run time. "
+ << "This causes a complete physical reload which might take some time." << endl;
this->setPhysicalWorld(false);
this->negativeWorldRange_ = range;
this->setPhysicalWorld(true);
@@ -159,13 +159,13 @@
{
if (range.length() < 10.0f)
{
- CCOUT(2) << "Warning: Setting the positive world range to a very small value: "
- << multi_cast<std::string>(range) << std::endl;
+ orxout(internal_warning) << "Setting the positive world range to a very small value: "
+ << multi_cast<std::string>(range) << endl;
}
if (this->hasPhysics())
{
- CCOUT(2) << "Warning: Attempting to set the physical world range at run time. "
- << "This causes a complete physical reload which might take some time." << std::endl;
+ orxout(internal_warning) << "Attempting to set the physical world range at run time. "
+ << "This causes a complete physical reload which might take some time." << endl;
this->setPhysicalWorld(false);
this->positiveWorldRange_ = range;
this->setPhysicalWorld(true);
Modified: code/branches/output/src/orxonox/Test.cc
===================================================================
--- code/branches/output/src/orxonox/Test.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/Test.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -126,7 +126,7 @@
// temp = mem;
// mt2.importData( temp );
// assert( temp-mem == mt1.getNetworkSize() );
- // COUT(0) << mt2 << endl;
+ // orxout() << mt2 << endl;
// if(!Core::isMaster())
// call2(0, "bal", "a", "n", "ce");
// callMemberNetworkFunction( Test, checkU1, this->getObjectID(), 0 );
@@ -134,19 +134,19 @@
void Test::printBlaBla(std::string s1, std::string s2, std::string s3, std::string s4, std::string s5)
{
- COUT(0) << s1 << s2 << s3 << s4 << s5 << endl;
+ orxout() << s1 << s2 << s3 << s4 << s5 << endl;
}
- void Test::checkU1(){ COUT(1) << "U1 changed: " << u1 << std::endl; }
- void Test::checkU2(){ COUT(1) << "U2 changed: " << u2 << std::endl; }
- void Test::checkU3(){ COUT(1) << "U3 changed: " << u3 << std::endl; }
- void Test::checkU4(){ COUT(1) << "U4 changed: " << u4 << std::endl; }
+ void Test::checkU1(){ orxout() << "U1 changed: " << u1 << endl; }
+ void Test::checkU2(){ orxout() << "U2 changed: " << u2 << endl; }
+ void Test::checkU3(){ orxout() << "U3 changed: " << u3 << endl; }
+ void Test::checkU4(){ orxout() << "U4 changed: " << u4 << endl; }
- void Test::checkS1(){ COUT(1) << "S1 changed: " << s1 << std::endl; }
- void Test::checkS2(){ COUT(1) << "S2 changed: " << s2 << std::endl; }
- void Test::checkS3(){ COUT(1) << "S3 changed: " << s3 << std::endl; }
- void Test::checkS4(){ COUT(1) << "S4 changed: " << s4 << std::endl; }
+ void Test::checkS1(){ orxout() << "S1 changed: " << s1 << endl; }
+ void Test::checkS2(){ orxout() << "S2 changed: " << s2 << endl; }
+ void Test::checkS3(){ orxout() << "S3 changed: " << s3 << endl; }
+ void Test::checkS4(){ orxout() << "S4 changed: " << s4 << endl; }
- void Test::printPointer(){ CCOUT(1) << "pointer: " << this->pointer_ << endl; }
+ void Test::printPointer(){ orxout() << "pointer: " << this->pointer_ << endl; }
}
Modified: code/branches/output/src/orxonox/Test.h
===================================================================
--- code/branches/output/src/orxonox/Test.h 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/Test.h 2011-08-01 14:37:38 UTC (rev 8809)
@@ -107,7 +107,7 @@
{ mySet_.insert(2); }
void blub2()
- { for( std::set<uint32_t>::iterator it=mySet_.begin(); it!=mySet_.end(); ++it ) COUT(0) << *it << endl; }
+ { for( std::set<uint32_t>::iterator it=mySet_.begin(); it!=mySet_.end(); ++it ) orxout() << *it << endl; }
};
}
Modified: code/branches/output/src/orxonox/collisionshapes/CollisionShape.cc
===================================================================
--- code/branches/output/src/orxonox/collisionshapes/CollisionShape.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/collisionshapes/CollisionShape.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -202,7 +202,7 @@
// If the vectors are not in the same direction, then this is no longer a uniform scaling.
if(scale_.crossProduct(scale).squaredLength() != 0.0f)
{
- CCOUT(2) << "Warning: Non-uniform scaling is not yet supported." << endl;
+ orxout(internal_warning) << "Non-uniform scaling is not yet supported." << endl;
return;
}
Modified: code/branches/output/src/orxonox/collisionshapes/CompoundCollisionShape.cc
===================================================================
--- code/branches/output/src/orxonox/collisionshapes/CompoundCollisionShape.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/collisionshapes/CompoundCollisionShape.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -97,7 +97,7 @@
if (this->attachedShapes_.find(shape) != this->attachedShapes_.end())
{
- CCOUT(2) << "Warning: Attaching a CollisionShape twice is not yet supported." << std::endl;
+ orxout(internal_warning) << "Attaching a CollisionShape twice is not yet supported." << endl;
return;
}
@@ -138,7 +138,7 @@
this->updatePublicShape();
}
else
- CCOUT(2) << "Warning: Cannot detach non child collision shape" << std::endl;
+ orxout(internal_warning) << "Cannot detach non child collision shape" << endl;
}
/**
@@ -167,7 +167,7 @@
// Check whether the input shape belongs to this CompoundCollisionShape.
if (it == this->attachedShapes_.end())
{
- CCOUT(2) << "Warning: Cannot update child shape: Instance not a child." << std::endl;
+ orxout(internal_warning) << "Cannot update child shape: Instance not a child." << endl;
return;
}
Modified: code/branches/output/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- code/branches/output/src/orxonox/controllers/ArtificialController.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/controllers/ArtificialController.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -97,7 +97,7 @@
{
if (it->myMaster_ == this)
{
- COUT(1) << "error: " << this << " is still master in " << (*it) << std::endl;
+ orxout(internal_error) << this << " is still master in " << (*it) << endl;
it->myMaster_ = 0;
}
@@ -106,7 +106,7 @@
std::vector<ArtificialController*>::iterator it2 = std::find(it->slaves_.begin(), it->slaves_.end(), this);
if (it2 != it->slaves_.end())
{
- COUT(1) << "error: " << this << " is still slave in " << (*it) << std::endl;
+ orxout(internal_error) << this << " is still slave in " << (*it) << endl;
it->slaves_.erase(it2);
}
else
@@ -736,7 +736,7 @@
float speedDiv = this->getControllableEntity()->getVelocity().squaredLength() - this->target_->getVelocity().squaredLength();
-COUT(0) << "~follow distance: " << distance << "SpeedCounter: " << this->speedCounter_ << "~speedDiv: " << speedDiv << std::endl;
+orxout() << "~follow distance: " << distance << "SpeedCounter: " << this->speedCounter_ << "~speedDiv: " << speedDiv << endl;
if (distance < 800)
{
if (distance < 200)
Modified: code/branches/output/src/orxonox/controllers/HumanController.cc
===================================================================
--- code/branches/output/src/orxonox/controllers/HumanController.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/controllers/HumanController.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -92,7 +92,7 @@
{
Camera* camera = HumanController::localController_s->controllableEntity_->getCamera();
if (!camera)
- COUT(3) << "HumanController, Warning: Using a ControllableEntity without Camera" << std::endl;
+ orxout(internal_warning) << "HumanController, Warning: Using a ControllableEntity without Camera" << endl;
}
}
@@ -196,7 +196,7 @@
this->boostingTimeout_.startTimer();
this->controllableEntity_->boost(this->boosting_);
- COUT(4) << "Start boosting" << endl;
+// orxout() << "Start boosting" << endl;
}
}
@@ -210,7 +210,7 @@
this->boostingTimeout_.stopTimer();
this->controllableEntity_->boost(this->boosting_);
- COUT(4) << "Stop boosting" << endl;
+// orxout() << "Stop boosting" << endl;
}
void HumanController::greet()
@@ -256,8 +256,8 @@
const Vector3& position = HumanController::localController_s->controllableEntity_->getPosition();
const Quaternion& orientation = HumanController::localController_s->controllableEntity_->getOrientation();
- COUT(0) << "position=\"" << position.x << ", " << position.y << ", " << position.z << "\" ";
- COUT(0) << "orientation=\"" << orientation.w << ", " << orientation.x << ", " << orientation.y << ", " << orientation.z << "\"" << std::endl;
+ orxout(message) << "position=\"" << position.x << ", " << position.y << ", " << position.z << "\" "
+ << "orientation=\"" << orientation.w << ", " << orientation.x << ", " << orientation.y << ", " << orientation.z << "\"" << endl;
}
}
Modified: code/branches/output/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- code/branches/output/src/orxonox/controllers/NewHumanController.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/controllers/NewHumanController.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -387,7 +387,7 @@
Ogre::RaySceneQueryResult::iterator itr;
for (itr = result.begin(); itr != result.end(); ++itr)
{
-// CCOUT(0) << "testing object as target" << endl;
+// orxout() << "testing object as target" << endl;
if (itr->movable->isInScene() && itr->movable->getMovableType() == "Entity" && itr->distance > 200)
{
// Try to cast the user pointer
Modified: code/branches/output/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/branches/output/src/orxonox/gamestates/GSLevel.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/gamestates/GSLevel.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -154,7 +154,7 @@
this->staticObjects_.insert(*it);
// call the loader
- COUT(0) << "Loading level..." << std::endl;
+ orxout(user_status) << "Loading level..." << endl;
startFile_ = new XMLFile(LevelManager::getInstance().getDefaultLevel());
bool loaded = Loader::open(startFile_);
@@ -168,21 +168,22 @@
Loader::unload(startFile_);
delete startFile_;
- COUT(3) << "Unloaded level. Remaining objects:" << std::endl;
+ orxout(user_status) << "Unloaded level" << endl;
+ orxout(internal_info) << "Remaining objects:" << endl;
unsigned int i = 0;
for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it)
{
std::set<BaseObject*>::const_iterator find = this->staticObjects_.find(*it);
if (find == this->staticObjects_.end())
{
- COUT(3) << ++i << ": " << it->getIdentifier()->getName() << " (" << *it << "), references: " << it->getReferenceCount() << std::endl;
+ orxout(internal_info) << ++i << ": " << it->getIdentifier()->getName() << " (" << *it << "), references: " << it->getReferenceCount() << endl;
}
}
- COUT(3) << i << " objects remaining.";
+ orxout(internal_info) << i << " objects remaining.";
if (i == 0)
- COUT(3) << " Well done!" << std::endl;
+ orxout(internal_info) << " Well done!" << endl;
else
- COUT(3) << " Try harder!" << std::endl;
+ orxout(internal_info) << " Try harder!" << endl;
}
/**
Modified: code/branches/output/src/orxonox/gamestates/GSMasterServer.cc
===================================================================
--- code/branches/output/src/orxonox/gamestates/GSMasterServer.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/gamestates/GSMasterServer.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -53,7 +53,7 @@
//GameMode::setIsServer(true);
this->mserver = new MasterServer();
- COUT(0) << "Loading masterserver mode" << std::endl;
+ orxout(user_status) << "Loading masterserver mode" << endl;
this->mserver->run();
}
Modified: code/branches/output/src/orxonox/gamestates/GSRoot.cc
===================================================================
--- code/branches/output/src/orxonox/gamestates/GSRoot.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/gamestates/GSRoot.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -76,12 +76,12 @@
for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it; ++it)
{
if (dynamic_cast<Synchronisable*>(*it))
- COUT(0) << "object: " << it->getIdentifier()->getName() << " id: " << dynamic_cast<Synchronisable*>(*it)->getObjectID() << std::endl;
+ orxout(debug_output) << "object: " << it->getIdentifier()->getName() << " id: " << dynamic_cast<Synchronisable*>(*it)->getObjectID() << endl;
else
- COUT(0) << "object: " << it->getIdentifier()->getName() << std::endl;
+ orxout(debug_output) << "object: " << it->getIdentifier()->getName() << endl;
nr++;
}
- COUT(0) << "currently got " << nr << " objects" << std::endl;
+ orxout(debug_output) << "currently got " << nr << " objects" << endl;
}
void GSRoot::activate()
Modified: code/branches/output/src/orxonox/gamestates/GSServer.cc
===================================================================
--- code/branches/output/src/orxonox/gamestates/GSServer.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/gamestates/GSServer.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -56,7 +56,7 @@
GameMode::setIsServer(true);
this->server_ = new Server(CommandLineParser::getValue("port"));
- COUT(0) << "Loading scene in server mode" << std::endl;
+ orxout(user_status) << "Loading scene in server mode" << endl;
server_->open();
}
Modified: code/branches/output/src/orxonox/gametypes/Asteroids.cc
===================================================================
--- code/branches/output/src/orxonox/gametypes/Asteroids.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/gametypes/Asteroids.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -73,7 +73,7 @@
Gametype::start();
std::string message("The match has started! Reach the first chekpoint within 15 seconds! But be aware, there may be pirates around...");
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
}
@@ -83,7 +83,7 @@
Gametype::end();
std::string message("The match has ended.");
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
}
}
Modified: code/branches/output/src/orxonox/gametypes/Deathmatch.cc
===================================================================
--- code/branches/output/src/orxonox/gametypes/Deathmatch.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/gametypes/Deathmatch.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -47,7 +47,7 @@
Gametype::start();
std::string message("The match has started!");
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
}
@@ -56,7 +56,7 @@
Gametype::end();
std::string message("The match has ended.");
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
}
@@ -65,7 +65,7 @@
Gametype::playerEntered(player);
const std::string& message = player->getName() + " entered the game";
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
}
@@ -76,7 +76,7 @@
if (valid_player)
{
const std::string& message = player->getName() + " left the game";
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
}
@@ -90,7 +90,7 @@
if (valid_player)
{
const std::string& message = player->getOldName() + " changed name to " + player->getName();
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
}
@@ -112,7 +112,7 @@
else
message = victim->getPlayer()->getName() + " died";
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
}
@@ -126,7 +126,7 @@
if (player)
{
const std::string& message = player->getName() + " scores!";
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
}
}
Modified: code/branches/output/src/orxonox/gametypes/Dynamicmatch.cc
===================================================================
--- code/branches/output/src/orxonox/gametypes/Dynamicmatch.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/gametypes/Dynamicmatch.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -341,9 +341,9 @@
playerParty_[player]=chaser; //Set playerparty
numberOf[chaser]++;
Gametype::playerEntered(player);
- const std::string& message6 = player->getName() + " entered the game";
- COUT(0) << message6 << std::endl;
- Host::Broadcast(message6);
+ const std::string& message = player->getName() + " entered the game";
+ orxout(level::message) << message << endl;
+ Host::Broadcast(message);
}
bool Dynamicmatch::playerLeft(PlayerInfo* player) //standardfunction
@@ -358,7 +358,7 @@
case 2: numberOf[killer]--; break;
}
const std::string& message = player->getName() + " left the game";
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
//remove player from map
playerParty_.erase (player);
@@ -616,7 +616,7 @@
if (valid_player)
{
const std::string& message = player->getOldName() + " changed name to " + player->getName();
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
}
@@ -629,7 +629,7 @@
if(!tutorial)
{
std::string message("Dynamicmatch started!");
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
}
else if(tutorial) // Announce selectionphase
@@ -646,7 +646,7 @@
/*void Dynamicmatch::instructions()
{
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!");
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
callInstructions_.setTimer(10, false, createExecutor(createFunctor(&Dynamicmatch::furtherInstructions, this)));
}
@@ -654,7 +654,7 @@
void Dynamicmatch::furtherInstructions()
{
std::string message("After 3 Minutes the game is over.");
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
}*/
void Dynamicmatch::end()
@@ -662,7 +662,7 @@
Gametype::end();
std::string message("Time out. Press F2 to see the points you scored.");
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
}
SpawnPoint* Dynamicmatch::getBestSpawnPoint(PlayerInfo* player) const
Modified: code/branches/output/src/orxonox/gametypes/Gametype.cc
===================================================================
--- code/branches/output/src/orxonox/gametypes/Gametype.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/gametypes/Gametype.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -296,7 +296,7 @@
it->first->startControl(entity);
}
else
- COUT(2) << "Warning: Killed Pawn was not in the playerlist" << std::endl;
+ orxout(internal_warning) << "Killed Pawn was not in the playerlist" << endl;
}
}
@@ -343,7 +343,7 @@
return activeSpawnPoints[randomspawn];
}
- COUT(2) << "Warning: Fallback SpawnPoint was used, because there were no active SpawnPoints." << endl;
+ orxout(internal_warning) << "Fallback SpawnPoint was used because there were no active SpawnPoints." << endl;
return fallbackSpawnPoint;
}
return 0;
@@ -443,7 +443,7 @@
}
else
{
- COUT(1) << "Error: No SpawnPoints in current Gametype" << std::endl;
+ orxout(user_error) << "No SpawnPoints in current Gametype" << endl;
abort();
}
}
@@ -460,7 +460,7 @@
}
else
{
- COUT(1) << "Error: No SpawnPoints in current Gametype" << std::endl;
+ orxout(user_error) << "No SpawnPoints in current Gametype" << endl;
abort();
}
}
Modified: code/branches/output/src/orxonox/gametypes/LastManStanding.cc
===================================================================
--- code/branches/output/src/orxonox/gametypes/LastManStanding.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/gametypes/LastManStanding.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -104,7 +104,7 @@
{
this->playersAlive--;
const std::string& message = victim->getPlayer()->getName() + " has lost all lives";
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
}
Modified: code/branches/output/src/orxonox/gametypes/LastTeamStanding.cc
===================================================================
--- code/branches/output/src/orxonox/gametypes/LastTeamStanding.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/gametypes/LastTeamStanding.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -118,7 +118,7 @@
if(eachTeamsPlayers[team] == 0) //last team member died
this->teamsAlive--;
const std::string& message = victim->getPlayer()->getName() + " has lost all lives";
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
}
return allow;
Modified: code/branches/output/src/orxonox/gametypes/TeamBaseMatch.cc
===================================================================
--- code/branches/output/src/orxonox/gametypes/TeamBaseMatch.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/gametypes/TeamBaseMatch.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -140,9 +140,9 @@
if (!this->hasStarted() || this->hasEnded())
return;
- COUT(0) << "Points standing:" << std::endl << "Team 1: "<< pointsTeam1_ << std::endl << "Team 2: " << pointsTeam2_ << std::endl;
- if(pointsTeam1_ >=1700 && pointsTeam1_ < 2000) COUT(0) << "Team 1 is near victory!" << std::endl;
- if(pointsTeam2_ >=1700 && pointsTeam2_ < 2000) COUT(0) << "Team 2 is near victory!" << std::endl;
+ orxout(message) << "Points standing:" << '\n' << "Team 1: "<< pointsTeam1_ << '\n' << "Team 2: " << pointsTeam2_ << endl;
+ if(pointsTeam1_ >=1700 && pointsTeam1_ < 2000) orxout(message) << "Team 1 is near victory!" << endl;
+ if(pointsTeam2_ >=1700 && pointsTeam2_ < 2000) orxout(message) << "Team 2 is near victory!" << endl;
}
@@ -178,12 +178,12 @@
if (this->pointsTeam1_ > this->pointsTeam2_)
{
- COUT(0) << "Team 1 has won the match" << std::endl;
+ orxout(message) << "Team 1 has won the match" << endl;
winningteam = 0;
}
else
{
- COUT(0) << "Team 2 has won the match" << std::endl;
+ orxout(message) << "Team 2 has won the match" << endl;
winningteam = 1;
}
Modified: code/branches/output/src/orxonox/gametypes/UnderAttack.cc
===================================================================
--- code/branches/output/src/orxonox/gametypes/UnderAttack.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/gametypes/UnderAttack.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -69,7 +69,7 @@
{
this->end(); //end gametype
std::string message("Ship destroyed! Team 0 has won!");
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
this->gameEnded_ = true;
@@ -152,7 +152,7 @@
this->gameEnded_ = true;
this->end();
std::string message("Time is up! Team 1 has won!");
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
@@ -172,7 +172,7 @@
{
const std::string& message = multi_cast<std::string>(timesequence_) + " seconds left!";
/*
- COUT(0) << message << std::endl;
+ orxout(level::message) << message << endl;
Host::Broadcast(message);
*/
this->gtinfo_->sendAnnounceMessage(message);
Modified: code/branches/output/src/orxonox/graphics/Model.cc
===================================================================
--- code/branches/output/src/orxonox/graphics/Model.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/graphics/Model.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -141,7 +141,7 @@
}
if( this->numLodLevels_>10 )
{
- CCOUT(2) << "More than 10 LoD levels requested. Creating only 10." << endl;
+ orxout(internal_warning, context::lod) << "More than 10 LoD levels requested. Creating only 10." << endl;
this->numLodLevels_ = 10;
}
if( this->bLodEnabled_ )
@@ -157,9 +157,9 @@
scaleFactor *= getBiggestScale(((WorldEntity*) creatorPtr)->getScale3D());
creatorPtr = creatorPtr->getCreator();
}
- COUT(0) << "name: " << this->meshSrc_ << "scaleFactor: " << scaleFactor << ", volume: " << volume << endl;
+ orxout() << "name: " << this->meshSrc_ << "scaleFactor: " << scaleFactor << ", volume: " << volume << endl;
*/
- COUT(4) << "Setting lodLevel for " << this->meshSrc_<< " with lodLevel_: " << this->lodLevel_ <<" and volume: "<< volume << ":" << std::endl;
+ orxout(verbose, context::lod) << "Setting lodLevel for " << this->meshSrc_<< " with lodLevel_: " << this->lodLevel_ <<" and volume: "<< volume << ":" << endl;
#if OGRE_VERSION >= 0x010700
Ogre::Mesh::LodValueList distList;
@@ -172,7 +172,7 @@
// float factor = scaleFactor*5/lodLevel_;
float factor = pow(volume, 2.0f / 3.0f) * 15.0f / lodLevel_;
- COUT(4) << "LodLevel set with factor: " << factor << endl;
+ orxout(verbose, context::lod) << "LodLevel set with factor: " << factor << endl;
distList.push_back(70.0f*factor);
distList.push_back(140.0f*factor);
@@ -199,11 +199,11 @@
else
what = "<0";
- COUT(4)<<"LodLevel not set because lodLevel("<<lodLevel_<<") was "<<what<<"." << endl;
+ orxout(verbose, context::lod) << "LodLevel not set because lodLevel(" << lodLevel_ << ") was " << what << "." << endl;
}
}
else
- COUT(4) << "LodLevel for " << this->meshSrc_ << " not set because is disabled." << endl;
+ orxout(verbose, context::lod) << "LodLevel for " << this->meshSrc_ << " not set because is disabled." << endl;
}
}
}
Modified: code/branches/output/src/orxonox/graphics/ParticleEmitter.cc
===================================================================
--- code/branches/output/src/orxonox/graphics/ParticleEmitter.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/graphics/ParticleEmitter.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -115,8 +115,8 @@
}
catch (const std::exception& ex)
{
- COUT(1) << "Error: Couln't load particle effect \"" << this->source_ << "\" because:" << std::endl
- << ex.what() << std::endl;
+ orxout(internal_error) << "Couldn't load particle effect \"" << this->source_ << "\" because:" << endl
+ << ex.what() << endl;
}
}
}
Modified: code/branches/output/src/orxonox/interfaces/PickupCarrier.cc
===================================================================
--- code/branches/output/src/orxonox/interfaces/PickupCarrier.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/interfaces/PickupCarrier.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -74,7 +74,7 @@
it = this->pickups_.begin();
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.
{
- COUT(2) << "Oops. In a PickupCarrier, while cleaning up, a Pickupable (&" << temp << ") didn't unregister itself as it should have." << std::endl;;
+ orxout(internal_warning, context::pickups) << "Oops. In a PickupCarrier, while cleaning up, a Pickupable (&" << temp << ") didn't unregister itself as it should have." << endl;;
it++;
}
}
@@ -157,7 +157,7 @@
*/
bool PickupCarrier::addPickup(Pickupable* pickup)
{
- COUT(4) << "Adding Pickupable (&" << pickup << ") to PickupCarrier (&" << this << ")" << std::endl;
+ orxout(verbose, context::pickups) << "Adding Pickupable (&" << pickup << ") to PickupCarrier (&" << this << ")" << endl;
return this->pickups_.insert(pickup).second;
}
@@ -171,7 +171,7 @@
*/
bool PickupCarrier::removePickup(Pickupable* pickup)
{
- COUT(4) << "Removing Pickupable (&" << pickup << ") from PickupCarrier (&" << this << ")" << std::endl;
+ orxout(verbose, context::pickups) << "Removing Pickupable (&" << pickup << ") from PickupCarrier (&" << this << ")" << endl;
return this->pickups_.erase(pickup) == 1;
}
Modified: code/branches/output/src/orxonox/interfaces/Pickupable.cc
===================================================================
--- code/branches/output/src/orxonox/interfaces/Pickupable.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/interfaces/Pickupable.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -70,7 +70,7 @@
{
if(this->pickupIdentifier_ != NULL)
{
- COUT(4) << "Pickupable (&" << this << ") destroyed." << std::endl;
+ orxout(verbose, context::pickups) << "Pickupable (&" << this << ") destroyed." << endl;
this->pickupIdentifier_->destroy();
}
}
@@ -106,7 +106,7 @@
if(!this->beingDestroyed_)
this->OrxonoxClass::destroy();
else
- COUT(2) << this->getIdentifier()->getName() << " may be unsafe. " << std::endl;
+ orxout(internal_warning, context::pickups) << this->getIdentifier()->getName() << " may be unsafe. " << endl;
}
/**
@@ -125,7 +125,7 @@
if((!this->isUsable() && used) || (!this->isUnusable() && !used)) // If either the Pickupable is requested to be used but it is not usable or the Pickupable is requested to be unused, while it is not unusable.
return false;
- COUT(4) << "Pickupable (&" << this << ") set to used " << used << "." << std::endl;
+ orxout(verbose, context::pickups) << "Pickupable (&" << this << ") set to used " << used << "." << endl;
this->used_ = used;
@@ -200,7 +200,7 @@
if(this->isTarget(target)) // If the input target is already present in the list of targets.
return false;
- COUT(4) << "Target " << target->getName() << " added to Pickupable (" << this->getIdentifier()->getName() << ") (&" << this << ")." << std::endl;
+ orxout(verbose, context::pickups) << "Target " << target->getName() << " added to Pickupable (" << this->getIdentifier()->getName() << ") (&" << this << ")." << endl;
this->targets_.push_back(target);
return true;
}
@@ -220,12 +220,12 @@
if(!this->setCarrier(carrier))
{
- COUT(3) << "A Pickupable (&" << this << ") was trying to be added to a PickupCarrier, but was already present." << std::endl;
+ orxout(internal_warning, context::pickups) << "A Pickupable (&" << this << ") was trying to be added to a PickupCarrier, but was already present." << endl;
return false;
}
this->setPickedUp(true);
- COUT(4) << "Pickupable (&" << this << ") got picked up by a PickupCarrier (&" << carrier << ")." << std::endl;
+ orxout(verbose, context::pickups) << "Pickupable (&" << this << ") got picked up by a PickupCarrier (&" << carrier << ")." << endl;
return true;
}
@@ -244,9 +244,9 @@
assert(this->getCarrier()); // The Carrier cannot be NULL at this point.
if(!this->getCarrier()->removePickup(this)) //TODO Shouldn't this be a little later?
- COUT(2) << "Pickupable (&" << this << ", " << this->getIdentifier()->getName() << ") is being dropped, but it was not present in the PickupCarriers list of pickups." << std::endl;
+ 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;
- COUT(4) << "Pickupable (&" << this << ") got dropped up by a PickupCarrier (&" << this->getCarrier() << ")." << std::endl;
+ orxout(verbose, context::pickups) << "Pickupable (&" << this << ") got dropped up by a PickupCarrier (&" << this->getCarrier() << ")." << endl;
this->setUsed(false);
this->setPickedUp(false);
@@ -275,7 +275,7 @@
if(this->pickedUp_ == pickedUp) // If the picked up status has not changed.
return false;
- COUT(4) << "Pickupable (&" << this << ") set to pickedUp " << pickedUp << "." << std::endl;
+ orxout(verbose, context::pickups) << "Pickupable (&" << this << ") set to pickedUp " << pickedUp << "." << endl;
this->pickedUp_ = pickedUp;
@@ -304,7 +304,7 @@
if(this->carrier_ == carrier) // If the PickupCarrier doesn't change.
return false;
- COUT(4) << "Pickupable (&" << this << ") changed Carrier (& " << carrier << ")." << std::endl;
+ orxout(verbose, context::pickups) << "Pickupable (&" << this << ") changed Carrier (& " << carrier << ")." << endl;
if(carrier != NULL && tell)
{
@@ -339,7 +339,7 @@
Pickupable* pickup = dynamic_cast<Pickupable*>(item);
- COUT(4) << "Pickupable (&" << this << ") cloned. Clone is new Pickupable (&" << pickup << ")." << std::endl;
+ orxout(verbose, context::pickups) << "Pickupable (&" << this << ") cloned. Clone is new Pickupable (&" << pickup << ")." << endl;
return pickup;
}
Modified: code/branches/output/src/orxonox/interfaces/RadarViewable.cc
===================================================================
--- code/branches/output/src/orxonox/interfaces/RadarViewable.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/interfaces/RadarViewable.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -82,7 +82,7 @@
// this->radarObjectShape_ = radar->addObjectDescription(str);
// else
// {
-// CCOUT(2) << "Attempting to access the radar, but the radar is non existent." << std::endl;
+// orxout(internal_warning) << "Attempting to access the radar, but the radar is non existent." << endl;
// }
// this->radarObjectDescription_ = str;
// }
@@ -105,7 +105,7 @@
{
if (!object)
{
- COUT(1) << "Assertion: Every RadarViewable has to be assigned a WorldEntity pointer!" << std::endl;
+ orxout(user_error) << "Assertion: Every RadarViewable has to be assigned a WorldEntity pointer!" << endl;
assert(0);
}
}
Modified: code/branches/output/src/orxonox/items/Engine.cc
===================================================================
--- code/branches/output/src/orxonox/items/Engine.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/items/Engine.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -260,7 +260,7 @@
{
if(!this->engineTemplate_.empty())
{
- COUT(4)<<"Loading an engine template: "<<this->engineTemplate_<<"\n";
+ orxout(verbose, context::templates) << "Loading an engine template: " << this->engineTemplate_ << endl;
Template *temp = Template::getTemplate(this->engineTemplate_);
if(temp)
{
Modified: code/branches/output/src/orxonox/overlays/InGameConsole.cc
===================================================================
--- code/branches/output/src/orxonox/overlays/InGameConsole.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/overlays/InGameConsole.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -262,7 +262,7 @@
// we take -1.3 because the border makes the panel bigger
this->consoleOverlayContainer_->setTop(-1.3f * this->relativeHeight);
- COUT(4) << "Info: InGameConsole initialized" << std::endl;
+ orxout(internal_info) << "InGameConsole initialized" << endl;
}
// ###############################
Modified: code/branches/output/src/orxonox/overlays/OrxonoxOverlay.cc
===================================================================
--- code/branches/output/src/orxonox/overlays/OrxonoxOverlay.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/overlays/OrxonoxOverlay.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -146,7 +146,7 @@
OrxonoxOverlay::overlays_s.erase(this->getOldName());
if (OrxonoxOverlay::overlays_s.find(this->getName()) != OrxonoxOverlay::overlays_s.end())
- COUT(1) << "Overlay names should be unique or you cannnot access them via console. Name: \"" << this->getName() << '"' << std::endl;
+ orxout(internal_warning) << "Overlay names should be unique or you cannnot access them via console. Name: \"" << this->getName() << '"' << endl;
OrxonoxOverlay::overlays_s[this->getName()] = this;
}
@@ -361,12 +361,12 @@
if(overlay->isVisible())
{
overlay->hide();
- COUT(4) << "HIDE " << name << std::endl;
+ orxout(internal_info) << "HIDE " << name << endl;
}
else
{
overlay->show();
- COUT(4) << "SHOW " << name << std::endl;
+ orxout(internal_info) << "SHOW " << name << endl;
}
}
}
Modified: code/branches/output/src/orxonox/pickup/PickupIdentifier.cc
===================================================================
--- code/branches/output/src/orxonox/pickup/PickupIdentifier.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/pickup/PickupIdentifier.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -50,7 +50,7 @@
RegisterRootObject(PickupIdentifier);
if(pickup == NULL)
- COUT(1) << "Error, PickupIdentifier was created without a valid Pickupable." << std::endl;
+ orxout(internal_error, context::pickups) << "PickupIdentifier was created without a valid Pickupable." << endl;
this->pickup_ = pickup;
}
@@ -82,7 +82,7 @@
// If the two have a different number of parameters then obviously something is very wrong.
if(!(this->parameters_.size() == identifier->parameters_.size()))
{
- COUT(1) << "Something went wrong in PickupIdentifier!" << std::endl;
+ orxout(internal_error, context::pickups) << "Something went wrong in PickupIdentifier!" << endl;
return this->parameters_.size()-identifier->parameters_.size();
}
@@ -92,7 +92,7 @@
// If a parameter present in one of the identifiers is not found in the other, once again, something is very wrong.
if(identifier->parameters_.find(it->first) == identifier->parameters_.end())
{
- COUT(1) << "Something went wrong in PickupIdentifier!" << std::endl;
+ orxout(internal_error, context::pickups) << "Something went wrong in PickupIdentifier!" << endl;
return -1;
}
if(identifier->parameters_.find(it->first)->second != it->second)
@@ -114,11 +114,11 @@
*/
bool PickupIdentifier::addParameter(std::string & name, std::string & value)
{
- COUT(4) << "PickupIdentifier " << name << ", " << value << std::endl;
+ orxout(verbose, context::pickups) << "PickupIdentifier " << name << ", " << value << endl;
if(!(this->parameters_.find(name) == this->parameters_.end()))
{
- COUT(4) << "Request for adding a parameter that already exists for the PickupIdentififer was denied. name: '" << name << "', value: '" << value << "'."<< std::endl;
+ orxout(verbose, context::pickups) << "Request for adding a parameter that already exists for the PickupIdentififer was denied. name: '" << name << "', value: '" << value << "'."<< endl;
return false;
}
Modified: code/branches/output/src/orxonox/sound/AmbientSound.cc
===================================================================
--- code/branches/output/src/orxonox/sound/AmbientSound.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/sound/AmbientSound.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -93,7 +93,7 @@
if (fileInfo != NULL)
this->setSource(path);
else
- COUT(3) << "Sound: " << this->ambientSource_ << ": Not a valid name! Ambient sound will not change." << std::endl;
+ orxout(internal_warning, context::sound) << this->ambientSource_ << ": Not a valid name! Ambient sound will not change." << endl;
}
}
Modified: code/branches/output/src/orxonox/sound/BaseSound.cc
===================================================================
--- code/branches/output/src/orxonox/sound/BaseSound.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/sound/BaseSound.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -93,7 +93,7 @@
alSourcePlay(this->audioSource_);
if (int error = alGetError())
- COUT(2) << "Sound: Error playing sound: " << SoundManager::getALErrorString(error) << std::endl;
+ orxout(internal_error, context::sound) << "Error playing sound: " << SoundManager::getALErrorString(error) << endl;
}
}
@@ -146,19 +146,19 @@
alSource3f(this->audioSource_, AL_VELOCITY, 0, 0, 0);
alSource3f(this->audioSource_, AL_DIRECTION, 0, 0, 0);
if (ALint error = alGetError())
- COUT(2) << "Sound Warning: Setting source parameters to 0 failed: "
- << SoundManager::getALErrorString(error) << std::endl;
+ orxout(internal_warning, context::sound) << "Setting source parameters to 0 failed: "
+ << SoundManager::getALErrorString(error) << endl;
assert(this->soundBuffer_ != NULL);
alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer());
if (ALuint error = alGetError())
- COUT(1) << "Sound Error: Could not set buffer \"" << this->source_ << "\": " << SoundManager::getALErrorString(error) << std::endl;
+ orxout(internal_error, context::sound) << "Could not set buffer \"" << this->source_ << "\": " << SoundManager::getALErrorString(error) << endl;
}
void BaseSound::setVolume(float vol)
{
this->volume_ = clamp(vol, 0.0f, 1.0f);
if (this->volume_ != vol)
- COUT(2) << "Sound warning: volume out of range, clamping value." << std::endl;
+ orxout(internal_warning, context::sound) << "Volume out of range, clamping value." << endl;
this->updateVolume();
}
@@ -169,8 +169,8 @@
float volume = this->volume_ * this->getRealVolume();
alSourcef(this->audioSource_, AL_GAIN, volume);
if (int error = alGetError())
- COUT(2) << "Sound: Error setting volume to " << volume
- << ": " << SoundManager::getALErrorString(error) << std::endl;
+ orxout(internal_error, context::sound) << "Error setting volume to " << volume
+ << ": " << SoundManager::getALErrorString(error) << endl;
}
}
@@ -185,7 +185,7 @@
{
if (pitch > 2 || pitch < 0.5f)
{
- COUT(2) << "Sound warning: pitch out of range, cropping value." << std::endl;
+ orxout(internal_warning, context::sound) << "Pitch out of range, cropping value." << endl;
pitch = pitch > 2.0f ? 2.0f : pitch;
pitch = pitch < 0.5f ? 0.5f : pitch;
}
@@ -194,7 +194,7 @@
{
alSourcef(this->audioSource_, AL_PITCH, pitch);
if (int error = alGetError())
- COUT(2) << "Sound: Error setting pitch: " << SoundManager::getALErrorString(error) << std::endl;
+ orxout(internal_error, context::sound) << "Error setting pitch: " << SoundManager::getALErrorString(error) << endl;
}
}
@@ -239,7 +239,7 @@
alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer());
if (ALuint error = alGetError())
{
- COUT(1) << "Sound Error: Could not set buffer \"" << source << "\": " << SoundManager::getALErrorString(error) << std::endl;
+ orxout(internal_error, context::sound) << "Could not set buffer \"" << source << "\": " << SoundManager::getALErrorString(error) << endl;
return;
}
@@ -247,7 +247,7 @@
assert(this->isPlaying() || this->isPaused());
alSourcePlay(this->audioSource_);
if (int error = alGetError())
- COUT(2) << "Sound: Error playing sound: " << SoundManager::getALErrorString(error) << std::endl;
+ orxout(internal_error, context::sound) << "Error playing sound: " << SoundManager::getALErrorString(error) << endl;
if (this->isPaused())
alSourcePause(this->audioSource_);
}
Modified: code/branches/output/src/orxonox/sound/SoundBuffer.cc
===================================================================
--- code/branches/output/src/orxonox/sound/SoundBuffer.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/sound/SoundBuffer.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -50,7 +50,7 @@
shared_ptr<ResourceInfo> fileInfo = Resource::getInfo(filename);
if (fileInfo == NULL)
{
- COUT(2) << "Sound: Warning: Sound file '" << filename << "' not found" << std::endl;
+ orxout(internal_error, context::sound) << "Sound file '" << filename << "' not found" << endl;
return;
}
// Open data stream
@@ -143,7 +143,7 @@
int ret = ov_open_callbacks(dataStream.get(), &vf, NULL, 0, vorbisCallbacks);
if (ret < 0)
{
- COUT(2) << "Sound: libvorbisfile: File does not seem to be an Ogg Vorbis bitstream" << std::endl;
+ orxout(internal_error, context::sound) << "libvorbisfile: File does not seem to be an Ogg Vorbis bitstream" << endl;
ov_clear(&vf);
ThrowException(General, "Sound Error: Ogg file loader failed when opening the bitstream");
}
@@ -159,7 +159,7 @@
}
else if (ret < 0)
{
- COUT(2) << "Sound: libvorbisfile: error reading the file" << std::endl;
+ orxout(internal_error, context::sound) << "libvorbisfile: error reading the file" << endl;
ov_clear(&vf);
ThrowException(General, "Sound Error: Ogg file loader failed when decoding the file");
}
Modified: code/branches/output/src/orxonox/sound/SoundManager.cc
===================================================================
--- code/branches/output/src/orxonox/sound/SoundManager.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/sound/SoundManager.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -88,19 +88,19 @@
strcpy(device, devices);
std::string renderDevice;
SetConfigValue(renderDevice, std::string(device)).description("Sound device used for rendering");
- COUT(4) << "Sound: Available devices: ";
+ orxout(verbose, context::sound) << "Sound: Available devices: ";
while (true)
{
this->deviceNames_.push_back(devices);
- COUT(4) << '"' << devices << "\", ";
+ orxout(verbose, context::sound) << '"' << devices << "\", ";
devices += strlen(devices) + 1;
if (*devices == '\0')
break;
}
- COUT(4) << std::endl;
+ orxout(verbose, context::sound) << endl;
// Open the selected device
- COUT(3) << "Sound: Opening device \"" << renderDevice << '\' << std::endl;
+ orxout(internal_info, context::sound) << "Sound: Opening device \"" << renderDevice << '\' << endl;
this->device_ = alcOpenDevice(renderDevice.c_str());
*/
this->device_ = alcOpenDevice(NULL);
@@ -121,13 +121,13 @@
// Get some information about the sound
if (const char* version = alGetString(AL_VERSION))
- COUT(4) << "Sound: --- OpenAL Version: " << version << std::endl;
+ orxout(internal_info, context::sound) << "Sound: --- OpenAL Version: " << version << endl;
if (const char* vendor = alGetString(AL_VENDOR))
- COUT(4) << "Sound: --- OpenAL Vendor : " << vendor << std::endl;
+ orxout(internal_info, context::sound) << "Sound: --- OpenAL Vendor : " << vendor << endl;
if (const char* types = alutGetMIMETypes(ALUT_LOADER_BUFFER))
- COUT(4) << "Sound: --- Supported MIME Types: " << types << std::endl;
+ orxout(internal_info, context::sound) << "Sound: --- Supported MIME Types: " << types << endl;
else
- COUT(2) << "Sound Warning: MIME Type retrieval failed: " << alutGetErrorString(alutGetError()) << std::endl;
+ orxout(internal_warning, context::sound) << "MIME Type retrieval failed: " << alutGetErrorString(alutGetError()) << endl;
this->mute_[SoundType::All] = 1.0f;
this->mute_[SoundType::Music] = 1.0f;
@@ -151,7 +151,7 @@
desroyContextGuard.Dismiss();
resetPlaysSoundGuard.Dismiss();
- COUT(4) << "Sound: Initialisation complete" << std::endl;
+ orxout(internal_status, context::sound) << "Sound: Initialisation complete" << endl;
}
SoundManager::~SoundManager()
@@ -163,14 +163,14 @@
// If there are still used buffers around, well, that's just very bad...
if (this->soundBuffers_.size() != this->effectsPool_.size())
- COUT(1) << "Sound Error: Some sound buffers are still in use but OpenAL is about to shut down. Fix this!" << std::endl;
+ orxout(internal_error, context::sound) << "Some sound buffers are still in use but OpenAL is about to shut down. Fix this!" << endl;
// Empty buffer pool and buffer list
this->effectsPool_.clear();
this->soundBuffers_.clear();
// There should not be any sources in use anymore
if (!this->usedSoundSources_.empty())
- COUT(1) << "Sound Error: Some sound sources are still in use but OpenAL is about to shut down. Fix this!" << std::endl;
+ orxout(internal_error, context::sound) << "Some sound sources are still in use but OpenAL is about to shut down. Fix this!" << endl;
while (!this->availableSoundSources_.empty())
{
alDeleteSources(1, &this->availableSoundSources_.back());
@@ -181,23 +181,23 @@
// Relieve context to destroy it
if (!alcMakeContextCurrent(NULL))
- COUT(1) << "Sound Error: Could not unset ALC context" << std::endl;
+ orxout(internal_error, context::sound) << "Could not unset ALC context" << endl;
alcDestroyContext(this->context_);
if (ALCenum error = alcGetError(this->device_))
{
if (error == AL_INVALID_OPERATION)
- COUT(1) << "Sound Error: Could not destroy ALC context because it is the current one" << std::endl;
+ orxout(internal_error, context::sound) << "Could not destroy ALC context because it is the current one" << endl;
else
- COUT(1) << "Sound Error: Could not destroy ALC context because it is invalid" << std::endl;
+ orxout(internal_error, context::sound) << "Could not destroy ALC context because it is invalid" << endl;
}
#ifdef AL_VERSION_1_1
if (!alcCloseDevice(this->device_))
- COUT(1) << "Sound Error: Could not destroy ALC device. This might be because there are still buffers in use!" << std::endl;
+ orxout(internal_error, context::sound) << "Could not destroy ALC device. This might be because there are still buffers in use!" << endl;
#else
alcCloseDevice(this->device_);
#endif
if (!alutExit())
- COUT(1) << "Sound Error: Closing ALUT failed: " << alutGetErrorString(alutGetError()) << std::endl;
+ orxout(internal_error, context::sound) << "Closing ALUT failed: " << alutGetErrorString(alutGetError()) << endl;
}
void SoundManager::setConfigValues()
@@ -243,7 +243,7 @@
{
if (crossFadeStep_ <= 0.0 || crossFadeStep_ >= 1.0 )
{
- COUT(2) << "Sound warning: fade step out of range, ignoring change." << std::endl;
+ orxout(internal_warning, context::sound) << "Fade step out of range, ignoring change." << endl;
ResetConfigValue(crossFadeStep_);
}
}
@@ -252,7 +252,7 @@
{
float clampedVolume = clamp(this->volume_[type], 0.0f, 1.0f);
if (clampedVolume != this->volume_[type])
- COUT(2) << "Sound warning: Volume setting (" << type << ") out of range, clamping." << std::endl;
+ orxout(internal_warning, context::sound) << "Volume setting (" << type << ") out of range, clamping." << endl;
this->updateVolume(type);
}
@@ -320,7 +320,7 @@
ALenum error = alGetError();
if (error == AL_INVALID_VALUE)
// @TODO: Follow this constantly appearing, nerve-racking warning
- COUT(2) << "Sound: OpenAL: Invalid listener position" << std::endl;
+ orxout(internal_error, context::sound) << "OpenAL: Invalid listener position" << endl;
}
void SoundManager::setListenerOrientation(const Quaternion& orientation)
@@ -334,7 +334,7 @@
alListenerfv(AL_ORIENTATION, orient);
ALenum error = alGetError();
if (error == AL_INVALID_VALUE)
- COUT(2) << "Sound: OpenAL: Invalid listener orientation" << std::endl;
+ orxout(internal_error, context::sound) << "OpenAL: Invalid listener orientation" << endl;
}
void SoundManager::registerAmbientSound(AmbientSound* newAmbient)
@@ -345,7 +345,7 @@
{
if (it->first == newAmbient)
{
- COUT(2) << "Sound warning: Will not play an AmbientSound twice." << std::endl;
+ orxout(internal_warning, context::sound) << "Will not play an AmbientSound twice." << endl;
return;
}
}
@@ -519,7 +519,7 @@
}
catch (const std::exception& ex)
{
- COUT(1) << ex.what() << std::endl;
+ orxout(internal_error, context::sound) << ex.what() << endl;
return buffer;
}
this->soundBuffers_[filename] = buffer;
@@ -613,7 +613,7 @@
{
alDeleteSources(1, &this->availableSoundSources_.back());
if (alGetError())
- COUT(1) << "Sound Error: Failed to delete a source --> lost forever" << std::endl;
+ orxout(internal_error, context::sound) << "Failed to delete a source --> lost forever" << endl;
this->availableSoundSources_.pop_back();
}
}
Modified: code/branches/output/src/orxonox/sound/SoundStreamer.cc
===================================================================
--- code/branches/output/src/orxonox/sound/SoundStreamer.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/sound/SoundStreamer.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -50,7 +50,7 @@
int ret = ov_open_callbacks(dataStream.get(), &vf, NULL, 0, vorbisCallbacks);
if (ret < 0)
{
- COUT(2) << "Sound: libvorbisfile: File does not seem to be an Ogg Vorbis bitstream" << std::endl;
+ orxout(internal_error, context::sound) << "libvorbisfile: File does not seem to be an Ogg Vorbis bitstream" << endl;
ov_clear(&vf);
return;
}
@@ -76,7 +76,7 @@
}
else if (ret < 0)
{
- COUT(2) << "Sound: libvorbisfile: error reading the file" << std::endl;
+ orxout(internal_error, context::sound) << "libvorbisfile: error reading the file" << endl;
ov_clear(&vf);
return;
}
@@ -90,16 +90,16 @@
int processed;
alGetSourcei(audioSource, AL_BUFFERS_PROCESSED, &processed);
if (ALint error = alGetError())
- COUT(2) << "Sound Warning: Couldn't get number of processed buffers: "
- << SoundManager::getALErrorString(error) << std::endl;
+ orxout(internal_warning, context::sound) << "Couldn't get number of processed buffers: "
+ << SoundManager::getALErrorString(error) << endl;
if(processed > 0)
{
ALuint* buffers = new ALuint[processed];
alSourceUnqueueBuffers(audioSource, processed, buffers);
if (ALint error = alGetError())
- COUT(2) << "Sound Warning: Couldn't unqueue buffers: "
- << SoundManager::getALErrorString(error) << std::endl;
+ orxout(internal_warning, context::sound) << "Couldn't unqueue buffers: "
+ << SoundManager::getALErrorString(error) << endl;
for(int i = 0; i < processed; i++)
{
@@ -110,7 +110,7 @@
}
else if (ret < 0)
{
- COUT(2) << "Sound: libvorbisfile: error reading the file" << std::endl;
+ orxout(internal_error, context::sound) << "libvorbisfile: error reading the file" << endl;
ov_clear(&vf);
return;
}
@@ -120,8 +120,8 @@
alSourceQueueBuffers(audioSource, processed, buffers);
if (ALint error = alGetError())
- COUT(2) << "Sound Warning: Couldn't queue buffers: "
- << SoundManager::getALErrorString(error) << std::endl;
+ orxout(internal_warning, context::sound) << "Couldn't queue buffers: "
+ << SoundManager::getALErrorString(error) << endl;
}
}
}
Modified: code/branches/output/src/orxonox/sound/WorldSound.cc
===================================================================
--- code/branches/output/src/orxonox/sound/WorldSound.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/sound/WorldSound.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -93,19 +93,19 @@
alSource3f(this->audioSource_, AL_POSITION, pos.x, pos.y, pos.z);
ALenum error = alGetError();
if (error == AL_INVALID_VALUE)
- COUT(2) << "Sound: OpenAL: Invalid sound position" << std::endl;
+ orxout(internal_error, context::sound) << "OpenAL: Invalid sound position" << endl;
const Vector3& vel = this->getVelocity();
alSource3f(this->audioSource_, AL_VELOCITY, vel.x, vel.y, vel.z);
error = alGetError();
if (error == AL_INVALID_VALUE)
- COUT(2) << "Sound: OpenAL: Invalid sound velocity" << std::endl;
+ orxout(internal_error, context::sound) << "OpenAL: Invalid sound velocity" << endl;
const Vector3& direction = -this->getWorldOrientation().zAxis();
alSource3f(this->audioSource_, AL_DIRECTION, direction.x, direction.y, direction.z);
error = alGetError();
if (error == AL_INVALID_VALUE)
- COUT(2) << "Sound: OpenAL: Invalid sound direction" << std::endl;
+ orxout(internal_error, context::sound) << "OpenAL: Invalid sound direction" << endl;
}
}
Modified: code/branches/output/src/orxonox/weaponsystem/WeaponMode.cc
===================================================================
--- code/branches/output/src/orxonox/weaponsystem/WeaponMode.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/weaponsystem/WeaponMode.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -187,7 +187,7 @@
if (identifier)
this->munitiontype_ = identifier;
else
- COUT(2) << "Warning: No munition class defined in WeaponMode " << this->getName() << std::endl;
+ orxout(internal_warning) << "No munition class defined in WeaponMode " << this->getName() << endl;
this->updateMunition();
}
@@ -248,7 +248,6 @@
Vector3 muzzleDirection;
muzzleDirection = target - this->muzzlePosition_;
-// COUT(0) << "muzzleDirection " << muzzleDirection << endl;
this->muzzleOrientation_ = (this->weapon_->getWorldOrientation() * WorldEntity::FRONT).getRotationTo(muzzleDirection) * this->weapon_->getWorldOrientation();
}
else
Modified: code/branches/output/src/orxonox/worldentities/BigExplosion.cc
===================================================================
--- code/branches/output/src/orxonox/worldentities/BigExplosion.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/worldentities/BigExplosion.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -60,7 +60,7 @@
}
catch (const std::exception& ex)
{
- COUT(1) << "Error: Couln't load particle effect in BigExplosion: " << ex.what() << std::endl;
+ orxout(internal_error) << "Couldn't load particle effect in BigExplosion: " << ex.what() << endl;
this->initZero();
}
}
Modified: code/branches/output/src/orxonox/worldentities/ControllableEntity.cc
===================================================================
--- code/branches/output/src/orxonox/worldentities/ControllableEntity.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/worldentities/ControllableEntity.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -456,7 +456,7 @@
this->xmlcontroller_->setControllableEntity(this);
}
else
- COUT(2) << "Warning: ControllableEntity \"" << this->getName() << "\" already has a Controller." << std::endl;
+ orxout(internal_warning) << "ControllableEntity \"" << this->getName() << "\" already has a Controller." << endl;
}
void ControllableEntity::parentChanged()
Modified: code/branches/output/src/orxonox/worldentities/ExplosionChunk.cc
===================================================================
--- code/branches/output/src/orxonox/worldentities/ExplosionChunk.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/worldentities/ExplosionChunk.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -60,7 +60,7 @@
}
catch (const std::exception& ex)
{
- COUT(1) << "Error: Couln't load particle effect in ExplosionChunk: " << ex.what() << std::endl;
+ orxout(internal_error) << "Couldn't load particle effect in ExplosionChunk: " << ex.what() << endl;
this->fire_ = 0;
this->smoke_ = 0;
}
Modified: code/branches/output/src/orxonox/worldentities/MobileEntity.cc
===================================================================
--- code/branches/output/src/orxonox/worldentities/MobileEntity.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/worldentities/MobileEntity.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -188,7 +188,7 @@
{
if (type == WorldEntity::Static)
{
- CCOUT(1) << "Error: Cannot tell a MobileEntity to have static collision type! Ignoring." << std::endl;
+ orxout(internal_warning) << "Cannot tell a MobileEntity to have static collision type! Ignoring." << endl;
assert(false); // Only in debug mode
return false;
}
Modified: code/branches/output/src/orxonox/worldentities/SpawnPoint.cc
===================================================================
--- code/branches/output/src/orxonox/worldentities/SpawnPoint.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/worldentities/SpawnPoint.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -47,7 +47,7 @@
if (this->getGametype())
this->getGametype()->registerSpawnPoint(this);
else
- COUT(1) << "Error: SpawnPoint has no Gametype" << std::endl;
+ orxout(internal_error) << "SpawnPoint has no Gametype" << endl;
this->setSyncMode(ObjectDirection::None);
}
Modified: code/branches/output/src/orxonox/worldentities/StaticEntity.cc
===================================================================
--- code/branches/output/src/orxonox/worldentities/StaticEntity.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/worldentities/StaticEntity.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -62,7 +62,7 @@
{
if (this->addedToPhysicalWorld())
{
- CCOUT(2) << "Warning: Attempting to change the position of a StaticEntity at physics run time. Ignoring change." << std::endl;
+ orxout(internal_warning) << "Attempting to change the position of a StaticEntity at physics run time. Ignoring change." << endl;
return;
}
if (this->isStatic())
@@ -79,7 +79,7 @@
{
if (this->addedToPhysicalWorld())
{
- CCOUT(2) << "Warning: Attempting to change the orientation of a StaticEntity at physics run time. Ignoring change." << std::endl;
+ orxout(internal_warning) << "Attempting to change the orientation of a StaticEntity at physics run time. Ignoring change." << endl;
return;
}
if (this->isStatic())
@@ -96,7 +96,7 @@
{
if (type == WorldEntity::Kinematic || type == WorldEntity::Dynamic)
{
- CCOUT(1) << "Error: Cannot tell a StaticEntity to have kinematic or dynamic collision type! Ignoring." << std::endl;
+ orxout(internal_warning) << "Cannot tell a StaticEntity to have kinematic or dynamic collision type! Ignoring." << endl;
assert(false); // Only in debug mode
return false;
}
Modified: code/branches/output/src/orxonox/worldentities/WorldEntity.cc
===================================================================
--- code/branches/output/src/orxonox/worldentities/WorldEntity.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/worldentities/WorldEntity.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -310,12 +310,12 @@
this->collisionTypeSynchronised_ != Static &&
this->collisionTypeSynchronised_ != None)
{
- CCOUT(1) << "Error when collsion Type was received over network. Unknown enum value:" << this->collisionTypeSynchronised_ << std::endl;
+ orxout(internal_error) << "Error when collsion Type was received over network. Unknown enum value:" << this->collisionTypeSynchronised_ << endl;
}
else if (this->collisionTypeSynchronised_ != collisionType_)
{
if (this->parent_)
- CCOUT(2) << "Warning: Network connection tried to set the collision type of an attached WE. Ignoring." << std::endl;
+ orxout(internal_warning) << "Network connection tried to set the collision type of an attached WE. Ignoring." << endl;
else
this->setCollisionType(this->collisionTypeSynchronised_);
}
@@ -372,7 +372,7 @@
{
if (object == this)
{
- COUT(2) << "Warning: Can't attach a WorldEntity to itself." << std::endl;
+ orxout(internal_warning) << "Can't attach a WorldEntity to itself." << endl;
return;
}
@@ -405,22 +405,22 @@
{
if (!newParent->hasPhysics())
{
- COUT(2) << "Warning: Cannot attach a physical object to a non physical one." << std::endl;
+ orxout(internal_warning) << " Cannot attach a physical object to a non physical one." << endl;
return false;
}
else if (this->isDynamic())
{
- COUT(2) << "Warning: Cannot attach a dynamic object to a WorldEntity." << std::endl;
+ orxout(internal_warning) << "Cannot attach a dynamic object to a WorldEntity." << endl;
return false;
}
else if (this->isKinematic() && newParent->isDynamic())
{
- COUT(2) << "Warning: Cannot attach a kinematic object to a dynamic one." << std::endl;
+ orxout(internal_warning) << "Cannot attach a kinematic object to a dynamic one." << endl;
return false;
}
else if (this->isKinematic())
{
- COUT(2) << "Warning: Cannot attach a kinematic object to a static or kinematic one: Not yet implemented." << std::endl;
+ orxout(internal_warning) << "Cannot attach a kinematic object to a static or kinematic one: Not yet implemented." << endl;
return false;
}
}
@@ -454,7 +454,7 @@
std::set<WorldEntity*>::iterator it = this->children_.find(object);
if (it == this->children_.end())
{
- CCOUT(2) << "Warning: Cannot detach an object that is not a child." << std::endl;
+ orxout(internal_warning) << "Cannot detach an object that is not a child." << endl;
return;
}
@@ -798,7 +798,7 @@
// If we are already attached to a parent, this would be a bad idea..
if (this->parent_)
{
- CCOUT(2) << "Warning: Cannot set the collision type of a WorldEntity with a parent." << std::endl;
+ orxout(internal_warning) << "Cannot set the collision type of a WorldEntity with a parent." << endl;
return;
}
@@ -821,7 +821,7 @@
// Check whether there was some scaling applied.
if (!this->node_->getScale().positionEquals(Vector3(1, 1, 1), 0.001))
{
- CCOUT(2) << "Warning: Cannot create a physical body if there is scaling applied to the node: Not yet implemented." << std::endl;
+ orxout(internal_warning) << "Cannot create a physical body if there is scaling applied to the node: Not yet implemented." << endl;
return;
}
HACK HACK HACK
@@ -970,7 +970,7 @@
else if ((this->mass_ + this->childrenMass_) == 0.0f)
{
// Use default values to avoid very large or very small values
- CCOUT(4) << "Warning: Setting the internal physical mass to 1.0 because mass_ is 0.0" << std::endl;
+ orxout(internal_warning) << "Setting the internal physical mass to 1.0 because mass_ is 0.0" << endl;
btVector3 inertia(0, 0, 0);
this->collisionShape_->calculateLocalInertia(1.0f, inertia);
this->physicalBody_->setMassProps(1.0f, inertia);
Modified: code/branches/output/src/orxonox/worldentities/pawns/FpsPlayer.cc
===================================================================
--- code/branches/output/src/orxonox/worldentities/pawns/FpsPlayer.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/worldentities/pawns/FpsPlayer.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -131,7 +131,7 @@
{
if (type != WorldEntity::Dynamic)
{
- CCOUT(1) << "Error: Cannot tell a FpsPlayer not to be dynamic! Ignoring." << std::endl;
+ orxout(internal_warning) << "Cannot tell a FpsPlayer not to be dynamic! Ignoring." << endl;
assert(false); // Only in debug mode
return false;
}
Modified: code/branches/output/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/output/src/orxonox/worldentities/pawns/SpaceShip.cc 2011-07-31 21:42:55 UTC (rev 8808)
+++ code/branches/output/src/orxonox/worldentities/pawns/SpaceShip.cc 2011-08-01 14:37:38 UTC (rev 8809)
@@ -144,7 +144,7 @@
{
if (type != WorldEntity::Dynamic)
{
- CCOUT(1) << "Error: Cannot tell a SpaceShip not to be dynamic! Ignoring." << std::endl;
+ orxout(internal_warning) << "Cannot tell a SpaceShip not to be dynamic! Ignoring." << endl;
assert(false); // Only in debug mode
return false;
}
@@ -506,7 +506,7 @@
Camera *camera = this->getCamera();
if (camera == 0)
{
- COUT(2) << "Failed to reset camera!";
+ orxout(internal_warning) << "Failed to reset camera!" << endl;
return;
}
More information about the Orxonox-commit
mailing list