diff options
author | Filippos Karapetis | 2011-10-11 01:24:28 +0300 |
---|---|---|
committer | Filippos Karapetis | 2011-10-11 01:25:08 +0300 |
commit | 96ce226967741e65684c8b4d55adfbb5526fa787 (patch) | |
tree | fb0ef824d0566157c661ab41798346a1ff3efc27 /engines/sci/engine | |
parent | 1402b47674f83a7f021417a4eebb8e132036cdcd (diff) | |
download | scummvm-rg350-96ce226967741e65684c8b4d55adfbb5526fa787.tar.gz scummvm-rg350-96ce226967741e65684c8b4d55adfbb5526fa787.tar.bz2 scummvm-rg350-96ce226967741e65684c8b4d55adfbb5526fa787.zip |
SCI: Proper implementation of text drawing for SCI2+
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kernel.h | 1 | ||||
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 2 | ||||
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 5 | ||||
-rw-r--r-- | engines/sci/engine/selector.cpp | 1 | ||||
-rw-r--r-- | engines/sci/engine/selector.h | 1 |
5 files changed, 9 insertions, 1 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index e3e3f51f75..e0ab954641 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -442,6 +442,7 @@ reg_t kUpdateScreenItem(EngineState *s, int argc, reg_t *argv); reg_t kDeleteScreenItem(EngineState *s, int argc, reg_t *argv); // Text reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv); +reg_t kDisposeTextBitmap(EngineState *s, int argc, reg_t *argv); // "Planes" in SCI32 are pictures reg_t kAddPlane(EngineState *s, int argc, reg_t *argv); reg_t kDeletePlane(EngineState *s, int argc, reg_t *argv); diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 22f9c9556a..d32482d155 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -477,6 +477,7 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(CreateTextBitmap), SIG_EVERYWHERE, "i(.*)", NULL, NULL }, { MAP_CALL(DeletePlane), SIG_EVERYWHERE, "o", NULL, NULL }, { MAP_CALL(DeleteScreenItem), SIG_EVERYWHERE, "o", NULL, NULL }, + { MAP_CALL(DisposeTextBitmap), SIG_EVERYWHERE, "r", NULL, NULL }, { MAP_CALL(FrameOut), SIG_EVERYWHERE, "", NULL, NULL }, { MAP_CALL(GetHighPlanePri), SIG_EVERYWHERE, "", NULL, NULL }, { MAP_CALL(InPolygon), SIG_EVERYWHERE, "iio", NULL, NULL }, @@ -501,7 +502,6 @@ static SciKernelMapEntry s_kernelMap[] = { // SCI2 unmapped functions - TODO! // SetScroll - called by script 64909, Styler::doit() - // DisposeTextBitmap // PalCycle - called by Game::newRoom. Related to RemapColors. // VibrateMouse - used in QFG4 // ObjectIntersect - used in QFG4 diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 4b35864268..b1314ef02f 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -1405,6 +1405,11 @@ reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv) { } } +reg_t kDisposeTextBitmap(EngineState *s, int argc, reg_t *argv) { + g_sci->_gfxText32->disposeTextBitmap(argv[0]); + return s->r_acc; +} + reg_t kGetWindowsOption(EngineState *s, int argc, reg_t *argv) { uint16 windowsOption = argv[0].toUint16(); switch (windowsOption) { diff --git a/engines/sci/engine/selector.cpp b/engines/sci/engine/selector.cpp index c2f857f319..a9aca9e22f 100644 --- a/engines/sci/engine/selector.cpp +++ b/engines/sci/engine/selector.cpp @@ -167,6 +167,7 @@ void Kernel::mapSelectors() { #ifdef ENABLE_SCI32 FIND_SELECTOR(data); FIND_SELECTOR(picture); + FIND_SELECTOR(bitmap); FIND_SELECTOR(plane); FIND_SELECTOR(top); FIND_SELECTOR(left); diff --git a/engines/sci/engine/selector.h b/engines/sci/engine/selector.h index 085dd6e832..bbd86bb03e 100644 --- a/engines/sci/engine/selector.h +++ b/engines/sci/engine/selector.h @@ -132,6 +132,7 @@ struct SelectorCache { #ifdef ENABLE_SCI32 Selector data; // Used by Array()/String() Selector picture; // Used to hold the picture ID for SCI32 pictures + Selector bitmap; // Used to hold the text bitmap for SCI32 texts Selector plane; Selector top; |