aboutsummaryrefslogtreecommitdiff
path: root/engines/access
diff options
context:
space:
mode:
authorStrangerke2014-08-25 22:46:56 +0200
committerStrangerke2014-08-25 22:46:56 +0200
commit8c059add8b25cbabd499fe9ef6e69da563a3b913 (patch)
tree87fbe85af6b40c8c9db76f15d8733e329c32c020 /engines/access
parent33cdeb7a4005408b92366ae34a29589e3b0fa0cb (diff)
downloadscummvm-rg350-8c059add8b25cbabd499fe9ef6e69da563a3b913.tar.gz
scummvm-rg350-8c059add8b25cbabd499fe9ef6e69da563a3b913.tar.bz2
scummvm-rg350-8c059add8b25cbabd499fe9ef6e69da563a3b913.zip
ACCESS: Modify speakText so it takes a string array as parameter
Diffstat (limited to 'engines/access')
-rw-r--r--engines/access/access.cpp20
-rw-r--r--engines/access/access.h2
2 files changed, 11 insertions, 11 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp
index 32a4e6cc8f..97ffc134be 100644
--- a/engines/access/access.cpp
+++ b/engines/access/access.cpp
@@ -199,7 +199,6 @@ void AccessEngine::dummyLoop() {
_events->setCursor((cursorId == CURSOR_HELP) ? CURSOR_ARROW : (CursorType)(cursorId + 1));
}
}
-
}
int AccessEngine::getRandomNumber(int maxNumber) {
@@ -264,21 +263,17 @@ void AccessEngine::loadEstablish(int sub) {
_countTbl[i] = READ_LE_UINT16(_eseg + idx + 6 + (2 * i));
}
-void AccessEngine::speakText(int idx) {
+void AccessEngine::speakText(Common::Array<Common::String> msgArr) {
int curPage = 0;
int soundsLeft = 0;
- Common::String msg;
- for (int i = idx; _eseg[i] != 0; ++i)
- msg += _eseg[i];
-
while(true) {
soundsLeft = _countTbl[curPage];
_events->zeroKeys();
Common::String line;
int width = 0;
- bool lastLine = _fonts._font2.getLine(msg, _bubbleBox->_maxChars * 6, line, width);
+ bool lastLine = _fonts._font2.getLine(msgArr[curPage], _bubbleBox->_maxChars * 6, line, width);
// Set font colors
_fonts._font2._fontColors[0] = 0;
_fonts._font2._fontColors[1] = 28;
@@ -372,15 +367,20 @@ void AccessEngine::doEstablish(int esatabIndex, int sub) {
_screen->_printOrg = _screen->_printStart = Common::Point(48, 35);
loadEstablish(sub);
_et = sub;
- warning("CHECKME: Use of di");
uint16 msgOffset = READ_LE_UINT16(_eseg + (sub * 2) + 2);
- Common::String msg((const char *)_eseg + msgOffset);
_printEnd = 155;
if (_txtPages == 0) {
+ Common::String msg((const char *)_eseg + msgOffset);
_fonts._font2.printText(_screen, msg);
} else {
-// speakText(msg);
+ Common::Array<Common::String> msgArr;
+ for (int i = 0; i < _txtPages; ++i) {
+ Common::String msg((const char *)_eseg + msgOffset);
+ msgOffset += msg.size() + 1;
+ msgArr.push_back(msg);
+ }
+ speakText(msgArr);
}
_screen->forceFadeOut();
diff --git a/engines/access/access.h b/engines/access/access.h
index 2aa41308c3..70195d1e64 100644
--- a/engines/access/access.h
+++ b/engines/access/access.h
@@ -92,7 +92,7 @@ private:
void dummyLoop();
- void speakText(int idx);
+ void speakText(Common::Array<Common::String>msgArr);
void doEstablish(int esatabIndex, int sub);
protected: