[Orxonox-commit 4183] r8854 - in code/branches/output: data/levels src/libraries/core src/libraries/core/input

landauf at orxonox.net landauf at orxonox.net
Sun Aug 21 23:57:00 CEST 2011


Author: landauf
Date: 2011-08-21 23:56:59 +0200 (Sun, 21 Aug 2011)
New Revision: 8854

Modified:
   code/branches/output/data/levels/presentationDM.oxw
   code/branches/output/src/libraries/core/Language.cc
   code/branches/output/src/libraries/core/input/InputManager.cc
Log:
change some output's level to verbose: 1. in Language.cc because it is printed a lot during the first startup of orxonox. 2. in InputManager.cc because the reloading happens each time the in game menu is opened or closed.
fixed possible "mass = 0" warning in presentationDM.oxw and fixed squared scaling of asteroid's size (?) because the scale was used for MovableEntity AND Model.

Modified: code/branches/output/data/levels/presentationDM.oxw
===================================================================
--- code/branches/output/data/levels/presentationDM.oxw	2011-08-21 21:18:20 UTC (rev 8853)
+++ code/branches/output/data/levels/presentationDM.oxw	2011-08-21 21:56:59 UTC (rev 8854)
@@ -46,13 +46,14 @@
     <?lua
       for i = 1, 100, 1 do
         j = math.random()
+        scale = j * 50 + 5
     ?>
-      <MovableEntity position="<?lua print(math.random() * 5000-2000) ?>,<?lua print(math.random() * 5000-2000) ?>,<?lua print(math.random() * 5000 - 2000) ?>" collisionType=dynamic linearDamping=0.8 angularDamping=0 mass="<?lua print(j * 50) ?>" scale="<?lua print(j * 5) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
+      <MovableEntity position="<?lua print(math.random() * 5000-2000) ?>,<?lua print(math.random() * 5000-2000) ?>,<?lua print(math.random() * 5000 - 2000) ?>" collisionType=dynamic linearDamping=0.8 angularDamping=0 mass="<?lua print(scale) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
         <attached>
-          <Model position="0,0,0" scale="<?lua print(j * 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
+          <Model scale="<?lua print(scale) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
         </attached>
         <collisionShapes>
-          <SphereCollisionShape radius="<?lua print(j * 70) ?>" />
+          <SphereCollisionShape radius="<?lua print(scale * 2.5) ?>" />
         </collisionShapes>
       </MovableEntity>
     <?lua end ?>

Modified: code/branches/output/src/libraries/core/Language.cc
===================================================================
--- code/branches/output/src/libraries/core/Language.cc	2011-08-21 21:18:20 UTC (rev 8853)
+++ code/branches/output/src/libraries/core/Language.cc	2011-08-21 21:56:59 UTC (rev 8854)
@@ -303,7 +303,7 @@
     */
     void Language::writeDefaultLanguageFile() const
     {
-        orxout(internal_info, context::language) << "Write default language file." << endl;
+        orxout(verbose, context::language) << "Write default language file." << endl;
 
         const std::string& filepath = PathConfig::getConfigPathString() + getFilename(this->defaultLanguage_);
 

Modified: code/branches/output/src/libraries/core/input/InputManager.cc
===================================================================
--- code/branches/output/src/libraries/core/input/InputManager.cc	2011-08-21 21:18:20 UTC (rev 8853)
+++ code/branches/output/src/libraries/core/input/InputManager.cc	2011-08-21 21:56:59 UTC (rev 8854)
@@ -142,7 +142,7 @@
     */
     void InputManager::loadDevices()
     {
-        orxout(internal_info, context::input) << "InputManager: Loading input devices..." << endl;
+        orxout(verbose, context::input) << "InputManager: Loading input devices..." << endl;
 
         // When loading the devices they should not already be loaded
         assert(internalState_ & Bad);
@@ -195,7 +195,7 @@
             oisInputManager_ = OIS::InputManager::createInputSystem(paramList);
             // Exception-safety
             Loki::ScopeGuard guard = Loki::MakeGuard(OIS::InputManager::destroyInputSystem, oisInputManager_);
-            orxout(internal_info, context::input) << "Created OIS input manager." << endl;
+            orxout(verbose, context::input) << "Created OIS input manager." << endl;
 
             if (oisInputManager_->getNumberOfDevices(OIS::OISKeyboard) > 0)
                 devices_[InputDeviceEnumerator::Keyboard] = new Keyboard(InputDeviceEnumerator::Keyboard, oisInputManager_);
@@ -218,7 +218,7 @@
         // Reorder states in case some joy sticks were added/removed
         this->updateActiveStates();
 
-        orxout(internal_info, context::input) << "Input devices loaded." << endl;
+        orxout(verbose, context::input) << "Input devices loaded." << endl;
     }
 
     //! Creates a new orxonox::Mouse
@@ -305,7 +305,7 @@
     */
     void InputManager::destroyDevices()
     {
-        orxout(internal_info, context::input) << "InputManager: Destroying devices..." << endl;
+        orxout(verbose, context::input) << "InputManager: Destroying devices..." << endl;
 
         BOOST_FOREACH(InputDevice*& device, devices_)
         {
@@ -314,7 +314,7 @@
             const std::string& className = device->getClassName();
             delete device;
             device = 0;
-            orxout(internal_info, context::input) << className << " destroyed." << endl;
+            orxout(verbose, context::input) << className << " destroyed." << endl;
         }
         devices_.resize(InputDeviceEnumerator::FirstJoyStick);
 
@@ -331,7 +331,7 @@
         oisInputManager_ = NULL;
 
         internalState_ |= Bad;
-        orxout(internal_info, context::input) << "Destroyed devices." << endl;
+        orxout(verbose, context::input) << "Destroyed devices." << endl;
     }
 
     // ############################################################
@@ -350,13 +350,13 @@
     //! Internal reload method. Destroys the OIS devices and loads them again.
     void InputManager::reloadInternal()
     {
-        orxout(internal_info, context::input) << "InputManager: Reloading ..." << endl;
+        orxout(verbose, context::input) << "InputManager: Reloading ..." << endl;
 
         this->destroyDevices();
         this->loadDevices();
 
         internalState_ &= ~Bad;
-        orxout(internal_info, context::input) << "InputManager: Reloading complete." << endl;
+        orxout(verbose, context::input) << "InputManager: Reloading complete." << endl;
     }
 
     // ############################################################




More information about the Orxonox-commit mailing list