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/gfx.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/gfx.h')
-rw-r--r-- | engines/scumm/gfx.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h index cdb473a67c..c6062ef9be 100644 --- a/engines/scumm/gfx.h +++ b/engines/scumm/gfx.h @@ -26,6 +26,9 @@ #ifndef SCUMM_GFX_H #define SCUMM_GFX_H +#include "common/system.h" +#include "common/list.h" + #include "graphics/surface.h" namespace Scumm { @@ -421,6 +424,66 @@ public: }; #endif +#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE +// Helper class for FM-Towns output (required for specific hardware effects like +// switching graphics layers on and off). +class TownsScreen { +public: + TownsScreen(OSystem *system, int width, int height, int bpp); + ~TownsScreen(); + + void setupLayer(int layer, int width, int height, int numCol, void *srcPal = 0); + void clearLayer(int layer); + void fillLayerRect(int layer, int x, int y, int w, int h, int col); + //void copyRectToLayer(int layer, int x, int y, int w, int h, const uint8 *src); + + uint8 *getLayerPixels(int layer, int x, int y); + int getLayerPitch(int layer); + int getLayerHeight(int layer); + int getLayerBpp(int layer); + int getLayerScaleW(int layer); + int getLayerScaleH(int layer); + + void addDirtyRect(int x, int y, int w, int h); + void toggleLayers(int flag); + void update(); + +private: + void updateOutputBuffer(); + void outputToScreen(); + uint16 calc16BitColor(const uint8 *palEntry); + + struct TownsScreenLayer { + uint8 *pixels; + uint8 *palette; + int pitch; + int height; + int bpp; + int numCol; + uint8 scaleW; + uint8 scaleH; + bool onBottom; + bool enabled; + bool ready; + + uint16 *bltInternX; + uint8 **bltInternY; + uint16 *bltTmpPal; + } _layers[2]; + + uint8 *_outBuffer; + + int _height; + int _width; + int _pitch; + int _bpp; + + int _numDirtyRects; + Common::List<Common::Rect> _dirtyRects; + OSystem *_system; +}; +#endif // DISABLE_TOWNS_DUAL_LAYER_MODE + } // End of namespace Scumm #endif |