aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2011-08-23 15:14:48 +0200
committerJohannes Schickel2011-08-23 15:15:29 +0200
commit243779a7ebb3e6d263a99fa7c6fcf2240b6be148 (patch)
tree26c2a27456b46712afd5937c35ea05156e0b93f8
parente31ad4d665e6987168f5b882e6d4b5115bc4ac70 (diff)
downloadscummvm-rg350-243779a7ebb3e6d263a99fa7c6fcf2240b6be148.tar.gz
scummvm-rg350-243779a7ebb3e6d263a99fa7c6fcf2240b6be148.tar.bz2
scummvm-rg350-243779a7ebb3e6d263a99fa7c6fcf2240b6be148.zip
GRAPHICS: Display warning in case the SJIS.FNT version does not match.
-rw-r--r--graphics/sjis.cpp3
-rw-r--r--graphics/sjis.h4
2 files changed, 6 insertions, 1 deletions
diff --git a/graphics/sjis.cpp b/graphics/sjis.cpp
index 4dd24d9dcc..facf0470b2 100644
--- a/graphics/sjis.cpp
+++ b/graphics/sjis.cpp
@@ -537,7 +537,8 @@ bool FontSjisSVM::loadData() {
}
uint32 version = data->readUint32BE();
- if (version != 3) {
+ if (version != kSjisFontVersion) {
+ warning("SJIS font version mismatch, expected: %d found: %u", kSjisFontVersion, version);
delete data;
return false;
}
diff --git a/graphics/sjis.h b/graphics/sjis.h
index 185b6cc593..f96eef6ad1 100644
--- a/graphics/sjis.h
+++ b/graphics/sjis.h
@@ -263,6 +263,10 @@ private:
const uint8 *getCharDataDefault(uint16 c) const;
void mapKANJIChar(const uint8 fB, const uint8 sB, int &base, int &index) const;
+
+ enum {
+ kSjisFontVersion = 3
+ };
};
// TODO: Consider adding support for PC98 ROM