22#ifndef SCUMM_STRING_V7_H
23#define SCUMM_STRING_V7_H
25#ifdef ENABLE_SCUMM_7_8
27#include "common/scummsys.h"
28#include "scumm/charset_v7.h"
34class TextRenderer_v7 {
36 TextRenderer_v7(ScummEngine *vm, GlyphRenderer_v7 *gr);
39 void drawString(
const char *str,
byte *buffer,
Common::Rect &clipRect,
int x,
int y,
int pitch, int16 col, TextStyleFlags flags);
40 void drawStringWrap(
const char *str,
byte *buffer,
Common::Rect &clipRect,
int x,
int y,
int pitch, int16 col, TextStyleFlags flags);
42 int getStringWidth(
const char *str) {
return getStringWidth(str, 100000); }
43 int getStringHeight(
const char *str) {
return getStringHeight(str, 100000); }
45 Common::Rect calcStringDimensions(
const char *str,
int x,
int y, TextStyleFlags flags);
48 if (lang == Common::JA_JPN)
49 return (c >= 0x80 && c <= 0x9F) || (c >= 0xE0 && c <= 0xFD);
50 else if (lang == Common::KO_KOR)
51 return (c >= 0xB0 && c <= 0xD0);
52 else if (lang == Common::ZH_TWN || lang == Common::ZH_CHN)
58 int getStringWidth(
const char *str, uint numBytesMax);
59 int getStringHeight(
const char *str, uint numBytesMax);
60 void drawSubstring(
const char *str, uint numBytesMax,
byte *buffer,
Common::Rect &clipRect,
int x,
int y,
int pitch, int16 &col, TextStyleFlags flags);
64 const bool _useCJKMode;
66 const int _rtlCenteredOffset;
68 const byte _2byteCharWidth;
69 const char _lineBreakMarker;
71 const uint16 _screenWidth;
72 GlyphRenderer_v7 *_gr;
Language
Definition: language.h:45