From 398d0ffceffc2dc1241b3f667c180573c288ccbf Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 14 May 2012 02:30:15 +0300 Subject: SCI: Check for object visibility, if an object defines it Fixes the inventory in GK1 --- engines/sci/graphics/frameout.h | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/sci/graphics/frameout.h') diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index 8c3cc261d5..a3d686c592 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -60,6 +60,7 @@ struct FrameoutEntry { GfxPicture *picture; int16 picStartX; int16 picStartY; + bool visible; }; typedef Common::List FrameoutList; -- cgit v1.2.3 From 6cda15ba8e57891471c53449433385f5992bce3a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 21 May 2012 01:29:30 +0300 Subject: SCI: Added two new debug commands, plane_list and plane_items These can be used to debug drawn items in SCI32 --- engines/sci/graphics/frameout.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/sci/graphics/frameout.h') diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index a3d686c592..ec4de62c0a 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -104,6 +104,8 @@ public: void addPlanePicture(reg_t object, GuiResourceId pictureId, uint16 startX, uint16 startY = 0); void deletePlanePictures(reg_t object); void clear(); + void printPlaneList(Console *con); + void printPlaneItemList(Console *con, reg_t planeObject); private: void showVideo(); -- cgit v1.2.3 From de3f6a19ed6ca98ad152f5038c1db1f70f2c72ed Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 7 Jun 2012 11:26:32 +0300 Subject: SCI: Initial implementation of kScrollWindow, used in some SCI21 games This is used in LSL6 hires and SQ6. This initial implementation is hackish and only works in SQ6 (nothing is shown in LSL6) --- engines/sci/graphics/frameout.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'engines/sci/graphics/frameout.h') diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index ec4de62c0a..2d2ca6546c 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -76,6 +76,15 @@ struct PlanePictureEntry { typedef Common::List PlanePictureList; +struct ScrollTextEntry { + reg_t bitmapHandle; + reg_t kWindow; + uint16 x; + uint16 y; +}; + +typedef Common::Array ScrollTextList; + class GfxCache; class GfxCoordAdjuster32; class GfxPaint32; @@ -104,6 +113,18 @@ public: void addPlanePicture(reg_t object, GuiResourceId pictureId, uint16 startX, uint16 startY = 0); void deletePlanePictures(reg_t object); void clear(); + + // Scroll text functions + void addScrollTextEntry(Common::String &text, reg_t kWindow, uint16 x, uint16 y, bool replace); + void showCurrentScrollText(); + void initScrollText(uint16 maxItems) { _maxScrollTexts = maxItems; } + void clearScrollTexts(); + void firstScrollText() { if (_scrollTexts.size() > 0) _curScrollText = 0; } + void lastScrollText() { if (_scrollTexts.size() > 0) _curScrollText = _scrollTexts.size() - 1; } + void prevScrollText() { if (_curScrollText > 0) _curScrollText--; } + void nextScrollText() { if (_curScrollText + 1 < (uint16)_scrollTexts.size()) _curScrollText++; } + void toggleScrollText(bool show) { _showScrollText = show; } + void printPlaneList(Console *con); void printPlaneItemList(Console *con, reg_t planeObject); @@ -127,6 +148,10 @@ private: FrameoutList _screenItems; PlaneList _planes; PlanePictureList _planePictures; + ScrollTextList _scrollTexts; + int16 _curScrollText; + bool _showScrollText; + uint16 _maxScrollTexts; void sortPlanes(); -- cgit v1.2.3 From dc11d223cdb156dd71300a8535cb5ab0940180c1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 9 Jun 2012 15:36:36 +0300 Subject: SCI: Initial implementation of AddLine, UpdateLine, DeleteLine --- engines/sci/graphics/frameout.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'engines/sci/graphics/frameout.h') diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index 2d2ca6546c..0d80a68f1d 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -27,6 +27,17 @@ namespace Sci { class GfxPicture; +struct PlaneLineEntry { + reg_t hunkId; + Common::Point startPoint; + Common::Point endPoint; + byte color; + byte priority; + byte control; +}; + +typedef Common::List PlaneLineList; + struct PlaneEntry { reg_t object; uint16 priority; @@ -40,6 +51,7 @@ struct PlaneEntry { Common::Rect upscaledPlaneClipRect; bool planePictureMirrored; byte planeBack; + PlaneLineList lines; }; typedef Common::List PlaneList; @@ -112,6 +124,9 @@ public: void addPlanePicture(reg_t object, GuiResourceId pictureId, uint16 startX, uint16 startY = 0); void deletePlanePictures(reg_t object); + reg_t addPlaneLine(reg_t object, Common::Point startPoint, Common::Point endPoint, byte color, byte priority, byte control); + void updatePlaneLine(reg_t object, reg_t hunkId, Common::Point startPoint, Common::Point endPoint, byte color, byte priority, byte control); + void deletePlaneLine(reg_t object, reg_t hunkId); void clear(); // Scroll text functions -- cgit v1.2.3 From 08124396035e8fd0996c9d347be3d606a58ecd1f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 22 Jun 2012 09:31:51 +0300 Subject: SCI: Simplify the SCI32 coordinate adjustment code --- engines/sci/graphics/frameout.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'engines/sci/graphics/frameout.h') diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index 0d80a68f1d..ecaf450d89 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -148,9 +148,6 @@ private: void createPlaneItemList(reg_t planeObject, FrameoutList &itemList); bool isPictureOutOfView(FrameoutEntry *itemEntry, Common::Rect planeRect, int16 planeOffsetX, int16 planeOffsetY); void drawPicture(FrameoutEntry *itemEntry, int16 planeOffsetX, int16 planeOffsetY, bool planePictureMirrored); - int16 upscaleHorizontalCoordinate(int16 coordinate); - int16 upscaleVerticalCoordinate(int16 coordinate); - Common::Rect upscaleRect(Common::Rect &rect); SegManager *_segMan; ResourceManager *_resMan; @@ -169,9 +166,6 @@ private: uint16 _maxScrollTexts; void sortPlanes(); - - uint16 _scriptsRunningWidth; - uint16 _scriptsRunningHeight; }; } // End of namespace Sci -- cgit v1.2.3 From 1a90ca5ecd9eeaaca3b6de79dd940e9b29e472aa Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 16 Jul 2012 11:49:50 +0300 Subject: SCI: Handle all negative priority values. Fixes graphics in the SQ6 demo --- engines/sci/graphics/frameout.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/sci/graphics/frameout.h') diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index ecaf450d89..5fd2824224 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -40,8 +40,8 @@ typedef Common::List PlaneLineList; struct PlaneEntry { reg_t object; - uint16 priority; - uint16 lastPriority; + int16 priority; + int16 lastPriority; int16 planeOffsetX; int16 planeOffsetY; GuiResourceId pictureId; -- cgit v1.2.3