From 3bd08fd48280506bb0a1ccc9ac960cf5f262cf93 Mon Sep 17 00:00:00 2001 From: David Eriksson Date: Tue, 21 Oct 2003 13:18:02 +0000 Subject: - Add some missing speech - Disable debug messages svn-id: r10936 --- queen/cutaway.cpp | 15 ++++++++++----- queen/cutaway.h | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'queen') diff --git a/queen/cutaway.cpp b/queen/cutaway.cpp index 893fca3e35..afb4861a05 100644 --- a/queen/cutaway.cpp +++ b/queen/cutaway.cpp @@ -23,6 +23,7 @@ #include "cutaway.h" #include "display.h" #include "graphics.h" +#include "sound.h" #include "talk.h" #include "walk.h" @@ -356,7 +357,7 @@ void Cutaway::actionSpecialMove(int index) { if (horizontalScroll > k) horizontalScroll = k; - debug(0, "horizontalScroll = %i", horizontalScroll); + //debug(0, "horizontalScroll = %i", horizontalScroll); display->horizontalScroll(horizontalScroll); @@ -1124,7 +1125,7 @@ void Cutaway::run(char *nextFilename) { case OBJECT_TYPE_TEXT_SPEAK: case OBJECT_TYPE_TEXT_DISPLAY_AND_SPEAK: case OBJECT_TYPE_TEXT_DISPLAY: - handleText(objectType, object, sentence); + handleText(i + 1, objectType, object, sentence); break; default: @@ -1433,13 +1434,13 @@ int Cutaway::makeComplexAnimation(int16 currentImage, Cutaway::CutawayAnim *objA for (i = 0; i < frameCount; i++) { _cutAnim[bobNum][i].frame = currentImage + frameIndex[objAnim[i].unpackFrame]; - debug(0, "_cutAnim[%i][%i].frame = %i", bobNum, i, _cutAnim[bobNum][i].frame); + //debug(0, "_cutAnim[%i][%i].frame = %i", bobNum, i, _cutAnim[bobNum][i].frame); } for (i = 1; i < 256; i++) { if (frameIndex[i]) { currentImage++; - debug(0, "bankUnpack(%i, %i, %i)", i, currentImage, objAnim[0].bank); + //debug(0, "bankUnpack(%i, %i, %i)", i, currentImage, objAnim[0].bank); _graphics->bankUnpack(i, currentImage, objAnim[0].bank); } } @@ -1450,6 +1451,7 @@ int Cutaway::makeComplexAnimation(int16 currentImage, Cutaway::CutawayAnim *objA } void Cutaway::handleText( + int index, ObjectType type, CutawayObject &object, const char *sentence) { @@ -1477,7 +1479,10 @@ void Cutaway::handleText( _graphics->bobSetText(bob, sentence, x, object.bobStartY, object.specialMove, flags); if (OBJECT_TYPE_TEXT_SPEAK == type || OBJECT_TYPE_TEXT_DISPLAY_AND_SPEAK == type) { - // XXX: speak + char voiceFileName[MAX_STRING_SIZE]; + findCdCut(_basename, index, voiceFileName); + strcat(voiceFileName, "1"); + _sound->sfxPlay(voiceFileName); } int i; diff --git a/queen/cutaway.h b/queen/cutaway.h index e82858f9d3..00dbe594e1 100644 --- a/queen/cutaway.h +++ b/queen/cutaway.h @@ -254,6 +254,7 @@ class Cutaway { //! Perform text actions void handleText( + int index, ObjectType type, CutawayObject &object, const char *sentence); -- cgit v1.2.3