22 #ifndef SCUMM_SMUSH_FONT_H 23 #define SCUMM_SMUSH_FONT_H 25 #include "common/scummsys.h" 26 #include "scumm/nut_renderer.h" 27 #include "scumm/scumm.h" 28 #include "scumm/string_v7.h" 32 class SmushFont :
public NutRenderer,
public GlyphRenderer_v7 {
35 NutRenderer(vm, filename), _hardcodedFontColors(useOriginalColors) {
36 _r =
new TextRenderer_v7(vm,
this);
41 void drawString(
const char *str, byte *buffer,
Common::Rect &clipRect,
int x,
int y, int16 col, TextStyleFlags flags) {
42 _r->drawString(str, buffer, clipRect, x, y, _vm->_screenWidth, col, flags);
45 void drawStringWrap(
const char *str, byte *buffer,
Common::Rect &clipRect,
int x,
int y, int16 col, TextStyleFlags flags) {
46 _r->drawStringWrap(str, buffer, clipRect, x, y, _vm->_screenWidth, col, flags);
50 int draw2byte(byte *buffer,
Common::Rect &clipRect,
int x,
int y,
int pitch, int16 col, uint16 chr)
override {
51 return NutRenderer::draw2byte(buffer, clipRect, x, y, pitch, _vm->_game.id == GID_CMI ? 255 : (_vm->_game.id == GID_DIG && col == -1 ? 1 : col), chr);
54 int drawCharV7(byte *buffer,
Common::Rect &clipRect,
int x,
int y,
int pitch, int16 col, TextStyleFlags flags, byte chr)
override {
55 return NutRenderer::drawCharV7(buffer, clipRect, x, y, pitch, col, flags, chr, _hardcodedFontColors,
true);
58 int getCharWidth(uint16 chr)
const override {
return NutRenderer::getCharWidth(chr & 0xFF); }
59 int getCharHeight(uint16 chr)
const override {
return NutRenderer::getCharHeight(chr & 0xFF); }
60 int getFontHeight()
const override {
return NutRenderer::getFontHeight(); }
61 int setFont(
int)
override {
return 0; }
62 bool newStyleWrapping()
const override {
return true; }
65 const bool _hardcodedFontColors;
Definition: smush_font.h:32