[Scummvm-git-logs] scummvm master -> 8f3c504200230f89071bc73a91cee4c970c735e1
criezy
noreply at scummvm.org
Wed Dec 21 14:08:00 UTC 2022
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4e2658bb53 GLK: Return Glk colors from glk_style_measure
8f3c504200 GLK: Convert text colors in glk_stylehint_set()
Commit: 4e2658bb532a533d8a9f3155711b2e6629e38ba6
https://github.com/scummvm/scummvm/commit/4e2658bb532a533d8a9f3155711b2e6629e38ba6
Author: angstsmurf (ignalina at me.com)
Date: 2022-12-21T15:07:56+01:00
Commit Message:
GLK: Return Glk colors from glk_style_measure
We need to convert color values back to Glk format before returning them
from glk_style_measure(). We do this by encoding the value as a string
and then to a long with strtol().
This fixes bug 13622 and the same problem (cyan background) in Magnetic
and Level9.
Changed paths:
engines/glk/glk_api.cpp
diff --git a/engines/glk/glk_api.cpp b/engines/glk/glk_api.cpp
index b17fccc23d7..bae71c8af4a 100644
--- a/engines/glk/glk_api.cpp
+++ b/engines/glk/glk_api.cpp
@@ -609,11 +609,11 @@ bool GlkAPI::glk_style_measure(winid_t win, uint style, uint hint, uint *result)
break;
case stylehint_TextColor:
- *result = styles[style].fg;
+ *result = strtol(_conf->encodeColor(styles[style].fg).c_str(), nullptr, 16);
break;
case stylehint_BackColor:
- *result = styles[style].bg;
+ *result = strtol(_conf->encodeColor(styles[style].bg).c_str(), nullptr, 16);
break;
case stylehint_ReverseColor:
Commit: 8f3c504200230f89071bc73a91cee4c970c735e1
https://github.com/scummvm/scummvm/commit/8f3c504200230f89071bc73a91cee4c970c735e1
Author: angstsmurf (ignalina at me.com)
Date: 2022-12-21T15:07:56+01:00
Commit Message:
GLK: Convert text colors in glk_stylehint_set()
Text colors need to be converted from the Glk 0x00RRGGBB format to the
internal format used by ScummVM. Nothing seems to use this currently,
though.
Changed paths:
engines/glk/glk_api.cpp
diff --git a/engines/glk/glk_api.cpp b/engines/glk/glk_api.cpp
index bae71c8af4a..5270c7922e6 100644
--- a/engines/glk/glk_api.cpp
+++ b/engines/glk/glk_api.cpp
@@ -468,11 +468,11 @@ void GlkAPI::glk_stylehint_set(uint wintype, uint style, uint hint, int val) {
switch (hint) {
case stylehint_TextColor:
- styles[style].fg = val;
+ styles[style].fg = _conf->parseColor(val);
break;
case stylehint_BackColor:
- styles[style].bg = val;
+ styles[style].bg = _conf->parseColor(val);
break;
case stylehint_ReverseColor:
More information about the Scummvm-git-logs
mailing list