Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8809


Ignore:
Timestamp:
Aug 1, 2011, 4:37:38 PM (13 years ago)
Author:
landauf
Message:

Replaced COUT() with orxout() in tools and orxonox library. Requires quite some fine-tuning.

Location:
code/branches/output/src
Files:
61 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/tools/BillboardSet.cc

    r6417 r8809  
    8080        catch (...)
    8181        {
    82             COUT(1) << "Error: Couln't load billboard \"" << file << '"' << std::endl;
     82            orxout(internal_error) << "Couldn't load billboard \"" << file << '"' << endl;
    8383            this->billboardSet_ = 0;
    8484        }
     
    103103        catch (...)
    104104        {
    105             COUT(1) << "Error: Couln't load billboard \"" << file << '"' << std::endl;
     105            orxout(internal_error) << "Couldn't load billboard \"" << file << '"' << endl;
    106106            this->billboardSet_ = 0;
    107107        }
  • code/branches/output/src/libraries/tools/Mesh.cc

    r8351 r8809  
    7272            catch (...)
    7373            {
    74                 COUT(1) << "Error: Couln't load mesh \"" << meshsource << '"' << std::endl;
     74                orxout(internal_error) << "Couldn't load mesh \"" << meshsource << '"' << endl;
    7575                this->entity_ = 0;
    7676            }
  • code/branches/output/src/libraries/tools/ParticleInterface.cc

    r7166 r8809  
    7878            catch (...)
    7979            {
    80                 COUT(1) << "Error: Couln't load particle system \"" << templateName << '"' << std::endl;
     80                orxout(internal_error) << "Couldn't load particle system \"" << templateName << '"' << endl;
    8181                this->particleSystem_ = 0;
    8282            }
  • code/branches/output/src/libraries/tools/ResourceCollection.cc

    r8351 r8809  
    6262        if (resourceGroup.empty())
    6363        {
    64             COUT(2) << "Warning: \"\" is not a valid resource group." << std::endl;
     64            orxout(internal_warning) << "\"\" is not a valid resource group." << endl;
    6565            return;
    6666        }
  • code/branches/output/src/libraries/tools/ResourceLocation.cc

    r8366 r8809  
    8080        else
    8181        {
    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;
    8383            return;
    8484        }
     
    101101        catch (const Ogre::Exception& ex)
    102102        {
    103             COUT(1) << "Removing of a ResourceLocation failed: " << ex.what() << std::endl;
     103            orxout(internal_error) << "Removing of a ResourceLocation failed: " << ex.what() << endl;
    104104        }
    105105    }
  • code/branches/output/src/libraries/tools/Shader.cc

    r8079 r8809  
    141141                }
    142142                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;
    144144            }
    145145            this->oldcompositorName_ = this->compositorName_;
     
    217217                }
    218218                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;
    220220            }
    221221            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;
    223223        }
    224224        this->parameters_.clear();
  • code/branches/output/src/libraries/tools/Timer.h

    r8729 r8809  
    6666    void MyClass::myFunction()
    6767    {
    68         COUT(0) << "Hello World" << std::endl;
     68        orxout() << "Hello World" << endl;
    6969    }
    7070    @endcode
  • code/branches/output/src/libraries/util/output/OutputDefinitions.h

    r8808 r8809  
    9797            REGISTER_OUTPUT_CONTEXT(packets);
    9898            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);
    99106        }
    100107    }
  • code/branches/output/src/orxonox/ChatHistory.cc

    r8327 r8809  
    131131    /* output the line to the file if logging is enabled */
    132132    if( this->hist_log_enabled )
    133       this->hist_logfile << toadd << std::endl;
     133      this->hist_logfile << toadd << endl;
    134134    return 0;
    135135  }
     
    154154    { this->hist_log_enabled = false;
    155155#ifndef CHATTEST
    156       COUT(2) << "Warning: Could not open logfile." << std::endl;
     156      orxout(internal_warning) << "Could not open logfile." << endl;
    157157#endif
    158158    }
     
    185185    for( it = this->hist_buffer.begin(); it != this->hist_buffer.end();
    186186      ++it )
    187       std::cout << *it << std::endl;
     187      orxout(debug_output) << *it << endl;
    188188
    189189    /* output size */
    190     std::cout << "Size: " << hist_buffer.size() << std::endl;
     190    orxout(debug_output) << "Size: " << hist_buffer.size() << endl;
    191191  }
    192192
  • code/branches/output/src/orxonox/ChatInputHandler.cc

    r8327 r8809  
    199199    /* sanity checks */
    200200    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;
    203203
    204204    /* "hash" the name */
  • code/branches/output/src/orxonox/Level.cc

    r7648 r8809  
    8888    void Level::networkcallback_applyXMLFile()
    8989    {
    90         COUT(0) << "Loading level \"" << this->xmlfilename_ << "\"..." << std::endl;
     90        orxout(user_status) << "Loading level \"" << this->xmlfilename_ << "\"..." << endl;
    9191
    9292        ClassTreeMask mask;
     
    115115        if (!identifier || !identifier->isA(Class(Gametype)))
    116116        {
    117             COUT(0) << "Error: \"" << gametype << "\" is not a valid gametype." << std::endl;
     117            orxout(internal_error) << "\"" << gametype << "\" is not a valid gametype." << endl;
    118118            identifier = Class(Gametype);
    119119            this->gametype_ = "Gametype";
     
    157157//         this->lodInformation_.insert(std::make_pair(meshName,lodInformation));
    158158        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;
    160160        this->lodInformation_[meshName] = lodInformation;
    161161    }
     
    171171    void Level::playerEntered(PlayerInfo* player)
    172172    {
    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;
    174174        player->setGametype(this->getGametype());
    175175    }
     
    177177    void Level::playerLeft(PlayerInfo* player)
    178178    {
    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;
    180180        player->setGametype(0);
    181181    }
  • code/branches/output/src/orxonox/LevelInfo.cc

    r7652 r8809  
    125125        if(!this->validateTag(tag))
    126126        {
    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;
    128128            return false;
    129129        }
  • code/branches/output/src/orxonox/LevelManager.cc

    r8706 r8809  
    251251
    252252        // Iterate over all the found *.oxw files
    253         COUT(3) << "Loading LevelInfos..." << std::endl;
     253        orxout(internal_info) << "Loading LevelInfos..." << endl;
    254254        std::set<std::string> names;
    255255        for (Ogre::StringVector::const_iterator it = levels->begin(); it != levels->end(); ++it)
     
    281281                // Warn about levels with the same name.
    282282                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;
    284284
    285285                // Warn about multiple items so that it gets fixed quickly
    286286                if(availableLevels_.find(info) != availableLevels_.end())
    287287                {
    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;
    289289                    // Delete LevelInfoItem to avoid a dangling pointer
    290290                    delete info;
  • code/branches/output/src/orxonox/MoodManager.cc

    r8706 r8809  
    5454        {
    5555            // 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;
    5757        }
    5858       
     
    8282        if (!Resource::exists(path))
    8383        {
    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;
    8585            this->setMood(oldMood_);
    8686        }
    8787        else
    8888        {
    89             COUT(3) << "Mood changed to " << mood_ << std::endl;
     89            orxout(internal_info) << "Mood changed to " << mood_ << endl;
    9090            MoodListener::changedMood(mood_);
    9191        }
  • code/branches/output/src/orxonox/PlayerManager.cc

    r8327 r8809  
    5757        {
    5858            if (clientID != 0)
    59                 COUT(3) << "client connected" << std::endl;
     59                orxout(internal_info) << "client connected" << endl;
    6060
    6161            // create new HumanPlayer instance
     
    7777        {
    7878            if (clientID != 0)
    79                 COUT(3) << "client disconnected" << std::endl;
     79                orxout(internal_info) << "client disconnected" << endl;
    8080
    8181            // remove from clients-map
  • code/branches/output/src/orxonox/Radar.cc

    r7284 r8809  
    195195    void Radar::listObjects() const
    196196    {
    197         COUT(3) << "List of RadarObjects:\n";
     197        orxout(debug_output) << "List of RadarObjects:" << endl;
    198198        // iterate through all Radar Objects
    199199        unsigned int i = 0;
    200200        for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it, ++i)
    201201        {
    202             COUT(3) << i++ << ": " << (*it)->getRVWorldPosition() << std::endl;
     202            orxout(debug_output) << i++ << ": " << (*it)->getRVWorldPosition() << endl;
    203203        }
    204204    }
  • code/branches/output/src/orxonox/Scene.cc

    r7163 r8809  
    141141        if (range.length() < 10.0f)
    142142        {
    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;
    150150            this->setPhysicalWorld(false);
    151151            this->negativeWorldRange_ = range;
     
    160160        if (range.length() < 10.0f)
    161161        {
    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;
    169169            this->setPhysicalWorld(false);
    170170            this->positiveWorldRange_ = range;
  • code/branches/output/src/orxonox/Test.cc

    r7284 r8809  
    127127    //     mt2.importData( temp );
    128128    //     assert( temp-mem == mt1.getNetworkSize() );
    129     //     COUT(0) << mt2 << endl;
     129    //     orxout() << mt2 << endl;
    130130    //     if(!Core::isMaster())
    131131    //       call2(0, "bal", "a", "n", "ce");
     
    135135    void Test::printBlaBla(std::string s1, std::string s2, std::string s3, std::string s4, std::string s5)
    136136    {
    137         COUT(0) << s1 << s2 << s3 << s4 << s5 << endl;
     137        orxout() << s1 << s2 << s3 << s4 << s5 << endl;
    138138    }
    139139
    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; }
    144144
    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; }
    149149
    150     void Test::printPointer(){ CCOUT(1) << "pointer: " << this->pointer_ << endl; }
     150    void Test::printPointer(){ orxout() << "pointer: " << this->pointer_ << endl; }
    151151
    152152}
  • code/branches/output/src/orxonox/Test.h

    r7163 r8809  
    108108     
    109109      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; }
    111111  };
    112112}
  • code/branches/output/src/orxonox/collisionshapes/CollisionShape.cc

    r8706 r8809  
    203203        if(scale_.crossProduct(scale).squaredLength() != 0.0f)
    204204        {
    205             CCOUT(2) << "Warning: Non-uniform scaling is not yet supported." << endl;
     205            orxout(internal_warning) << "Non-uniform scaling is not yet supported." << endl;
    206206            return;
    207207        }
  • code/branches/output/src/orxonox/collisionshapes/CompoundCollisionShape.cc

    r8706 r8809  
    9898        if (this->attachedShapes_.find(shape) != this->attachedShapes_.end())
    9999        {
    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;
    101101            return;
    102102        }
     
    139139        }
    140140        else
    141             CCOUT(2) << "Warning: Cannot detach non child collision shape" << std::endl;
     141            orxout(internal_warning) << "Cannot detach non child collision shape" << endl;
    142142    }
    143143
     
    168168        if (it == this->attachedShapes_.end())
    169169        {
    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;
    171171            return;
    172172        }
  • code/branches/output/src/orxonox/controllers/ArtificialController.cc

    r8706 r8809  
    9898                    if (it->myMaster_ == this)
    9999                    {
    100                         COUT(1) << "error: " << this << " is still master in " << (*it) << std::endl;
     100                        orxout(internal_error) << this << " is still master in " << (*it) << endl;
    101101                        it->myMaster_ = 0;
    102102                    }
     
    107107                        if (it2 != it->slaves_.end())
    108108                        {
    109                             COUT(1) << "error: " << this << " is still slave in " << (*it) << std::endl;
     109                            orxout(internal_error) << this << " is still slave in " << (*it) << endl;
    110110                            it->slaves_.erase(it2);
    111111                        }
     
    737737        float speedDiv = this->getControllableEntity()->getVelocity().squaredLength() - this->target_->getVelocity().squaredLength();
    738738
    739 COUT(0) << "~follow distance: " << distance << "SpeedCounter: " << this->speedCounter_ << "~speedDiv: " << speedDiv << std::endl;
     739orxout() << "~follow distance: " << distance << "SpeedCounter: " << this->speedCounter_ << "~speedDiv: " << speedDiv << endl;
    740740        if (distance < 800)
    741741        {
  • code/branches/output/src/orxonox/controllers/HumanController.cc

    r8706 r8809  
    9393            Camera* camera = HumanController::localController_s->controllableEntity_->getCamera();
    9494            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;
    9696        }
    9797    }
     
    197197           
    198198            this->controllableEntity_->boost(this->boosting_);
    199             COUT(4) << "Start boosting" << endl;
     199//            orxout() << "Start boosting" << endl;
    200200        }
    201201    }
     
    211211
    212212        this->controllableEntity_->boost(this->boosting_);
    213         COUT(4) << "Stop boosting" << endl;
     213//        orxout() << "Stop boosting" << endl;
    214214    }
    215215
     
    257257            const Quaternion& orientation = HumanController::localController_s->controllableEntity_->getOrientation();
    258258
    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;
    261261        }
    262262    }
  • code/branches/output/src/orxonox/controllers/NewHumanController.cc

    r8436 r8809  
    388388        for (itr = result.begin(); itr != result.end(); ++itr)
    389389        {
    390 //             CCOUT(0) << "testing object as target" << endl;
     390//             orxout() << "testing object as target" << endl;
    391391            if (itr->movable->isInScene() && itr->movable->getMovableType() == "Entity" && itr->distance > 200)
    392392            {
  • code/branches/output/src/orxonox/gamestates/GSLevel.cc

    r8729 r8809  
    155155
    156156        // call the loader
    157         COUT(0) << "Loading level..." << std::endl;
     157        orxout(user_status) << "Loading level..." << endl;
    158158        startFile_ = new XMLFile(LevelManager::getInstance().getDefaultLevel());
    159159        bool loaded = Loader::open(startFile_);
     
    169169        delete startFile_;
    170170
    171         COUT(3) << "Unloaded level. Remaining objects:" << std::endl;
     171        orxout(user_status) << "Unloaded level" << endl;
     172        orxout(internal_info) << "Remaining objects:" << endl;
    172173        unsigned int i = 0;
    173174        for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it)
     
    176177            if (find == this->staticObjects_.end())
    177178            {
    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;
    179180            }
    180181        }
    181         COUT(3) << i << " objects remaining.";
     182        orxout(internal_info) << i << " objects remaining.";
    182183        if (i == 0)
    183             COUT(3) << " Well done!" << std::endl;
     184            orxout(internal_info) << " Well done!" << endl;
    184185        else
    185             COUT(3) << " Try harder!" << std::endl;
     186            orxout(internal_info) << " Try harder!" << endl;
    186187    }
    187188
  • code/branches/output/src/orxonox/gamestates/GSMasterServer.cc

    r8788 r8809  
    5454
    5555    this->mserver = new MasterServer();
    56     COUT(0) << "Loading masterserver mode" << std::endl;
     56    orxout(user_status) << "Loading masterserver mode" << endl;
    5757
    5858    this->mserver->run();
  • code/branches/output/src/orxonox/gamestates/GSRoot.cc

    r8706 r8809  
    7777        {
    7878            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;
    8080            else
    81                 COUT(0) << "object: " << it->getIdentifier()->getName() << std::endl;
     81                orxout(debug_output) << "object: " << it->getIdentifier()->getName() << endl;
    8282            nr++;
    8383        }
    84         COUT(0) << "currently got " << nr << " objects" << std::endl;
     84        orxout(debug_output) << "currently got " << nr << " objects" << endl;
    8585    }
    8686
  • code/branches/output/src/orxonox/gamestates/GSServer.cc

    r8788 r8809  
    5757
    5858        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;
    6060
    6161        server_->open();
  • code/branches/output/src/orxonox/gametypes/Asteroids.cc

    r7655 r8809  
    7474
    7575        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;
    7777        Host::Broadcast(message);
    7878
     
    8484
    8585        std::string message("The match has ended.");
    86         COUT(0) << message << std::endl;
     86        orxout(level::message) << message << endl;
    8787        Host::Broadcast(message);
    8888    }
  • code/branches/output/src/orxonox/gametypes/Deathmatch.cc

    r6417 r8809  
    4848
    4949        std::string message("The match has started!");
    50         COUT(0) << message << std::endl;
     50        orxout(level::message) << message << endl;
    5151        Host::Broadcast(message);
    5252    }
     
    5757
    5858        std::string message("The match has ended.");
    59         COUT(0) << message << std::endl;
     59        orxout(level::message) << message << endl;
    6060        Host::Broadcast(message);
    6161    }
     
    6666
    6767        const std::string& message = player->getName() + " entered the game";
    68         COUT(0) << message << std::endl;
     68        orxout(level::message) << message << endl;
    6969        Host::Broadcast(message);
    7070    }
     
    7777        {
    7878            const std::string& message = player->getName() + " left the game";
    79             COUT(0) << message << std::endl;
     79            orxout(level::message) << message << endl;
    8080            Host::Broadcast(message);
    8181        }
     
    9191        {
    9292            const std::string& message = player->getOldName() + " changed name to " + player->getName();
    93             COUT(0) << message << std::endl;
     93            orxout(level::message) << message << endl;
    9494            Host::Broadcast(message);
    9595        }
     
    113113                message = victim->getPlayer()->getName() + " died";
    114114
    115             COUT(0) << message << std::endl;
     115            orxout(level::message) << message << endl;
    116116            Host::Broadcast(message);
    117117        }
     
    127127        {
    128128            const std::string& message = player->getName() + " scores!";
    129             COUT(0) << message << std::endl;
     129            orxout(level::message) << message << endl;
    130130            Host::Broadcast(message);
    131131        }
  • code/branches/output/src/orxonox/gametypes/Dynamicmatch.cc

    r8729 r8809  
    342342        numberOf[chaser]++;
    343343        Gametype::playerEntered(player);
    344         const std::string& message6 = player->getName() + " entered the game";
    345         COUT(0) << message6 << std::endl;
    346         Host::Broadcast(message6);
     344        const std::string& message = player->getName() + " entered the game";
     345        orxout(level::message) << message << endl;
     346        Host::Broadcast(message);
    347347    }
    348348
     
    359359            }
    360360            const std::string& message = player->getName() + " left the game";
    361             COUT(0) << message << std::endl;
     361            orxout(level::message) << message << endl;
    362362            Host::Broadcast(message);
    363363            //remove player from map
     
    617617        {
    618618            const std::string& message = player->getOldName() + " changed name to " + player->getName();
    619             COUT(0) << message << std::endl;
     619            orxout(level::message) << message << endl;
    620620            Host::Broadcast(message);
    621621        }
     
    630630        {
    631631            std::string message("Dynamicmatch started!");
    632             COUT(0) << message << std::endl;
     632            orxout(level::message) << message << endl;
    633633            Host::Broadcast(message);
    634634        }
     
    647647    {
    648648        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;
    650650        Host::Broadcast(message);
    651651        callInstructions_.setTimer(10, false, createExecutor(createFunctor(&Dynamicmatch::furtherInstructions, this)));
     
    655655    {
    656656        std::string message("After 3 Minutes the game is over.");
    657         COUT(0) << message << std::endl;
     657        orxout(level::message) << message << endl;
    658658        Host::Broadcast(message);
    659659    }*/
     
    663663
    664664        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;
    666666        Host::Broadcast(message);
    667667    }
  • code/branches/output/src/orxonox/gametypes/Gametype.cc

    r8706 r8809  
    297297            }
    298298            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;
    300300        }
    301301    }
     
    344344            }
    345345
    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;
    347347            return fallbackSpawnPoint;
    348348        }
     
    444444        else
    445445        {
    446             COUT(1) << "Error: No SpawnPoints in current Gametype" << std::endl;
     446            orxout(user_error) << "No SpawnPoints in current Gametype" << endl;
    447447            abort();
    448448        }
     
    461461        else
    462462        {
    463             COUT(1) << "Error: No SpawnPoints in current Gametype" << std::endl;
     463            orxout(user_error) << "No SpawnPoints in current Gametype" << endl;
    464464            abort();
    465465        }
  • code/branches/output/src/orxonox/gametypes/LastManStanding.cc

    r8327 r8809  
    105105            this->playersAlive--;
    106106            const std::string& message = victim->getPlayer()->getName() + " has lost all lives";
    107             COUT(0) << message << std::endl;
     107            orxout(level::message) << message << endl;
    108108            Host::Broadcast(message);
    109109        }
  • code/branches/output/src/orxonox/gametypes/LastTeamStanding.cc

    r8706 r8809  
    119119                this->teamsAlive--;
    120120            const std::string& message = victim->getPlayer()->getName() + " has lost all lives";
    121             COUT(0) << message << std::endl;
     121            orxout(level::message) << message << endl;
    122122            Host::Broadcast(message);
    123123        }
  • code/branches/output/src/orxonox/gametypes/TeamBaseMatch.cc

    r8327 r8809  
    141141            return;
    142142
    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;
    146146    }
    147147
     
    179179            if (this->pointsTeam1_ > this->pointsTeam2_)
    180180            {
    181                 COUT(0) << "Team 1 has won the match" << std::endl;
     181                orxout(message) << "Team 1 has won the match" << endl;
    182182                winningteam = 0;
    183183            }
    184184            else
    185185            {
    186                 COUT(0) << "Team 2 has won the match" << std::endl;
     186                orxout(message) << "Team 2 has won the match" << endl;
    187187                winningteam = 1;
    188188            }
  • code/branches/output/src/orxonox/gametypes/UnderAttack.cc

    r8327 r8809  
    7070        this->end(); //end gametype
    7171        std::string message("Ship destroyed! Team 0 has won!");
    72         COUT(0) << message << std::endl;
     72        orxout(level::message) << message << endl;
    7373        Host::Broadcast(message);
    7474        this->gameEnded_ = true;
     
    153153                this->end();
    154154                std::string message("Time is up! Team 1 has won!");
    155                 COUT(0) << message << std::endl;
     155                orxout(level::message) << message << endl;
    156156                Host::Broadcast(message);
    157157
     
    173173                const std::string& message = multi_cast<std::string>(timesequence_) + " seconds left!";
    174174/*
    175                 COUT(0) << message << std::endl;
     175                orxout(level::message) << message << endl;
    176176                Host::Broadcast(message);
    177177*/
  • code/branches/output/src/orxonox/graphics/Model.cc

    r8079 r8809  
    142142            if( this->numLodLevels_>10 )
    143143            {
    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;
    145145                this->numLodLevels_ = 10;
    146146            }
     
    158158                    creatorPtr = creatorPtr->getCreator();
    159159                }
    160                 COUT(0) << "name: " << this->meshSrc_ << "scaleFactor: " << scaleFactor << ", volume: " << volume << endl;
     160                orxout() << "name: " << this->meshSrc_ << "scaleFactor: " << scaleFactor << ", volume: " << volume << endl;
    161161*/
    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;
    163163
    164164#if OGRE_VERSION >= 0x010700
     
    173173                    float factor = pow(volume, 2.0f / 3.0f) * 15.0f / lodLevel_;
    174174
    175                     COUT(4) << "LodLevel set with factor: " << factor << endl;
     175                    orxout(verbose, context::lod) << "LodLevel set with factor: " << factor << endl;
    176176
    177177                    distList.push_back(70.0f*factor);
     
    200200                        what = "<0";
    201201
    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;
    203203                }
    204204            }
    205205            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;
    207207        }
    208208    }
  • code/branches/output/src/orxonox/graphics/ParticleEmitter.cc

    r7174 r8809  
    116116            catch (const std::exception& ex)
    117117            {
    118                 COUT(1) << "Error: Couln't load particle effect \"" << this->source_ << "\" because:" << std::endl
    119                         << ex.what() << std::endl;
     118                orxout(internal_error) << "Couldn't load particle effect \"" << this->source_ << "\" because:" << endl
     119                                       << ex.what() << endl;
    120120            }
    121121        }
  • code/branches/output/src/orxonox/interfaces/PickupCarrier.cc

    r8351 r8809  
    7575            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.
    7676            {
    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;;
    7878                it++;
    7979            }
     
    158158    bool PickupCarrier::addPickup(Pickupable* pickup)
    159159    {
    160         COUT(4) << "Adding Pickupable (&" << pickup << ") to PickupCarrier (&" << this << ")" << std::endl;
     160        orxout(verbose, context::pickups) << "Adding Pickupable (&" << pickup << ") to PickupCarrier (&" << this << ")" << endl;
    161161        return this->pickups_.insert(pickup).second;
    162162    }
     
    172172    bool PickupCarrier::removePickup(Pickupable* pickup)
    173173    {
    174         COUT(4) << "Removing Pickupable (&" << pickup << ") from PickupCarrier (&" << this << ")" << std::endl;
     174        orxout(verbose, context::pickups) << "Removing Pickupable (&" << pickup << ") from PickupCarrier (&" << this << ")" << endl;
    175175        return this->pickups_.erase(pickup) == 1;
    176176    }
  • code/branches/output/src/orxonox/interfaces/Pickupable.cc

    r8464 r8809  
    7171        if(this->pickupIdentifier_ != NULL)
    7272        {
    73             COUT(4) << "Pickupable (&" << this << ") destroyed." << std::endl;
     73            orxout(verbose, context::pickups) << "Pickupable (&" << this << ") destroyed." << endl;
    7474            this->pickupIdentifier_->destroy();
    7575        }
     
    107107            this->OrxonoxClass::destroy();
    108108        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;
    110110    }
    111111
     
    126126            return false;
    127127
    128         COUT(4) << "Pickupable (&" << this << ") set to used " << used << "." << std::endl;
     128        orxout(verbose, context::pickups) << "Pickupable (&" << this << ") set to used " << used << "." << endl;
    129129
    130130        this->used_ = used;
     
    201201            return false;
    202202
    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;
    204204        this->targets_.push_back(target);
    205205        return true;
     
    221221        if(!this->setCarrier(carrier))
    222222        {
    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;
    224224            return false;
    225225        }
    226226
    227227        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;
    229229        return true;
    230230    }
     
    245245        assert(this->getCarrier()); // The Carrier cannot be NULL at this point.
    246246        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;
    250250        this->setUsed(false);
    251251        this->setPickedUp(false);
     
    276276            return false;
    277277
    278         COUT(4) << "Pickupable (&" << this << ") set to pickedUp " << pickedUp << "." << std::endl;
     278        orxout(verbose, context::pickups) << "Pickupable (&" << this << ") set to pickedUp " << pickedUp << "." << endl;
    279279
    280280        this->pickedUp_ = pickedUp;
     
    305305            return false;
    306306
    307         COUT(4) << "Pickupable (&" << this << ") changed Carrier (& " << carrier << ")." << std::endl;
     307        orxout(verbose, context::pickups) << "Pickupable (&" << this << ") changed Carrier (& " << carrier << ")." << endl;
    308308
    309309        if(carrier != NULL && tell)
     
    340340        Pickupable* pickup = dynamic_cast<Pickupable*>(item);
    341341
    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;
    343343        return pickup;
    344344    }
  • code/branches/output/src/orxonox/interfaces/RadarViewable.cc

    r8738 r8809  
    8383//         else
    8484//         {
    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;
    8686//         }
    8787//         this->radarObjectDescription_ = str;
     
    106106        if (!object)
    107107        {
    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;
    109109            assert(0);
    110110        }
  • code/branches/output/src/orxonox/items/Engine.cc

    r8727 r8809  
    261261        if(!this->engineTemplate_.empty())
    262262        {
    263             COUT(4)<<"Loading an engine template: "<<this->engineTemplate_<<"\n";
     263            orxout(verbose, context::templates) << "Loading an engine template: " << this->engineTemplate_ << endl;
    264264            Template *temp = Template::getTemplate(this->engineTemplate_);
    265265            if(temp)
  • code/branches/output/src/orxonox/overlays/InGameConsole.cc

    r8805 r8809  
    263263        this->consoleOverlayContainer_->setTop(-1.3f * this->relativeHeight);
    264264
    265         COUT(4) << "Info: InGameConsole initialized" << std::endl;
     265        orxout(internal_info) << "InGameConsole initialized" << endl;
    266266    }
    267267
  • code/branches/output/src/orxonox/overlays/OrxonoxOverlay.cc

    r8706 r8809  
    147147
    148148        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;
    150150
    151151        OrxonoxOverlay::overlays_s[this->getName()] = this;
     
    362362            {
    363363                overlay->hide();
    364                 COUT(4) << "HIDE " << name << std::endl;
     364                orxout(internal_info) << "HIDE " << name << endl;
    365365            }
    366366            else
    367367            {
    368368                overlay->show();
    369                 COUT(4) << "SHOW " << name << std::endl;
     369                orxout(internal_info) << "SHOW " << name << endl;
    370370            }
    371371        }
  • code/branches/output/src/orxonox/pickup/PickupIdentifier.cc

    r7494 r8809  
    5151
    5252        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;
    5454
    5555        this->pickup_ = pickup;
     
    8383        if(!(this->parameters_.size() == identifier->parameters_.size()))
    8484        {
    85             COUT(1) << "Something went wrong in PickupIdentifier!" << std::endl;
     85            orxout(internal_error, context::pickups) << "Something went wrong in PickupIdentifier!" << endl;
    8686            return this->parameters_.size()-identifier->parameters_.size();
    8787        }
     
    9393            if(identifier->parameters_.find(it->first) == identifier->parameters_.end())
    9494            {
    95                 COUT(1) << "Something went wrong in PickupIdentifier!" << std::endl;
     95                orxout(internal_error, context::pickups) << "Something went wrong in PickupIdentifier!" << endl;
    9696                return -1;
    9797            }
     
    115115    bool PickupIdentifier::addParameter(std::string & name, std::string & value)
    116116    {
    117         COUT(4) << "PickupIdentifier " << name << ", " << value << std::endl;
     117        orxout(verbose, context::pickups) << "PickupIdentifier " << name << ", " << value << endl;
    118118
    119119        if(!(this->parameters_.find(name) == this->parameters_.end()))
    120120        {
    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;
    122122            return false;
    123123        }
  • code/branches/output/src/orxonox/sound/AmbientSound.cc

    r8706 r8809  
    9494                this->setSource(path);
    9595            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;
    9797        }
    9898    }
  • code/branches/output/src/orxonox/sound/BaseSound.cc

    r8729 r8809  
    9494            alSourcePlay(this->audioSource_);
    9595            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;
    9797        }
    9898    }
     
    147147        alSource3f(this->audioSource_, AL_DIRECTION, 0, 0, 0);
    148148        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;
    151151        assert(this->soundBuffer_ != NULL);
    152152        alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer());
    153153        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;
    155155    }
    156156
     
    159159        this->volume_ = clamp(vol, 0.0f, 1.0f);
    160160        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;
    162162        this->updateVolume();
    163163    }
     
    170170            alSourcef(this->audioSource_, AL_GAIN, volume);
    171171            if (int error = alGetError())
    172                 COUT(2) << "Sound: Error setting volume to " << volume
    173                         << ": " << SoundManager::getALErrorString(error) << std::endl;
     172                orxout(internal_error, context::sound) << "Error setting volume to " << volume
     173                                                       << ": " << SoundManager::getALErrorString(error) << endl;
    174174        }
    175175    }
     
    186186        if (pitch > 2 || pitch < 0.5f)
    187187        {
    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;
    189189            pitch = pitch > 2.0f ? 2.0f : pitch;
    190190            pitch = pitch < 0.5f ? 0.5f : pitch;
     
    195195            alSourcef(this->audioSource_, AL_PITCH, pitch);
    196196            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;
    198198        }
    199199    }
     
    240240            if (ALuint error = alGetError())
    241241            {
    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;
    243243                return;
    244244            }
     
    248248            alSourcePlay(this->audioSource_);
    249249            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;
    251251            if (this->isPaused())
    252252                alSourcePause(this->audioSource_);
  • code/branches/output/src/orxonox/sound/SoundBuffer.cc

    r8351 r8809  
    5151        if (fileInfo == NULL)
    5252        {
    53             COUT(2) << "Sound: Warning: Sound file '" << filename << "' not found" << std::endl;
     53            orxout(internal_error, context::sound) << "Sound file '" << filename << "' not found" << endl;
    5454            return;
    5555        }
     
    144144        if (ret < 0)
    145145        {
    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;
    147147            ov_clear(&vf);
    148148            ThrowException(General, "Sound Error: Ogg file loader failed when opening the bitstream");
     
    160160            else if (ret < 0)
    161161            {
    162                 COUT(2) << "Sound: libvorbisfile: error reading the file" << std::endl;
     162                orxout(internal_error, context::sound) << "libvorbisfile: error reading the file" << endl;
    163163                ov_clear(&vf);
    164164                ThrowException(General, "Sound Error: Ogg file loader failed when decoding the file");
  • code/branches/output/src/orxonox/sound/SoundManager.cc

    r8521 r8809  
    8989        std::string renderDevice;
    9090        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: ";
    9292        while (true)
    9393        {
    9494            this->deviceNames_.push_back(devices);
    95             COUT(4) << '"' << devices << "\", ";
     95            orxout(verbose, context::sound) << '"' << devices << "\", ";
    9696            devices += strlen(devices) + 1;
    9797            if (*devices == '\0')
    9898                break;
    9999        }
    100         COUT(4) << std::endl;
     100        orxout(verbose, context::sound) << endl;
    101101
    102102        // Open the selected device
    103         COUT(3) << "Sound: Opening device \"" << renderDevice << '\' << std::endl;
     103        orxout(internal_info, context::sound) << "Sound: Opening device \"" << renderDevice << '\' << endl;
    104104        this->device_ = alcOpenDevice(renderDevice.c_str());
    105105*/
     
    122122        // Get some information about the sound
    123123        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;
    125125        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;
    127127        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;
    129129        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;
    131131
    132132        this->mute_[SoundType::All]     = 1.0f;
     
    152152        resetPlaysSoundGuard.Dismiss();
    153153
    154         COUT(4) << "Sound: Initialisation complete" << std::endl;
     154        orxout(internal_status, context::sound) << "Sound: Initialisation complete" << endl;
    155155    }
    156156
     
    164164        // If there are still used buffers around, well, that's just very bad...
    165165        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;
    167167        // Empty buffer pool and buffer list
    168168        this->effectsPool_.clear();
     
    171171        // There should not be any sources in use anymore
    172172        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;
    174174        while (!this->availableSoundSources_.empty())
    175175        {
     
    182182        // Relieve context to destroy it
    183183        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;
    185185        alcDestroyContext(this->context_);
    186186        if (ALCenum error = alcGetError(this->device_))
    187187        {
    188188            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;
    190190            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;
    192192        }
    193193#ifdef AL_VERSION_1_1
    194194        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;
    196196#else
    197197        alcCloseDevice(this->device_);
    198198#endif
    199199        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;
    201201    }
    202202
     
    244244        if (crossFadeStep_ <= 0.0 || crossFadeStep_ >= 1.0 )
    245245        {
    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;
    247247            ResetConfigValue(crossFadeStep_);
    248248        }
     
    253253        float clampedVolume = clamp(this->volume_[type], 0.0f, 1.0f);
    254254        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;
    256256        this->updateVolume(type);
    257257    }
     
    321321        if (error == AL_INVALID_VALUE)
    322322            // @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;
    324324    }
    325325
     
    335335        ALenum error = alGetError();
    336336        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;
    338338    }
    339339
     
    346346                if (it->first == newAmbient)
    347347                {
    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;
    349349                    return;
    350350                }
     
    520520            catch (const std::exception& ex)
    521521            {
    522                 COUT(1) << ex.what() << std::endl;
     522                orxout(internal_error, context::sound) << ex.what() << endl;
    523523                return buffer;
    524524            }
     
    614614            alDeleteSources(1, &this->availableSoundSources_.back());
    615615            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;
    617617            this->availableSoundSources_.pop_back();
    618618        }
  • code/branches/output/src/orxonox/sound/SoundStreamer.cc

    r7163 r8809  
    5151        if (ret < 0)
    5252        {
    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;
    5454            ov_clear(&vf);
    5555            return;
     
    7777            else if (ret < 0)
    7878            {
    79                 COUT(2) << "Sound: libvorbisfile: error reading the file" << std::endl;
     79                orxout(internal_error, context::sound) << "libvorbisfile: error reading the file" << endl;
    8080                ov_clear(&vf);
    8181                return;
     
    9191            alGetSourcei(audioSource, AL_BUFFERS_PROCESSED, &processed);
    9292            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;
    9595
    9696            if(processed > 0)
     
    9999                alSourceUnqueueBuffers(audioSource, processed, buffers);
    100100                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;
    103103
    104104                for(int i = 0; i < processed; i++)
     
    111111                    else if (ret < 0)
    112112                    {
    113                         COUT(2) << "Sound: libvorbisfile: error reading the file" << std::endl;
     113                        orxout(internal_error, context::sound) << "libvorbisfile: error reading the file" << endl;
    114114                        ov_clear(&vf);
    115115                        return;
     
    121121                alSourceQueueBuffers(audioSource, processed, buffers);
    122122                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;
    125125            }
    126126        }
  • code/branches/output/src/orxonox/sound/WorldSound.cc

    r8351 r8809  
    9494            ALenum error = alGetError();
    9595            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;
    9797
    9898            const Vector3& vel = this->getVelocity();
     
    100100            error = alGetError();
    101101            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;
    103103
    104104            const Vector3& direction = -this->getWorldOrientation().zAxis();
     
    106106            error = alGetError();
    107107            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;
    109109        }
    110110    }
  • code/branches/output/src/orxonox/weaponsystem/WeaponMode.cc

    r8706 r8809  
    188188            this->munitiontype_ = identifier;
    189189        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;
    191191        this->updateMunition();
    192192    }
     
    249249            Vector3 muzzleDirection;
    250250            muzzleDirection = target - this->muzzlePosition_;
    251 //             COUT(0) << "muzzleDirection " << muzzleDirection << endl;
    252251            this->muzzleOrientation_ = (this->weapon_->getWorldOrientation() * WorldEntity::FRONT).getRotationTo(muzzleDirection) * this->weapon_->getWorldOrientation();
    253252        }
  • code/branches/output/src/orxonox/worldentities/BigExplosion.cc

    r7284 r8809  
    6161            catch (const std::exception& ex)
    6262            {
    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;
    6464                this->initZero();
    6565            }
  • code/branches/output/src/orxonox/worldentities/ControllableEntity.cc

    r8706 r8809  
    457457        }
    458458        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;
    460460    }
    461461
  • code/branches/output/src/orxonox/worldentities/ExplosionChunk.cc

    r7284 r8809  
    6161            catch (const std::exception& ex)
    6262            {
    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;
    6464                this->fire_ = 0;
    6565                this->smoke_ = 0;
  • code/branches/output/src/orxonox/worldentities/MobileEntity.cc

    r8727 r8809  
    189189        if (type == WorldEntity::Static)
    190190        {
    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;
    192192            assert(false); // Only in debug mode
    193193            return false;
  • code/branches/output/src/orxonox/worldentities/SpawnPoint.cc

    r8706 r8809  
    4848            this->getGametype()->registerSpawnPoint(this);
    4949        else
    50             COUT(1) << "Error: SpawnPoint has no Gametype" << std::endl;
     50            orxout(internal_error) << "SpawnPoint has no Gametype" << endl;
    5151
    5252        this->setSyncMode(ObjectDirection::None);
  • code/branches/output/src/orxonox/worldentities/StaticEntity.cc

    r6417 r8809  
    6363        if (this->addedToPhysicalWorld())
    6464        {
    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;
    6666            return;
    6767        }
     
    8080        if (this->addedToPhysicalWorld())
    8181        {
    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;
    8383            return;
    8484        }
     
    9797        if (type == WorldEntity::Kinematic || type == WorldEntity::Dynamic)
    9898        {
    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;
    100100            assert(false); // Only in debug mode
    101101            return false;
  • code/branches/output/src/orxonox/worldentities/WorldEntity.cc

    r8706 r8809  
    311311            this->collisionTypeSynchronised_ != None)
    312312        {
    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;
    314314        }
    315315        else if (this->collisionTypeSynchronised_ != collisionType_)
    316316        {
    317317            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;
    319319            else
    320320                this->setCollisionType(this->collisionTypeSynchronised_);
     
    373373        if (object == this)
    374374        {
    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;
    376376            return;
    377377        }
     
    406406            if (!newParent->hasPhysics())
    407407            {
    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;
    409409                return false;
    410410            }
    411411            else if (this->isDynamic())
    412412            {
    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;
    414414                return false;
    415415            }
    416416            else if (this->isKinematic() && newParent->isDynamic())
    417417            {
    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;
    419419                return false;
    420420            }
    421421            else if (this->isKinematic())
    422422            {
    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;
    424424                return false;
    425425            }
     
    455455        if (it == this->children_.end())
    456456        {
    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;
    458458            return;
    459459        }
     
    799799        if (this->parent_)
    800800        {
    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;
    802802            return;
    803803        }
     
    822822            if (!this->node_->getScale().positionEquals(Vector3(1, 1, 1), 0.001))
    823823            {
    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;
    825825                return;
    826826            }
     
    971971            {
    972972                // 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;
    974974                btVector3 inertia(0, 0, 0);
    975975                this->collisionShape_->calculateLocalInertia(1.0f, inertia);
  • code/branches/output/src/orxonox/worldentities/pawns/FpsPlayer.cc

    r7184 r8809  
    132132        if (type != WorldEntity::Dynamic)
    133133        {
    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;
    135135            assert(false); // Only in debug mode
    136136            return false;
  • code/branches/output/src/orxonox/worldentities/pawns/SpaceShip.cc

    r8727 r8809  
    145145        if (type != WorldEntity::Dynamic)
    146146        {
    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;
    148148            assert(false); // Only in debug mode
    149149            return false;
     
    507507        if (camera == 0)
    508508        {
    509             COUT(2) << "Failed to reset camera!";
     509            orxout(internal_warning) << "Failed to reset camera!" << endl;
    510510            return;
    511511        }
Note: See TracChangeset for help on using the changeset viewer.