Skip to content

Commit

Permalink
SHERLOCK: RT: Fix People::reset when _scriptMoreFlag is set
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Jul 6, 2015
1 parent 8570f05 commit b935cb1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
17 changes: 12 additions & 5 deletions engines/sherlock/people.cpp
Expand Up @@ -193,20 +193,27 @@ People::~People() {
}

void People::reset() {
SaveManager &saves = *_vm->_saves;
Talk &talk = *_vm->_talk;
_data[HOLMES]->_description = "Sherlock Holmes!";

// Note: Serrated Scalpel only uses a single Person slot for Sherlock.. Watson is handled by scene sprites
int count = IS_SERRATED_SCALPEL ? 1 : MAX_CHARACTERS;
for (int idx = 0; idx < count; ++idx) {
Person &p = *_data[idx];

p._type = (idx == 0) ? CHARACTER : INVALID;
if (IS_SERRATED_SCALPEL)
if (IS_SERRATED_SCALPEL) {
p._type = CHARACTER;
p._sequenceNumber = Tattoo::STOP_DOWNRIGHT;
p._position = Point32(100 * FIXED_INT_MULTIPLIER, 110 * FIXED_INT_MULTIPLIER);
else
} else if (!talk._scriptMoreFlag && !saves._justLoaded) {
p._type = (idx == 0) ? CHARACTER : INVALID;
p._sequenceNumber = Scalpel::STOP_DOWNRIGHT;
p._position = Point32(36 * FIXED_INT_MULTIPLIER, 29 * FIXED_INT_MULTIPLIER);

p._sequenceNumber = IS_SERRATED_SCALPEL ? (int)Scalpel::STOP_DOWNRIGHT : (int)Tattoo::STOP_DOWNRIGHT;
p._use[0]._verb = "";
p._use[1]._verb = "";
}

p._imageFrame = nullptr;
p._frameNumber = 1;
p._delta = Point32(0, 0);
Expand Down
7 changes: 4 additions & 3 deletions engines/sherlock/tattoo/tattoo_talk.cpp
Expand Up @@ -22,6 +22,7 @@

#include "sherlock/tattoo/tattoo_talk.h"
#include "sherlock/tattoo/tattoo_people.h"
#include "sherlock/tattoo/tattoo_scene.h"
#include "sherlock/tattoo/tattoo_user_interface.h"
#include "sherlock/sherlock.h"
#include "sherlock/screen.h"
Expand Down Expand Up @@ -267,7 +268,7 @@ OpcodeReturn TattooTalk::cmdGotoScene(const byte *&str) {
Scene &scene = *_vm->_scene;
scene._goToScene = str[1] - 1;

if (scene._goToScene != 100) {
if (scene._goToScene != OVERHEAD_MAP) {
// Not going to the map overview
map._oldCharPoint = scene._goToScene;

Expand All @@ -283,10 +284,10 @@ OpcodeReturn TattooTalk::cmdGotoScene(const byte *&str) {
}

_scriptMoreFlag = 1;
} // if (scene._goToScene != 100)
}

str += 7;
if (scene._goToScene != 100)
if (scene._goToScene != OVERHEAD_MAP)
_scriptSaveIndex = str - _scriptStart;

_endStr = true;
Expand Down

0 comments on commit b935cb1

Please sign in to comment.