From f91f4d4186f06281f3e1cd3c2b267f6dd9018220 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 25 Sep 2009 11:39:22 +0000 Subject: Patch #2858137 and fix for bug #2855359: fmt_fnt.rom font loading failure is ignored svn-id: r44346 --- engines/scumm/charset.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp index 26deaac18d..633250408e 100644 --- a/engines/scumm/charset.cpp +++ b/engines/scumm/charset.cpp @@ -56,7 +56,9 @@ void ScummEngine::loadCJKFont() { _2byteWidth = 16; _2byteHeight = 16; // use FM-TOWNS font rom, since game files don't have kanji font resources - if (fp.open("fmt_fnt.rom")) { + if (!fp.open("fmt_fnt.rom")) { + error("SCUMM::Font: Couldn't open fmt_fnt.rom"); + } else { _useCJKMode = true; debug(2, "Loading FM-TOWNS Kanji rom"); _2byteFontPtr = new byte[((_2byteWidth + 7) / 8) * _2byteHeight * numChar]; @@ -116,7 +118,10 @@ void ScummEngine::loadCJKFont() { fp.read(_2byteFontPtr, ((_2byteWidth + 7) / 8) * _2byteHeight * numChar); fp.close(); } else { - error("Couldn't load any font"); + if (fontFile) + error("SCUMM::Font: Couldn't open %s",fontFile); + else + error("SCUMM::Font: Couldn't load any font"); } } } -- cgit v1.2.3