diff options
author | Max Horn | 2003-06-04 23:32:09 +0000 |
---|---|---|
committer | Max Horn | 2003-06-04 23:32:09 +0000 |
commit | 565a100c831fa76c634d210d636065042e96e49a (patch) | |
tree | 1f1095d138e660d8e5817041b58e6af08dd92cff /scumm/nut_renderer.h | |
parent | d84c5de8e8f5c630bdf5f7d1d9a85a4f52f3e9cd (diff) | |
download | scummvm-rg350-565a100c831fa76c634d210d636065042e96e49a.tar.gz scummvm-rg350-565a100c831fa76c634d210d636065042e96e49a.tar.bz2 scummvm-rg350-565a100c831fa76c634d210d636065042e96e49a.zip |
some cleanup & refactoring (CJK fonts have proper shadows now, for example); preparations to merge NutRenderer and SmushFont
svn-id: r8303
Diffstat (limited to 'scumm/nut_renderer.h')
-rw-r--r-- | scumm/nut_renderer.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/scumm/nut_renderer.h b/scumm/nut_renderer.h index 21f035a5cd..0aaf752a59 100644 --- a/scumm/nut_renderer.h +++ b/scumm/nut_renderer.h @@ -26,27 +26,33 @@ class Scumm; class NutRenderer { -private: +protected: Scumm *_vm; - int32 _offsets[256]; - byte _tmpCodecBuffer[2000]; - byte *_dataSrc; bool _initialized; bool _loaded; + int _nbChars; + struct { + int width; + int height; + byte *src; + } _chars[256]; - void decodeCodec44(byte *dst, byte *src, uint32 length); + void decodeCodec44(byte *dst, const byte *src, uint32 length); + + void draw2byte(int c, int x, int y, byte color, bool useMask); + void drawChar(byte c, int x, int y, byte color, bool useMask); public: NutRenderer(Scumm *vm); ~NutRenderer(); bool loadFont(const char *filename, const char *dir); - void draw2byte(int c, int32 x, int32 y, byte color, bool useMask); - void drawChar(byte c, int32 x, int32 y, byte color, bool useMask); -// void drawString(const char *string, int32 x, int32 y, byte color, int32 mode); - int32 getCharWidth(byte c); - int32 getCharHeight(byte c); - int32 getStringWidth(const byte *string); + + void drawShadowChar(int c, int x, int y, byte color, bool useMask); + + int getCharWidth(byte c); + int getCharHeight(byte c); + int getStringWidth(const byte *string); }; |