Changeset 4768 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Jul 2, 2005, 12:03:12 PM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/graphics_engine.cc
r4766 r4768 37 37 this->maxFPS = 0; 38 38 39 this->fullscreen = false;39 this->fullscreenFlag = 0; 40 40 41 41 this->initVideo(); … … 92 92 */ 93 93 // setting up the Resolution 94 this->setResolution( 550, 400, 16);94 this->setResolution(640, 480, 16); 95 95 96 96 // TO DO: Create a cool icon and use it here … … 146 146 int GraphicsEngine::setResolution(int width, int height, int bpp) 147 147 { 148 Uint32 fullscreenFlag;149 148 this->resolutionX = width; 150 149 this->resolutionY = height; 151 150 this->bitsPerPixel = bpp; 152 151 153 if (this->fullscreen) 152 if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags | SDL_FULLSCREEN)) == NULL) 153 { 154 PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError()); 155 SDL_Quit(); 156 // return -1; 157 } 158 } 159 160 /** 161 \brief sets Fullscreen mode 162 \param fullscreen true if fullscreen, false if windowed 163 */ 164 void GraphicsEngine::setFullscreen(bool fullscreen) 165 { 166 if (fullscreen) 154 167 fullscreenFlag = SDL_FULLSCREEN; 155 168 else 156 169 fullscreenFlag = 0; 157 158 if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags | fullscreenFlag)) == NULL)159 {160 PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError());161 SDL_Quit();162 // return -1;163 }164 }165 166 /**167 \brief sets Fullscreen mode168 \param fullscreen true if fullscreen, false if windowed169 */170 void GraphicsEngine::setFullscreen(bool fullscreen)171 {172 this->fullscreen = fullscreen;173 170 this->setResolution(this->resolutionX, this->resolutionY, this->bitsPerPixel); 174 171 } -
orxonox/trunk/src/lib/graphics/graphics_engine.h
r4746 r4768 75 75 int resolutionY; //!< the Y-resolution of the screen 76 76 int bitsPerPixel; //!< the bits per pixels of the screen 77 bool fullscreen;//!< if we are in fullscreen mode77 Uint32 fullscreenFlag; //!< if we are in fullscreen mode 78 78 Uint32 videoFlags; //!< flags for video 79 79 SDL_Rect** videoModes; //!< list of resolutions -
orxonox/trunk/src/orxonox.h
r4766 r4768 17 17 class IniParser; 18 18 19 //! Orxonox core singleton class19 //! orxonox core singleton class 20 20 /** 21 21 */
Note: See TracChangeset
for help on using the changeset viewer.