diff options
| -rw-r--r-- | scumm/cursor.cpp | 23 | ||||
| -rw-r--r-- | scumm/intern.h | 1 | ||||
| -rw-r--r-- | scumm/scumm.cpp | 7 | ||||
| -rw-r--r-- | scumm/scumm.h | 2 | 
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); | 
