diff options
author | antoniou79 | 2018-08-01 18:05:28 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2018-12-25 12:35:52 +0100 |
commit | 6f55071c570ee6a5bc4d4f3205972f6d7e7c35d2 (patch) | |
tree | 279a73a8bafd0e46ed494ba2d4db505b8863e084 /engines/bladerunner/font.cpp | |
parent | bf46900c7c48a988abfa7d622f1da2bff7c95544 (diff) | |
download | scummvm-rg350-6f55071c570ee6a5bc4d4f3205972f6d7e7c35d2.tar.gz scummvm-rg350-6f55071c570ee6a5bc4d4f3205972f6d7e7c35d2.tar.bz2 scummvm-rg350-6f55071c570ee6a5bc4d4f3205972f6d7e7c35d2.zip |
BLADERUNNER: SUBTITLES.MIX pack support
Diffstat (limited to 'engines/bladerunner/font.cpp')
-rw-r--r-- | engines/bladerunner/font.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/engines/bladerunner/font.cpp b/engines/bladerunner/font.cpp index 94ec476495..19fad67df6 100644 --- a/engines/bladerunner/font.cpp +++ b/engines/bladerunner/font.cpp @@ -37,46 +37,6 @@ Font::~Font() { close(); } -#if BLADERUNNER_SUBTITLES_EXTERNAL_FONT -// for external FON font file / subtitles support -bool Font::openFromStream(Common::ScopedPtr<Common::SeekableReadStream> &stream, int screenWidth, int screenHeight, int spacing1, int spacing2, uint16 color) { - reset(); - - _screenWidth = screenWidth; - _screenHeight = screenHeight; - _spacing1 = spacing1; - _spacing2 = spacing2; - _color = color; - - if (!stream) { - return false; - } - _characterCount = stream->readUint32LE(); - debug("Font's character count: %d", _characterCount); - _maxWidth = stream->readUint32LE(); - _maxHeight = stream->readUint32LE(); - _dataSize = stream->readUint32LE(); - _data = new uint16[_dataSize]; - if (!_data) { - debug("Font::open failed to allocate font buffer"); - return false; - } - - for (int i = 0; i < _characterCount; i++) { - _characters[i].x = stream->readUint32LE(); - _characters[i].y = stream->readUint32LE(); - _characters[i].width = stream->readUint32LE(); - _characters[i].height = stream->readUint32LE(); - _characters[i].dataOffset = stream->readUint32LE(); - debug("char::%d character x: %d, y: %d, w: %d, h:%d, do: %d", i, _characters[i].x, _characters[i].y, _characters[i].width, _characters[i].height, _characters[i].dataOffset); - } - for (int i = 0; i < _dataSize; i++) { - _data[i] = stream->readUint16LE(); - } - return true; -} -#endif // BLADERUNNER_SUBTITLES_EXTERNAL_FONT - bool Font::open(const Common::String &fileName, int screenWidth, int screenHeight, int spacing1, int spacing2, uint16 color) { reset(); |