aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/scumm.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/scumm.h')
-rw-r--r--engines/scumm/scumm.h51
1 files changed, 49 insertions, 2 deletions
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 8c3df21238..aef5cfbec7 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -43,6 +43,17 @@
#include "sound/mididrv.h"
+#ifdef __DS__
+/* This disables the dual layer mode which is used in FM-Towns versions
+ * of SCUMM games and which emulates the behaviour of the original code.
+ * The only purpose is code size reduction for certain backends.
+ * SCUMM 3 (FM-Towns) games will run in normal (DOS VGA) mode, which should
+ * work just fine in most situations. Some glitches might occur. SCUMM 5 games
+ * will not work without dual layer (and 16 bit color) support.
+ */
+#define DISABLE_TOWNS_DUAL_LAYER_MODE
+#endif
+
namespace GUI {
class Dialog;
}
@@ -70,6 +81,7 @@ class CharsetRenderer;
class IMuse;
class IMuseDigital;
class MusicEngine;
+class Player_Towns;
class ScummEngine;
class ScummDebugger;
class Serializer;
@@ -426,6 +438,7 @@ public:
IMuse *_imuse;
IMuseDigital *_imuseDigital;
MusicEngine *_musicEngine;
+ Player_Towns *_townsPlayer;
Sound *_sound;
VerbSlot *_verbs;
@@ -970,6 +983,7 @@ public:
Common::RenderMode _renderMode;
uint8 _bytesPerPixel;
+ uint8 _bytesPerPixelOutput;
protected:
ColorCycle _colorCycle[16]; // Palette cycles
@@ -1042,6 +1056,7 @@ protected:
void setRoomPalette(int pal, int room);
void setPCEPaletteFromPtr(const byte *ptr);
virtual void setPaletteFromPtr(const byte *ptr, int numcolor = -1);
+
virtual void setPalColor(int index, int r, int g, int b);
void setDirtyColors(int min, int max);
const byte *findPalInPals(const byte *pal, int index);
@@ -1075,7 +1090,7 @@ protected:
// Screen rendering
byte *_compositeBuf;
byte *_herculesBuf;
- byte *_fmtownsBuf;
+
virtual void drawDirtyScreenParts();
void updateDirtyScreen(VirtScreenNumber slot);
void drawStripToScreen(VirtScreen *vs, int x, int w, int t, int b);
@@ -1219,7 +1234,7 @@ protected:
void restoreCharsetBg();
void clearCharsetMask();
void clearTextSurface();
-
+
virtual void initCharset(int charset);
virtual void printString(int m, const byte *msg);
@@ -1395,6 +1410,38 @@ public:
// Exists both in V7 and in V72HE:
byte VAR_NUM_GLOBAL_OBJS;
+
+ // FM-Towns specific
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+public:
+ bool towns_isRectInStringBox(int x1, int y1, int x2, int y2);
+ byte _townsPaletteFlags;
+ byte _townsCharsetColorMap[16];
+
+protected:
+ void towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, int srcX, int srcY, int w, int h);
+#ifdef USE_RGB_COLOR
+ void towns_setPaletteFromPtr(const byte *ptr, int numcolor = -1);
+ void towns_setTextPaletteFromPtr(const byte *ptr);
+#endif
+ void towns_setupPalCycleField(int x1, int y1, int x2, int y2);
+ void towns_processPalCycleField();
+ void towns_resetPalCycleFields();
+ void towns_restoreCharsetBg();
+
+ Common::Rect _cyclRects[16];
+ int _numCyclRects;
+
+ Common::Rect _curStringRect;
+
+ byte _townsOverrideShadowColor;
+ byte _textPalette[48];
+ byte _townsClearLayerFlag;
+ byte _townsActiveLayerFlags;
+ static const uint8 _townsLayer2Mask[];
+
+ TownsScreen *_townsScreen;
+#endif // DISABLE_TOWNS_DUAL_LAYER_MODE
};
} // End of namespace Scumm