[Scummvm-git-logs] scummvm master -> 25dcbc3cf8318ed0b69a8f917ac23fe44fefb3e5
npjg
nathanael.gentrydb8 at gmail.com
Wed Jul 8 17:48:51 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8a85754f25 DIRECTOR: Move Channel to its own file
25dcbc3cf8 DIRECTOR: Move TransParams to stage
Commit: 8a85754f25e8320598ede0832fe2801b19b87ec1
https://github.com/scummvm/scummvm/commit/8a85754f25e8320598ede0832fe2801b19b87ec1
Author: Nathanael Gentry (nathanael.gentrydb8 at gmail.com)
Date: 2020-07-08T13:44:02-04:00
Commit Message:
DIRECTOR: Move Channel to its own file
Changed paths:
A engines/director/channel.cpp
A engines/director/channel.h
engines/director/events.cpp
engines/director/lingo/lingo-builtins.cpp
engines/director/lingo/lingo-code.cpp
engines/director/module.mk
engines/director/score.cpp
engines/director/score.h
engines/director/stage.cpp
diff --git a/engines/director/channel.cpp b/engines/director/channel.cpp
new file mode 100644
index 0000000000..4daa5a91ed
--- /dev/null
+++ b/engines/director/channel.cpp
@@ -0,0 +1,248 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "director/director.h"
+#include "director/movie.h"
+#include "director/score.h"
+#include "director/channel.h"
+#include "director/sprite.h"
+#include "director/castmember.h"
+
+#include "graphics/macgui/mactext.h"
+
+namespace Director {
+
+Channel::Channel(Sprite *sp) {
+ _sprite = sp;
+ _currentPoint = sp->_startPoint;
+ _delta = Common::Point(0, 0);
+ _constraint = 0;
+
+ _visible = true;
+ _dirty = true;
+
+ _sprite->updateCast();
+}
+
+Graphics::ManagedSurface *Channel::getSurface() {
+ if (_sprite->_cast && _sprite->_cast->_widget) {
+ return _sprite->_cast->_widget->getSurface();
+ } else {
+ return nullptr;
+ }
+}
+
+const Graphics::Surface *Channel::getMask(bool forceMatte) {
+ if (!_sprite->_cast)
+ return nullptr;
+
+ bool needsMatte = _sprite->_ink == kInkTypeMatte ||
+ _sprite->_ink == kInkTypeNotCopy ||
+ _sprite->_ink == kInkTypeNotTrans ||
+ _sprite->_ink == kInkTypeNotReverse ||
+ _sprite->_ink == kInkTypeNotGhost;
+
+ if (needsMatte || forceMatte) {
+ // Mattes are only supported in bitmaps for now. Shapes don't need mattes,
+ // as they already have all non-enclosed white pixels transparent.
+ // Matte on text has a trivial enough effect to not worry about implementing.
+ if (_sprite->_cast->_type == kCastBitmap) {
+ return ((BitmapCastMember *)_sprite->_cast)->getMatte();
+ } else {
+ return nullptr;
+ }
+ } else if (_sprite->_ink == kInkTypeMask) {
+ CastMember *member = g_director->getCurrentMovie()->getCastMember(_sprite->_castId + 1);
+
+ if (member && member->_initialRect == _sprite->_cast->_initialRect) {
+ return &member->_widget->getSurface()->rawSurface();
+ } else {
+ warning("Channel::getMask(): Requested cast mask, but no matching mask was found");
+ return nullptr;
+ }
+ }
+
+ return nullptr;
+}
+
+bool Channel::isDirty(Sprite *nextSprite) {
+ // When a sprite is puppeted setTheSprite ensures that the dirty flag here is
+ // set. Otherwise, we need to rerender when the position, bounding box, or
+ // cast of the sprite changes.
+ bool isDirty = _dirty ||
+ _delta != Common::Point(0, 0) ||
+ (_sprite->_cast && _sprite->_cast->isModified());
+
+ if (nextSprite) {
+ isDirty |= _sprite->_castId != nextSprite->_castId ||
+ _sprite->_ink != nextSprite->_ink ||
+ _sprite->getDims() != nextSprite->getDims() ||
+ (_currentPoint != nextSprite->_startPoint &&
+ !_sprite->_puppet && !_sprite->_moveable);
+ }
+
+ return isDirty;
+}
+
+Common::Rect Channel::getBbox() {
+ Common::Rect bbox = _sprite->getDims();
+ bbox.moveTo(getPosition());
+
+ return bbox;
+}
+
+void Channel::setClean(Sprite *nextSprite, int spriteId) {
+ if (!nextSprite)
+ return;
+
+ bool newSprite = (_sprite->_spriteType == kInactiveSprite && nextSprite->_spriteType != kInactiveSprite);
+ _dirty = false;
+
+ if (!_sprite->_puppet) {
+ _sprite = nextSprite;
+ _sprite->updateCast();
+
+ // Sprites marked moveable are constrained to the same bounding box until
+ // the moveable is disabled
+ if (!_sprite->_moveable || newSprite)
+ _currentPoint = _sprite->_startPoint;
+ }
+
+ _currentPoint += _delta;
+ _delta = Common::Point(0, 0);
+
+ if (_sprite->_cast && _sprite->_cast->_widget) {
+ Common::Point p(getPosition());
+ _sprite->_cast->_modified = false;
+ _sprite->_cast->_widget->_dims.moveTo(p.x, p.y);
+
+ _sprite->_cast->_widget->_priority = spriteId;
+ _sprite->_cast->_widget->draw();
+ _sprite->_cast->_widget->_contentIsDirty = false;
+ }
+}
+
+void Channel::addRegistrationOffset(Common::Point &pos) {
+ if (_sprite->_cast && _sprite->_cast->_type == kCastBitmap) {
+ BitmapCastMember *bc = (BitmapCastMember *)(_sprite->_cast);
+
+ pos += Common::Point(bc->_initialRect.left - bc->_regX,
+ bc->_initialRect.top - bc->_regY);
+ }
+}
+
+void Channel::addDelta(Common::Point pos) {
+ // TODO: Channel should have a pointer to its score
+ if (_sprite->_moveable &&
+ _constraint > 0 &&
+ _constraint < g_director->getCurrentMovie()->getScore()->_channels.size()) {
+ Common::Rect constraintBbox = g_director->getCurrentMovie()->getScore()->_channels[_constraint]->getBbox();
+
+ Common::Rect currentBbox = getBbox();
+ currentBbox.translate(_delta.x + pos.x, _delta.y + pos.y);
+
+ Common::Point regPoint;
+ addRegistrationOffset(regPoint);
+
+ constraintBbox.top += regPoint.y;
+ constraintBbox.bottom -= regPoint.y;
+
+ constraintBbox.left += regPoint.x;
+ constraintBbox.right -= regPoint.x;
+
+ if (!constraintBbox.contains(currentBbox)) {
+ if (currentBbox.top < constraintBbox.top) {
+ pos.y += constraintBbox.top - currentBbox.top;
+ } else if (currentBbox.bottom > constraintBbox.bottom) {
+ pos.y += constraintBbox.bottom - currentBbox.bottom;
+ }
+
+ if (currentBbox.left < constraintBbox.left) {
+ pos.x += constraintBbox.left - currentBbox.left;
+ } else if (currentBbox.right > constraintBbox.right) {
+ pos.x += constraintBbox.right - currentBbox.right;
+ }
+ }
+ }
+
+ _delta += pos;
+}
+
+Common::Point Channel::getPosition() {
+ Common::Point res = _currentPoint;
+ addRegistrationOffset(res);
+ return res;
+}
+
+MacShape *Channel::getShape() {
+ if (!_sprite->isQDShape() || (_sprite->_cast && _sprite->_cast->_type != kCastShape))
+ return nullptr;
+
+ MacShape *shape = new MacShape();
+
+ shape->ink = _sprite->_ink;
+ shape->spriteType = _sprite->_spriteType;
+ shape->foreColor = _sprite->_foreColor;
+ shape->backColor = _sprite->_backColor;
+ shape->lineSize = _sprite->_thickness & 0x3;
+ shape->pattern = _sprite->getPattern();
+
+ if (g_director->getVersion() >= 3 && shape->spriteType == kCastMemberSprite) {
+ if (!_sprite->_cast) {
+ warning("Channel::getShape(): kCastMemberSprite has no cast defined");
+ delete shape;
+ return nullptr;
+ }
+
+ ShapeCastMember *sc = (ShapeCastMember *)_sprite->_cast;
+ switch (sc->_shapeType) {
+ case kShapeRectangle:
+ shape->spriteType = sc->_fillType ? kRectangleSprite : kOutlinedRectangleSprite;
+ break;
+ case kShapeRoundRect:
+ shape->spriteType = sc->_fillType ? kRoundedRectangleSprite : kOutlinedRoundedRectangleSprite;
+ break;
+ case kShapeOval:
+ shape->spriteType = sc->_fillType ? kOvalSprite : kOutlinedOvalSprite;
+ break;
+ case kShapeLine:
+ shape->spriteType = sc->_lineDirection == 6 ? kLineBottomTopSprite : kLineTopBottomSprite;
+ break;
+ default:
+ break;
+ }
+
+ if (g_director->getVersion() > 3) {
+ shape->foreColor = sc->_fgCol;
+ shape->backColor = sc->_bgCol;
+ shape->lineSize = sc->_lineThickness;
+ shape->ink = sc->_ink;
+ }
+ }
+
+ // for outlined shapes, line thickness of 1 means invisible.
+ shape->lineSize -= 1;
+
+ return shape;
+}
+
+} // End of namespace Director
diff --git a/engines/director/channel.h b/engines/director/channel.h
new file mode 100644
index 0000000000..14ffc61a60
--- /dev/null
+++ b/engines/director/channel.h
@@ -0,0 +1,69 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef DIRECTOR_CHANNEL_H
+#define DIRECTOR_CHANNEL_H
+
+namespace Graphics {
+ struct Surface;
+ class ManagedSurface;
+}
+
+namespace Director {
+
+class Sprite;
+
+struct MacShape {
+ InkType ink;
+ byte spriteType;
+ byte foreColor;
+ byte backColor;
+ int lineSize;
+ uint pattern;
+};
+
+struct Channel {
+ Sprite *_sprite;
+
+ bool _dirty;
+ bool _visible;
+ uint _constraint;
+ Common::Point _currentPoint;
+ Common::Point _delta;
+
+ Channel(Sprite *sp);
+ bool isDirty(Sprite *nextSprite = nullptr);
+
+ void addRegistrationOffset(Common::Point &pos);
+ Common::Rect getBbox();
+ Common::Point getPosition();
+ MacShape *getShape();
+ Graphics::ManagedSurface *getSurface();
+ const Graphics::Surface *getMask(bool forceMatte = false);
+
+ void setClean(Sprite *nextSprite, int spriteId);
+ void addDelta(Common::Point pos);
+};
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/events.cpp b/engines/director/events.cpp
index c36a4abfa7..c46e8b07b2 100644
--- a/engines/director/events.cpp
+++ b/engines/director/events.cpp
@@ -27,6 +27,7 @@
#include "director/director.h"
#include "director/movie.h"
#include "director/score.h"
+#include "director/channel.h"
#include "director/sprite.h"
#include "director/stage.h"
#include "director/castmember.h"
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index e455c37249..ba81da1e89 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -33,6 +33,7 @@
#include "director/score.h"
#include "director/sound.h"
#include "director/sprite.h"
+#include "director/channel.h"
#include "director/stage.h"
#include "director/stxt.h"
#include "director/util.h"
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 15e655acb5..57a9986ec8 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -46,6 +46,7 @@
#include "director/director.h"
#include "director/movie.h"
#include "director/score.h"
+#include "director/channel.h"
#include "director/util.h"
#include "director/lingo/lingo.h"
#include "director/lingo/lingo-code.h"
diff --git a/engines/director/module.mk b/engines/director/module.mk
index 763d1a962e..2cc1df1a28 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -4,6 +4,7 @@ MODULE_OBJS = \
archive.o \
cast.o \
castmember.o \
+ channel.o \
detection.o \
director.o \
events.o \
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index c23b4be273..37c605c941 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -39,6 +39,7 @@
#include "director/frame.h"
#include "director/movie.h"
#include "director/sound.h"
+#include "director/channel.h"
#include "director/sprite.h"
#include "director/stage.h"
#include "director/util.h"
@@ -46,220 +47,6 @@
namespace Director {
-Channel::Channel(Sprite *sp) {
- _sprite = sp;
- _currentPoint = sp->_startPoint;
- _delta = Common::Point(0, 0);
- _constraint = 0;
-
- _visible = true;
- _dirty = true;
-
- _sprite->updateCast();
-}
-
-Graphics::ManagedSurface *Channel::getSurface() {
- if (_sprite->_cast && _sprite->_cast->_widget) {
- return _sprite->_cast->_widget->getSurface();
- } else {
- return nullptr;
- }
-}
-
-const Graphics::Surface *Channel::getMask(bool forceMatte) {
- if (!_sprite->_cast)
- return nullptr;
-
- bool needsMatte = _sprite->_ink == kInkTypeMatte ||
- _sprite->_ink == kInkTypeNotCopy ||
- _sprite->_ink == kInkTypeNotTrans ||
- _sprite->_ink == kInkTypeNotReverse ||
- _sprite->_ink == kInkTypeNotGhost;
-
- if (needsMatte || forceMatte) {
- // Mattes are only supported in bitmaps for now. Shapes don't need mattes,
- // as they already have all non-enclosed white pixels transparent.
- // Matte on text has a trivial enough effect to not worry about implementing.
- if (_sprite->_cast->_type == kCastBitmap) {
- return ((BitmapCastMember *)_sprite->_cast)->getMatte();
- } else {
- return nullptr;
- }
- } else if (_sprite->_ink == kInkTypeMask) {
- CastMember *member = g_director->getCurrentMovie()->getCastMember(_sprite->_castId + 1);
-
- if (member && member->_initialRect == _sprite->_cast->_initialRect) {
- return &member->_widget->getSurface()->rawSurface();
- } else {
- warning("Channel::getMask(): Requested cast mask, but no matching mask was found");
- return nullptr;
- }
- }
-
- return nullptr;
-}
-
-bool Channel::isDirty(Sprite *nextSprite) {
- // When a sprite is puppeted setTheSprite ensures that the dirty flag here is
- // set. Otherwise, we need to rerender when the position, bounding box, or
- // cast of the sprite changes.
- bool isDirty = _dirty ||
- _delta != Common::Point(0, 0) ||
- (_sprite->_cast && _sprite->_cast->isModified());
-
- if (nextSprite) {
- isDirty |= _sprite->_castId != nextSprite->_castId ||
- _sprite->_ink != nextSprite->_ink ||
- _sprite->getDims() != nextSprite->getDims() ||
- (_currentPoint != nextSprite->_startPoint &&
- !_sprite->_puppet && !_sprite->_moveable);
- }
-
- return isDirty;
-}
-
-Common::Rect Channel::getBbox() {
- Common::Rect bbox = _sprite->getDims();
- bbox.moveTo(getPosition());
-
- return bbox;
-}
-
-void Channel::setClean(Sprite *nextSprite, int spriteId) {
- if (!nextSprite)
- return;
-
- bool newSprite = (_sprite->_spriteType == kInactiveSprite && nextSprite->_spriteType != kInactiveSprite);
- _dirty = false;
-
- if (!_sprite->_puppet) {
- _sprite = nextSprite;
- _sprite->updateCast();
-
- // Sprites marked moveable are constrained to the same bounding box until
- // the moveable is disabled
- if (!_sprite->_moveable || newSprite)
- _currentPoint = _sprite->_startPoint;
- }
-
- _currentPoint += _delta;
- _delta = Common::Point(0, 0);
-
- if (_sprite->_cast && _sprite->_cast->_widget) {
- Common::Point p(getPosition());
- _sprite->_cast->_modified = false;
- _sprite->_cast->_widget->_dims.moveTo(p.x, p.y);
-
- _sprite->_cast->_widget->_priority = spriteId;
- _sprite->_cast->_widget->draw();
- _sprite->_cast->_widget->_contentIsDirty = false;
- }
-}
-
-void Channel::addRegistrationOffset(Common::Point &pos) {
- if (_sprite->_cast && _sprite->_cast->_type == kCastBitmap) {
- BitmapCastMember *bc = (BitmapCastMember *)(_sprite->_cast);
-
- pos += Common::Point(bc->_initialRect.left - bc->_regX,
- bc->_initialRect.top - bc->_regY);
- }
-}
-
-void Channel::addDelta(Common::Point pos) {
- // TODO: Channel should have a pointer to its score
- if (_sprite->_moveable &&
- _constraint > 0 &&
- _constraint < g_director->getCurrentMovie()->getScore()->_channels.size()) {
- Common::Rect constraintBbox = g_director->getCurrentMovie()->getScore()->_channels[_constraint]->getBbox();
-
- Common::Rect currentBbox = getBbox();
- currentBbox.translate(_delta.x + pos.x, _delta.y + pos.y);
-
- Common::Point regPoint;
- addRegistrationOffset(regPoint);
-
- constraintBbox.top += regPoint.y;
- constraintBbox.bottom -= regPoint.y;
-
- constraintBbox.left += regPoint.x;
- constraintBbox.right -= regPoint.x;
-
- if (!constraintBbox.contains(currentBbox)) {
- if (currentBbox.top < constraintBbox.top) {
- pos.y += constraintBbox.top - currentBbox.top;
- } else if (currentBbox.bottom > constraintBbox.bottom) {
- pos.y += constraintBbox.bottom - currentBbox.bottom;
- }
-
- if (currentBbox.left < constraintBbox.left) {
- pos.x += constraintBbox.left - currentBbox.left;
- } else if (currentBbox.right > constraintBbox.right) {
- pos.x += constraintBbox.right - currentBbox.right;
- }
- }
- }
-
- _delta += pos;
-}
-
-Common::Point Channel::getPosition() {
- Common::Point res = _currentPoint;
- addRegistrationOffset(res);
- return res;
-}
-
-MacShape *Channel::getShape() {
- if (!_sprite->isQDShape() || (_sprite->_cast && _sprite->_cast->_type != kCastShape))
- return nullptr;
-
- MacShape *shape = new MacShape();
-
- shape->ink = _sprite->_ink;
- shape->spriteType = _sprite->_spriteType;
- shape->foreColor = _sprite->_foreColor;
- shape->backColor = _sprite->_backColor;
- shape->lineSize = _sprite->_thickness & 0x3;
- shape->pattern = _sprite->getPattern();
-
- if (g_director->getVersion() >= 3 && shape->spriteType == kCastMemberSprite) {
- if (!_sprite->_cast) {
- warning("Channel::getShape(): kCastMemberSprite has no cast defined");
- delete shape;
- return nullptr;
- }
-
- ShapeCastMember *sc = (ShapeCastMember *)_sprite->_cast;
- switch (sc->_shapeType) {
- case kShapeRectangle:
- shape->spriteType = sc->_fillType ? kRectangleSprite : kOutlinedRectangleSprite;
- break;
- case kShapeRoundRect:
- shape->spriteType = sc->_fillType ? kRoundedRectangleSprite : kOutlinedRoundedRectangleSprite;
- break;
- case kShapeOval:
- shape->spriteType = sc->_fillType ? kOvalSprite : kOutlinedOvalSprite;
- break;
- case kShapeLine:
- shape->spriteType = sc->_lineDirection == 6 ? kLineBottomTopSprite : kLineTopBottomSprite;
- break;
- default:
- break;
- }
-
- if (g_director->getVersion() > 3) {
- shape->foreColor = sc->_fgCol;
- shape->backColor = sc->_bgCol;
- shape->lineSize = sc->_lineThickness;
- shape->ink = sc->_ink;
- }
- }
-
- // for outlined shapes, line thickness of 1 means invisible.
- shape->lineSize -= 1;
-
- return shape;
-}
-
Score::Score(Movie *movie) {
_movie = movie;
_stage = movie->getStage();
diff --git a/engines/director/score.h b/engines/director/score.h
index 26a81f2c24..da44321012 100644
--- a/engines/director/score.h
+++ b/engines/director/score.h
@@ -102,38 +102,6 @@ struct TransParams {
}
};
-struct MacShape {
- InkType ink;
- byte spriteType;
- byte foreColor;
- byte backColor;
- int lineSize;
- uint pattern;
-};
-
-struct Channel {
- Sprite *_sprite;
-
- bool _dirty;
- bool _visible;
- uint _constraint;
- Common::Point _currentPoint;
- Common::Point _delta;
-
- Channel(Sprite *sp);
- bool isDirty(Sprite *nextSprite = nullptr);
-
- void addRegistrationOffset(Common::Point &pos);
- Common::Rect getBbox();
- Common::Point getPosition();
- MacShape *getShape();
- Graphics::ManagedSurface *getSurface();
- const Graphics::Surface *getMask(bool forceMatte = false);
-
- void setClean(Sprite *nextSprite, int spriteId);
- void addDelta(Common::Point pos);
-};
-
class Score {
public:
Score(Movie *movie);
diff --git a/engines/director/stage.cpp b/engines/director/stage.cpp
index 0c94976d4e..ce56ee5b51 100644
--- a/engines/director/stage.cpp
+++ b/engines/director/stage.cpp
@@ -33,6 +33,7 @@
#include "director/stage.h"
#include "director/score.h"
#include "director/castmember.h"
+#include "director/channel.h"
#include "director/sprite.h"
#include "director/util.h"
Commit: 25dcbc3cf8318ed0b69a8f917ac23fe44fefb3e5
https://github.com/scummvm/scummvm/commit/25dcbc3cf8318ed0b69a8f917ac23fe44fefb3e5
Author: Nathanael Gentry (nathanael.gentrydb8 at gmail.com)
Date: 2020-07-08T13:44:02-04:00
Commit Message:
DIRECTOR: Move TransParams to stage
Changed paths:
engines/director/score.h
engines/director/stage.h
diff --git a/engines/director/score.h b/engines/director/score.h
index da44321012..f77075ea4c 100644
--- a/engines/director/score.h
+++ b/engines/director/score.h
@@ -59,49 +59,6 @@ enum RenderMode {
kRenderNoUnrender
};
-struct TransParams {
- TransitionType type;
- uint frame;
- uint duration;
- uint chunkSize;
- uint area;
-
- int steps;
- int stepDuration;
-
- int xStepSize;
- int yStepSize;
-
- int xpos, ypos;
-
- int stripSize;
-
- TransParams() {
- type = kTransNone;
- frame = 0;
- duration = 250;
- chunkSize = 1;
- area = 0;
- steps = 0;
- stepDuration = 0;
- stripSize = 0;
-
- xStepSize = yStepSize = 0;
- xpos = ypos = 0;
- }
-
- TransParams(uint16 d, uint16 a, uint16 c, TransitionType t) :
- duration(d), area(a), chunkSize(c), type(t) {
- frame = 0;
- steps = 0;
- stepDuration = 0;
- stripSize = 0;
-
- xStepSize = yStepSize = 0;
- xpos = ypos = 0;
- }
-};
-
class Score {
public:
Score(Movie *movie);
diff --git a/engines/director/stage.h b/engines/director/stage.h
index 8e9684b652..ff5e891661 100644
--- a/engines/director/stage.h
+++ b/engines/director/stage.h
@@ -40,7 +40,49 @@ namespace Director {
struct Channel;
struct MacShape;
-struct TransParams;
+
+struct TransParams {
+ TransitionType type;
+ uint frame;
+ uint duration;
+ uint chunkSize;
+ uint area;
+
+ int steps;
+ int stepDuration;
+
+ int xStepSize;
+ int yStepSize;
+
+ int xpos, ypos;
+
+ int stripSize;
+
+ TransParams() {
+ type = kTransNone;
+ frame = 0;
+ duration = 250;
+ chunkSize = 1;
+ area = 0;
+ steps = 0;
+ stepDuration = 0;
+ stripSize = 0;
+
+ xStepSize = yStepSize = 0;
+ xpos = ypos = 0;
+ }
+
+ TransParams(uint16 d, uint16 a, uint16 c, TransitionType t) :
+ duration(d), area(a), chunkSize(c), type(t) {
+ frame = 0;
+ steps = 0;
+ stepDuration = 0;
+ stripSize = 0;
+
+ xStepSize = yStepSize = 0;
+ xpos = ypos = 0;
+ }
+};
class Stage : public Graphics::MacWindow, public Object<Stage> {
public:
More information about the Scummvm-git-logs
mailing list