diff options
| author | Max Horn | 2007-08-11 08:05:03 +0000 | 
|---|---|---|
| committer | Max Horn | 2007-08-11 08:05:03 +0000 | 
| commit | a03119c5f5c51203a7ca0c7ca84d928b47ae8aa6 (patch) | |
| tree | 9ac393fc89605d83abe00bb42bb6b68a24de6f42 /common/system.cpp | |
| parent | c492e9c90289d7592b8585ba0dc18b859a428560 (diff) | |
| download | scummvm-rg350-a03119c5f5c51203a7ca0c7ca84d928b47ae8aa6.tar.gz scummvm-rg350-a03119c5f5c51203a7ca0c7ca84d928b47ae8aa6.tar.bz2 scummvm-rg350-a03119c5f5c51203a7ca0c7ca84d928b47ae8aa6.zip | |
Changed OSystem (A)RGBToColor and colorTo(A)RGB methods to use ColorMasks templates; clarified some OSystem comments
svn-id: r28517
Diffstat (limited to 'common/system.cpp')
| -rw-r--r-- | common/system.cpp | 21 | 
1 files changed, 19 insertions, 2 deletions
| diff --git a/common/system.cpp b/common/system.cpp index f8068d41f5..a1bdb4cdcc 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -28,13 +28,13 @@  #include "backends/intern.h"  #include "backends/events/default/default-events.h" -#include "gui/message.h" -  #include "common/config-manager.h"  #include "common/system.h"  #include "common/timer.h"  #include "common/util.h" +#include "graphics/colormasks.h" +#include "gui/message.h"  #include "sound/mixer.h"  OSystem *g_system = 0; @@ -66,6 +66,23 @@ bool OSystem::setGraphicsMode(const char *name) {  	return false;  } +OverlayColor OSystem::RGBToColor(uint8 r, uint8 g, uint8 b) { +	return ::RGBToColor<ColorMasks<565> >(r, g, b); +} + +void OSystem::colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b) { +	::colorToRGB<ColorMasks<565> >(color, r, g, b); +} + +OverlayColor OSystem::ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b) { +	return RGBToColor(r, g, b); +} + +void OSystem::colorToARGB(OverlayColor color, uint8 &a, uint8 &r, uint8 &g, uint8 &b) { +	colorToRGB(color, r, g, b); +	a = 255; +} +  void OSystem::displayMessageOnOSD(const char *msg) {  	// Display the message for 1.5 seconds  	GUI::TimedMessageDialog dialog(msg, 1500); | 
