22#if !defined(SCUMM_NUT_RENDERER_H) && defined(ENABLE_SCUMM_7_8)
23#define SCUMM_NUT_RENDERER_H
25#include "common/file.h"
26#include "graphics/surface.h"
27#include "scumm/charset_v7.h"
37 kDefaultTransparentColor = 0,
38 kSmush44TransparentColor = 2
48 const int8 *_2byteShadowXOffsetTable;
49 const int8 *_2byteShadowYOffsetTable;
50 uint8 *_2byteColorTable;
51 uint8 *_2byteMainColor;
52 const int _2byteSteps;
63 void codec1(
byte *dst,
const byte *src,
int width,
int height,
int pitch);
64 void codec21(
byte *dst,
const byte *src,
int width,
int height,
int pitch);
66 void loadFont(
const char *filename);
69 NutRenderer(ScummEngine *vm,
const char *filename =
nullptr);
70 virtual ~NutRenderer();
71 void loadFontFromData(
const byte *data, int32 dataSize);
72 int getNumChars()
const {
return _numChars; }
74 void drawFrame(
byte *dst,
int c,
int x,
int y,
int pitch = -1);
75 int draw2byte(
byte *buffer,
Common::Rect &clipRect,
int x,
int y,
int pitch, int16 col, uint16 chr);
76 int drawCharV7(
byte *buffer,
Common::Rect &clipRect,
int x,
int y,
int pitch, int16 col, TextStyleFlags flags,
byte chr,
bool hardcodedColors =
false,
bool smushColorMode =
false);
78 int getCharWidth(
byte c)
const;
79 int getCharHeight(
byte c)
const;
80 int16 getCharXOffset(
byte c)
const {
return _chars[c].xoffs; }
81 int16 getCharYOffset(
byte c)
const {
return _chars[c].yoffs; }
82 const byte *getCharData(
byte c);
83 byte getCharTransparency(
byte c)
const {
return _chars[c].transparency; }
84 byte getBpp()
const {
return 8; }
86 int getFontHeight()
const {
return _fontHeight; }