aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-06-23 05:43:08 +0530
committerEugene Sandulenko2019-09-03 17:16:56 +0200
commit5ae9b45489270c3af6c4d86446ac80b0d44abf37 (patch)
tree7bda6bfd144a65f2fdc1ebc7ddfa040344712736
parent32b99eb8b8069ce68d46e8f00d21dd0edb95f985 (diff)
downloadscummvm-rg350-5ae9b45489270c3af6c4d86446ac80b0d44abf37.tar.gz
scummvm-rg350-5ae9b45489270c3af6c4d86446ac80b0d44abf37.tar.bz2
scummvm-rg350-5ae9b45489270c3af6c4d86446ac80b0d44abf37.zip
HDB: Add Font data
Addition includes structs, constants and member variables.
-rw-r--r--engines/hdb/draw-manager.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/engines/hdb/draw-manager.h b/engines/hdb/draw-manager.h
index ee53df47c9..1d1c5d6f42 100644
--- a/engines/hdb/draw-manager.h
+++ b/engines/hdb/draw-manager.h
@@ -33,7 +33,9 @@ enum {
kTileWidth = 32,
kTileHeight = 32,
kMaxSkies = 10,
- kNum3DStars = 300
+ kNum3DStars = 300,
+ kFontSpace = 5,
+ kFontIncrement = 1
};
class Tile;
@@ -60,6 +62,19 @@ struct GfxCache {
GfxCache() : name(""), tileGfx(NULL), size(0), loaded(0) {}
};
+struct FontInfo {
+ uint16 type; // 0 = mono, 1 = proportional
+ uint16 numChars; // how many characters in font
+ uint16 height; // height of entire font
+ uint16 kerning; // space between chars
+ uint16 leading; // space between lines
+};
+
+struct CharInfo {
+ uint16 width; // Character width in pixels
+ uint32 offset; // From the start of the font charInfo chunk
+};
+
class DrawMan {
public:
@@ -134,6 +149,17 @@ private:
Picture *_starField[4];
Picture *_skyClouds;
+ // Cursor
+ int _cursorX, _cursorY;
+
+ // Font Data
+
+ FontInfo _fontHeader;
+ Common::Array<CharInfo *> _charInfoBlocks;
+ Graphics::Surface _fontSurfaces[256];
+ uint16 _fontGfx;
+ int _eLeft, _eRight, _eTop, _eBottom;
+
bool _systemInit;
};