From 9217472f0e4e801659c0a448dcbf57c28fd36ee2 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 2 Apr 2006 14:16:31 +0000 Subject: With this change, backends are now responsible for instantiating their OSystem class before calling scummvm_main (Note: PalmOS and Symbian are not yet converted, and won't work currently) svn-id: r21557 --- gui/ThemeNew.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gui/ThemeNew.cpp') diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp index 8be57bb725..8ae1854e10 100644 --- a/gui/ThemeNew.cpp +++ b/gui/ThemeNew.cpp @@ -47,7 +47,7 @@ extern int gBitFormat; static void getColorFromConfig(const Common::ConfigFile &cfg, const Common::String &value, OverlayColor &color) { Common::String temp; if (!cfg.hasKey(value, "colors")) { - color = OSystem::instance().RGBToColor(0, 0, 0); + color = g_system->RGBToColor(0, 0, 0); return; } cfg.getKey(value, "colors", temp); @@ -59,7 +59,7 @@ static void getColorFromConfig(const Common::ConfigFile &cfg, const Common::Stri rgb[cnt] = atoi(colors + pos); pos = strchr(colors + pos, ' ') - colors + 1; } - color = OSystem::instance().RGBToColor(rgb[0], rgb[1], rgb[2]); + color = g_system->RGBToColor(rgb[0], rgb[1], rgb[2]); } static void getValueFromConfig(const Common::ConfigFile &cfg, const Common::String §ion, const Common::String &value, uint &val, uint defaultVal) { @@ -1027,7 +1027,7 @@ Common::Rect ThemeNew::shadowRect(const Common::Rect &r, uint32 shadowStyle) { void ThemeNew::drawShadow(const Common::Rect &r, const Graphics::Surface *corner, const Graphics::Surface *top, const Graphics::Surface *left, const Graphics::Surface *fill, uint32 shadowStyle, bool full, bool skipLastRow) { - OverlayColor col = OSystem::instance().RGBToColor(0, 0, 0); + OverlayColor col = g_system->RGBToColor(0, 0, 0); switch (shadowStyle) { case kShadowFull: { @@ -1125,8 +1125,8 @@ void ThemeNew::drawShadowRect(const Common::Rect &r, const Common::Rect &area, c ++partsW; } - OverlayColor startCol = OSystem::instance().RGBToColor(0, 0, 0); - OverlayColor endCol = OSystem::instance().RGBToColor(0, 0, 0); + OverlayColor startCol = g_system->RGBToColor(0, 0, 0); + OverlayColor endCol = g_system->RGBToColor(0, 0, 0); for (int y = 0; y < partsH; ++y) { // calculate the correct drawing height -- cgit v1.2.3