ZVISION: Remove duplicate blitting code for images and animations
This commit is contained in:
parent
2becc76d5c
commit
db37cfb1b0
5 changed files with 37 additions and 72 deletions
|
@ -566,6 +566,12 @@ ActionPreloadAnimation::ActionPreloadAnimation(ZVision *engine, int32 slotkey, c
|
|||
// The two %*u are usually 0 and dont seem to have a use
|
||||
sscanf(line.c_str(), "%24s %*u %*u %d %d", fileName, &_mask, &_framerate);
|
||||
|
||||
// Mask 0 means "no transparency" in this case. Since we use a common blitting
|
||||
// code for images and animations, we set it to -1 to avoid confusion with
|
||||
// color 0, which is used as a mask in some images
|
||||
if (_mask == 0)
|
||||
_mask = -1;
|
||||
|
||||
_fileName = Common::String(fileName);
|
||||
}
|
||||
|
||||
|
@ -628,6 +634,12 @@ ActionPlayAnimation::ActionPlayAnimation(ZVision *engine, int32 slotkey, const C
|
|||
"%24s %u %u %u %u %u %u %d %*u %*u %d %d",
|
||||
fileName, &_x, &_y, &_x2, &_y2, &_start, &_end, &_loopCount, &_mask, &_framerate);
|
||||
|
||||
// Mask 0 means "no transparency" in this case. Since we use a common blitting
|
||||
// code for images and animations, we set it to -1 to avoid confusion with
|
||||
// color 0, which is used as a mask in some images
|
||||
if (_mask == 0)
|
||||
_mask = -1;
|
||||
|
||||
_fileName = Common::String(fileName);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue