From 746258f882b74cea1c5d5a34ef6c67e0669cdf09 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Wed, 21 Oct 2009 12:59:10 +0000 Subject: Add patch from Tobias, for graphic support (backgrounds/objects) in PCE version of Loom, with minor changes. svn-id: r45304 --- engines/scumm/gfx.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'engines/scumm/gfx.h') diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h index 0910d9bc59..34ba63164c 100644 --- a/engines/scumm/gfx.h +++ b/engines/scumm/gfx.h @@ -301,6 +301,47 @@ public: virtual void roomChanged(byte *roomptr); }; +class GdiPCEngine : public Gdi { +protected: + struct { + uint16 nametable[4096], nametableObj[512]; + byte colortable[4096], colortableObj[512]; + byte attributes[64], attributesObj[64]; + uint16 masktable[4096], masktableObj[512]; + int objX; + bool hasmask; + int numTiles; + byte* tiles; + } _PCE; + +protected: + void decodePCEngineGfx(const byte *room); + void decodeStrip(const byte *ptr, uint16 *tiles, byte *colors, uint16 *masks, int dataWidth, int numRows, bool isObject); + void decodePCEngineTileData(const byte *ptr); + void decodePCEngineObject(const byte *ptr, int xpos, int ypos, int width, int height); + + void drawStripPCEngine(byte *dst, byte *mask, int dstPitch, int stripnr, int top, int height); + void drawStripPCEngineMask(byte *dst, int stripnr, int top, int height) const; + + virtual bool drawStrip(byte *dstPtr, VirtScreen *vs, + int x, int y, const int width, const int height, + int stripnr, const byte *smap_ptr); + + virtual void decodeMask(int x, int y, const int width, const int height, + int stripnr, int numzbuf, const byte *zplane_list[9], + bool transpStrip, byte flag, const byte *tmsk_ptr); + + virtual void prepareDrawBitmap(const byte *ptr, VirtScreen *vs, + const int x, const int y, const int width, const int height, + int stripnr, int numstrip); + +public: + GdiPCEngine(ScummEngine *vm); + ~GdiPCEngine(); + + virtual void roomChanged(byte *roomptr); +}; + class GdiV1 : public Gdi { protected: /** Render settings which are specific to the C64 graphic decoders. */ -- cgit v1.2.3