aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2006-04-17 10:22:05 +0000
committerMax Horn2006-04-17 10:22:05 +0000
commitea85e8c986189ef0143343e9de6d9279dcf09096 (patch)
treeb0df61ac99f5e0a02ac4abc023c4d56bf0388c47 /gui
parentbbac9e43ee2d29eb76a792225d7f936382169810 (diff)
downloadscummvm-rg350-ea85e8c986189ef0143343e9de6d9279dcf09096.tar.gz
scummvm-rg350-ea85e8c986189ef0143343e9de6d9279dcf09096.tar.bz2
scummvm-rg350-ea85e8c986189ef0143343e9de6d9279dcf09096.zip
Moved ColorMasks to their own new header graphics/colormasks.h, so that both the scalers and the GUI code can access them. Also added (untested) entries for 1555, 444, 888 and 8888 modes
svn-id: r21966
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeNew.cpp27
1 files changed, 1 insertions, 26 deletions
diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp
index 11b737ffb1..36575c0e04 100644
--- a/gui/ThemeNew.cpp
+++ b/gui/ThemeNew.cpp
@@ -26,6 +26,7 @@
#include "graphics/imageman.h"
#include "graphics/imagedec.h"
+#include "graphics/colormasks.h"
#include "common/config-manager.h"
#include "common/file.h"
@@ -86,32 +87,6 @@ static void getValueFromConfig(const Common::ConfigFile &cfg, const Common::Stri
#define getExtraValueFromConfig(x, y, z, a) getValueFromConfig(x, "extra", y, z, a)
namespace GUI {
-// some of this stuff is allready in graphics/scaler/intern.h
-// maybe use the structs in graphics/scaler/intern.h then and add
-// there kBlueMask
-template<int bitFormat>
-struct ColorMasks {
-};
-
-template<>
-struct ColorMasks<555> {
- enum {
- kRBMask = 0x7C1F,
- kRedMask = 0x7C00,
- kGreenMask = 0x03E0,
- kBlueMask = 0x001F
- };
-};
-
-template<>
-struct ColorMasks<565> {
- enum {
- kRBMask = 0xF81F,
- kRedMask = 0xF800,
- kGreenMask = 0x07E0,
- kBlueMask = 0x001F
- };
-};
OverlayColor getColorAlpha(OverlayColor col1, OverlayColor col2, int alpha);
OverlayColor calcGradient(OverlayColor start, OverlayColor end, int pos, int max, uint factor);