diff options
author | WinterGrascph | 2016-05-02 20:58:55 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 055e789d0461f881b13cb4fe6e3331b1872eb633 (patch) | |
tree | b186ad7347159fee50d36a26e9dca335a17085d3 /engines/dm/gfx.h | |
parent | 5ae7d3a84b04336b65b93e2efe1c988c795e1752 (diff) | |
download | scummvm-rg350-055e789d0461f881b13cb4fe6e3331b1872eb633.tar.gz scummvm-rg350-055e789d0461f881b13cb4fe6e3331b1872eb633.tar.bz2 scummvm-rg350-055e789d0461f881b13cb4fe6e3331b1872eb633.zip |
DM: Create DisplayMan, add support parsing IMG0 files
Add display manager named DisplayMan with functions: setUpScreens(),
loadGraphics() (which loads graphics from the graphics.dat file),
setPalette(..), loadIntoBitmap(..) which loads the requested image into a
bitmap and blitToScreen(..)
Diffstat (limited to 'engines/dm/gfx.h')
-rw-r--r-- | engines/dm/gfx.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h new file mode 100644 index 0000000000..91cf7e1ca2 --- /dev/null +++ b/engines/dm/gfx.h @@ -0,0 +1,38 @@ +#ifndef GFX_H +#define GFX_H + +#include "common/scummsys.h" +#include "dm/dm.h" + +namespace DM { + +class DisplayMan { + DMEngine *_vm; + byte *_currPalette; + uint16 _screenWidth; + uint16 _screenHeight; + byte *_vgaBuffer; + uint16 _itemCount; + uint32 *_indexBytePos; + uint8 *_compressedData; + DisplayMan(const DMEngine &dmEngine); // no implementation on purpose + void operator=(const DisplayMan &rhs); // no implementation on purpose +public: + DisplayMan(DMEngine *dmEngine); + ~DisplayMan(); + void setUpScreens(uint16 width, uint16 height); + void loadGraphics(); + void setPalette(byte *buff, uint16 colorCount); + void loadIntoBitmap(uint16 index, byte *destBitmap); + uint16 getImageWidth(uint16 index); + uint16 getImageHeight(uint16 index); + void blitToScreen(byte *srcBitmap, uint16 srcWidth, uint16 srcHeight, uint16 destX, uint16 destY); + byte *getCurrentVgaBuffer(); + void updateScreen(); +}; + +} + + + +#endif |