ACCESS: Add destination surface in speakText parameters
This commit is contained in:
parent
7d0392aa83
commit
a47b10c1c0
3 changed files with 10 additions and 11 deletions
|
@ -263,7 +263,7 @@ void AccessEngine::loadEstablish(int sub) {
|
||||||
_countTbl[i] = READ_LE_UINT16(_eseg + idx + 6 + (2 * i));
|
_countTbl[i] = READ_LE_UINT16(_eseg + idx + 6 + (2 * i));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccessEngine::speakText(Common::Array<Common::String> msgArr) {
|
void AccessEngine::speakText(ASurface *s, Common::Array<Common::String> msgArr) {
|
||||||
int curPage = 0;
|
int curPage = 0;
|
||||||
int soundsLeft = 0;
|
int soundsLeft = 0;
|
||||||
|
|
||||||
|
@ -273,17 +273,17 @@ void AccessEngine::speakText(Common::Array<Common::String> msgArr) {
|
||||||
|
|
||||||
Common::String line;
|
Common::String line;
|
||||||
int width = 0;
|
int width = 0;
|
||||||
bool lastLine = _fonts._font2.getLine(msgArr[curPage], _screen->_maxChars * 6, line, width);
|
bool lastLine = _fonts._font2.getLine(msgArr[curPage], s->_maxChars * 6, line, width);
|
||||||
// Set font colors
|
// Set font colors
|
||||||
_fonts._font2._fontColors[0] = 0;
|
_fonts._font2._fontColors[0] = 0;
|
||||||
_fonts._font2._fontColors[1] = 28;
|
_fonts._font2._fontColors[1] = 28;
|
||||||
_fonts._font2._fontColors[2] = 29;
|
_fonts._font2._fontColors[2] = 29;
|
||||||
_fonts._font2._fontColors[3] = 30;
|
_fonts._font2._fontColors[3] = 30;
|
||||||
|
|
||||||
_fonts._font2.drawString(_screen, line, _screen->_printOrg);
|
_fonts._font2.drawString(s, line, s->_printOrg);
|
||||||
_screen->_printOrg = Common::Point(_screen->_printStart.x, _screen->_printOrg.y + 9);
|
s->_printOrg = Common::Point(s->_printStart.x, s->_printOrg.y + 9);
|
||||||
|
|
||||||
if ((_screen->_printOrg.y > _printEnd) && (!lastLine)) {
|
if ((s->_printOrg.y > _printEnd) && (!lastLine)) {
|
||||||
while (true) {
|
while (true) {
|
||||||
_sound->_soundTable[0]._data = _sound->loadSound(_narateFile + 99, _sndSubFile);
|
_sound->_soundTable[0]._data = _sound->loadSound(_narateFile + 99, _sndSubFile);
|
||||||
_sound->_soundPriority[0] = 1;
|
_sound->_soundPriority[0] = 1;
|
||||||
|
@ -306,8 +306,8 @@ void AccessEngine::speakText(Common::Array<Common::String> msgArr) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_buffer2.copyBuffer(_screen);
|
_buffer2.copyBuffer(s);
|
||||||
_screen->_printOrg.y = _screen->_printStart.y;
|
s->_printOrg.y = s->_printStart.y;
|
||||||
++curPage;
|
++curPage;
|
||||||
soundsLeft = _countTbl[curPage];
|
soundsLeft = _countTbl[curPage];
|
||||||
}
|
}
|
||||||
|
@ -380,7 +380,7 @@ void AccessEngine::doEstablish(int esatabIndex, int sub) {
|
||||||
msgOffset += msg.size() + 1;
|
msgOffset += msg.size() + 1;
|
||||||
msgArr.push_back(msg);
|
msgArr.push_back(msg);
|
||||||
}
|
}
|
||||||
speakText(msgArr);
|
speakText(_screen, msgArr);
|
||||||
}
|
}
|
||||||
|
|
||||||
_screen->forceFadeOut();
|
_screen->forceFadeOut();
|
||||||
|
|
|
@ -81,7 +81,7 @@ private:
|
||||||
uint32 _lastTime, _curTime;
|
uint32 _lastTime, _curTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles basic initialisation
|
* Handles basic initialization
|
||||||
*/
|
*/
|
||||||
void initialize();
|
void initialize();
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ private:
|
||||||
|
|
||||||
void dummyLoop();
|
void dummyLoop();
|
||||||
|
|
||||||
void speakText(Common::Array<Common::String>msgArr);
|
void speakText(ASurface *s, Common::Array<Common::String>msgArr);
|
||||||
|
|
||||||
void doEstablish(int esatabIndex, int sub);
|
void doEstablish(int esatabIndex, int sub);
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -329,7 +329,6 @@ void ASurface::flipHorizontal(ASurface &dest) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ASurface::moveBufferLeft() {
|
void ASurface::moveBufferLeft() {
|
||||||
byte *p = (byte *)getPixels();
|
byte *p = (byte *)getPixels();
|
||||||
Common::copy(p + TILE_WIDTH, p + (w * h), p);
|
Common::copy(p + TILE_WIDTH, p + (w * h), p);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue