aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2016-02-16 21:27:42 -0600
committerColin Snover2016-02-18 13:18:02 -0600
commit2c0e64fdaf8f2ec2b28124d488be68f36cb25317 (patch)
tree5fcea0f61fc69c92c260a09c54595b7aa09e4283
parent20ccad80bfb689822be9f70512901557cbf244bf (diff)
downloadscummvm-rg350-2c0e64fdaf8f2ec2b28124d488be68f36cb25317.tar.gz
scummvm-rg350-2c0e64fdaf8f2ec2b28124d488be68f36cb25317.tar.bz2
scummvm-rg350-2c0e64fdaf8f2ec2b28124d488be68f36cb25317.zip
SCI: Add short-lived kSetFontRes kernel function
kSetFontRes didn't exist in SCI2, showed up in SCI2.1early, then was replaced with kFont subop 1 in SCI2.1mid.
-rw-r--r--engines/sci/engine/kernel_tables.h3
-rw-r--r--engines/sci/engine/kgraphics32.cpp5
2 files changed, 5 insertions, 3 deletions
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index b4a092a25c..fbd0b13c88 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -65,6 +65,7 @@ struct SciKernelMapSubEntry {
#define SIG_SCI1 SCI_VERSION_1_EGA_ONLY, SCI_VERSION_1_LATE
#define SIG_SCI11 SCI_VERSION_1_1, SCI_VERSION_1_1
#define SIG_SINCE_SCI11 SCI_VERSION_1_1, SCI_VERSION_NONE
+#define SIG_SCI21EARLY_ONLY SCI_VERSION_2_1_EARLY, SCI_VERSION_2_1_EARLY
#define SIG_SINCE_SCI21 SCI_VERSION_2_1_EARLY, SCI_VERSION_3
#define SIG_UNTIL_SCI21MID SCI_VERSION_2, SCI_VERSION_2_1_MIDDLE
#define SIG_SINCE_SCI21LATE SCI_VERSION_2_1_LATE, SCI_VERSION_3
@@ -670,7 +671,7 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_CALL(CelInfo), SIG_EVERYWHERE, "iiiiii", NULL, NULL },
{ MAP_CALL(SetLanguage), SIG_EVERYWHERE, "r", NULL, NULL },
{ MAP_CALL(ScrollWindow), SIG_EVERYWHERE, "i(.*)", kScrollWindow_subops, NULL },
- { MAP_DUMMY(SetFontRes), SIG_EVERYWHERE, "(.*)", NULL, NULL },
+ { MAP_CALL(SetFontRes), SIG_SCI21EARLY_ONLY, SIGFOR_ALL, "ii", NULL, NULL },
{ MAP_CALL(Font), SIG_EVERYWHERE, "i(.*)", NULL, NULL },
{ MAP_CALL(Bitmap), SIG_EVERYWHERE, "(.*)", NULL, NULL },
{ MAP_CALL(AddLine), SIG_EVERYWHERE, "oiiiiiiiii", NULL, NULL },
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp
index a83836b033..cf53944652 100644
--- a/engines/sci/engine/kgraphics32.cpp
+++ b/engines/sci/engine/kgraphics32.cpp
@@ -482,9 +482,10 @@ reg_t kFont(EngineState *s, int argc, reg_t *argv) {
return s->r_acc;
}
-// TODO: Is this actually a thing??
reg_t kSetFontRes(EngineState *s, int argc, reg_t *argv) {
- return kStub(s, argc, argv);
+ g_sci->_gfxText32->_scaledWidth = argv[0].toUint16();
+ g_sci->_gfxText32->_scaledHeight = argv[1].toUint16();
+ return NULL_REG;
}
// TODO: Eventually, all of the kBitmap operations should be put