22 #ifndef TITANIC_FONT_H 23 #define TITANIC_FONT_H 25 #include "common/scummsys.h" 26 #include "common/array.h" 27 #include "titanic/support/rect.h" 28 #include "titanic/support/string.h" 29 #include "titanic/support/text_cursor.h" 33 enum TextCommand { TEXTCMD_NPC = 26, TEXTCMD_SET_COLOR = 27 };
35 enum WriteCharacterResult {
36 WC_IN_BOUNDS = 0, WC_OUTSIDE_TOP = -1, WC_OUTSIDE_BOTTOM = -2,
37 WC_OUTSIDE_LEFT = -3, WC_OUTSIDE_RIGHT = -4
58 WriteCharacterResult writeChar(
CVideoSurface *surface,
unsigned char c,
65 void extendBounds(
Point &textSize, byte c,
int maxWidth)
const;
70 void checkLineWrap(
Point &textSize,
int maxWidth,
const char *&str)
const;
76 CharEntry _chars[256];
77 byte _fontR, _fontG, _fontB;
85 void load(
int fontNumber);
104 const CString &str,
int lineWidth = 0);
118 void setColor(byte r, byte g, byte b);
int writeString(CVideoSurface *surface, const Rect &rect1, const Rect &destRect, int yOffset, const CString &str, CTextCursor *textCursor)
void setColor(byte r, byte g, byte b)
int getTextBounds(const CString &str, int maxWidth, Point *sizeOut) const
void load(int fontNumber)
Definition: text_cursor.h:33
int stringWidth(const CString &text) const
Definition: video_surface.h:43