diff options
Diffstat (limited to 'engines/sci/graphics/view.h')
-rw-r--r-- | engines/sci/graphics/view.h | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/engines/sci/graphics/view.h b/engines/sci/graphics/view.h index a2050dc9d5..990a7e2f71 100644 --- a/engines/sci/graphics/view.h +++ b/engines/sci/graphics/view.h @@ -30,6 +30,7 @@ namespace Sci { struct CelInfo { int16 width, height; + int16 scriptWidth, scriptHeight; int16 displaceX; int16 displaceY; byte clearKey; @@ -60,39 +61,53 @@ public: GfxView(ResourceManager *resMan, GfxScreen *screen, GfxPalette *palette, GuiResourceId resourceId); ~GfxView(); - GuiResourceId getResourceId(); - int16 getWidth(int16 loopNo, int16 celNo); - int16 getHeight(int16 loopNo, int16 celNo); - CelInfo *getCelInfo(int16 loopNo, int16 celNo); - LoopInfo *getLoopInfo(int16 loopNo); - void getCelRect(int16 loopNo, int16 celNo, int16 x, int16 y, int16 z, Common::Rect *outRect); - void getCelScaledRect(int16 loopNo, int16 celNo, int16 x, int16 y, int16 z, int16 scaleX, int16 scaleY, Common::Rect *outRect); - byte *getBitmap(int16 loopNo, int16 celNo); - void draw(Common::Rect rect, Common::Rect clipRect, Common::Rect clipRectTranslated, int16 loopNo, int16 celNo, byte priority, uint16 EGAmappingNr, bool upscaledHires); - void drawScaled(Common::Rect rect, Common::Rect clipRect, Common::Rect clipRectTranslated, int16 loopNo, int16 celNo, byte priority, int16 scaleX, int16 scaleY); + GuiResourceId getResourceId() const; + int16 getWidth(int16 loopNo, int16 celNo) const; + int16 getHeight(int16 loopNo, int16 celNo) const; + const CelInfo *getCelInfo(int16 loopNo, int16 celNo) const; + void getCelRect(int16 loopNo, int16 celNo, int16 x, int16 y, int16 z, Common::Rect &outRect) const; + void getCelScaledRect(int16 loopNo, int16 celNo, int16 x, int16 y, int16 z, int16 scaleX, int16 scaleY, Common::Rect &outRect) const; + const byte *getBitmap(int16 loopNo, int16 celNo); + void draw(const Common::Rect &rect, const Common::Rect &clipRect, const Common::Rect &clipRectTranslated, int16 loopNo, int16 celNo, byte priority, uint16 EGAmappingNr, bool upscaledHires); + void drawScaled(const Common::Rect &rect, const Common::Rect &clipRect, const Common::Rect &clipRectTranslated, int16 loopNo, int16 celNo, byte priority, int16 scaleX, int16 scaleY); uint16 getLoopCount() const { return _loopCount; } - uint16 getCelCount(int16 loopNo); + uint16 getCelCount(int16 loopNo) const; Palette *getPalette(); + bool isScaleable(); + bool isSci2Hires(); + private: void initData(GuiResourceId resourceId); void unpackCel(int16 loopNo, int16 celNo, byte *outPtr, uint32 pixelCount); void unditherBitmap(byte *bitmap, int16 width, int16 height, byte clearKey); ResourceManager *_resMan; + GfxCoordAdjuster *_coordAdjuster; GfxScreen *_screen; GfxPalette *_palette; GuiResourceId _resourceId; Resource *_resource; byte *_resourceData; + int _resourceSize; uint16 _loopCount; LoopInfo *_loop; bool _embeddedPal; Palette _viewPalette; + // set for SCI2 views in gk1/windows, means that views are hires and should be handled accordingly + bool _isSci2Hires; + byte *_EGAmapping; + + // this is set for sci0early to adjust for the getCelRect() change + int16 _adjustForSci0Early; + + // this is not set for some views in laura bow 2 floppy and signals that the view shall never get scaled + // even if scaleX/Y are set (inside kAnimate) + bool _isScaleable; }; } // End of namespace Sci |