[Scummvm-cvs-logs] scummvm master -> 3dac0c66462fa50e577d29e504d99fdb0a796866
dreammaster
dreammaster at scummvm.org
Thu Jun 4 00:43:43 CEST 2015
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:
2cec902479 SHERLOCK: Fix issues with drawAllShapes
3dac0c6646 SHERLOCK: Implement changes for checkObject
Commit: 2cec902479ba77dc411f42be2ec51e3a9795a340
https://github.com/scummvm/scummvm/commit/2cec902479ba77dc411f42be2ec51e3a9795a340
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-06-03T18:37:54-04:00
Commit Message:
SHERLOCK: Fix issues with drawAllShapes
Changed paths:
engines/sherlock/tattoo/tattoo_scene.cpp
diff --git a/engines/sherlock/tattoo/tattoo_scene.cpp b/engines/sherlock/tattoo/tattoo_scene.cpp
index 12922b2..9569b4c 100644
--- a/engines/sherlock/tattoo/tattoo_scene.cpp
+++ b/engines/sherlock/tattoo/tattoo_scene.cpp
@@ -96,14 +96,13 @@ void TattooScene::drawAllShapes() {
}
// Queue drawing the animation if it is NORMAL and can fall in front of, or behind the people
- if (_activeCAnim._imageFrame != nullptr && (_activeCAnim._zPlacement == NORMAL_BEHIND) || _activeCAnim._zPlacement == NORMAL_FORWARD) {
+ if (_activeCAnim._imageFrame != nullptr && (_activeCAnim._zPlacement == NORMAL_BEHIND || _activeCAnim._zPlacement == NORMAL_FORWARD)) {
if (_activeCAnim._scaleVal == 256)
- if (_activeCAnim._scaleVal == 256)
- shapeList.push_back(ShapeEntry(_activeCAnim._position.y + _activeCAnim._imageFrame->_offset.y +
- _activeCAnim._imageFrame->_height));
- else
- shapeList.push_back(ShapeEntry(_activeCAnim._position.y + _activeCAnim._imageFrame->sDrawYOffset(_activeCAnim._scaleVal) +
- _activeCAnim._imageFrame->sDrawYSize(_activeCAnim._scaleVal)));
+ shapeList.push_back(ShapeEntry(_activeCAnim._position.y + _activeCAnim._imageFrame->_offset.y +
+ _activeCAnim._imageFrame->_height));
+ else
+ shapeList.push_back(ShapeEntry(_activeCAnim._position.y + _activeCAnim._imageFrame->sDrawYOffset(_activeCAnim._scaleVal) +
+ _activeCAnim._imageFrame->sDrawYSize(_activeCAnim._scaleVal)));
}
// Queue all active characters for drawing
Commit: 3dac0c66462fa50e577d29e504d99fdb0a796866
https://github.com/scummvm/scummvm/commit/3dac0c66462fa50e577d29e504d99fdb0a796866
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-06-03T18:42:32-04:00
Commit Message:
SHERLOCK: Implement changes for checkObject
Changed paths:
engines/sherlock/objects.cpp
engines/sherlock/objects.h
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index 4527c4e..124e7c5 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -648,9 +648,18 @@ void Object::checkObject() {
codeFound = true;
int v = _sequences[_frameNumber];
- if (v >= 228) {
+ // Check for a Talk or Listen Sequence
+ if (IS_ROSE_TATTOO && v == ALLOW_TALK_CODE) {
+ if (_gotoSeq) {
+ setObjTalkSequence(_gotoSeq);
+ } else {
+ ++_frameNumber;
+ }
+ } else if (IS_ROSE_TATTOO && (v == TALK_SEQ_CODE || v == TALK_LISTEN_CODE)) {
+ error("TODO");
+ } else if (v >= GOTO_CODE) {
// Goto code found
- v -= 228;
+ v -= GOTO_CODE;
_seqCounter2 = _seqCounter;
_seqStack = _frameNumber + 1;
setObjSequence(v, false);
@@ -686,6 +695,12 @@ void Object::checkObject() {
default:
break;
}
+ } else if (IS_ROSE_TATTOO && v == TELEPORT_CODE) {
+ error("TODO");
+ } else if (IS_ROSE_TATTOO && v == CALL_TALK_CODE) {
+ error("TODO");
+ } else if (IS_ROSE_TATTOO && v == HIDE_CODE) {
+ error("TODO");
} else {
v -= 128;
@@ -708,6 +723,14 @@ void Object::checkObject() {
// Will be incremented below to return back to original value
--_frameNumber;
v = 0;
+
+ } else if (IS_ROSE_TATTOO && v == 10) {
+ // Set delta for objects
+ _delta = Common::Point(READ_LE_UINT16(&_sequences[_frameNumber + 1]),
+ READ_LE_UINT16(&_sequences[_frameNumber + 3]));
+ _noShapeSize = Common::Point(0, 0);
+ _frameNumber += 4;
+
} else if (v == 10) {
// Set delta for objects
Common::Point pt(_sequences[_frameNumber + 1], _sequences[_frameNumber + 2]);
@@ -723,6 +746,7 @@ void Object::checkObject() {
_delta = pt;
_frameNumber += 2;
+
} else if (v < USE_COUNT) {
for (int idx = 0; idx < NAMES_COUNT; ++idx) {
checkNameForCodes(_use[v]._names[idx], nullptr);
@@ -863,6 +887,10 @@ void Object::setObjSequence(int seq, bool wait) {
}
}
+void Object::setObjTalkSequence(int seq) {
+ error("TODO: setObjTalkSequence");
+}
+
int Object::checkNameForCodes(const Common::String &name, const char *const messages[]) {
Map &map = *_vm->_map;
People &people = *_vm->_people;
diff --git a/engines/sherlock/objects.h b/engines/sherlock/objects.h
index e7b26d1..936adc5 100644
--- a/engines/sherlock/objects.h
+++ b/engines/sherlock/objects.h
@@ -82,6 +82,15 @@ enum {
#define SEQ_TO_CODE 67
#define FLIP_CODE (64 + 128)
#define SOUND_CODE (34 + 128)
+#define HIDE_CODE (7+128) // Code for hiding/unhiding an object from a Sequence
+#define CALL_TALK_CODE (8+128) // Code for call a Talk File from a Sequence
+#define TELEPORT_CODE (9+128) // Code for setting Teleport Data (X,Y)
+#define MOVE_CODE (10+128) // Code for setting Movement Delta (X,Y)
+
+#define GOTO_CODE 228
+#define TALK_SEQ_CODE 252 // Code specifying start of talk sequence frames in a Sequence
+#define TALK_LISTEN_CODE 251 // Code specifying start of talk listen frames in a Sequence
+#define ALLOW_TALK_CODE 250
class Point32 {
public:
@@ -268,6 +277,15 @@ private:
* It then sets the frame number of the start of that sequence
*/
void setObjSequence(int seq, bool wait);
+
+ /**
+ * Adjusts the frame and sequence variables of a sprite that corresponds to the current speaker
+ * so that it points to the beginning of the sequence number's talk sequence in the object's
+ * sequence buffer
+ * @param seq Which sequence to use (if there's more than 1)
+ * @remarks 1: First talk seq, 2: second talk seq, etc.
+ */
+ void setObjTalkSequence(int seq);
public:
static bool _countCAnimFrames;
More information about the Scummvm-git-logs
mailing list