From 9dfce6ec117d13d45c3a1aadf98aa58f21c5c314 Mon Sep 17 00:00:00 2001 From: djsrv Date: Fri, 16 Jul 2021 23:18:23 -0400 Subject: [PATCH] DIRECTOR: Add FIXME comments to Sprite::setCast --- engines/director/sprite.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engines/director/sprite.cpp b/engines/director/sprite.cpp index ab9f5e01c11..0df655aaf1a 100644 --- a/engines/director/sprite.cpp +++ b/engines/director/sprite.cpp @@ -229,7 +229,8 @@ void Sprite::setCast(CastMemberID memberID) { // WORKAROUND: In D2/D3 there can be text casts that have button // information set in the sprite. warning("Sprite::setCast(): Working around D2/3 button glitch"); - + // FIXME: We should not override the cast member's type here. + // We should only change how the sprite renders. _cast->_type = kCastButton; ((TextCastMember *)_cast)->_buttonType = (ButtonType)(_spriteType - 8); } @@ -253,6 +254,8 @@ void Sprite::setCast(CastMemberID memberID) { // this happens in warlock-mac data/stambul/c up if (_spriteType == kBitmapSprite && _cast->_type != kCastBitmap) { warning("Sprite::setCast(): sprite type doesn't match cast type, setting cast member to null"); + // FIXME: We should still set the cast number but not render + // the sprite if the types conflict. _cast = nullptr; _castId = CastMemberID(); }