diff options
Diffstat (limited to 'scumm')
| -rw-r--r-- | scumm/cursor.cpp | 11 | ||||
| -rw-r--r-- | scumm/intern.h | 1 | ||||
| -rw-r--r-- | scumm/saveload.cpp | 3 | ||||
| -rw-r--r-- | scumm/saveload.h | 4 | ||||
| -rw-r--r-- | scumm/scumm.h | 1 | 
5 files changed, 18 insertions, 2 deletions
| diff --git a/scumm/cursor.cpp b/scumm/cursor.cpp index 9894a09ee0..2fb0a0c514 100644 --- a/scumm/cursor.cpp +++ b/scumm/cursor.cpp @@ -26,6 +26,7 @@  #include "scumm/intern.h"  #include "scumm/object.h"  #include "scumm/resource_v7he.h" +#include "scumm/saveload.h"  #include "scumm/scumm.h" @@ -395,4 +396,14 @@ void ScummEngine_v5::setBuiltinCursor(int idx) {  	updateCursor();  } +void ScummEngine_v5::saveOrLoadCursorImages(Serializer *s) { +	const SaveLoadEntry cursorEntries[] = { +		MKARRAY2(ScummEngine_v5, _cursorImages[0][0], sleUint16, 16, 4, (byte*)_cursorImages[1] - (byte*)_cursorImages[0], VER(44)), +		MKARRAY(ScummEngine_v5, _cursorHotspots[0], sleByte, 8, VER(44)), +		MKEND() +	}; + +	s->saveLoadEntries(this, cursorEntries); +} +  } // End of namespace Scumm diff --git a/scumm/intern.h b/scumm/intern.h index 13e37ef349..de77eb84cd 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -76,6 +76,7 @@ protected:  	void setBuiltinCursor(int index);  	void redefineBuiltinCursorFromChar(int index, int chr);  	void redefineBuiltinCursorHotspot(int index, int x, int y); +	void saveOrLoadCursorImages(Serializer *s);  	/* Version 5 script opcodes */  	void o5_actorFollowCamera(); diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index 8e8c033664..ca88038c01 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -877,6 +877,9 @@ void ScummEngine::saveOrLoad(Serializer *s, uint32 savegameVersion) {  		_imuseDigital->saveOrLoad(s);  	} +	// This is probably only needed for Loom. +	saveOrLoadCursorImages(s); +  	if (s->isLoading())  		setupVolumes();  } diff --git a/scumm/saveload.h b/scumm/saveload.h index d5adb6e5a2..deb4cc20bd 100644 --- a/scumm/saveload.h +++ b/scumm/saveload.h @@ -32,11 +32,11 @@ namespace Scumm {  // Can be useful for other ports too :)  #define VER(x) x -#define CURRENT_VER 43 +#define CURRENT_VER 44  // To work around a warning in GCC 3.2 (and 3.1 ?) regarding non-POD types,  // we use a small trick: instead of 0 we use 42. Why? Well, it seems newer GCC -// versions hae a heuristic built in to detect "offset-of" patterns - which is exactly +// versions have a heuristic built in to detect "offset-of" patterns - which is exactly  // what our OFFS macro does. Now, for non-POD types this is not really legal, because  // member need not be at a fixed offset relative to the variable, even if they are in  // current reality (many of our complex structs are non-POD; for an explanation of  diff --git a/scumm/scumm.h b/scumm/scumm.h index e605811a37..c065f12cef 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -386,6 +386,7 @@ public:  	void updateCursor();  	virtual void animateCursor() {}  	void updatePalette(); +	virtual void saveOrLoadCursorImages(Serializer *s) {}  	/**  	 * Flag which signals that the SMUSH video playback should end now | 
