Add way to overwrite default SJIS font.
svn-id: r42819
This commit is contained in:
parent
be9c906c72
commit
ec67b583b0
2 changed files with 16 additions and 13 deletions
|
@ -31,17 +31,19 @@
|
||||||
|
|
||||||
namespace Graphics {
|
namespace Graphics {
|
||||||
|
|
||||||
FontSJIS *FontSJIS::createFont() {
|
FontSJIS *FontSJIS::createFont(const Common::Platform platform) {
|
||||||
FontSJIS *ret = 0;
|
FontSJIS *ret = 0;
|
||||||
|
|
||||||
// First try ScummVM's font.
|
// Try the font ROM of the specified platform
|
||||||
ret = new FontSjisSVM();
|
if (platform == Common::kPlatformFMTowns) {
|
||||||
|
ret = new FontTowns();
|
||||||
if (ret && ret->loadData())
|
if (ret && ret->loadData())
|
||||||
return ret;
|
return ret;
|
||||||
delete ret;
|
delete ret;
|
||||||
|
}
|
||||||
|
|
||||||
// Next try the FM-Towns font ROM.
|
// Try ScummVM's font.
|
||||||
ret = new FontTowns();
|
ret = new FontSjisSVM();
|
||||||
if (ret && ret->loadData())
|
if (ret && ret->loadData())
|
||||||
return ret;
|
return ret;
|
||||||
delete ret;
|
delete ret;
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
#include "common/scummsys.h"
|
#include "common/scummsys.h"
|
||||||
#include "common/stream.h"
|
#include "common/stream.h"
|
||||||
|
#include "common/util.h"
|
||||||
|
|
||||||
#include "graphics/surface.h"
|
#include "graphics/surface.h"
|
||||||
|
|
||||||
|
@ -54,13 +55,13 @@ public:
|
||||||
* It will also call loadData, so the user can just start
|
* It will also call loadData, so the user can just start
|
||||||
* using the font.
|
* using the font.
|
||||||
*
|
*
|
||||||
* It will prefer ScummVM's font.
|
* It'll prefer the platform specific ROM file, when platform
|
||||||
|
* is set to a value, which's font ROM is supported.
|
||||||
|
* So far that is only kPlatformFMTowns.
|
||||||
*
|
*
|
||||||
* TODO: Consider adding some way to overwrite the first checked
|
* The last file tried is ScummVM's SJIS.FNT file.
|
||||||
* font, some games might want to prefer the original ROM over
|
|
||||||
* ScummVM's.
|
|
||||||
*/
|
*/
|
||||||
static FontSJIS *createFont();
|
static FontSJIS *createFont(const Common::Platform platform = Common::kPlatformUnknown);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load the font data.
|
* Load the font data.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue