diff options
author | WinterGrascph | 2016-05-06 18:13:23 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 64371787e28fba114dc5dff27c5c7d61bb2bc293 (patch) | |
tree | cc02edbc22855694f2fb4b57fa68d7e9e178438a /engines/dm/gfx.h | |
parent | c725fdec9eececc155d0c39bf905910100baeea0 (diff) | |
download | scummvm-rg350-64371787e28fba114dc5dff27c5c7d61bb2bc293.tar.gz scummvm-rg350-64371787e28fba114dc5dff27c5c7d61bb2bc293.tar.bz2 scummvm-rg350-64371787e28fba114dc5dff27c5c7d61bb2bc293.zip |
DM: Rewrite blitting methods, revise FRAME POD
Diffstat (limited to 'engines/dm/gfx.h')
-rw-r--r-- | engines/dm/gfx.h | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h index 39cfff9783..f4d74abba3 100644 --- a/engines/dm/gfx.h +++ b/engines/dm/gfx.h @@ -41,6 +41,8 @@ enum dmPaletteEnum { }; + + class DisplayMan { DMEngine *_vm; dmPaletteEnum _currPalette; @@ -48,39 +50,44 @@ class DisplayMan { uint16 _screenHeight; byte *_vgaBuffer; uint16 _itemCount; - // 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; + byte **_bitmaps; + byte *getCurrentVgaBuffer(); + void loadIntoBitmap(uint16 index, byte *destBitmap); void unpackGraphics(); - void drawFrameToScreen(byte *bitmap, Frame &f, Color transparent); - void drawFrameToBitMap(byte *bitmap, Frame &f, Color transparent, byte *destBitmap, uint16 destWidth); + void drawWallSetBitmap(byte *bitmap, Frame &f, uint16 srcWidth); 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 DisplayMan::blitToBitmap(byte *srcBitmap, uint16 srcFromX, uint16 srcToX, uint16 srcFromY, uint16 srcToY, - int16 srcWidth, uint16 destX, uint16 destY, byte *destBitmap, uint16 destWidth, Color transparent = colorNoTransparency); - void DisplayMan::blitToScreen(byte *srcBitmap, uint16 srcFromX, uint16 srcToX, uint16 srcFromY, uint16 srcToY, - int16 srcWidth, uint16 destX, uint16 destY, Color transparent = colorNoTransparency); - void flipBitmapVertical(byte *bitmap, uint16 width, uint16 height); + + /// Gives the width of an IMG0 type item + uint16 width(uint16 index); + /// Gives the height of an IMG1 type item + uint16 height(uint16 index); + + void blitToBitmap(byte *srcBitmap, uint16 srcWidth, uint16 srcX, uint16 srcY, + byte *destBitmap, uint16 destWidth, + uint16 destFromX, uint16 destToX, uint16 destFromY, uint16 destToY, + Color transparent = colorNoTransparency); + void blitToBitmap(byte *srcBitmap, uint16 srcWidth, uint16 srcHeight, byte *destBitmap, uint16 destWidth, uint16 destX = 0, uint16 destY = 0); + void blitToScreen(byte *srcBitmap, uint16 srcWidth, uint16 srcX, uint16 srcY, + uint16 destFromX, uint16 destToX, uint16 destFromY, uint16 destToY, + Color transparent = colorNoTransparency); + void flipBitmapHorizontal(byte *bitmap, uint16 width, uint16 height); + void flipBitmapVertical(byte *bitmap, uint16 width, uint16 height); + void clearBitmap(byte *bitmap, uint16 width, uint16 height, Color color); - byte *getCurrentVgaBuffer(); - void updateScreen(); - void drawDungeon(); void clearScreen(Color color); + void drawDungeon(direction dir, uint16 posX, uint16 posY); + void updateScreen(); }; } |