DIRECTOR: LINGO: Implement kTheModified field in CastMember::getField()

This commit is contained in:
Pragyansh Chaturvedi (r41k0u) 2022-06-14 08:47:31 +05:30 committed by Eugene Sandulenko
parent fdfd91fd7f
commit 761c99cbd8
3 changed files with 10 additions and 2 deletions

View File

@ -48,6 +48,7 @@ CastMember::CastMember(Cast *cast, uint16 castId, Common::SeekableReadStreamEndi
_flags1 = 0;
_modified = true;
_isChanged = false;
_objType = kCastMemberObj;
@ -59,6 +60,12 @@ CastMemberInfo *CastMember::getInfo() {
return _cast->getCastMemberInfo(_castId);
}
void CastMember::setModified(bool modified) {
_modified = modified;
if (modified)
_isChanged = true;
}
/////////////////////////////////////
// Bitmap

View File

@ -73,7 +73,7 @@ public:
virtual bool isEditable() { return false; }
virtual void setEditable(bool editable) {}
virtual bool isModified() { return _modified; }
virtual void setModified(bool modified) { _modified = modified; }
void setModified(bool modified);
virtual Graphics::MacWidget *createWidget(Common::Rect &bbox, Channel *channel, SpriteType spriteType) { return nullptr; }
virtual void updateWidget(Graphics::MacWidget *widget, Channel *channel) {}
virtual void updateFromWidget(Graphics::MacWidget *widget) {}
@ -112,6 +112,7 @@ protected:
// a link to the widget we created, we may use it later
Graphics::MacWidget *_widget;
bool _modified;
bool _isChanged;
};
class BitmapCastMember : public CastMember {

View File

@ -676,7 +676,7 @@ Datum CastMember::getField(int field) {
d = 1; // Not loaded handled in Lingo::getTheCast
break;
case kTheModified:
warning("STUB: CastMember::getField():: Unprocessed getting field \"%s\" of cast %d", g_lingo->field2str(field), _castId);
d = (int)_isChanged;
break;
case kTheName:
if (castInfo)