aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorColin Snover2017-09-29 17:29:06 -0500
committerColin Snover2017-09-29 19:56:24 -0500
commit3b8b4f1722872b9f241f8d1d6b3d581ac5cc8fb1 (patch)
tree7dffad4efb4ac25b5943f8d75cd0302b09c2c652 /engines/sci
parent3cdf26b355d5d0c387858bd85e546d6fff549dd4 (diff)
downloadscummvm-rg350-3b8b4f1722872b9f241f8d1d6b3d581ac5cc8fb1.tar.gz
scummvm-rg350-3b8b4f1722872b9f241f8d1d6b3d581ac5cc8fb1.tar.bz2
scummvm-rg350-3b8b4f1722872b9f241f8d1d6b3d581ac5cc8fb1.zip
SCI32: Clean up unused kBitmap code/subops
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kernel.h7
-rw-r--r--engines/sci/engine/kernel_tables.h14
-rw-r--r--engines/sci/engine/kgraphics32.cpp45
3 files changed, 7 insertions, 59 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 69a86ae9d5..5ab9abe151 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -553,19 +553,12 @@ reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv);
reg_t kBitmap(EngineState *s, int argc, reg_t *argv);
reg_t kBitmapCreate(EngineState *s, int argc, reg_t *argv);
reg_t kBitmapDestroy(EngineState *s, int argc, reg_t *argv);
-reg_t kBitmapDrawLine(EngineState *s, int argc, reg_t *argv);
reg_t kBitmapDrawView(EngineState *s, int argc, reg_t *argv);
reg_t kBitmapDrawText(EngineState *s, int argc, reg_t *argv);
reg_t kBitmapDrawColor(EngineState *s, int argc, reg_t *argv);
-reg_t kBitmapDrawBitmap(EngineState *s, int argc, reg_t *argv);
-reg_t kBitmapInvert(EngineState *s, int argc, reg_t *argv);
reg_t kBitmapSetOrigin(EngineState *s, int argc, reg_t *argv);
reg_t kBitmapCreateFromView(EngineState *s, int argc, reg_t *argv);
-reg_t kBitmapCopyPixels(EngineState *s, int argc, reg_t *argv);
-reg_t kBitmapClone(EngineState *s, int argc, reg_t *argv);
reg_t kBitmapGetInfo(EngineState *s, int argc, reg_t *argv);
-reg_t kBitmapScale(EngineState *s, int argc, reg_t *argv);
-reg_t kBitmapCreateFromUnknown(EngineState *s, int argc, reg_t *argv);
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 fa93d60a3d..797edeeda2 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -382,19 +382,19 @@ static const SciKernelMapSubEntry kText_subops[] = {
static const SciKernelMapSubEntry kBitmap_subops[] = {
{ SIG_SINCE_SCI21, 0, MAP_CALL(BitmapCreate), "iiii(i)(i)(i)", NULL },
{ SIG_SINCE_SCI21, 1, MAP_CALL(BitmapDestroy), "[r!]", NULL },
- { SIG_SINCE_SCI21, 2, MAP_CALL(BitmapDrawLine), "riiiii(i)(i)", NULL },
+ { SIG_SINCE_SCI21, 2, MAP_DUMMY(BitmapDrawLine), "riiiii(i)(i)", NULL },
{ SIG_SINCE_SCI21, 3, MAP_CALL(BitmapDrawView), "riii(i)(i)(0)(i)(i)", NULL },
{ SIG_SINCE_SCI21, 4, MAP_CALL(BitmapDrawText), "rriiiiiiiiiii", NULL },
{ SIG_SINCE_SCI21, 5, MAP_CALL(BitmapDrawColor), "riiiii", NULL },
- { SIG_SINCE_SCI21, 6, MAP_CALL(BitmapDrawBitmap), "rr(i)(i)(i)", NULL },
- { SIG_SINCE_SCI21, 7, MAP_CALL(BitmapInvert), "riiiiii", NULL },
+ { SIG_SINCE_SCI21, 6, MAP_DUMMY(BitmapDrawBitmap), "rr(i)(i)(i)", NULL },
+ { SIG_SINCE_SCI21, 7, MAP_DUMMY(BitmapInvert), "riiiiii", NULL },
{ SIG_SINCE_SCI21MID, 8, MAP_CALL(BitmapSetOrigin), "rii", NULL },
{ SIG_SINCE_SCI21MID, 9, MAP_CALL(BitmapCreateFromView), "iii(i)(i)(i)([r0])", NULL },
- { SIG_SINCE_SCI21MID, 10, MAP_CALL(BitmapCopyPixels), "rr", NULL },
- { SIG_SINCE_SCI21MID, 11, MAP_CALL(BitmapClone), "r", NULL },
+ { SIG_SINCE_SCI21MID, 10, MAP_DUMMY(BitmapCopyPixels), "rr", NULL },
+ { SIG_SINCE_SCI21MID, 11, MAP_DUMMY(BitmapClone), "r", NULL },
{ SIG_SINCE_SCI21MID, 12, MAP_CALL(BitmapGetInfo), "r(i)(i)", NULL },
- { SIG_SINCE_SCI21LATE,13, MAP_CALL(BitmapScale), "r...ii", NULL },
- { SIG_SCI3, 14, MAP_CALL(BitmapCreateFromUnknown), "......", NULL },
+ { SIG_SINCE_SCI21LATE,13, MAP_DUMMY(BitmapScale), "r...ii", NULL },
+ { SIG_SCI3, 14, MAP_DUMMY(BitmapCreateFromUnknown), "......", NULL },
{ SIG_SCI3, 15, MAP_DUMMY(Bitmap), "(.*)", NULL },
{ SIG_SCI3, 16, MAP_DUMMY(Bitmap), "(.*)", NULL },
SCI_SUBOPENTRY_TERMINATOR
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp
index e75f563efb..bed4a09342 100644
--- a/engines/sci/engine/kgraphics32.cpp
+++ b/engines/sci/engine/kgraphics32.cpp
@@ -670,11 +670,6 @@ reg_t kBitmapDestroy(EngineState *s, int argc, reg_t *argv) {
return s->r_acc;
}
-reg_t kBitmapDrawLine(EngineState *s, int argc, reg_t *argv) {
- // bitmapMemId, (x1, y1, x2, y2) OR (x2, y2, x1, y1), line color, unknown int, unknown int
- return kStubNull(s, argc + 1, argv - 1);
-}
-
reg_t kBitmapDrawView(EngineState *s, int argc, reg_t *argv) {
SciBitmap &bitmap = *s->_segMan->lookupBitmap(argv[0]);
CelObjView view(argv[1].toUint16(), argv[2].toSint16(), argv[3].toSint16());
@@ -722,12 +717,6 @@ reg_t kBitmapDrawText(EngineState *s, int argc, reg_t *argv) {
int16 borderColor = argv[11].toSint16();
bool dimmed = argv[12].toUint16();
- // NOTE: Technically the engine checks these things:
- // textRect.bottom > 0
- // textRect.right > 0
- // textRect.left < bitmap.width
- // textRect.top < bitmap.height
- // Then clips. But this seems stupid.
textRect.clip(Common::Rect(bitmap.getWidth(), bitmap.getHeight()));
reg_t textBitmapObject = g_sci->_gfxText32->createFontBitmap(textRect.width(), textRect.height(), Common::Rect(textRect.width(), textRect.height()), text, foreColor, backColor, skipColor, fontId, alignment, borderColor, dimmed, false, false);
@@ -753,18 +742,6 @@ reg_t kBitmapDrawColor(EngineState *s, int argc, reg_t *argv) {
return s->r_acc;
}
-reg_t kBitmapDrawBitmap(EngineState *s, int argc, reg_t *argv) {
- // target bitmap, source bitmap, x, y, unknown boolean
-
- return kStubNull(s, argc + 1, argv - 1);
-}
-
-reg_t kBitmapInvert(EngineState *s, int argc, reg_t *argv) {
- // bitmap, left, top, right, bottom, foreColor, backColor
-
- return kStubNull(s, argc + 1, argv - 1);
-}
-
reg_t kBitmapSetOrigin(EngineState *s, int argc, reg_t *argv) {
SciBitmap &bitmap = *s->_segMan->lookupBitmap(argv[0]);
bitmap.setOrigin(Common::Point(argv[1].toSint16(), argv[2].toSint16()));
@@ -798,18 +775,6 @@ reg_t kBitmapCreateFromView(EngineState *s, int argc, reg_t *argv) {
return bitmapId;
}
-reg_t kBitmapCopyPixels(EngineState *s, int argc, reg_t *argv) {
- // target bitmap, source bitmap
-
- return kStubNull(s, argc + 1, argv - 1);
-}
-
-reg_t kBitmapClone(EngineState *s, int argc, reg_t *argv) {
- // bitmap
-
- return kStub(s, argc + 1, argv - 1);
-}
-
reg_t kBitmapGetInfo(EngineState *s, int argc, reg_t *argv) {
SciBitmap &bitmap = *s->_segMan->lookupBitmap(argv[0]);
@@ -831,16 +796,6 @@ reg_t kBitmapGetInfo(EngineState *s, int argc, reg_t *argv) {
return make_reg(0, color);
}
-reg_t kBitmapScale(EngineState *s, int argc, reg_t *argv) {
- // TODO: SCI3
- return kStubNull(s, argc + 1, argv - 1);
-}
-
-reg_t kBitmapCreateFromUnknown(EngineState *s, int argc, reg_t *argv) {
- // TODO: SCI3
- return kStub(s, argc + 1, argv - 1);
-}
-
reg_t kEditText(EngineState *s, int argc, reg_t *argv) {
return g_sci->_gfxControls32->kernelEditText(argv[0]);
}