diff -ur ScummVM-cvs20050105/scumm/cursor.cpp ScummVM-cvs20050105+hack/scumm/cursor.cpp
old
|
new
|
|
26 | 26 | #include "scumm/intern.h" |
27 | 27 | #include "scumm/object.h" |
28 | 28 | #include "scumm/resource_v7he.h" |
| 29 | #include "scumm/saveload.h" |
29 | 30 | #include "scumm/scumm.h" |
30 | 31 | |
31 | 32 | |
… |
… |
|
395 | 396 | updateCursor(); |
396 | 397 | } |
397 | 398 | |
| 399 | void ScummEngine_v5::saveOrLoadCursorImages(Serializer *s) { |
| 400 | const SaveLoadEntry cursorEntries[] = { |
| 401 | MKARRAY2(ScummEngine_v5, _cursorImages[0][0], sleUint16, 16, 4, (byte*)_cursorImages[1] - (byte*)_cursorImages[0], VER(44)), |
| 402 | MKARRAY(ScummEngine_v5, _cursorHotspots[0], sleByte, 8, VER(44)), |
| 403 | MKEND() |
| 404 | }; |
| 405 | |
| 406 | s->saveLoadEntries(this, cursorEntries); |
| 407 | } |
| 408 | |
398 | 409 | } // End of namespace Scumm |
diff -ur ScummVM-cvs20050105/scumm/intern.h ScummVM-cvs20050105+hack/scumm/intern.h
old
|
new
|
|
76 | 76 | void setBuiltinCursor(int index); |
77 | 77 | void redefineBuiltinCursorFromChar(int index, int chr); |
78 | 78 | void redefineBuiltinCursorHotspot(int index, int x, int y); |
| 79 | void saveOrLoadCursorImages(Serializer *s); |
79 | 80 | |
80 | 81 | /* Version 5 script opcodes */ |
81 | 82 | void o5_actorFollowCamera(); |
diff -ur ScummVM-cvs20050105/scumm/saveload.cpp ScummVM-cvs20050105+hack/scumm/saveload.cpp
old
|
new
|
|
877 | 877 | _imuseDigital->saveOrLoad(s); |
878 | 878 | } |
879 | 879 | |
| 880 | // This is probably only needed for Loom. |
| 881 | saveOrLoadCursorImages(s); |
| 882 | |
880 | 883 | if (s->isLoading()) |
881 | 884 | setupVolumes(); |
882 | 885 | } |
diff -ur ScummVM-cvs20050105/scumm/saveload.h ScummVM-cvs20050105+hack/scumm/saveload.h
old
|
new
|
|
32 | 32 | // Can be useful for other ports too :) |
33 | 33 | |
34 | 34 | #define VER(x) x |
35 | | #define CURRENT_VER 43 |
| 35 | #define CURRENT_VER 44 |
36 | 36 | |
37 | 37 | // To work around a warning in GCC 3.2 (and 3.1 ?) regarding non-POD types, |
38 | 38 | // we use a small trick: instead of 0 we use 42. Why? Well, it seems newer GCC |
39 | | // versions hae a heuristic built in to detect "offset-of" patterns - which is exactly |
| 39 | // versions have a heuristic built in to detect "offset-of" patterns - which is exactly |
40 | 40 | // what our OFFS macro does. Now, for non-POD types this is not really legal, because |
41 | 41 | // member need not be at a fixed offset relative to the variable, even if they are in |
42 | 42 | // current reality (many of our complex structs are non-POD; for an explanation of |
diff -ur ScummVM-cvs20050105/scumm/scumm.h ScummVM-cvs20050105+hack/scumm/scumm.h
old
|
new
|
|
386 | 386 | void updateCursor(); |
387 | 387 | virtual void animateCursor() {} |
388 | 388 | void updatePalette(); |
| 389 | virtual void saveOrLoadCursorImages(Serializer *s) {} |
389 | 390 | |
390 | 391 | /** |
391 | 392 | * Flag which signals that the SMUSH video playback should end now |