aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2009-11-22 23:33:58 +0000
committerMatthew Hoops2009-11-22 23:33:58 +0000
commita7e6745ba49cf3fd2b0b2556c828d7d6b3202965 (patch)
tree1ad10f1dc725e2e2576e4bc507506ee164733a0a
parent604ed73b87e908475a8e2faf1d01d5e03fa14587 (diff)
downloadscummvm-rg350-a7e6745ba49cf3fd2b0b2556c828d7d6b3202965.tar.gz
scummvm-rg350-a7e6745ba49cf3fd2b0b2556c828d7d6b3202965.tar.bz2
scummvm-rg350-a7e6745ba49cf3fd2b0b2556c828d7d6b3202965.zip
Some PCE BIOSROM's have a 0x200 byte header. We need to skip that if it's present to get to the correct font data.
svn-id: r46100
-rw-r--r--engines/scumm/charset.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 70a9336380..c708b09291 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -76,7 +76,10 @@ void ScummEngine::loadCJKFont() {
} else {
_useCJKMode = true;
debug(2, "Loading PC-Engine System Card");
- fp.seek(0x30000);
+
+ // A 0x200 byte header can be present at the beginning of the syscard. Seek past it too.
+ fp.seek((fp.size() & 0x200) ? 0x30200 : 0x30000);
+
_2byteFontPtr = new byte[_2byteWidth * _2byteHeight * numChar / 8];
fp.read(_2byteFontPtr, _2byteWidth * _2byteHeight * numChar / 8);
fp.close();