Fixed bug #1093845 after discussing with Fingolfin.

svn-id: r16449
This commit is contained in:
Torbjörn Andersson 2005-01-06 15:57:12 +00:00
parent 27bf2ad560
commit f974b48a41
5 changed files with 18 additions and 2 deletions

View file

@ -26,6 +26,7 @@
#include "scumm/intern.h" #include "scumm/intern.h"
#include "scumm/object.h" #include "scumm/object.h"
#include "scumm/resource_v7he.h" #include "scumm/resource_v7he.h"
#include "scumm/saveload.h"
#include "scumm/scumm.h" #include "scumm/scumm.h"
@ -395,4 +396,14 @@ void ScummEngine_v5::setBuiltinCursor(int idx) {
updateCursor(); 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 } // End of namespace Scumm

View file

@ -76,6 +76,7 @@ protected:
void setBuiltinCursor(int index); void setBuiltinCursor(int index);
void redefineBuiltinCursorFromChar(int index, int chr); void redefineBuiltinCursorFromChar(int index, int chr);
void redefineBuiltinCursorHotspot(int index, int x, int y); void redefineBuiltinCursorHotspot(int index, int x, int y);
void saveOrLoadCursorImages(Serializer *s);
/* Version 5 script opcodes */ /* Version 5 script opcodes */
void o5_actorFollowCamera(); void o5_actorFollowCamera();

View file

@ -877,6 +877,9 @@ void ScummEngine::saveOrLoad(Serializer *s, uint32 savegameVersion) {
_imuseDigital->saveOrLoad(s); _imuseDigital->saveOrLoad(s);
} }
// This is probably only needed for Loom.
saveOrLoadCursorImages(s);
if (s->isLoading()) if (s->isLoading())
setupVolumes(); setupVolumes();
} }

View file

@ -32,11 +32,11 @@ namespace Scumm {
// Can be useful for other ports too :) // Can be useful for other ports too :)
#define VER(x) x #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, // 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 // 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 // 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 // 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 // current reality (many of our complex structs are non-POD; for an explanation of

View file

@ -386,6 +386,7 @@ public:
void updateCursor(); void updateCursor();
virtual void animateCursor() {} virtual void animateCursor() {}
void updatePalette(); void updatePalette();
virtual void saveOrLoadCursorImages(Serializer *s) {}
/** /**
* Flag which signals that the SMUSH video playback should end now * Flag which signals that the SMUSH video playback should end now