aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2011-02-03 18:07:47 +0000
committerMatthew Hoops2011-02-03 18:07:47 +0000
commitbe1f62af23b6a525e60a9585ac40009da95f0b1c (patch)
treea18db5051ad7c19ccd2319b4611ff24d0e1bba07 /engines
parent4d088332a2f5bb6cb8aea9031a79d834dbb258e4 (diff)
downloadscummvm-rg350-be1f62af23b6a525e60a9585ac40009da95f0b1c.tar.gz
scummvm-rg350-be1f62af23b6a525e60a9585ac40009da95f0b1c.tar.bz2
scummvm-rg350-be1f62af23b6a525e60a9585ac40009da95f0b1c.zip
SCI: Add a stub for kFont which calls kSetFontRes as a subop
svn-id: r55755
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kernel.h1
-rw-r--r--engines/sci/engine/kernel_tables.h2
-rw-r--r--engines/sci/engine/kgraphics.cpp24
3 files changed, 20 insertions, 7 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index c9692f3725..202fc40ba4 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -473,6 +473,7 @@ reg_t kCelInfo(EngineState *s, int argc, reg_t *argv);
reg_t kSetLanguage(EngineState *s, int argc, reg_t *argv);
reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv);
reg_t kSetFontRes(EngineState *s, int argc, reg_t *argv);
+reg_t kFont(EngineState *s, int argc, reg_t *argv);
#endif
reg_t kDoSoundInit(EngineState *s, int argc, reg_t *argv);
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 133bc07c92..71892a8bea 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -548,6 +548,7 @@ static SciKernelMapEntry s_kernelMap[] = {
{ MAP_CALL(SetLanguage), SIG_EVERYWHERE, "r", NULL, NULL },
{ MAP_CALL(ScrollWindow), SIG_EVERYWHERE, "(.*)", NULL, NULL },
{ MAP_CALL(SetFontRes), SIG_EVERYWHERE, "ii", NULL, NULL },
+ { MAP_CALL(Font), SIG_EVERYWHERE, "i(.*)", NULL, NULL },
// SCI2.1 Empty Functions
@@ -590,7 +591,6 @@ static SciKernelMapEntry s_kernelMap[] = {
// Bitmap
// MovePlaneItems - used by SQ6 to scroll through the inventory via the up/down buttons
- // Font
// AddLine - used by Torin's Passage to highlight the chapter buttons
// DeleteLine - used by Torin's Passage to delete the highlight from the chapter buttons
// UpdateLine - used by LSL6
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 52d9971f2f..5ec8b3f323 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -1625,12 +1625,10 @@ reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv) {
}
reg_t kSetFontRes(EngineState *s, int argc, reg_t *argv) {
- // This defines the resolution that the fonts are supposed to be displayed in.
- // This is used in early SCI2.1 games, but doesn't really have a purpose
- // except to notify that GK1 Mac is using higher resolution fonts and should
- // not be scaled. Saying that the GK2 demo and KQ7 v1.4 have 640x480 fonts
- // is pretty much a no-brainer. You can see why this was removed for SCI2.1
- // middle. This is not called in the low-res SCI2.1 early games either.
+ // TODO: This defines the resolution that the fonts are supposed to be displayed
+ // in. Currently, this is only used for showing high-res fonts in GK1 Mac, but
+ // should be extended to handle other font resolutions such as those
+
int xResolution = argv[0].toUint16();
//int yResolution = argv[1].toUint16();
@@ -1640,6 +1638,20 @@ reg_t kSetFontRes(EngineState *s, int argc, reg_t *argv) {
return s->r_acc;
}
+reg_t kFont(EngineState *s, int argc, reg_t *argv) {
+ // Handle font settings for SCI2.1
+
+ switch (argv[0].toUint16()) {
+ case 1:
+ // Set font resolution
+ return kSetFontRes(s, argc - 1, argv + 1);
+ default:
+ warning("kFont: unknown subop %d", argv[0].toUint16());
+ }
+
+ return s->r_acc;
+}
+
#endif
} // End of namespace Sci