From 243779a7ebb3e6d263a99fa7c6fcf2240b6be148 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 23 Aug 2011 15:14:48 +0200 Subject: GRAPHICS: Display warning in case the SJIS.FNT version does not match. --- graphics/sjis.cpp | 3 ++- graphics/sjis.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3