diff options
author | Max Horn | 2003-04-29 10:26:35 +0000 |
---|---|---|
committer | Max Horn | 2003-04-29 10:26:35 +0000 |
commit | b23e788b7df0476d33d5db6da9859598e51e715f (patch) | |
tree | 9a5e0679c9c274e03873a038537f45320f3c0756 | |
parent | ea6dace0b26f94c71b88e68abf05016a052665e6 (diff) | |
download | scummvm-rg350-b23e788b7df0476d33d5db6da9859598e51e715f.tar.gz scummvm-rg350-b23e788b7df0476d33d5db6da9859598e51e715f.tar.bz2 scummvm-rg350-b23e788b7df0476d33d5db6da9859598e51e715f.zip |
unified Zak256 charset code with the rest; this *might* cause a regression should anywhere in Zak256 a charset > 1 be set; if so, tell me where exactly, and I can try to figure out a proper fix
svn-id: r7195
-rw-r--r-- | scumm/resource_v3.cpp | 10 | ||||
-rw-r--r-- | scumm/string.cpp | 8 |
2 files changed, 6 insertions, 12 deletions
diff --git a/scumm/resource_v3.cpp b/scumm/resource_v3.cpp index 84ba140027..1a5836ec54 100644 --- a/scumm/resource_v3.cpp +++ b/scumm/resource_v3.cpp @@ -164,16 +164,16 @@ void Scumm_v3::loadCharset(int no) { uint32 size; memset(_charsetData, 0, sizeof(_charsetData)); - checkRange(4, 0, no, "Loading illegal charset %d"); + if (_gameId == GID_ZAK256) + checkRange(2, 0, no, "Loading illegal charset %d"); + else + checkRange(4, 0, no, "Loading illegal charset %d"); closeRoom(); File file; char buf[20]; - if (_gameId == GID_ZAK256) - sprintf(buf, "%02d.LFL", 98 + no); - else - sprintf(buf, "%02d.LFL", 99 - no); + sprintf(buf, "%02d.LFL", 99 - no); file.open(buf, _gameDataPath); diff --git a/scumm/string.cpp b/scumm/string.cpp index 671b64833d..929468d27b 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -753,13 +753,7 @@ void Scumm::addStringToStack(int var) { void Scumm::initCharset(int charsetno) { int i; - // FIXME why is this required? see also Scumm_v3::loadCharset - if (_gameId == GID_ZAK256) - charsetno = !charsetno; - - if (_features & GF_SMALL_HEADER) - loadCharset(charsetno); - else if (!getResourceAddress(rtCharset, charsetno)) + if (!getResourceAddress(rtCharset, charsetno)) loadCharset(charsetno); _string[0].t_charset = charsetno; |