[Scummvm-cvs-logs] SF.net SVN: scummvm:[55755] scummvm/trunk/engines/sci/engine
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Thu Feb 3 19:07:47 CET 2011
Revision: 55755
http://scummvm.svn.sourceforge.net/scummvm/?rev=55755&view=rev
Author: mthreepwood
Date: 2011-02-03 18:07:47 +0000 (Thu, 03 Feb 2011)
Log Message:
-----------
SCI: Add a stub for kFont which calls kSetFontRes as a subop
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kernel.h
scummvm/trunk/engines/sci/engine/kernel_tables.h
scummvm/trunk/engines/sci/engine/kgraphics.cpp
Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h 2011-02-03 15:51:51 UTC (rev 55754)
+++ scummvm/trunk/engines/sci/engine/kernel.h 2011-02-03 18:07:47 UTC (rev 55755)
@@ -473,6 +473,7 @@
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);
Modified: scummvm/trunk/engines/sci/engine/kernel_tables.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel_tables.h 2011-02-03 15:51:51 UTC (rev 55754)
+++ scummvm/trunk/engines/sci/engine/kernel_tables.h 2011-02-03 18:07:47 UTC (rev 55755)
@@ -548,6 +548,7 @@
{ 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 @@
// 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
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2011-02-03 15:51:51 UTC (rev 55754)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2011-02-03 18:07:47 UTC (rev 55755)
@@ -1625,12 +1625,10 @@
}
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 @@
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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list