aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/frotz/screen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/glk/frotz/screen.cpp')
-rw-r--r--engines/glk/frotz/screen.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/glk/frotz/screen.cpp b/engines/glk/frotz/screen.cpp
index eef6d6118d..a71217cc26 100644
--- a/engines/glk/frotz/screen.cpp
+++ b/engines/glk/frotz/screen.cpp
@@ -21,10 +21,26 @@
*/
#include "glk/frotz/screen.h"
+#include "common/file.h"
+#include "image/bmp.h"
namespace Glk {
namespace Frotz {
+void FrotzScreen::loadFonts(Common::Archive *archive) {
+ Screen::loadFonts(archive);
+
+ Image::BitmapDecoder decoder;
+ Common::File f;
+ if (!f.open("infocom_graphics.bmp", *archive))
+ error("Could not load font");
+
+ decoder.loadStream(f);
+ _fonts.push_back(new Frotz::BitmapFont(*decoder.getSurface()));
+}
+
+/*--------------------------------------------------------------------------*/
+
BitmapFont::BitmapFont(const Graphics::Surface &src, uint charWidth,
uint charHeight, unsigned char startingChar) : _startingChar(startingChar) {
assert(src.format.bytesPerPixel == 1);