diff options
author | Johannes Schickel | 2010-10-13 03:57:44 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-10-13 03:57:44 +0000 |
commit | 75e8452b6e6a2bf4fb2f588aa00b428a60d873b5 (patch) | |
tree | f29541d55309487a94bd1d38e8b53bb3dde9aec6 /engines/scumm/scumm.h | |
parent | 48ee83b88957dab86bc763e9ef21a70179fa8679 (diff) | |
parent | e9f50882ea5b6beeefa994040be9d3bab6a1f107 (diff) | |
download | scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.gz scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.bz2 scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.zip |
OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend
changes into the branch. I suppose the gp2x backend and probably all new
backends, i.e. gph, dingux etc., might not compile anymore.
Since I have no way of testing those it would be nice if porters could look
into getting those up to speed in this branch.
svn-id: r53399
Diffstat (limited to 'engines/scumm/scumm.h')
-rw-r--r-- | engines/scumm/scumm.h | 51 |
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 |