aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/director/score.cpp22
-rw-r--r--engines/director/score.h11
2 files changed, 21 insertions, 12 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 3fb8e98577..86cd5c6127 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -528,7 +528,8 @@ void Score::processEvents() {
}
Frame::Frame() {
- _transFlags = 0;
+ _transDuration = 0;
+ _transArea = 0;
_transChunkSize = 0;
_tempo = 0;
@@ -550,7 +551,8 @@ Frame::Frame() {
Frame::Frame(const Frame &frame) {
_actionId = frame._actionId;
- _transFlags = frame._transFlags;
+ _transArea = frame._transArea;
+ _transDuration = frame._transDuration;
_transType = frame._transType;
_transChunkSize = frame._transChunkSize;
_tempo = frame._tempo;
@@ -607,9 +609,15 @@ void Frame::readMainChannels(Common::SeekableReadStream &stream, uint16 offset,
_soundType1 = stream.readByte();
offset++;
break;
- case kTransFlagsPosition:
- _transFlags = stream.readByte();
+ case kTransFlagsPosition: {
+ uint8 transFlags = stream.readByte();
+ if (transFlags & 0x80)
+ _transArea = 1;
+ else
+ _transArea = 0;
+ _transDuration = transFlags & 0x7f;
offset++;
+ }
break;
case kTransChunkSizePosition:
_transChunkSize = stream.readByte();
@@ -721,7 +729,7 @@ void Frame::prepareFrame(Archive &_movie, Graphics::ManagedSurface &surface, Gra
renderSprites(_movie, surface, movieRect, false);
renderSprites(_movie, trailSurface, movieRect, true);
if (_transType != 0)
- playTranisition();
+ playTransition();
if (_sound1 != 0 || _sound2 != 0) {
playSoundChannel();
}
@@ -733,8 +741,8 @@ void Frame::playSoundChannel() {
debug(0, "Sound1 %d", _sound1);
}
-void Frame::playTranisition() {
- warning("STUB: playTranisition(%d, %d, %d)", _transType, _transFlags, _transChunkSize);
+void Frame::playTransition() {
+ warning("STUB: playTransition(%d, %d, %d)", _transType, _transDuration, _transChunkSize);
}
void Frame::renderSprites(Archive &_movie, Graphics::ManagedSurface &surface, Common::Rect movieRect, bool renderTrail) {
diff --git a/engines/director/score.h b/engines/director/score.h
index b68cc40d55..1b64ccab39 100644
--- a/engines/director/score.h
+++ b/engines/director/score.h
@@ -234,20 +234,20 @@ public:
~Frame();
Frame(const Frame &frame);
void readChannel(Common::SeekableReadStream &stream, uint16 offset, uint16 size);
- void prepareFrame(Archive &_movie, Graphics::ManagedSurface &surface, Common::Rect movieRect);
+ void prepareFrame(Archive &_movie, Graphics::ManagedSurface &surface, Graphics::ManagedSurface &trailSurface, Common::Rect movieRect);
uint16 getSpriteIDFromPos(Common::Point pos);
private:
- void playTranisition();
+ void playTransition();
void playSoundChannel();
- void renderSprites(Archive &_movie, Graphics::ManagedSurface &surface, Common::Rect movieRect);
- void renderTrailSprites(Archive &_movie, Graphics::ManagedSurface &surface, Common::Rect movieRect);
+ void renderSprites(Archive &_movie, Graphics::ManagedSurface &surface, Common::Rect movieRect, bool renderTrail);
void readSprite(Common::SeekableReadStream &stream, uint16 offset, uint16 size);
void readMainChannels(Common::SeekableReadStream &stream, uint16 offset, uint16 size);
void drawBackgndTransSprite(Graphics::ManagedSurface &target, const Graphics::Surface &sprite, Common::Rect &drawRect);
void drawMatteSprite(Graphics::ManagedSurface &target, const Graphics::Surface &sprite, Common::Rect &drawRect);
public:
uint8 _actionId;
- uint8 _transFlags;
+ uint8 _transDuration;
+ uint8 _transArea; //1 - Whole Stage, 0 - Changing Area
uint8 _transChunkSize;
transitionType _transType;
uint8 _tempo;
@@ -311,6 +311,7 @@ private:
uint16 _stageColor;
Archive *_movieArchive;
Graphics::ManagedSurface *_surface;
+ Graphics::ManagedSurface *_trailSurface;
Lingo *_lingo;
DirectorSound *_soundManager;
};