Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1477 for code


Ignore:
Timestamp:
May 29, 2008, 10:22:53 AM (16 years ago)
Author:
landauf
Message:
  • small char-length tweaking for my system (because i have to show the shell)
  • fixed bug causing orxonox to loop forever when loading the config file (you'll like this, felix)
Location:
code/branches/network/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/orxonox/GraphicsEngine.cc

    r1466 r1477  
    5454
    5555namespace orxonox {
    56  
     56
    5757  SetConsoleCommandShortcut(GraphicsEngine, CompositorBloomOn).setAccessLevel(AccessLevel::User);
    5858  SetConsoleCommandShortcut(GraphicsEngine, CompositorMotionBlurOn).setAccessLevel(AccessLevel::User);
     
    303303    else
    304304      return 0;
     305  }
     306
     307  /**
     308    @brief Returns the window aspect ratio height/width.
     309    @return The ratio
     310  */
     311  float GraphicsEngine::getWindowAspectRatio() const
     312  {
     313    if (this->renderWindow_)
     314        return (float)this->renderWindow_->getHeight() / (float)this->renderWindow_->getWidth();
     315    else
     316        return 1.0f;
    305317  }
    306318
  • code/branches/network/src/orxonox/GraphicsEngine.h

    r1466 r1477  
    7272            int getWindowWidth() const;
    7373            int getWindowHeight() const;
     74            float getWindowAspectRatio() const;
    7475            float getAverageFPS() const
    7576            { if (renderWindow_) return this->renderWindow_->getAverageFPS(); else return 0.0f; }
  • code/branches/network/src/orxonox/console/InGameConsole.cc

    r1473 r1477  
    4747
    4848#define LINES 30
    49 #define CHAR_WIDTH1 7.34 // fix this please - determine the char-width dynamically
     49#define CHAR_WIDTH1 7.78 //34 // fix this please - determine the char-width dynamically
    5050#define CHAR_WIDTH2 8.28 // fix this please - determine the char-width dynamically
    51 #define CHAR_WIDTH3 7.78 // fix this please - determine the char-width dynamically
     51#define CHAR_WIDTH3 7.80 //78 // fix this please - determine the char-width dynamically
    5252
    5353namespace orxonox
     
    465465        static std::string char2 = "Z4";
    466466
    467         if (pos > maxCharsPerLine_)
     467        if (pos > (int)maxCharsPerLine_)
    468468          pos = maxCharsPerLine_;
    469469        else if (pos < 0)
  • code/branches/network/src/util/String.cc

    r1446 r1477  
    112112    {
    113113        quotecount++;
     114        quote++;
    114115    }
    115116
Note: See TracChangeset for help on using the changeset viewer.