aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/fonts.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2019-01-31 20:50:34 -0800
committerPaul Gilbert2019-01-31 21:54:34 -0800
commitaf2b1252d868ea07a45e5f567f8109c339cb63fe (patch)
tree0e6907671502e2097d4ed90333d0544a359db61e /engines/glk/fonts.cpp
parent307dd44fba7efb763c611dc45af7535d2b20ca46 (diff)
downloadscummvm-rg350-af2b1252d868ea07a45e5f567f8109c339cb63fe.tar.gz
scummvm-rg350-af2b1252d868ea07a45e5f567f8109c339cb63fe.tar.bz2
scummvm-rg350-af2b1252d868ea07a45e5f567f8109c339cb63fe.zip
GLK: Change use of RGB tuplets to uint
This has several advantages, such as simplifying copying and comparing colors. It will also make it easier to specify zcolor_Transparent as a color
Diffstat (limited to 'engines/glk/fonts.cpp')
-rw-r--r--engines/glk/fonts.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/engines/glk/fonts.cpp b/engines/glk/fonts.cpp
index 60eb116a90..cdac7c0b2b 100644
--- a/engines/glk/fonts.cpp
+++ b/engines/glk/fonts.cpp
@@ -28,26 +28,21 @@
namespace Glk {
FontInfo::FontInfo() : _size(0), _aspect(0), _cellW(0), _cellH(0), _leading(0), _baseLine(0),
- _linkStyle(0), _moreFont(PROPB), _moreAlign(0), _caps(0) {
- Common::fill(&_linkColor[0], &_linkColor[3], 0);
- Common::fill(&_linkSave[0], &_linkSave[3], 0);
- Common::fill(&_moreColor[0], &_moreColor[3], 0);
- Common::fill(&_moreSave[0], &_moreSave[3], 0);
+ _linkStyle(0), _moreFont(PROPB), _moreAlign(0), _caps(0), _linkColor(0), _linkSave(0),
+ _moreColor(0), _moreSave(0) {
}
/*--------------------------------------------------------------------------*/
-PropFontInfo::PropFontInfo() : _justify(0), _quotes(0), _dashes(0), _spaces(0), _caretShape(0), _lineSeparation(2) {
- Common::fill(&_caretColor[0], &_caretColor[3], 0);
- Common::fill(&_caretSave[0], &_caretSave[3], 0);
+PropFontInfo::PropFontInfo() : _justify(0), _quotes(0), _dashes(0), _spaces(0), _caretShape(0),
+ _lineSeparation(2), _caretColor(0), _caretSave(0) {
}
/*--------------------------------------------------------------------------*/
void PropFontInfo::drawCaret(const Point &pos) {
- const byte *rgb = _caretColor;
+ uint color = _caretColor;
Graphics::Screen &s = *g_vm->_screen;
- uint color = s.format.RGBToColor(rgb[0], rgb[1], rgb[2]);
int x = pos.x / GLI_SUBPIX, y = pos.y;
switch (_caretShape) {