aboutsummaryrefslogtreecommitdiff
path: root/scumm/scumm.h
diff options
context:
space:
mode:
authorMax Horn2002-12-25 21:04:47 +0000
committerMax Horn2002-12-25 21:04:47 +0000
commitfca9ec09e7709ff4400d2a9a7fd76f4f21781006 (patch)
tree2c9dd18841983469c4780c75d90762f8a167c048 /scumm/scumm.h
parentf1808d20ac90f4212fd14aeaf544a8aaac6a3fbc (diff)
downloadscummvm-rg350-fca9ec09e7709ff4400d2a9a7fd76f4f21781006.tar.gz
scummvm-rg350-fca9ec09e7709ff4400d2a9a7fd76f4f21781006.tar.bz2
scummvm-rg350-fca9ec09e7709ff4400d2a9a7fd76f4f21781006.zip
moved CharsetRendere into its own header/source file; changed Scumm::_charset into a pointer, to make it possible to use different implementations of it
svn-id: r6147
Diffstat (limited to 'scumm/scumm.h')
-rw-r--r--scumm/scumm.h57
1 files changed, 5 insertions, 52 deletions
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 1414ad16f2..57651b42ef 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -31,6 +31,7 @@
#include "common/timer.h"
#include "common/util.h"
+class CharsetRenderer;
class GameDetector;
class NewGui;
class Dialog;
@@ -175,56 +176,6 @@ enum {
#define _roomFileOffsets res.roomoffs[rtRoom]
-class CharsetRenderer {
-protected:
- byte _curId;
- byte *_fontPtr;
-
-public:
- Scumm *_vm;
- int _strLeft, _strRight, _strTop, _strBottom;
- int _nextLeft, _nextTop;
-
- int _top;
- int _left, _startLeft;
- byte _center;
- int _right;
- byte _color;
- bool _hasMask;
- bool _blitAlso;
-
- int _bufPos;
- bool _firstChar;
- bool _disableOffsX;
-
- bool _ignoreCharsetMask;
-
-protected:
- byte _bpp;
- uint32 _charOffs;
- byte *_charPtr;
- int _offsX, _offsY;
- int _virtScreenHeight;
-
- void drawBits(byte *dst, byte *mask, int drawTop, int width, int height, bool useMask);
-
-public:
- byte _colorMap[16];
- byte _buffer[512];
-
- void printChar(int chr);
- void printCharOld(int chr);
- int getSpacing(byte chr, byte *charset);
- int getStringWidth(int a, byte *str, int pos);
- void addLinebreaks(int a, byte *str, int pos, int maxwidth);
-
- void setCurID(byte id);
- int getCurID() { return _curId; }
-
- byte *getFontPtr() { return _fontPtr; }
- byte *getFontPtr(byte id);
-};
-
#define ARRAY_HDR_SIZE 6
struct ArrayHeader {
int16 dim1_size;
@@ -906,17 +857,17 @@ public:
/* String class */
- CharsetRenderer _charset;
+ CharsetRenderer *_charset;
byte _charsetColor;
bool _noSubtitles; // Skip all subtitles?
byte _charsetData[15][16];
+
void initCharset(int charset);
void restoreCharsetBg();
int hasCharsetMask(int x, int y, int x2, int y2);
void CHARSET_1();
void description();
void drawDescString(byte *msg);
- byte *_msgPtrToAdd;
byte *addMessageToStack(byte *msg);
void addIntToStack(int var);
void addVerbToStack(int var);
@@ -925,7 +876,9 @@ public:
void unkMessage1();
void unkMessage2();
void clearMsgQueue();
+
int _numInMsgStack;
+ byte *_msgPtrToAdd;
byte *_messagePtr;
int16 _talkDelay;
bool _keepText;