Mercurial > fife-parpg
comparison engine/core/controller/enginesettings.cpp @ 425:ad7969d9460b
A client can now specify a global color key to be used with all images. The default color key is (255,0,255) in RGB format. Also the client can enable/disable the color key feature by using the setColorKeyEnabled function in the EngineSettings class. By default the color key feature is disabled. fixes[t:451]
author | vtchill@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 20 Feb 2010 19:11:01 +0000 |
parents | 98541d3b9220 |
children | 79678719d569 |
comparison
equal
deleted
inserted
replaced
424:e29fbf84cb41 | 425:ad7969d9460b |
---|---|
48 m_windowtitle("FIFE"), | 48 m_windowtitle("FIFE"), |
49 m_windowicon(""), | 49 m_windowicon(""), |
50 m_defaultfontpath(""), | 50 m_defaultfontpath(""), |
51 m_defaultfontsize(8), | 51 m_defaultfontsize(8), |
52 m_defaultfontglyphs(""), | 52 m_defaultfontglyphs(""), |
53 m_image_chunking_size(256) { | 53 m_image_chunking_size(256), |
54 m_iscolorkeyenabled(false) { | |
55 m_colorkey.r = 255; | |
56 m_colorkey.g = 0; | |
57 m_colorkey.b = 255; | |
54 } | 58 } |
55 | 59 |
56 EngineSettings::~EngineSettings() { | 60 EngineSettings::~EngineSettings() { |
57 } | 61 } |
58 | 62 |
157 } | 161 } |
158 | 162 |
159 void EngineSettings::setWindowIcon(const std::string& icon) { | 163 void EngineSettings::setWindowIcon(const std::string& icon) { |
160 m_windowicon = icon; | 164 m_windowicon = icon; |
161 } | 165 } |
162 | 166 |
167 void EngineSettings::setColorKeyEnabled(bool colorkeyenable) { | |
168 m_iscolorkeyenabled = colorkeyenable; | |
169 } | |
170 | |
171 bool EngineSettings::isColorKeyEnabled() const { | |
172 return m_iscolorkeyenabled; | |
173 } | |
174 | |
175 void EngineSettings::setColorKey(Uint8 r, Uint8 g, Uint8 b) { | |
176 m_colorkey.r = r; | |
177 m_colorkey.g = g; | |
178 m_colorkey.b = b; | |
179 } | |
180 | |
181 const SDL_Color& EngineSettings::getColorKey() const { | |
182 return m_colorkey; | |
183 } | |
163 } | 184 } |
164 | 185 |