Skip to content

Commit

Permalink
TOON: Remove some dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Aug 6, 2014
1 parent 09d1dee commit 37b7716
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions engines/toon/toon.cpp
Expand Up @@ -2037,23 +2037,19 @@ int32 ToonEngine::characterTalk(int32 dialogid, bool blocking) {
}
}

int32 myId = 0;
char *myLine;
if (dialogid < 1000) {
if (dialogid < 1000)
myLine = _roomTexts->getText(dialogid);
myId = dialogid;
} else {
else
myLine = _genericTexts->getText(dialogid - 1000);
myId = dialogid - 1000;
}

if (!myLine)
return 0;

bool oldMouseHidden = _gameState->_mouseHidden;
if (blocking) {
if (blocking)
_gameState->_mouseHidden = true;
}


// get what is before the string
int a = READ_LE_UINT16(myLine - 2);
Expand Down Expand Up @@ -2090,10 +2086,8 @@ int32 ToonEngine::characterTalk(int32 dialogid, bool blocking) {
while ((waitChar->getAnimFlag() & 0x10) == 0x10 && !_shouldQuit)
doFrame();
}
} else {
if (_audioManager->voiceStillPlaying())
_audioManager->stopCurrentVoice();
}
} else if (_audioManager->voiceStillPlaying())
_audioManager->stopCurrentVoice();

for (int32 i = 0; i < numParticipants - 1; i++) {
// listener
Expand Down Expand Up @@ -2133,10 +2127,10 @@ int32 ToonEngine::characterTalk(int32 dialogid, bool blocking) {
getTextPosition(talkerId, &_currentTextLineX, &_currentTextLineY);

if (dialogid < 1000) {
myId = _roomTexts->getId(dialogid);
int myId = _roomTexts->getId(dialogid);
_audioManager->playVoice(myId, false);
} else {
myId = _genericTexts->getId(dialogid - 1000);
int myId = _genericTexts->getId(dialogid - 1000);
_audioManager->playVoice(myId, true);
}

Expand Down

0 comments on commit 37b7716

Please sign in to comment.