aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTorbjörn Andersson2005-07-19 17:53:55 +0000
committerTorbjörn Andersson2005-07-19 17:53:55 +0000
commit546a9d852b1907dd8e1c9403842a934a98fd9a2d (patch)
tree50de9cf538c24450a264053c143e2f18e37c51da /scumm
parentf7749e4789b957c3feae1f6db1c0836bbe2956a3 (diff)
downloadscummvm-rg350-546a9d852b1907dd8e1c9403842a934a98fd9a2d.tar.gz
scummvm-rg350-546a9d852b1907dd8e1c9403842a934a98fd9a2d.tar.bz2
scummvm-rg350-546a9d852b1907dd8e1c9403842a934a98fd9a2d.zip
Applied patch #1238516, with very minor modifications. It gets rid of an
old DOTT hack/workaround. svn-id: r18559
Diffstat (limited to 'scumm')
-rw-r--r--scumm/cursor.cpp23
-rw-r--r--scumm/intern.h1
-rw-r--r--scumm/scumm.cpp7
-rw-r--r--scumm/scumm.h2
4 files changed, 25 insertions, 8 deletions
diff --git a/scumm/cursor.cpp b/scumm/cursor.cpp
index 18e7675f03..7bf81a3f3c 100644
--- a/scumm/cursor.cpp
+++ b/scumm/cursor.cpp
@@ -75,6 +75,22 @@ static const uint16 default_he_cursor[64] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};
+static const byte default_v6_cursor[] = {
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+ 0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x0F,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
+ 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, 0x0F,0x0F,0x0F, 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0xFF,
+ 0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x0F,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x00,0x0F,0x00, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+};
+
ScummEngine_v5::ScummEngine_v5(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16], int substResFileNameIndex)
: ScummEngine(detector, syst, gs, md5sum, substResFileNameIndex) {
@@ -133,7 +149,12 @@ void ScummEngine_v6::grabCursor(int x, int y, int w, int h) {
setCursorFromBuffer((byte *)vs->pixels + (y - vs->topline) * vs->pitch + x, w, h, vs->pitch);
}
-void ScummEngine::setCursorFromBuffer(byte *ptr, int width, int height, int pitch) {
+void ScummEngine_v6::setDefaultCursor() {
+ setCursorHotspot(7, 6);
+ setCursorFromBuffer(default_v6_cursor, 16, 13, 16);
+}
+
+void ScummEngine::setCursorFromBuffer(const byte *ptr, int width, int height, int pitch) {
uint size;
byte *dst;
diff --git a/scumm/intern.h b/scumm/intern.h
index d9105839d3..daf6e581c3 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -537,6 +537,7 @@ protected:
virtual void writeArray(int array, int index, int base, int value);
void shuffleArray(int num, int minIdx, int maxIdx);
+ void setDefaultCursor();
void setCursorTransparency(int a);
void setCursorHotspot(int x, int y);
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 1be930815b..f2821454a4 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -1840,12 +1840,7 @@ void ScummEngine_v2::scummInit() {
void ScummEngine_v6::scummInit() {
ScummEngine::scummInit();
-
- if (_gameId == GID_TENTACLE && res.roomno[rtRoom][60]) {
- // HACK: For DOTT we manually set the default cursor. See also bug #786994
- setCursorFromImg(697, 60, 1);
- setCursorTransparency(1);
- }
+ setDefaultCursor();
}
void ScummEngine_v60he::scummInit() {
diff --git a/scumm/scumm.h b/scumm/scumm.h
index f61d9b307d..dc532da3dc 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -983,7 +983,7 @@ protected:
void setupCursor();
- void setCursorFromBuffer(byte *ptr, int width, int height, int pitch);
+ void setCursorFromBuffer(const byte *ptr, int width, int height, int pitch);
public:
void markRectAsDirty(VirtScreenNumber virt, int left, int right, int top, int bottom, int dirtybit = 0);