diff -ur ScummVM-cvs20040728/scumm/saveload.cpp ScummVM-cvs20040728+hack/scumm/saveload.cpp
old
|
new
|
|
383 | 383 | }; |
384 | 384 | |
385 | 385 | const SaveLoadEntry *actorEntries = Actor::getSaveLoadEntries(); |
| 386 | const SaveLoadEntry *soundEntries = _sound->getSaveLoadEntries(); |
386 | 387 | |
387 | 388 | const SaveLoadEntry verbEntries[] = { |
388 | 389 | MKLINE(VerbSlot, curRect.left, sleInt16, VER(8)), |
… |
… |
|
672 | 673 | } |
673 | 674 | |
674 | 675 | s->saveLoadArrayOf(_actors, _numActors, sizeof(_actors[0]), actorEntries); |
| 676 | s->saveLoadEntries(_sound, soundEntries); |
675 | 677 | |
676 | 678 | if (savegameVersion < VER(9)) |
677 | 679 | s->saveLoadArrayOf(vm.slot, 25, sizeof(vm.slot[0]), scriptSlotEntries); |
diff -ur ScummVM-cvs20040728/scumm/saveload.h ScummVM-cvs20040728+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 34 |
| 35 | #define CURRENT_VER 35 |
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 |
diff -ur ScummVM-cvs20040728/scumm/sound.cpp ScummVM-cvs20040728+hack/scumm/sound.cpp
old
|
new
|
|
25 | 25 | #include "scumm/imuse.h" |
26 | 26 | #include "scumm/imuse_digi/dimuse.h" |
27 | 27 | #include "scumm/scumm.h" |
| 28 | #include "scumm/saveload.h" |
28 | 29 | #include "scumm/sound.h" |
29 | 30 | |
30 | 31 | #include "common/config-manager.h" |
… |
… |
|
1120 | 1121 | AudioCD.updateCD(); |
1121 | 1122 | } |
1122 | 1123 | |
| 1124 | const SaveLoadEntry *Sound::getSaveLoadEntries() { |
| 1125 | static const SaveLoadEntry soundEntries[] = { |
| 1126 | MKLINE(Sound, _currentCDSound, sleInt16, VER(35)), |
| 1127 | MKEND() |
| 1128 | }; |
| 1129 | |
| 1130 | return soundEntries; |
| 1131 | } |
| 1132 | |
1123 | 1133 | } // End of namespace Scumm |
diff -ur ScummVM-cvs20040728/scumm/sound.h ScummVM-cvs20040728+hack/scumm/sound.h
old
|
new
|
|
32 | 32 | class ScummFile; |
33 | 33 | |
34 | 34 | struct MP3OffsetTable; |
| 35 | struct SaveLoadEntry; |
35 | 36 | |
36 | 37 | enum { |
37 | 38 | kTalkSoundID = 10000 |
… |
… |
|
72 | 73 | |
73 | 74 | int _overrideFreq; |
74 | 75 | |
75 | | int _currentCDSound; |
| 76 | int16 _currentCDSound; |
76 | 77 | int _currentMusic; |
77 | 78 | public: |
78 | 79 | PlayingSoundHandle _talkChannelHandle; // Handle of mixer channel actor is talking on |
… |
… |
|
110 | 111 | void updateCD(); |
111 | 112 | int getCurrentCDSound() const { return _currentCDSound; } |
112 | 113 | |
| 114 | // Used by the save/load system: |
| 115 | const SaveLoadEntry *getSaveLoadEntries(); |
| 116 | |
113 | 117 | protected: |
114 | 118 | ScummFile *openSfxFile(); |
115 | 119 | void startSfxSound(File *file, int file_size, PlayingSoundHandle *handle, int id = -1); |