From 138c19f06f2830a4c5b549de4852597529a2c121 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 27 Feb 2016 15:00:55 +0200 Subject: SCI32: Remove two hacks for Torin, and document what happens instead --- engines/sci/graphics/compare.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'engines') diff --git a/engines/sci/graphics/compare.cpp b/engines/sci/graphics/compare.cpp index 716a366b7c..8333459b64 100644 --- a/engines/sci/graphics/compare.cpp +++ b/engines/sci/graphics/compare.cpp @@ -111,12 +111,10 @@ uint16 GfxCompare::kernelOnControl(byte screenMask, const Common::Rect &rect) { void GfxCompare::kernelSetNowSeen(reg_t objectReference) { GfxView *view = NULL; Common::Rect celRect(0, 0); + // TODO/FIXME: Torin's menu code tries to draw special views with an ID of 0xFFFF, which + // are not currently handled properly and cause a crash. These might be text views that + // are not properly implemented. GuiResourceId viewId = (GuiResourceId)readSelectorValue(_segMan, objectReference, SELECTOR(view)); - - // HACK: Ignore invalid views for now (perhaps unimplemented text views?) - if (viewId == 0xFFFF) // invalid view - return; - int16 loopNo = readSelectorValue(_segMan, objectReference, SELECTOR(loop)); int16 celNo = readSelectorValue(_segMan, objectReference, SELECTOR(cel)); int16 x = (int16)readSelectorValue(_segMan, objectReference, SELECTOR(x)); @@ -201,15 +199,9 @@ void GfxCompare::kernelBaseSetter(reg_t object) { GuiResourceId viewId = readSelectorValue(_segMan, object, SELECTOR(view)); int16 loopNo = readSelectorValue(_segMan, object, SELECTOR(loop)); int16 celNo = readSelectorValue(_segMan, object, SELECTOR(cel)); - - // HACK: Ignore invalid views for now (perhaps unimplemented text views?) - if (viewId == 0xFFFF) // invalid view - return; - uint16 scaleSignal = 0; - if (getSciVersion() >= SCI_VERSION_1_1) { + if (getSciVersion() >= SCI_VERSION_1_1) scaleSignal = readSelectorValue(_segMan, object, SELECTOR(scaleSignal)); - } Common::Rect celRect; -- cgit v1.2.3