aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/nut_renderer.h
diff options
context:
space:
mode:
authorTorbjörn Andersson2007-02-03 05:50:35 +0000
committerTorbjörn Andersson2007-02-03 05:50:35 +0000
commitea4053567806ab80037fdd5060503731e6991362 (patch)
tree1405ea18dc820b2eca8bcc2f9a434e3d05e21a26 /engines/scumm/nut_renderer.h
parent5395c4a2f4463ec2f3f9fdcc42d6f0a37f085620 (diff)
downloadscummvm-rg350-ea4053567806ab80037fdd5060503731e6991362.tar.gz
scummvm-rg350-ea4053567806ab80037fdd5060503731e6991362.tar.bz2
scummvm-rg350-ea4053567806ab80037fdd5060503731e6991362.zip
Applied the revised NUT font renderer patch #1635584, which combines cyx's
patch for correct (not to mention more efficient) rendering of CMI's shadowed letters, while retaining most of the memory savings of my original patch. This time, SMUSH and INSANE fonts also benefit from it. svn-id: r25345
Diffstat (limited to 'engines/scumm/nut_renderer.h')
-rw-r--r--engines/scumm/nut_renderer.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/engines/scumm/nut_renderer.h b/engines/scumm/nut_renderer.h
index 26a3f0a302..4fb01fc572 100644
--- a/engines/scumm/nut_renderer.h
+++ b/engines/scumm/nut_renderer.h
@@ -31,31 +31,41 @@ class ScummEngine;
class NutRenderer {
protected:
+
+ enum {
+ kDefaultTransparentColor = 0,
+ kSmush44TransparentColor = 2
+ };
+
ScummEngine *_vm;
- bool _bitmapFont;
int _numChars;
+ int _maxCharSize;
+ byte *_charBuffer;
byte *_decodedData;
+ byte *_paletteMap;
+ byte _bpp;
+ byte _palette[16];
struct {
uint16 width;
uint16 height;
byte *src;
+ byte transparency;
} _chars[256];
void codec1(byte *dst, const byte *src, int width, int height, int pitch);
void codec21(byte *dst, const byte *src, int width, int height, int pitch);
- void drawChar(const Graphics::Surface &s, byte c, int x, int y, byte color);
- void draw2byte(const Graphics::Surface &s, int c, int x, int y, byte color);
-
void loadFont(const char *filename);
+ byte *unpackChar(byte c);
public:
- NutRenderer(ScummEngine *vm, const char *filename, bool bitmap);
+ NutRenderer(ScummEngine *vm, const char *filename);
virtual ~NutRenderer();
int getNumChars() const { return _numChars; }
void drawFrame(byte *dst, int c, int x, int y);
- void drawShadowChar(const Graphics::Surface &s, int c, int x, int y, byte color, bool showShadow);
+ void drawChar(const Graphics::Surface &s, byte c, int x, int y, byte color);
+ void draw2byte(const Graphics::Surface &s, int c, int x, int y, byte color);
int getCharWidth(byte c) const;
int getCharHeight(byte c) const;