aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-24 19:45:42 +0100
committerEugene Sandulenko2019-12-24 21:39:14 +0100
commit13c086cf8897952f4d7af3fdba1cedf1a3a0a2f2 (patch)
tree7a84bd537eed432995cf390479aa95846f59beef
parentb5d64e8bbf152252ed60b47436007c9e8624e50f (diff)
downloadscummvm-rg350-13c086cf8897952f4d7af3fdba1cedf1a3a0a2f2.tar.gz
scummvm-rg350-13c086cf8897952f4d7af3fdba1cedf1a3a0a2f2.tar.bz2
scummvm-rg350-13c086cf8897952f4d7af3fdba1cedf1a3a0a2f2.zip
DIRECTOR: Enlist shape types
-rw-r--r--engines/director/frame.cpp13
-rw-r--r--engines/director/sprite.h16
-rw-r--r--engines/director/types.h22
3 files changed, 29 insertions, 22 deletions
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 99428ed2d4..3ecb941cfe 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -580,18 +580,19 @@ void Frame::renderSprites(Graphics::ManagedSurface &surface, bool renderTrail) {
if (_vm->getVersion() < 4) {
debugC(1, kDebugImages, "Frame::renderSprites(): Channel: %d type: %d", i, _sprites[i]->_spriteType);
switch (_sprites[i]->_spriteType) {
- case 1:
+ case kBitmapSprite:
castType = kCastBitmap;
break;
- case 2:
- case 12: // this is actually a mouse-over shape? I don't think it's a real button.
- case 16: // Face kit D3
+ case kRectangleSprite:
+ case kOutlinedRectangleSprite: // this is actually a mouse-over shape? I don't think it's a real button.
+ case kCastMemberSprite: // Face kit D3
castType = kCastShape;
break;
- case 7:
+ case kTextSprite:
castType = kCastText;
break;
default:
+ warning("Frame::renderSprites(): Unhandled sprite type %d", _sprites[i]->_spriteType);
break;
}
} else {
@@ -654,7 +655,7 @@ void Frame::renderShape(Graphics::ManagedSurface &surface, uint16 spriteId) {
Graphics::ManagedSurface tmpSurface;
tmpSurface.create(shapeRect.width(), shapeRect.height(), Graphics::PixelFormat::createFormatCLUT8());
- if (_vm->getVersion() <= 3 && _sprites[spriteId]->_spriteType == 0x0c) {
+ if (_vm->getVersion() <= 3 && _sprites[spriteId]->_spriteType == kOutlinedRectangleSprite) {
tmpSurface.fillRect(Common::Rect(shapeRect.width(), shapeRect.height()), (_vm->getCurrentScore()->_currentMouseDownSpriteId == spriteId ? 0 : 0xff));
//tmpSurface.frameRect(Common::Rect(shapeRect.width(), shapeRect.height()), 0);
// TODO: don't override, work out how to display correctly.
diff --git a/engines/director/sprite.h b/engines/director/sprite.h
index f9facd9d4f..c76a25f2ac 100644
--- a/engines/director/sprite.h
+++ b/engines/director/sprite.h
@@ -52,22 +52,6 @@ enum InkType {
kInkTypeDark
};
-// Director v4
-enum SpriteType {
- kInactiveSprite, // turns the sprite off
- kBitmapSprite,
- kRectangleSprite,
- kRoundedRectangleSprite,
- kOvalSprite,
- kLineTopBottomSprite, // line from top left to bottom right
- kLineBottomTopSprite, // line from bottom left to top right
- kTextSprite,
- kButtonSprite,
- kCheckboxSprite,
- kRadioButtonSprite,
- kUndeterminedSprite = 16 // use castType property to examine the type of cast member associated with sprite
-};
-
enum SpritePosition {
kSpritePositionUnk1 = 0,
kSpritePositionEnabled,
diff --git a/engines/director/types.h b/engines/director/types.h
index 601aa87153..9626f6d8e2 100644
--- a/engines/director/types.h
+++ b/engines/director/types.h
@@ -84,6 +84,28 @@ enum ButtonType {
kTypeRadio
};
+enum SpriteType {
+ kInactiveSprite = 0, // turns the sprite off
+ kBitmapSprite = 1,
+ kRectangleSprite = 2, // QuickDraw
+ kRoundedRectangleSprite = 3, // QuickDraw
+ kOvalSprite = 4, // QuickDraw
+ kLineTopBottomSprite = 5, // line from top left to bottom right
+ kLineBottomTopSprite = 6, // line from bottom left to top right
+ kTextSprite = 7,
+ kButtonSprite = 8,
+ kCheckboxSprite = 9,
+ kRadioButtonSprite = 10,
+ kPictSprite = 11, // Cast picture
+ kOutlinedRectangleSprite = 12, // QuickDraw
+ kOutlinedRoundedRectangleSprite = 13, // QuickDraw
+ kOutlinedOvalSprite = 14, // QuickDraw
+ kThinkLineSprite = 15, // 2pt width line
+ kCastMemberSprite = 16, // Specified by cast member
+ kFilmLoopSpite = 17,
+ kDirMovieSprite = 18
+};
+
const char *scriptType2str(ScriptType scr);