diff options
author | Max Horn | 2002-12-25 20:07:09 +0000 |
---|---|---|
committer | Max Horn | 2002-12-25 20:07:09 +0000 |
commit | 5c39a82633fd158fe40ae107160b07da699ef169 (patch) | |
tree | 007e43c86b2232447d132c4a1b994d8cee2da6ed /scumm/nut_renderer.h | |
parent | 5f5e96e24f9864c185846a9257b61ea26dc51a34 (diff) | |
download | scummvm-rg350-5c39a82633fd158fe40ae107160b07da699ef169.tar.gz scummvm-rg350-5c39a82633fd158fe40ae107160b07da699ef169.tar.bz2 scummvm-rg350-5c39a82633fd158fe40ae107160b07da699ef169.zip |
two good rules of thumb: don't use typecasts if you don't have to - type cast have a nasty habit of hiding and causing problems. When a method takes a pointer argument, if possible make it const. :-). Cleanup. Fixed font rendering in CMI: you need to call updateDirtyRect() if you modify the screen...
svn-id: r6143
Diffstat (limited to 'scumm/nut_renderer.h')
-rw-r--r-- | scumm/nut_renderer.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scumm/nut_renderer.h b/scumm/nut_renderer.h index 57fd7e5b4c..3c349a6f8c 100644 --- a/scumm/nut_renderer.h +++ b/scumm/nut_renderer.h @@ -1,5 +1,4 @@ /* ScummVM - Scumm Interpreter - * Copyright (C) 2001 Ludvig Strigeus * Copyright (C) 2001/2002 The ScummVM project * * This program is free software; you can redistribute it and/or @@ -24,8 +23,11 @@ #include "common/file.h" +class Scumm; + class NutRenderer { private: + Scumm *_vm; int32 _offsets[256]; byte _tmpCodecBuffer[2000]; byte *_dataSrc; @@ -37,13 +39,13 @@ private: void decodeCodec44(byte *dst, byte *src, uint32 length); public: - NutRenderer(); + NutRenderer(Scumm *vm); ~NutRenderer(); void bindDisplay(byte *dst, int32 width, int32 height, int32 pitch); - bool loadFont(char *filename, char *dir); + bool loadFont(const char *filename, const char *dir); void drawChar(char c, int32 x, int32 y, byte color); - void drawString(char *string, int32 x, int32 y, byte color, int32 mode); + void drawString(const char *string, int32 x, int32 y, byte color, int32 mode); int32 getCharWidth(char c); int32 getCharHeight(char c); int32 getStringWidth(char *string); |