DIRECTOR: Introduced editable flag to sprites

This commit is contained in:
Eugene Sandulenko 2020-04-11 17:08:04 +02:00
parent fee1e8a30c
commit a2d7f975a1
3 changed files with 7 additions and 3 deletions

View File

@ -348,12 +348,13 @@ void Frame::readChannels(Common::ReadStreamEndian *stream) {
sprite._colorcode = stream->readByte();
sprite._blendAmount = stream->readByte();
sprite._moveable = ((sprite._colorcode & 0x80) == 0x80);
sprite._thickness = stream->readByte();
stream->readByte(); // unused
}
sprite._ink = static_cast<InkType>(sprite._inkData & 0x3f);
sprite._editable = ((sprite._colorcode & 0x40) == 0x40);
sprite._moveable = ((sprite._colorcode & 0x80) == 0x80);
if (sprite._inkData & 0x40)
sprite._trails = 1;

View File

@ -35,7 +35,8 @@ Sprite::Sprite() {
_height = 0;
_castId = 0;
_constraint = 0;
_moveable = 0;
_moveable = false;
_editable = false;
_castId = 0;
_castIndex = 0;
_backColor = 255;
@ -95,6 +96,7 @@ Sprite::Sprite(const Sprite &sprite) {
_constraint = sprite._constraint;
_moveable = sprite._moveable;
_editable = sprite._editable;
_blend = sprite._blend;
_startTime = sprite._startTime;
_thickness = sprite._thickness;

View File

@ -89,7 +89,8 @@ public:
// TODO: default constraint = 0, if turned on, sprite is constrainted to the bounding rect
// As i know, constrainted != 0 only if sprite moveable
byte _constraint;
byte _moveable;
bool _moveable;
bool _editable;
byte _backColor;
byte _foreColor;