Ticket #8337: scummvm-patches

File scummvm-patches, 7.7 KB (added by SF/mrhandler, 21 years ago)

ScummVM 0.6.0 fixes (all platforms)

Line 
1diff -ruN scummvm-0.6.0/backends/fs/fs.h scummvm-0.6.0-patched/backends/fs/fs.h
2--- scummvm-0.6.0/backends/fs/fs.h Thu Feb 5 01:19:53 2004
3+++ scummvm-0.6.0-patched/backends/fs/fs.h Fri Mar 19 15:42:13 2004
4@@ -149,7 +149,7 @@
5 /**
6 * Sorted list of multiple file system nodes. E.g. the contents of a given directory.
7 */
8-class FSList : Common::List<FilesystemNode *> {
9+class FSList : private Common::List<FilesystemNode *> {
10 public:
11 class const_iterator {
12 friend class FSList;
13diff -ruN scummvm-0.6.0/scumm/dialogs.cpp scummvm-0.6.0-patched/scumm/dialogs.cpp
14--- scummvm-0.6.0/scumm/dialogs.cpp Mon Jan 26 08:40:14 2004
15+++ scummvm-0.6.0-patched/scumm/dialogs.cpp Fri Mar 19 15:42:36 2004
16@@ -209,7 +209,7 @@
17 };
18
19 SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode)
20- : ChooserDialog(title, buttonLabel, 182), _saveMode(saveMode) {
21+ : GUI::ChooserDialog(title, buttonLabel, 182), _saveMode(saveMode) {
22
23 _list->setEditable(saveMode);
24 _list->setNumberingMode(saveMode ? GUI::kListNumberingOne : GUI::kListNumberingZero);
25@@ -242,7 +242,7 @@
26 _chooseButton->draw();
27 break;
28 default:
29- ChooserDialog::handleCommand(sender, cmd, data);
30+ GUI::ChooserDialog::handleCommand(sender, cmd, data);
31 }
32 }
33
34diff -ruN scummvm-0.6.0/scumm/imuse.cpp scummvm-0.6.0-patched/scumm/imuse.cpp
35--- scummvm-0.6.0/scumm/imuse.cpp Mon Feb 9 02:27:24 2004
36+++ scummvm-0.6.0-patched/scumm/imuse.cpp Fri Mar 19 15:33:03 2004
37@@ -1296,6 +1296,7 @@
38 default:
39 error("saveReference: invalid type");
40 }
41+ return 0; // never reached, but avoids compiler warnings
42 }
43
44 void *IMuseInternal::loadReference(void *me_ref, byte type, int ref) {
45@@ -1308,6 +1309,7 @@
46 default:
47 error("loadReference: invalid type");
48 }
49+ return (void *) 0; // never reached, but avoids compiler warnings
50 }
51
52 int IMuseInternal::save_or_load(Serializer *ser, ScummEngine *scumm) {
53diff -ruN scummvm-0.6.0/scumm/insane/insane.cpp scummvm-0.6.0-patched/scumm/insane/insane.cpp
54--- scummvm-0.6.0/scumm/insane/insane.cpp Sat Feb 14 06:39:18 2004
55+++ scummvm-0.6.0-patched/scumm/insane/insane.cpp Fri Mar 19 15:46:24 2004
56@@ -437,7 +437,7 @@
57 init_actStruct(1, 2, 13, 1, 1, 0, 0, 0);
58 init_actStruct(1, 3, 13, 1, 1, 0, 0, 0);
59
60- for (i = 0; i < 9; i++)
61+ for (i = 0; i < 10; i++)
62 for (j = 0; j < 10; j++)
63 _enemyState[i][j] = 0;
64 }
65diff -ruN scummvm-0.6.0/scumm/insane/insane.h scummvm-0.6.0-patched/scumm/insane/insane.h
66--- scummvm-0.6.0/scumm/insane/insane.h Mon Feb 9 19:57:03 2004
67+++ scummvm-0.6.0-patched/scumm/insane/insane.h Fri Mar 19 15:46:29 2004
68@@ -159,7 +159,7 @@
69 int16 _smush_frameNum1;
70 int16 _smush_frameNum2;
71 byte _smush_earlyFluContents[0x31a];
72- int16 _enemyState[9][10];
73+ int16 _enemyState[10][10];
74 byte _iactBits[0x80];
75 int16 _mainRoadPos;
76 int16 _posBrokenCar;
77diff -ruN scummvm-0.6.0/scumm/resource.cpp scummvm-0.6.0-patched/scumm/resource.cpp
78--- scummvm-0.6.0/scumm/resource.cpp Sun Feb 29 01:30:03 2004
79+++ scummvm-0.6.0-patched/scumm/resource.cpp Fri Mar 19 15:38:06 2004
80@@ -668,6 +668,7 @@
81 nukeResource(type, idx);
82
83 error("Cannot read resource");
84+ return 0; // never reached, but avoids compiler warnings
85 }
86
87 int ScummEngine::readSoundResource(int type, int idx) {
88@@ -796,6 +797,7 @@
89 tmpsize = _fileHandle.readUint32BE();
90
91 // SDAT contains name of file we want
92+ memset(buffer, 0, sizeof(buffer)); // should be init'ed before use!
93 for (i = 0; (buffer[i] != ' ') && (i < tmpsize - 8) ; i++) {
94 buffer[i] = _fileHandle.readByte();
95 }
96@@ -1003,6 +1005,7 @@
97 default:
98 error("Unknown Mac0 instrument %s found", tag2str(type));
99 }
100+ return 0; // never reached, but avoids compiler warnings
101 }
102
103 void ScummEngine::convertMac0Resource(int type, int idx, byte *src_ptr, int size) {
104diff -ruN scummvm-0.6.0/scumm/smush/smush_font.cpp scummvm-0.6.0-patched/scumm/smush/smush_font.cpp
105--- scummvm-0.6.0/scumm/smush/smush_font.cpp Tue Jan 6 13:45:31 2004
106+++ scummvm-0.6.0-patched/scumm/smush/smush_font.cpp Fri Mar 19 15:48:21 2004
107@@ -88,7 +88,7 @@
108 char value = *src++;
109 if (value == -color) {
110 dst[i] = 0xFF;
111- } else if (value == -31) {
112+ } else if (value == (char) -31) {
113 dst[i] = 0;
114 } else if (value) {
115 dst[i] = value;
116diff -ruN scummvm-0.6.0/simon/simon.cpp scummvm-0.6.0-patched/simon/simon.cpp
117--- scummvm-0.6.0/simon/simon.cpp Thu Feb 26 13:08:22 2004
118+++ scummvm-0.6.0-patched/simon/simon.cpp Fri Mar 19 15:52:10 2004
119@@ -1515,6 +1515,7 @@
120 return i;
121
122 error("get_fcs_ptr_3_index: not found");
123+ return 0; // never reached, but avoids compiler warnings
124 }
125
126 void SimonEngine::lock() {
127@@ -2158,6 +2159,7 @@
128 default:
129 error("text, invalid value %d", a);
130 }
131+ return (ThreeValues *) NULL; // never reached, but avoids compiler warnings
132 }
133
134 void SimonEngine::o_print_str() {
135@@ -3272,6 +3274,7 @@
136 if (_itemarray_ptr[i] == id)
137 return i;
138 error("itemPtrToID: not found");
139+ return 0; // never reached, but avoids compiler warnings
140 }
141
142 void SimonEngine::o_pathfind(int x, int y, uint var_1, uint var_2) {
143diff -ruN scummvm-0.6.0/sky/compact.cpp scummvm-0.6.0-patched/sky/compact.cpp
144--- scummvm-0.6.0/sky/compact.cpp Tue Jan 6 13:45:32 2004
145+++ scummvm-0.6.0-patched/sky/compact.cpp Fri Mar 19 16:05:24 2004
146@@ -102,6 +102,7 @@
147 default:
148 error("Invalid MegaSet (%d)", megaSet);
149 }
150+ return (MegaSet *) NULL; // never reached, but avoids compiler warnings
151 }
152
153 /**
154@@ -133,6 +134,7 @@
155 default:
156 error("No TurnTable (%d) in MegaSet (%d)", dir, megaSet);
157 }
158+ return (uint16 **) NULL; // never reached, but avoids compiler warnings
159 }
160
161 /**
162@@ -171,6 +173,7 @@
163 default:
164 error("Invalid Mode (%d)", mode);
165 }
166+ return (uint16 *) NULL; // never reached, but avoids compiler warnings
167 }
168
169 static const uint32 compactOffsets[] = {
170@@ -302,6 +305,7 @@
171 off -= TURNTABLE_SIZE;
172
173 error("Offset %X out of bounds of compact", off + COMPACT_SIZE + EXTCOMPACT_SIZE + 4 * MEGASET_SIZE + 4 * TURNTABLE_SIZE);
174+ return (void *) NULL; // never reached, but avoids compiler warnings
175 }
176
177 // getToTables
178diff -ruN scummvm-0.6.0/sky/control.cpp scummvm-0.6.0-patched/sky/control.cpp
179--- scummvm-0.6.0/sky/control.cpp Mon Jan 26 21:28:32 2004
180+++ scummvm-0.6.0-patched/sky/control.cpp Fri Mar 19 16:06:23 2004
181@@ -582,6 +582,7 @@
182 default:
183 error("Control::handleClick: unknown routine: %X",pButton->_onClick);
184 }
185+ return 0; // never reached, but avoids compiler warnings
186 }
187
188 bool Control::getYesNo(char *text) {
189diff -ruN scummvm-0.6.0/sky/disk.cpp scummvm-0.6.0-patched/sky/disk.cpp
190--- scummvm-0.6.0/sky/disk.cpp Tue Jan 6 13:45:32 2004
191+++ scummvm-0.6.0-patched/sky/disk.cpp Fri Mar 19 16:07:25 2004
192@@ -460,6 +460,7 @@
193 error("Unknown game version! %d dinner table entries", _dinnerTableEntries);
194 break;
195 }
196+ return 0; // never reached, but avoids compiler warnings
197 }
198
199 } // End of namespace Sky
200diff -ruN scummvm-0.6.0/sky/logic.cpp scummvm-0.6.0-patched/sky/logic.cpp
201--- scummvm-0.6.0/sky/logic.cpp Tue Jan 6 13:45:32 2004
202+++ scummvm-0.6.0-patched/sky/logic.cpp Fri Mar 19 16:08:26 2004
203@@ -763,6 +763,7 @@
204 default:
205 error("Unknown Direction: %d", _compact->extCompact->dir);
206 }
207+ return false; // never reached, but avoids compiler warnings
208 }
209
210 void Logic::runGetOff() {
211diff -ruN scummvm-0.6.0/sky/sky.cpp scummvm-0.6.0-patched/sky/sky.cpp
212--- scummvm-0.6.0/sky/sky.cpp Fri Feb 13 11:51:33 2004
213+++ scummvm-0.6.0-patched/sky/sky.cpp Fri Mar 19 16:09:22 2004
214@@ -513,6 +513,7 @@
215 default:
216 error("Unknown game version %d", _systemVars.gameVersion);
217 }
218+ return false; // never reached, but avoids compiler warnings
219 }
220
221 bool SkyEngine::isCDVersion(void) {
222@@ -532,6 +533,7 @@
223 default:
224 error("Unknown game version %d", _systemVars.gameVersion);
225 }
226+ return false; // never reached, but avoids compiler warnings
227 }
228
229 } // End of namespace Sky