aboutsummaryrefslogtreecommitdiff
path: root/engines/dm/gfx.h
diff options
context:
space:
mode:
authorWinterGrascph2016-05-05 18:11:11 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit77cd7df08d31aecaae7390f7f12151f82e47dbac (patch)
tree254f66742842d73a8699d821cfed333fbe354f65 /engines/dm/gfx.h
parent4a8b34e993729dd90d12b1717977d8c4945e9325 (diff)
downloadscummvm-rg350-77cd7df08d31aecaae7390f7f12151f82e47dbac.tar.gz
scummvm-rg350-77cd7df08d31aecaae7390f7f12151f82e47dbac.tar.bz2
scummvm-rg350-77cd7df08d31aecaae7390f7f12151f82e47dbac.zip
DM: Add support for drawing portions of bitmaps
Create Frame structure and drawFrame(..) convenience method, also DisplayMan unpacks all the bitmaps with unpackGraphics()
Diffstat (limited to 'engines/dm/gfx.h')
-rw-r--r--engines/dm/gfx.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h
index acdabfa77c..f52381e3a4 100644
--- a/engines/dm/gfx.h
+++ b/engines/dm/gfx.h
@@ -6,6 +6,8 @@
namespace DM {
+struct Frame;
+
enum dmPaletteEnum {
palSwoosh = 0,
palMousePointer = 1,
@@ -27,22 +29,34 @@ class DisplayMan {
uint16 _screenHeight;
byte *_vgaBuffer;
uint16 _itemCount;
- uint32 *_indexBytePos;
- uint8 *_compressedData;
+ // TODO: will probably be redundant
+ uint32 *_packedItemPos;
+ // TODO: will probably be reundant
+ byte *_packedBitmaps; // TODO: this doesn't not contaion graphics exclusively, will have to be moved
DisplayMan(const DisplayMan &other); // no implementation on purpose
void operator=(const DisplayMan &rhs); // no implementation on purpose
+
+
+ byte **_unpackedBitmaps;
+ void unpackGraphics();
+ void drawFrame(Frame &f);
public:
DisplayMan(DMEngine *dmEngine);
~DisplayMan();
void setUpScreens(uint16 width, uint16 height);
void loadGraphics();
void loadPalette(dmPaletteEnum palette);
+ // TODO: will probably be redundant with public visibility
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);
+ void DisplayMan::blitToBitmap(byte *srcBitmap, uint16 srcFromX, uint16 srcToX, uint16 srcFromY, uint16 srcToY,
+ int16 srcWidth, uint16 destX, uint16 destY, byte *destBitmap, uint16 destWidth);
+ inline void DisplayMan::blitToScreen(byte *srcBitmap, uint16 srcFromX, uint16 srcToX, uint16 srcFromY, uint16 srcToY,
+ int16 srcWidth, uint16 destX, uint16 destY);
byte *getCurrentVgaBuffer();
void updateScreen();
+ void drawDungeon();
};
}