aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorJohannes Schickel2011-02-15 23:40:06 +0100
committerJohannes Schickel2011-02-15 23:42:50 +0100
commita02454644af514c4f50b861cc718e2951d4c46dd (patch)
treee6385482a68f330f412e87aa33b049b4f5912911 /engines/sci/graphics
parent01d511bf1b6df74254a2f6bd3007e884cd0c0dde (diff)
parent369db4fdfd5dac16858505f91cb37f4ae386fe80 (diff)
downloadscummvm-rg350-a02454644af514c4f50b861cc718e2951d4c46dd.tar.gz
scummvm-rg350-a02454644af514c4f50b861cc718e2951d4c46dd.tar.bz2
scummvm-rg350-a02454644af514c4f50b861cc718e2951d4c46dd.zip
Merge branch 'master' into osystem-palette
Conflicts: backends/platform/wii/osystem_gfx.cpp
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/frameout.cpp11
-rw-r--r--engines/sci/graphics/frameout.h3
2 files changed, 14 insertions, 0 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 5b690f289a..ab4a2c9c1a 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -58,6 +58,12 @@ GfxFrameout::GfxFrameout(SegManager *segMan, ResourceManager *resMan, GfxCoordAd
GfxFrameout::~GfxFrameout() {
}
+void GfxFrameout::clear() {
+ _screenItems.clear();
+ _planes.clear();
+ _planePictures.clear();
+}
+
void GfxFrameout::kernelAddPlane(reg_t object) {
PlaneEntry newPlane;
@@ -584,6 +590,11 @@ void GfxFrameout::kernelFrameout() {
uint16 startX = itemEntry->x + it->planeRect.left;
uint16 curY = itemEntry->y + it->planeRect.top;
const char *txt = text.c_str();
+ // HACK. The plane sometimes doesn't contain the correct width. This
+ // hack breaks the dialog options when speaking with Grace, but it's
+ // the best we got up to now.
+ // TODO: Remove this, and figure out why the plane in question isn't
+ // initialized correctly (its width is 0).
uint16 w = it->planeRect.width() >= 20 ? it->planeRect.width() : _screen->getWidth() - 10;
int16 charCount;
diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h
index 93d61ba22e..347ecb9424 100644
--- a/engines/sci/graphics/frameout.h
+++ b/engines/sci/graphics/frameout.h
@@ -28,6 +28,8 @@
namespace Sci {
+class GfxPicture;
+
struct PlaneEntry {
reg_t object;
uint16 priority;
@@ -99,6 +101,7 @@ public:
void addPlanePicture(reg_t object, GuiResourceId pictureId, uint16 startX);
void deletePlanePictures(reg_t object);
+ void clear();
private:
SegManager *_segMan;