comparison engine/core/controller/enginesettings.h @ 632:a7909cdcdc85

* A little data type cleanup in the FIFE::EngineSettings class * Added some standard integer definitions
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 05 Oct 2010 19:42:54 +0000
parents 356634098bd9
children 855ad500f991
comparison
equal deleted inserted replaced
631:f3457443c95f 632:a7909cdcdc85
1 /*************************************************************************** 1 /***************************************************************************
2 * Copyright (C) 2005-2008 by the FIFE team * 2 * Copyright (C) 2005-2010 by the FIFE team *
3 * http://www.fifengine.de * 3 * http://www.fifengine.net *
4 * This file is part of FIFE. * 4 * This file is part of FIFE. *
5 * * 5 * *
6 * FIFE is free software; you can redistribute it and/or * 6 * FIFE is free software; you can redistribute it and/or *
7 * modify it under the terms of the GNU Lesser General Public * 7 * modify it under the terms of the GNU Lesser General Public *
8 * License as published by the Free Software Foundation; either * 8 * License as published by the Free Software Foundation; either *
54 void validate() const; 54 void validate() const;
55 55
56 /** Sets bits per pixel 56 /** Sets bits per pixel
57 * @see getPossibleBitsPerPixel 57 * @see getPossibleBitsPerPixel
58 */ 58 */
59 void setBitsPerPixel(unsigned int bitsperpixel); 59 void setBitsPerPixel(uint8_t bitsperpixel);
60 60
61 /** Gets currently set bits per pixel value 61 /** Gets currently set bits per pixel value
62 */ 62 */
63 unsigned int getBitsPerPixel() const { 63 unsigned int getBitsPerPixel() const {
64 return m_bitsperpixel; 64 return m_bitsperpixel;
65 } 65 }
66 66
67 /** Gets all possible bits per pixel values 67 /** Gets all possible bits per pixel values
68 */ 68 */
69 std::vector<unsigned int> getPossibleBitsPerPixel() const; 69 std::vector<uint8_t> getPossibleBitsPerPixel() const;
70 70
71 /** Gets all possible screen resolutions 71 /** Gets all possible screen resolutions
72 */ 72 */
73 std::vector<std::pair<unsigned int, unsigned int> > getPossibleResolutions() const; 73 std::vector<std::pair<uint16_t, uint16_t> > getPossibleResolutions() const;
74 74
75 /** Sets fullscreen / windowed mode 75 /** Sets fullscreen / windowed mode
76 */ 76 */
77 void setFullScreen(bool fullscreen) { 77 void setFullScreen(bool fullscreen) {
78 m_fullscreen = fullscreen; 78 m_fullscreen = fullscreen;
124 return m_sdlremovefakealpha; 124 return m_sdlremovefakealpha;
125 } 125 }
126 126
127 /** Sets screen width (pixels) 127 /** Sets screen width (pixels)
128 */ 128 */
129 void setScreenWidth(unsigned int screenwidth); 129 void setScreenWidth(uint16_t screenwidth);
130 130
131 /** Gets screen width (pixels) 131 /** Gets screen width (pixels)
132 */ 132 */
133 unsigned int getScreenWidth() const { 133 unsigned int getScreenWidth() const {
134 return m_screenwidth; 134 return m_screenwidth;
135 } 135 }
136 136
137 /** Sets screen height (pixels) 137 /** Sets screen height (pixels)
138 */ 138 */
139 void setScreenHeight(unsigned int screenheight); 139 void setScreenHeight(uint16_t screenheight);
140 140
141 /** Gets screen height (pixels) 141 /** Gets screen height (pixels)
142 */ 142 */
143 unsigned int getScreenHeight() const { 143 unsigned int getScreenHeight() const {
144 return m_screenheight; 144 return m_screenheight;
154 return m_defaultfontpath; 154 return m_defaultfontpath;
155 } 155 }
156 156
157 /** Sets size for default font 157 /** Sets size for default font
158 */ 158 */
159 void setDefaultFontSize(const unsigned int defaultfontsize); 159 void setDefaultFontSize(uint16_t defaultfontsize);
160 160
161 /** Gets size for default font 161 /** Gets size for default font
162 */ 162 */
163 unsigned int getDefaultFontSize() const { 163 uint16_t getDefaultFontSize() const {
164 return m_defaultfontsize; 164 return m_defaultfontsize;
165 } 165 }
166 166
167 /** Sets glyphs for default font 167 /** Sets glyphs for default font
168 */ 168 */
202 */ 202 */
203 bool isColorKeyEnabled() const; 203 bool isColorKeyEnabled() const;
204 204
205 /** Sets the global colorkey to use for images 205 /** Sets the global colorkey to use for images
206 */ 206 */
207 void setColorKey(Uint8 r, Uint8 g, Uint8 b); 207 void setColorKey(uint8_t r, uint8_t g, uint8_t b);
208 208
209 /** Gets the global colorkey setting 209 /** Gets the global colorkey setting
210 */ 210 */
211 const SDL_Color& getColorKey() const; 211 const SDL_Color& getColorKey() const;
212 212
213 private: 213 private:
214 unsigned int m_bitsperpixel; 214 uint8_t m_bitsperpixel;
215 bool m_fullscreen; 215 bool m_fullscreen;
216 float m_initialvolume; 216 float m_initialvolume;
217 std::string m_renderbackend; 217 std::string m_renderbackend;
218 bool m_sdlremovefakealpha; 218 bool m_sdlremovefakealpha;
219 unsigned int m_screenwidth; 219 uint16_t m_screenwidth;
220 unsigned int m_screenheight; 220 uint16_t m_screenheight;
221 std::string m_windowtitle; 221 std::string m_windowtitle;
222 std::string m_windowicon; 222 std::string m_windowicon;
223 223
224 224
225 std::string m_defaultfontpath; 225 std::string m_defaultfontpath;
226 unsigned int m_defaultfontsize; 226 uint16_t m_defaultfontsize;
227 std::string m_defaultfontglyphs; 227 std::string m_defaultfontglyphs;
228 bool m_iscolorkeyenabled; 228 bool m_iscolorkeyenabled;
229 SDL_Color m_colorkey; 229 SDL_Color m_colorkey;
230 }; 230 };
231 231