diff options
author | Willem Jan Palenstijn | 2013-04-18 23:35:23 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-05-08 20:40:58 +0200 |
commit | 9c2341678ef4984bf92b3878295250faf980b066 (patch) | |
tree | 2fb4805e05e16b9924e80c9947e6bad723b28c4b /engines/drascula/talk.cpp | |
parent | 8172d679df5148a4a32f46074b20cb6caf91844f (diff) | |
parent | a5f4ff36ffc386d48f2da49387a9655ce9295a4d (diff) | |
download | scummvm-rg350-9c2341678ef4984bf92b3878295250faf980b066.tar.gz scummvm-rg350-9c2341678ef4984bf92b3878295250faf980b066.tar.bz2 scummvm-rg350-9c2341678ef4984bf92b3878295250faf980b066.zip |
Merge branch 'master'
Diffstat (limited to 'engines/drascula/talk.cpp')
-rw-r--r-- | engines/drascula/talk.cpp | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 6d1509fe3c..a326852e96 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -34,6 +34,11 @@ void DrasculaEngine::talkInit(const char *filename) { } bool DrasculaEngine::isTalkFinished() { + if (shouldQuit()) { + stopSound(); + return true; + } + if (getScan() != 0) stopSound(); if (soundIsActive()) @@ -367,6 +372,7 @@ void DrasculaEngine::talk(int index) { } void DrasculaEngine::talk(const char *said, const char *filename) { + debug(1, "DrasculaEngine::talk(said:\"%s\", filename:\"%s\")", said, filename); int talkOffset = 0; if (currentChapter != 2) talkOffset = 1; @@ -409,8 +415,8 @@ void DrasculaEngine::talk(const char *said, const char *filename) { if (currentChapter == 2) copyBackground(curX, curY, OBJWIDTH + 1, 0, curWidth, talkHeight - 1, screenSurface, drawSurface3); else - copyBackground(curX, curY, OBJWIDTH + 1, 0, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]), - (int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]), + copyBackground(curX, curY, OBJWIDTH + 1, 0, (int)(((float)curWidth / 100) * factor_red[MIN(201, curY + curHeight)]), + (int)(((float)(talkHeight - 1) / 100) * factor_red[MIN(201, curY + curHeight)]), screenSurface, drawSurface3); moveCharacters(); @@ -419,8 +425,8 @@ void DrasculaEngine::talk(const char *said, const char *filename) { if (!strcmp(menuBackground, "99.alg") || !strcmp(menuBackground, "994.alg")) copyBackground(OBJWIDTH + 1, 0, curX, curY, curWidth, talkHeight - 1, drawSurface3, screenSurface); } else { - copyBackground(OBJWIDTH + 1, 0, curX, curY, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]), - (int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]), + copyBackground(OBJWIDTH + 1, 0, curX, curY, (int)(((float)curWidth / 100) * factor_red[MIN(201, curY + curHeight)]), + (int)(((float)(talkHeight - 1) / 100) * factor_red[MIN(201, curY + curHeight)]), drawSurface3, screenSurface); } @@ -429,8 +435,8 @@ void DrasculaEngine::talk(const char *said, const char *filename) { copyRect(x_talk_izq[face], y_mask_talk, curX + 8, curY - 1, talkWidth, talkHeight, extraSurface, screenSurface); else - reduce_hare_chico(x_talk_izq[face], y_mask_talk, curX + (int)((8.0f / 100) * factor_red[curY + curHeight]), - curY, talkWidth, talkHeight, factor_red[curY + curHeight], + reduce_hare_chico(x_talk_izq[face], y_mask_talk, curX + (int)((8.0f / 100) * factor_red[MIN(201, curY + curHeight)]), + curY, talkWidth, talkHeight, factor_red[MIN(201, curY + curHeight)], extraSurface, screenSurface); updateRefresh(); @@ -439,8 +445,8 @@ void DrasculaEngine::talk(const char *said, const char *filename) { copyRect(x_talk_dch[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight, extraSurface, screenSurface); else - reduce_hare_chico(x_talk_dch[face], y_mask_talk, curX + (int)((12.0f / 100) * factor_red[curY + curHeight]), - curY, talkWidth, talkHeight, factor_red[curY + curHeight], extraSurface, screenSurface); + reduce_hare_chico(x_talk_dch[face], y_mask_talk, curX + (int)((12.0f / 100) * factor_red[MIN(201, curY + curHeight)]), + curY, talkWidth, talkHeight, factor_red[MIN(201, curY + curHeight)], extraSurface, screenSurface); updateRefresh(); } else if (trackProtagonist == 2) { if (currentChapter == 2) @@ -448,8 +454,8 @@ void DrasculaEngine::talk(const char *said, const char *filename) { frontSurface, screenSurface); else reduce_hare_chico(x_talk_izq[face], y_mask_talk, - talkOffset + curX + (int)((12.0f / 100) * factor_red[curY + curHeight]), - curY, talkWidth, talkHeight, factor_red[curY + curHeight], + talkOffset + curX + (int)((12.0f / 100) * factor_red[MIN(201, curY + curHeight)]), + curY, talkWidth, talkHeight, factor_red[MIN(201, curY + curHeight)], frontSurface, screenSurface); updateRefresh(); } else if (trackProtagonist == 3) { @@ -458,8 +464,8 @@ void DrasculaEngine::talk(const char *said, const char *filename) { frontSurface, screenSurface); else reduce_hare_chico(x_talk_dch[face], y_mask_talk, - talkOffset + curX + (int)((8.0f / 100) * factor_red[curY + curHeight]), - curY, talkWidth,talkHeight, factor_red[curY + curHeight], + talkOffset + curX + (int)((8.0f / 100) * factor_red[MIN(201, curY + curHeight)]), + curY, talkWidth,talkHeight, factor_red[MIN(201, curY + curHeight)], frontSurface, screenSurface); updateRefresh(); } |