aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/base-costume.cpp20
-rw-r--r--scumm/base-costume.h2
-rw-r--r--scumm/costume.cpp14
3 files changed, 29 insertions, 7 deletions
diff --git a/scumm/base-costume.cpp b/scumm/base-costume.cpp
index 2cde36b58d..0216a4ff41 100644
--- a/scumm/base-costume.cpp
+++ b/scumm/base-costume.cpp
@@ -61,3 +61,23 @@ void BaseCostumeRenderer::codec1_ignorePakCols(int num) {
} while (1);
}
+// FIXME: Call this something sensible, make sure it works
+void BaseCostumeRenderer::V1_ignorePakCols(int num) {
+ int n = _height;
+ warning("Attempting V1 column skip. We don't even make it here, yet.");
+ if (num > 1)
+ n *= num;
+
+ do {
+ v1.repcolor = *_srcptr >> 4;
+ v1.replen = *_srcptr++ & 0x0F;
+
+ if (v1.replen == 0)
+ v1.replen = *_srcptr++;
+
+ do {
+ if (!--n) return;
+ } while (--v1.replen);
+ } while (1);
+}
+
diff --git a/scumm/base-costume.h b/scumm/base-costume.h
index 6280eff5b1..feddcb8a3c 100644
--- a/scumm/base-costume.h
+++ b/scumm/base-costume.h
@@ -128,7 +128,7 @@ protected:
virtual byte drawLimb(const CostumeData &cost, int limb) = 0;
void codec1_ignorePakCols(int num);
-
+ void V1_ignorePakCols(int num);
};
#endif
diff --git a/scumm/costume.cpp b/scumm/costume.cpp
index 5fcaf7ddca..963ab87777 100644
--- a/scumm/costume.cpp
+++ b/scumm/costume.cpp
@@ -205,10 +205,11 @@ byte CostumeRenderer::mainRoutine(int xmoveCur, int ymoveCur) {
skip = -v1.x;
if (skip > 0) {
v1.skip_width -= skip;
- if (_vm->_version != 1)
+
+ if (_vm->_version == 1)
+ V1_ignorePakCols(skip);
+ else
codec1_ignorePakCols(skip);
- else
- warning ("TODO: ignore columns for v1 gfx costume codec");
v1.x = 0;
} else {
skip = x_right - _vm->_screenWidth;
@@ -223,10 +224,11 @@ byte CostumeRenderer::mainRoutine(int xmoveCur, int ymoveCur) {
skip = x_right - _vm->_screenWidth;
if (skip > 0) {
v1.skip_width -= skip;
- if (_vm->_version != 1)
+
+ if (_vm->_version == 1)
+ V1_ignorePakCols(skip);
+ else
codec1_ignorePakCols(skip);
- else
- warning ("TODO: ignore columns for v1 gfx costume codec");
v1.x = _vm->_screenWidth - 1;
} else {
skip = -1 - x_left;