aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorChristopher Page2008-08-04 22:34:07 +0000
committerChristopher Page2008-08-04 22:34:07 +0000
commit4198ee962399305a4a158b1f43224c00e2e04a1b (patch)
treeeea375b5cb471509df2e2c5d9123d963a62403c6 /engines/scumm
parenta51f45407659bba43254b466d20b6af2e8f17ffd (diff)
parent4f5479ee744ac6b419cdf7ec1e96fbf7c83d36ef (diff)
downloadscummvm-rg350-4198ee962399305a4a158b1f43224c00e2e04a1b.tar.gz
scummvm-rg350-4198ee962399305a4a158b1f43224c00e2e04a1b.tar.bz2
scummvm-rg350-4198ee962399305a4a158b1f43224c00e2e04a1b.zip
Merged revisions 33188-33189,33191-33193,33196,33198,33202-33203,33206,33210,33212,33218-33220,33222,33224-33226,33229-33243,33246,33248-33250,33252,33258-33261,33263,33266,33270,33272-33283,33285,33287-33290,33295-33298,33321,33325-33330,33332-33335,33337-33340,33342,33345,33347,33349-33350,33352-33357,33359-33367,33369-33371,33373,33375-33377,33379-33380,33383-33385,33387-33389,33392-33394,33400-33402,33404-33405,33407-33410,33412-33416,33418-33419,33425-33427,33432,33436-33438,33444,33446,33452-33453,33455-33459,33463-33464,33466-33471,33473-33474,33478,33490,33492,33495-33496,33509-33512,33518-33519,33522-33527,33529-33530,33537,33541,33544,33546,33550,33552-33554,33556,33558,33561-33562,33565,33568,33570,33574,33576,33578-33581,33584-33587,33590,33596,33604-33611,33614-33615,33617-33618,33620-33621 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk svn-id: r33624
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/charset.cpp24
-rw-r--r--engines/scumm/charset.h14
-rw-r--r--engines/scumm/debugger.cpp2
-rw-r--r--engines/scumm/file.cpp16
-rw-r--r--engines/scumm/file.h9
-rw-r--r--engines/scumm/file_nes.cpp15
-rw-r--r--engines/scumm/file_nes.h3
-rw-r--r--engines/scumm/gfx.cpp2
-rw-r--r--engines/scumm/he/script_v60he.cpp2
-rw-r--r--engines/scumm/he/script_v72he.cpp2
-rw-r--r--engines/scumm/he/script_v80he.cpp2
-rw-r--r--engines/scumm/he/wiz_he.cpp6
-rw-r--r--engines/scumm/imuse_digi/dimuse.cpp2
-rw-r--r--engines/scumm/resource.cpp4
-rw-r--r--engines/scumm/saveload.cpp8
-rw-r--r--engines/scumm/saveload.h8
-rw-r--r--engines/scumm/scumm-md5.h10
-rw-r--r--engines/scumm/scumm.h8
-rw-r--r--engines/scumm/string.cpp2
19 files changed, 67 insertions, 72 deletions
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 8f3175f098..609aca996d 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -49,14 +49,14 @@ void ScummEngine::loadCJKFont() {
Common::File fp;
_useCJKMode = false;
_textSurfaceMultiplier = 1;
- _newLineCharacter = 0xfe;
+ _newLineCharacter = 0;
if (_game.version <= 5 && _game.platform == Common::kPlatformFMTowns && _language == Common::JA_JPN) { // FM-TOWNS v3 / v5 Kanji
int numChar = 256 * 32;
_2byteWidth = 16;
_2byteHeight = 16;
// use FM-TOWNS font rom, since game files don't have kanji font resources
- if (fp.open("fmt_fnt.rom", Common::File::kFileReadMode)) {
+ if (fp.open("fmt_fnt.rom")) {
_useCJKMode = true;
debug(2, "Loading FM-TOWNS Kanji rom");
_2byteFontPtr = new byte[((_2byteWidth + 7) / 8) * _2byteHeight * numChar];
@@ -277,7 +277,7 @@ CharsetRenderer::CharsetRenderer(ScummEngine *vm) {
_disableOffsX = false;
_vm = vm;
- _curId = 0;
+ _curId = -1;
}
CharsetRenderer::~CharsetRenderer() {
@@ -289,7 +289,10 @@ CharsetRendererCommon::CharsetRendererCommon(ScummEngine *vm)
_shadowColor = 0;
}
-void CharsetRendererCommon::setCurID(byte id) {
+void CharsetRendererCommon::setCurID(int32 id) {
+ if (id == -1)
+ return;
+
assertRange(0, id, _vm->_numCharsets - 1, "charset");
_curId = id;
@@ -308,7 +311,10 @@ void CharsetRendererCommon::setCurID(byte id) {
_numChars = READ_LE_UINT16(_fontPtr + 2);
}
-void CharsetRendererV3::setCurID(byte id) {
+void CharsetRendererV3::setCurID(int32 id) {
+ if (id == -1)
+ return;
+
assertRange(0, id, _vm->_numCharsets - 1, "charset");
_curId = id;
@@ -668,7 +674,8 @@ void CharsetRenderer::translateColor() {
void CharsetRenderer::saveLoadWithSerializer(Serializer *ser) {
static const SaveLoadEntry charsetRendererEntries[] = {
- MKLINE(CharsetRenderer, _curId, sleByte, VER(73)),
+ MKLINE_OLD(CharsetRenderer, _curId, sleByte, VER(73), VER(73)),
+ MKLINE(CharsetRenderer, _curId, sleInt32, VER(74)),
MKLINE(CharsetRenderer, _color, sleByte, VER(73)),
MKEND()
};
@@ -988,7 +995,10 @@ CharsetRendererNut::~CharsetRendererNut() {
}
}
-void CharsetRendererNut::setCurID(byte id) {
+void CharsetRendererNut::setCurID(int32 id) {
+ if (id == -1)
+ return;
+
int numFonts = ((_vm->_game.id == GID_CMI) && (_vm->_game.features & GF_DEMO)) ? 4 : 5;
assert(id < numFonts);
_curId = id;
diff --git a/engines/scumm/charset.h b/engines/scumm/charset.h
index b62dbc6006..dbe02fc8fc 100644
--- a/engines/scumm/charset.h
+++ b/engines/scumm/charset.h
@@ -67,7 +67,7 @@ public:
protected:
ScummEngine *_vm;
- byte _curId;
+ int32 _curId;
public:
CharsetRenderer(ScummEngine *vm);
@@ -80,7 +80,7 @@ public:
void addLinebreaks(int a, byte *str, int pos, int maxwidth);
void translateColor();
- virtual void setCurID(byte id) = 0;
+ virtual void setCurID(int32 id) = 0;
int getCurID() { return _curId; }
virtual int getFontHeight() = 0;
@@ -113,7 +113,7 @@ protected:
public:
CharsetRendererCommon(ScummEngine *vm);
- void setCurID(byte id);
+ void setCurID(int32 id);
int getFontHeight();
};
@@ -142,7 +142,7 @@ protected:
public:
CharsetRendererNES(ScummEngine *vm) : CharsetRendererCommon(vm) {}
- void setCurID(byte id) {}
+ void setCurID(int32 id) {}
void printChar(int chr, bool ignoreCharsetMask);
void drawChar(int chr, const Graphics::Surface &s, int x, int y);
@@ -159,7 +159,7 @@ public:
void printChar(int chr, bool ignoreCharsetMask);
void drawChar(int chr, const Graphics::Surface &s, int x, int y);
- void setCurID(byte id);
+ void setCurID(int32 id);
void setColor(byte color);
int getCharWidth(byte chr);
};
@@ -168,7 +168,7 @@ class CharsetRendererV2 : public CharsetRendererV3 {
public:
CharsetRendererV2(ScummEngine *vm, Common::Language language);
- void setCurID(byte id) {}
+ void setCurID(int32 id) {}
int getCharWidth(byte chr) { return 8; }
};
@@ -184,7 +184,7 @@ public:
void printChar(int chr, bool ignoreCharsetMask);
- void setCurID(byte id);
+ void setCurID(int32 id);
int getFontHeight();
int getCharHeight(byte chr);
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index 9f9115e207..23af1f9672 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -298,7 +298,7 @@ bool ScummDebugger::Cmd_ImportRes(int argc, const char** argv) {
// FIXME add bounds check
if (!strncmp(argv[1], "scr", 3)) {
- file.open(argv[2], Common::File::kFileReadMode);
+ file.open(argv[2]);
if (file.isOpen() == false) {
DebugPrintf("Could not open file %s\n", argv[2]);
return true;
diff --git a/engines/scumm/file.cpp b/engines/scumm/file.cpp
index bc5fc38225..bf13308a0c 100644
--- a/engines/scumm/file.cpp
+++ b/engines/scumm/file.cpp
@@ -58,8 +58,8 @@ void ScummFile::resetSubfile() {
seek(0, SEEK_SET);
}
-bool ScummFile::open(const Common::String &filename, AccessMode mode) {
- if (File::open(filename, mode)) {
+bool ScummFile::open(const Common::String &filename) {
+ if (File::open(filename)) {
resetSubfile();
return true;
} else {
@@ -187,11 +187,6 @@ uint32 ScummFile::read(void *dataPtr, uint32 dataSize) {
return realLen;
}
-uint32 ScummFile::write(const void *, uint32) {
- error("ScummFile does not support writing!");
- return 0;
-}
-
#pragma mark -
#pragma mark --- ScummDiskImage ---
#pragma mark -
@@ -250,11 +245,6 @@ ScummDiskImage::ScummDiskImage(const char *disk1, const char *disk2, GameSetting
}
}
-uint32 ScummDiskImage::write(const void *, uint32) {
- error("ScummDiskImage does not support writing!");
- return 0;
-}
-
void ScummDiskImage::setEnc(byte enc) {
_stream->setEnc(enc);
}
@@ -300,7 +290,7 @@ bool ScummDiskImage::openDisk(char num) {
return true;
}
-bool ScummDiskImage::open(const Common::String &filename, AccessMode mode) {
+bool ScummDiskImage::open(const Common::String &filename) {
uint16 signature;
// check signature
diff --git a/engines/scumm/file.h b/engines/scumm/file.h
index 7064654f89..a2695cac59 100644
--- a/engines/scumm/file.h
+++ b/engines/scumm/file.h
@@ -36,7 +36,7 @@ class BaseScummFile : public Common::File {
public:
virtual void setEnc(byte value) = 0;
- virtual bool open(const Common::String &filename, AccessMode mode = kFileReadMode) = 0;
+ virtual bool open(const Common::String &filename) = 0;
virtual bool openSubFile(const Common::String &filename) = 0;
virtual bool eof() = 0;
@@ -44,7 +44,6 @@ public:
virtual uint32 size() = 0;
virtual void seek(int32 offs, int whence = SEEK_SET) = 0;
virtual uint32 read(void *dataPtr, uint32 dataSize) = 0;
- virtual uint32 write(const void *dataPtr, uint32 dataSize) = 0;
};
class ScummFile : public BaseScummFile {
@@ -59,7 +58,7 @@ public:
void setSubfileRange(uint32 start, uint32 len);
void resetSubfile();
- bool open(const Common::String &filename, AccessMode mode = kFileReadMode);
+ bool open(const Common::String &filename);
bool openSubFile(const Common::String &filename);
bool eof();
@@ -67,7 +66,6 @@ public:
uint32 size();
void seek(int32 offs, int whence = SEEK_SET);
uint32 read(void *dataPtr, uint32 dataSize);
- uint32 write(const void *dataPtr, uint32 dataSize);
};
class ScummDiskImage : public BaseScummFile {
@@ -104,7 +102,7 @@ public:
ScummDiskImage(const char *disk1, const char *disk2, GameSettings game);
void setEnc(byte value);
- bool open(const Common::String &filename, AccessMode mode = kFileReadMode);
+ bool open(const Common::String &filename);
bool openSubFile(const Common::String &filename);
void close();
@@ -113,7 +111,6 @@ public:
uint32 size() { return _stream->size(); }
void seek(int32 offs, int whence = SEEK_SET) { _stream->seek(offs, whence); }
uint32 read(void *dataPtr, uint32 dataSize) { return _stream->read(dataPtr, dataSize); }
- uint32 write(const void *dataPtr, uint32 dataSize);
};
} // End of namespace Scumm
diff --git a/engines/scumm/file_nes.cpp b/engines/scumm/file_nes.cpp
index 95f5eec4ea..8325436f87 100644
--- a/engines/scumm/file_nes.cpp
+++ b/engines/scumm/file_nes.cpp
@@ -62,11 +62,6 @@ struct ScummNESFile::Resource {
ScummNESFile::ScummNESFile() : _stream(0), _buf(0), _ROMset(kROMsetNum) {
}
-uint32 ScummNESFile::write(const void *, uint32) {
- error("ScummNESFile does not support writing!");
- return 0;
-}
-
void ScummNESFile::setEnc(byte enc) {
_stream->setEnc(enc);
}
@@ -1234,7 +1229,7 @@ bool ScummNESFile::generateIndex() {
return true;
}
-bool ScummNESFile::open(const Common::String &filename, AccessMode mode) {
+bool ScummNESFile::open(const Common::String &filename) {
if (_ROMset == kROMsetNum) {
char md5str[32+1];
@@ -1267,9 +1262,8 @@ bool ScummNESFile::open(const Common::String &filename, AccessMode mode) {
}
}
- if (File::open(filename, mode)) {
- if (_stream)
- delete _stream;
+ if (File::open(filename)) {
+ delete _stream;
_stream = 0;
free(_buf);
@@ -1282,8 +1276,7 @@ bool ScummNESFile::open(const Common::String &filename, AccessMode mode) {
}
void ScummNESFile::close() {
- if (_stream)
- delete _stream;
+ delete _stream;
_stream = 0;
free(_buf);
diff --git a/engines/scumm/file_nes.h b/engines/scumm/file_nes.h
index d601c2c496..4d2d6de275 100644
--- a/engines/scumm/file_nes.h
+++ b/engines/scumm/file_nes.h
@@ -64,7 +64,7 @@ public:
ScummNESFile();
void setEnc(byte value);
- bool open(const Common::String &filename, AccessMode mode = kFileReadMode);
+ bool open(const Common::String &filename);
bool openSubFile(const Common::String &filename);
void close();
@@ -73,7 +73,6 @@ public:
uint32 size() { return _stream->size(); }
void seek(int32 offs, int whence = SEEK_SET) { _stream->seek(offs, whence); }
uint32 read(void *dataPtr, uint32 dataSize) { return _stream->read(dataPtr, dataSize); }
- uint32 write(const void *dataPtr, uint32 dataSize);
};
} // End of namespace Scumm
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 6c8d24d25a..d09accafb0 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -669,7 +669,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
x += 16;
while (x + width >= _screenWidth)
width -= 16;
- if (width < 0)
+ if (width <= 0)
return;
}
diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp
index 4d5ec668a0..9429f8d086 100644
--- a/engines/scumm/he/script_v60he.cpp
+++ b/engines/scumm/he/script_v60he.cpp
@@ -1012,7 +1012,7 @@ void ScummEngine_v60he::o60_openFile() {
_hInFileTable[slot] = _saveFileMan->openForLoading(filename);
if (_hInFileTable[slot] == 0) {
Common::File *f = new Common::File();
- f->open(filename, Common::File::kFileReadMode);
+ f->open(filename);
if (!f->isOpen())
delete f;
else
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index 6f68d56693..484e11cf50 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -1692,7 +1692,7 @@ void ScummEngine_v72he::o72_openFile() {
_hInFileTable[slot] = _saveFileMan->openForLoading(filename);
if (_hInFileTable[slot] == 0) {
Common::File *f = new Common::File();
- f->open(filename, Common::File::kFileReadMode);
+ f->open(filename);
if (!f->isOpen())
delete f;
else
diff --git a/engines/scumm/he/script_v80he.cpp b/engines/scumm/he/script_v80he.cpp
index 393e1d3a8f..39ec715d94 100644
--- a/engines/scumm/he/script_v80he.cpp
+++ b/engines/scumm/he/script_v80he.cpp
@@ -409,7 +409,7 @@ void ScummEngine_v80he::o80_getFileSize() {
Common::SeekableReadStream *f = _saveFileMan->openForLoading((const char *)filename);
if (!f) {
Common::File *file = new Common::File();
- file->open((const char *)filename, Common::File::kFileReadMode);
+ file->open((const char *)filename);
if (!file->isOpen())
delete f;
else
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp
index df472307eb..f514449bff 100644
--- a/engines/scumm/he/wiz_he.cpp
+++ b/engines/scumm/he/wiz_he.cpp
@@ -1881,7 +1881,7 @@ void Wiz::processWizImage(const WizParameters *params) {
memcpy(filename, params->filename, 260);
_vm->convertFilePath(filename);
- if (f.open((const char *)filename, Common::File::kFileReadMode)) {
+ if (f.open((const char *)filename)) {
uint32 id = f.readUint32BE();
if (id == MKID_BE('AWIZ') || id == MKID_BE('MULT')) {
uint32 size = f.readUint32BE();
@@ -1911,7 +1911,7 @@ void Wiz::processWizImage(const WizParameters *params) {
break;
case 4:
if (params->processFlags & kWPFUseFile) {
- Common::File f;
+ Common::DumpFile f;
switch (params->fileWriteMode) {
case 2:
@@ -1924,7 +1924,7 @@ void Wiz::processWizImage(const WizParameters *params) {
memcpy(filename, params->filename, 260);
_vm->convertFilePath(filename);
- if (!f.open((const char *)filename, Common::File::kFileWriteMode)) {
+ if (!f.open((const char *)filename)) {
debug(0, "Unable to open for write '%s'", filename);
_vm->VAR(119) = -3;
} else {
diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp
index fa50eca604..d3359fa33e 100644
--- a/engines/scumm/imuse_digi/dimuse.cpp
+++ b/engines/scumm/imuse_digi/dimuse.cpp
@@ -57,8 +57,8 @@ IMuseDigital::IMuseDigital(ScummEngine_v7 *scumm, Audio::Mixer *mixer, int fps)
for (int l = 0; l < MAX_DIGITAL_TRACKS + MAX_DIGITAL_FADETRACKS; l++) {
_track[l] = new Track;
assert(_track[l]);
+ memset(_track[l], 0, sizeof(Track));
_track[l]->trackId = l;
- _track[l]->used = false;
}
_vm->_timer->installTimerProc(timer_handler, 1000000 / _callbackFps, this);
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index 8f7617885a..9823a9483f 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -1299,7 +1299,7 @@ void ScummEngine::allocateArrays() {
void ScummEngine::dumpResource(const char *tag, int idx, const byte *ptr, int length) {
char buf[256];
- Common::File out;
+ Common::DumpFile out;
uint32 size;
if (length >= 0)
@@ -1313,7 +1313,7 @@ void ScummEngine::dumpResource(const char *tag, int idx, const byte *ptr, int le
sprintf(buf, "dumps/%s%d.dmp", tag, idx);
- out.open(buf, Common::File::kFileWriteMode);
+ out.open(buf);
if (out.isOpen() == false)
return;
out.write(ptr, size);
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 5894e837aa..426c7ee48b 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -479,6 +479,9 @@ Graphics::Surface *ScummEngine::loadThumbnailFromSlot(int slot) {
Common::SeekableReadStream *in;
SaveGameHeader hdr;
+ if (slot < 0)
+ return 0;
+
makeSavegameName(filename, slot, false);
if (!(in = _saveFileMan->openForLoading(filename))) {
return 0;
@@ -507,6 +510,9 @@ bool ScummEngine::loadInfosFromSlot(int slot, InfoStuff *stuff) {
Common::SeekableReadStream *in;
SaveGameHeader hdr;
+ if (slot < 0)
+ return 0;
+
makeSavegameName(filename, slot, false);
if (!(in = _saveFileMan->openForLoading(filename))) {
return false;
@@ -595,7 +601,7 @@ bool ScummEngine::loadInfos(Common::SeekableReadStream *file, InfoStuff *stuff)
return true;
}
-void ScummEngine::saveInfos(Common::OutSaveFile* file) {
+void ScummEngine::saveInfos(Common::WriteStream* file) {
SaveInfoSection section;
section.type = MKID_BE('INFO');
section.version = INFOSECTION_VERSION;
diff --git a/engines/scumm/saveload.h b/engines/scumm/saveload.h
index 0ddb4e5d2a..2d7ee64680 100644
--- a/engines/scumm/saveload.h
+++ b/engines/scumm/saveload.h
@@ -31,7 +31,7 @@
namespace Common {
class SeekableReadStream;
- class OutSaveFile;
+ class WriteStream;
}
namespace Scumm {
@@ -50,7 +50,7 @@ namespace Scumm {
* only saves/loads those which are valid for the version of the savegame
* which is being loaded/saved currently.
*/
-#define CURRENT_VER 73
+#define CURRENT_VER 74
/**
* An auxillary macro, used to specify savegame versions. We use this instead
@@ -125,7 +125,7 @@ struct SaveLoadEntry {
class Serializer {
public:
- Serializer(Common::SeekableReadStream *in, Common::OutSaveFile *out, uint32 savegameVersion)
+ Serializer(Common::SeekableReadStream *in, Common::WriteStream *out, uint32 savegameVersion)
: _loadStream(in), _saveStream(out),
_savegameVersion(savegameVersion)
{ }
@@ -151,7 +151,7 @@ public:
protected:
Common::SeekableReadStream *_loadStream;
- Common::OutSaveFile *_saveStream;
+ Common::WriteStream *_saveStream;
uint32 _savegameVersion;
void saveArrayOf(void *b, int len, int datasize, byte filetype);
diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h
index 62d777aa33..ce8f0a4d9a 100644
--- a/engines/scumm/scumm-md5.h
+++ b/engines/scumm/scumm-md5.h
@@ -1,5 +1,5 @@
/*
- This file was generated by the md5table tool on Mon Jun 02 08:37:50 2008
+ This file was generated by the md5table tool on Mon Jul 28 00:13:01 2008
DO NOT EDIT MANUALLY!
*/
@@ -75,7 +75,7 @@ static const MD5Table md5table[] = {
{ "16effd200aa6b8abe9c569c3e578814d", "freddi4", "HE 99", "Demo", -1, Common::NL_NLD, Common::kPlatformWindows },
{ "179879b6e35c1ead0d93aab26db0951b", "fbear", "HE 70", "", 13381, Common::EN_ANY, Common::kPlatformWindows },
{ "17b5d5e6af4ae89d62631641d66d5a05", "indy3", "VGA", "VGA", -1, Common::IT_ITA, Common::kPlatformPC },
- { "17f7296f63c78642724f057fd8e736a7", "maniac", "NES", "extracted", -1, Common::EN_USA, Common::kPlatformNES },
+ { "17f7296f63c78642724f057fd8e736a7", "maniac", "NES", "extracted", -1, Common::EN_GRB, Common::kPlatformNES },
{ "17fa250eb72dae2dad511ba79c0b6b0a", "tentacle", "", "Demo", -1, Common::FR_FRA, Common::kPlatformPC },
{ "182344899c2e2998fca0bebcd82aa81a", "atlantis", "", "CD", 12035, Common::EN_ANY, Common::kPlatformPC },
{ "183d7464902d40d00800e8ee1f04117c", "maniac", "V2", "V2", 1988, Common::DE_DEU, Common::kPlatformPC },
@@ -149,7 +149,7 @@ static const MD5Table md5table[] = {
{ "37ff1b308999c4cca7319edfcc1280a0", "puttputt", "HE 70", "Demo", 8269, Common::EN_ANY, Common::kPlatformWindows },
{ "3824e60cdf639d22f6df92a03dc4b131", "fbear", "HE 61", "", 7732, Common::EN_ANY, Common::kPlatformPC },
{ "387a544b8b10b26912d8413bab63a853", "monkey2", "", "Demo", -1, Common::EN_ANY, Common::kPlatformPC },
- { "3905799e081b80a61d4460b7b733c206", "maniac", "NES", "", 262144, Common::EN_GRB, Common::kPlatformNES },
+ { "3905799e081b80a61d4460b7b733c206", "maniac", "NES", "", 262144, Common::EN_USA, Common::kPlatformNES },
{ "3938ee1aa4433fca9d9308c9891172b1", "zak", "FM-TOWNS", "Demo", -1, Common::EN_ANY, Common::kPlatformFMTowns },
{ "399b217b0c8d65d0398076da486363a9", "indy3", "VGA", "VGA", 6295, Common::DE_DEU, Common::kPlatformPC },
{ "39cb9dec16fa16f38d79acd80effb059", "loom", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformAmiga },
@@ -357,7 +357,7 @@ static const MD5Table md5table[] = {
{ "90e2f0af4f779629695c6394a65bb702", "spyfox2", "", "", -1, Common::FR_FRA, Common::kPlatformUnknown },
{ "910e31cffb28226bd68c569668a0d6b4", "monkey", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformPC },
{ "91469353f7be1b122fa88d23480a1320", "zak", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformAmiga },
- { "91d5db93187fab54d823f73bd6441cb6", "maniac", "NES", "extracted", -1, Common::EN_GRB, Common::kPlatformNES },
+ { "91d5db93187fab54d823f73bd6441cb6", "maniac", "NES", "extracted", -1, Common::EN_USA, Common::kPlatformNES },
{ "927a764615c7fcdd72f591355e089d8c", "monkey", "No Adlib", "EGA", -1, Common::DE_DEU, Common::kPlatformAtariST },
{ "92b078d9d6d9d751da9c26b8b3075779", "tentacle", "", "Floppy", -1, Common::FR_FRA, Common::kPlatformPC },
{ "92e7727e67f5cd979d8a1070e4eb8cb3", "puttzoo", "HE 98.5", "Updated", -1, Common::EN_ANY, Common::kPlatformUnknown },
@@ -503,7 +503,7 @@ static const MD5Table md5table[] = {
{ "d7b247c26bf1f01f8f7daf142be84de3", "balloon", "HE 99", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "d831f7c048574dd9d5d85db2a1468099", "maniac", "C64", "", -1, Common::EN_ANY, Common::kPlatformC64 },
{ "d8323015ecb8b10bf53474f6e6b0ae33", "dig", "", "", 16304, Common::UNK_LANG, Common::kPlatformUnknown },
- { "d8d07efcb88f396bee0b402b10c3b1c9", "maniac", "NES", "", 262144, Common::EN_USA, Common::kPlatformNES },
+ { "d8d07efcb88f396bee0b402b10c3b1c9", "maniac", "NES", "", 262144, Common::EN_GRB, Common::kPlatformNES },
{ "d917f311a448e3cc7239c31bddb00dd2", "samnmax", "", "CD", 9080, Common::EN_ANY, Common::kPlatformUnknown },
{ "d9d0dd93d16ab4dec55cabc2b86bbd17", "samnmax", "", "Demo", 6478, Common::EN_ANY, Common::kPlatformPC },
{ "da09e666fc8f5b78d7b0ac65d1a3b56e", "monkey2", "", "", 11135, Common::EN_ANY, Common::kPlatformFMTowns },
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index b1ab9f7386..b839d37b08 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -46,7 +46,7 @@ namespace GUI {
using GUI::Dialog;
namespace Common {
class SeekableReadStream;
- class OutSaveFile;
+ class WriteStream;
}
namespace Scumm {
@@ -556,7 +556,7 @@ protected:
public:
int _numLocalScripts, _numImages, _numRooms, _numScripts, _numSounds; // Used by HE games
int _numCostumes; // FIXME - should be protected, used by Actor::remapActorPalette
- int _numCharsets; // FIXME - should be protected, used by CharsetRenderer
+ int32 _numCharsets; // FIXME - should be protected, used by CharsetRenderer
BaseCostumeLoader *_costumeLoader;
BaseCostumeRenderer *_costumeRenderer;
@@ -633,8 +633,8 @@ public:
protected:
Graphics::Surface *loadThumbnail(Common::SeekableReadStream *file);
bool loadInfos(Common::SeekableReadStream *file, InfoStuff *stuff);
- void saveThumbnail(Common::OutSaveFile *file);
- void saveInfos(Common::OutSaveFile* file);
+ void saveThumbnail(Common::WriteStream *file);
+ void saveInfos(Common::WriteStream* file);
int32 _engineStartTime;
int32 _pauseStartTime;
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index f039e2ca23..700632e4b3 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -279,7 +279,7 @@ bool ScummEngine::handleNextCharsetCode(Actor *a, int *code) {
}
c = *buffer++;
- if (c == _newLineCharacter) {
+ if (_newLineCharacter != 0 && c == _newLineCharacter) {
c = 13;
break;
}