aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2012-12-12 00:22:18 +0100
committerStrangerke2012-12-12 00:22:18 +0100
commit3b3a28e27f038207b72f03b478b7bf93357d1c25 (patch)
tree08eb41d8d356a2fd8345a0a4d5ddd6406d1786d3 /engines
parentd274441e12e7112620747a5129bb2af77cdb852f (diff)
downloadscummvm-rg350-3b3a28e27f038207b72f03b478b7bf93357d1c25.tar.gz
scummvm-rg350-3b3a28e27f038207b72f03b478b7bf93357d1c25.tar.bz2
scummvm-rg350-3b3a28e27f038207b72f03b478b7bf93357d1c25.zip
HOPKINS: Rename functions in FontManager
Diffstat (limited to 'engines')
-rw-r--r--engines/hopkins/computer.cpp8
-rw-r--r--engines/hopkins/dialogs.cpp4
-rw-r--r--engines/hopkins/events.cpp2
-rw-r--r--engines/hopkins/font.cpp264
-rw-r--r--engines/hopkins/font.h78
-rw-r--r--engines/hopkins/hopkins.cpp2
-rw-r--r--engines/hopkins/objects.cpp97
-rw-r--r--engines/hopkins/script.cpp36
-rw-r--r--engines/hopkins/talk.cpp46
9 files changed, 272 insertions, 265 deletions
diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp
index 1c8080aeef..6dc7f1e6ac 100644
--- a/engines/hopkins/computer.cpp
+++ b/engines/hopkins/computer.cpp
@@ -364,7 +364,7 @@ void ComputerManager::TXT4(int xp, int yp, int textIdx) {
bool oldMouseFlag = _vm->_eventsManager._mouseFl;
_vm->_eventsManager._mouseFl = false;
- _vm->_fontManager.TEXT_NOW(xp, yp, "_", -4);
+ _vm->_fontManager.displayTextVesa(xp, yp, "_", -4);
do {
curChar = _vm->_eventsManager.waitKeyPress();
if (_vm->shouldQuit())
@@ -454,7 +454,7 @@ void ComputerManager::TXT4(int xp, int yp, int textIdx) {
x2 = x1 + 2 * _vm->_globals.police_l;
_vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager.VESA_SCREEN, x1, yp, 3 * _vm->_globals.police_l, 12, _vm->_graphicsManager.VESA_BUFFER, x1, yp);
_vm->_graphicsManager.Ajoute_Segment_Vesa(x1, yp, x2, yp + 12);
- _vm->_fontManager.TEXT_NOW(x1, yp, "_", -4);
+ _vm->_fontManager.displayTextVesa(x1, yp, "_", -4);
}
if (mappedChar != '*') {
newChar = mappedChar;
@@ -463,7 +463,7 @@ void ComputerManager::TXT4(int xp, int yp, int textIdx) {
_inputBuf[textIndex] = newChar;
charString = Common::String::format("%c_", newChar);
- _vm->_fontManager.TEXT_NOW(x1, yp, charString, -4);
+ _vm->_fontManager.displayTextVesa(x1, yp, charString, -4);
++textIndex;
x1 += _vm->_globals.police_l;
}
@@ -490,7 +490,7 @@ void ComputerManager::outText(const Common::String &msg) {
* Outputs a text string
*/
void ComputerManager::outText2(const Common::String &msg) {
- _vm->_fontManager.TEXT_NOW(_textPosition.x, _textPosition.y, msg, _textColor);
+ _vm->_fontManager.displayTextVesa(_textPosition.x, _textPosition.y, msg, _textColor);
}
/**
diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp
index 7ebcbc8953..0c72005894 100644
--- a/engines/hopkins/dialogs.cpp
+++ b/engines/hopkins/dialogs.cpp
@@ -416,7 +416,7 @@ LABEL_7:
do
_vm->_eventsManager.VBL();
while (!_vm->_globals.SORTIE && _vm->_eventsManager.getMouseButton() != 1);
- _vm->_fontManager.TEXTE_OFF(9);
+ _vm->_fontManager.hideText(9);
}
if (_vm->_globals.SORTIE) {
if (_vm->_globals.SORTIE == 2)
@@ -441,7 +441,7 @@ LABEL_7:
if ((uint16)(_vm->_globals.ECRAN - 35) <= 5u)
_vm->_objectsManager.SPECIAL_JEU();
}
- _vm->_fontManager.TEXTE_OFF(9);
+ _vm->_fontManager.hideText(9);
if (_inventDisplayedFl) {
_inventDisplayedFl = false;
// v9 = 114;
diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp
index 7976ba853d..5f9ee21464 100644
--- a/engines/hopkins/events.cpp
+++ b/engines/hopkins/events.cpp
@@ -456,7 +456,7 @@ LABEL_65:
if (_vm->_graphicsManager.OLD_SCROLL == v4) {
_vm->_graphicsManager.Affiche_Segment_Vesa();
} else {
- _vm->_fontManager.TEXTE_OFF(9);
+ _vm->_fontManager.hideText(9);
_vm->_graphicsManager.DD_Lock();
if (_vm->_graphicsManager.SDL_ECHELLE) {
if (_vm->_graphicsManager.Winbpp == 2) {
diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp
index 9efae223cd..7b5cfded30 100644
--- a/engines/hopkins/font.cpp
+++ b/engines/hopkins/font.cpp
@@ -42,90 +42,100 @@ void FontManager::setParent(HopkinsEngine *vm) {
void FontManager::clearAll() {
for (int idx = 0; idx < 12; ++idx) {
- Common::fill((byte *)&Txt[idx], (byte *)&Txt[idx] + sizeof(TxtItem), 0);
+ Common::fill((byte *)&_text[idx], (byte *)&_text[idx] + sizeof(TxtItem), 0);
- ListeTxt[idx].enabled = false;
- ListeTxt[idx].height = 0;
- ListeTxt[idx].width = 0;
- ListeTxt[idx].xp = 0;
- ListeTxt[idx].yp = 0;
+ _textList[idx]._enabledFl = false;
+ _textList[idx]._height = 0;
+ _textList[idx]._width = 0;
+ _textList[idx]._pos.x = 0;
+ _textList[idx]._pos.y = 0;
}
for (int idx = 0; idx < 21; idx++)
- TRIER_TEXT[idx] = 0;
+ _textSortArray[idx] = 0;
- oldname = Common::String("");
- nom_index = Common::String("");
+ _oldName = Common::String("");
+ _indexName = Common::String("");
for (int idx = 0; idx < 4048; idx++)
- Index[idx] = 0;
+ _index[idx] = 0;
- texte_tmp = g_PTRNUL;
+ _tempText = g_PTRNUL;
}
-// Text On
-void FontManager::TEXTE_ON(int idx) {
- if ((idx - 5) > 11)
+/**
+ * Display Text
+ */
+void FontManager::showText(int idx) {
+ if ((idx - 5) > MAX_TEXT)
error("Attempted to display text > MAX_TEXT.");
- TxtItem &txt = Txt[idx - 5];
- txt.textOn = true;
- txt.textLoaded = false;
+ TxtItem &txt = _text[idx - 5];
+ txt._textOnFl = true;
+ txt._textLoadedFl = false;
- if (txt.textBlock != g_PTRNUL) {
- _vm->_globals.dos_free2(txt.textBlock);
- txt.textBlock = g_PTRNUL;
+ if (txt._textBlock != g_PTRNUL) {
+ _vm->_globals.dos_free2(txt._textBlock);
+ txt._textBlock = g_PTRNUL;
}
}
-// Text Off
-void FontManager::TEXTE_OFF(int idx) {
- if ((idx - 5) > 11)
+/**
+ * Hide text
+ */
+void FontManager::hideText(int idx) {
+ if ((idx - 5) > MAX_TEXT)
error("Attempted to display text > MAX_TEXT.");
- TxtItem &txt = Txt[idx - 5];
- txt.textOn = false;
- txt.textLoaded = false;
+ TxtItem &txt = _text[idx - 5];
+ txt._textOnFl = false;
+ txt._textLoadedFl = false;
- if (txt.textBlock != g_PTRNUL) {
- _vm->_globals.dos_free2(txt.textBlock);
- txt.textBlock = g_PTRNUL;
+ if (txt._textBlock != g_PTRNUL) {
+ _vm->_globals.dos_free2(txt._textBlock);
+ txt._textBlock = g_PTRNUL;
}
}
-// Text Color
-void FontManager::COUL_TXT(int idx, byte colByte) {
- Txt[idx - 5].colour = colByte;
+/**
+ * Set Text Color
+ */
+void FontManager::setTextColor(int idx, byte colByte) {
+ _text[idx - 5]._color = colByte;
}
-// Text Optimal Color
-void FontManager::OPTI_COUL_TXT(int idx1, int idx2, int idx3, int idx4) {
- COUL_TXT(idx1, 255);
- COUL_TXT(idx2, 255);
- COUL_TXT(idx3, 255);
- COUL_TXT(idx4, 253);
+/**
+ * Set Text Optimal Color
+ */
+void FontManager::setOptimalColor(int idx1, int idx2, int idx3, int idx4) {
+ setTextColor(idx1, 255);
+ setTextColor(idx2, 255);
+ setTextColor(idx3, 255);
+ setTextColor(idx4, 253);
}
-//
-void FontManager::DOS_TEXT(int idx, int messageId, const Common::String &filename, int xp, int yp, int a6, int a7, int a8, int a9, int colour) {
- if ((idx - 5) > 11)
+/**
+ * Init text structure
+ */
+void FontManager::initTextBuffers(int idx, int messageId, const Common::String &filename, int xp, int yp, int a6, int a7, int textType, int a9, int color) {
+ if ((idx - 5) > MAX_TEXT)
error("Attempted to display text > MAX_TEXT.");
- TxtItem &txt = Txt[idx - 5];
- txt.textOn = false;
- txt.filename = filename;
- txt.xp = xp;
- txt.yp = yp;
- txt.messageId = messageId;
- txt.fieldE = a6;
- txt.field10 = a7;
- txt.field3FC = a8;
- txt.field3FE = a9;
- txt.colour = colour;
+ TxtItem &txt = _text[idx - 5];
+ txt._textOnFl = false;
+ txt._filename = filename;
+ txt._pos.x = xp;
+ txt._pos.y = yp;
+ txt._messageId = messageId;
+ txt._fieldE = a6; // Useless variable
+ txt._field10 = a7; // Useless variable
+ txt._textType = textType;
+ txt._field3FE = a9;
+ txt._color = color;
}
// Box
-void FontManager::BOITE(int idx, int messageId, const Common::String &filename, int xp, int yp) {
+void FontManager::box(int idx, int messageId, const Common::String &filename, int xp, int yp) {
byte *v9;
byte *ptre;
Common::String s;
@@ -138,66 +148,66 @@ void FontManager::BOITE(int idx, int messageId, const Common::String &filename,
error("Bad number for text");
_vm->_globals.police_l = 11;
- _vm->_globals.largeur_boite = 11 * Txt[idx].field3FE;
- if (Txt[idx].textLoaded) {
- int v34 = Txt[idx].field3FC;
- if (v34 != 6 && v34 != 1 && v34 != 3 && v34 != 5) {
+ _vm->_globals.largeur_boite = 11 * _text[idx]._field3FE;
+ if (_text[idx]._textLoadedFl) {
+ int textType = _text[idx]._textType;
+ if (textType != 6 && textType != 1 && textType != 3 && textType != 5) {
int yCurrent = yp + 5;
- if (Txt[idx].lineCount > 0) {
- for (int lineNum = 0; lineNum < Txt[idx].lineCount; ++lineNum) {
- TEXT_NOW1(xp + 5, yCurrent, Txt[idx].lines[lineNum], Txt[idx].colour);
+ if (_text[idx]._lineCount > 0) {
+ for (int lineNum = 0; lineNum < _text[idx]._lineCount; ++lineNum) {
+ displayText(xp + 5, yCurrent, _text[idx]._lines[lineNum], _text[idx]._color);
yCurrent += _vm->_globals.police_h + 1;
}
}
} else {
- int v36 = Txt[idx].height;
- int v37 = Txt[idx].width;
+ int height = _text[idx]._height;
+ int width = _text[idx]._width;
_vm->_graphicsManager.Restore_Mem(
_vm->_graphicsManager.VESA_BUFFER,
- Txt[idx].textBlock,
+ _text[idx]._textBlock,
xp,
yp,
- Txt[idx].width,
- Txt[idx].height);
- _vm->_graphicsManager.Ajoute_Segment_Vesa(xp, yp, xp + v37, yp + v36);
+ _text[idx]._width,
+ _text[idx]._height);
+ _vm->_graphicsManager.Ajoute_Segment_Vesa(xp, yp, xp + width, yp + height);
}
} else {
int lineCount = 0;
int v62 = 0;
do {
- TRIER_TEXT[v62++] = 0;
+ _textSortArray[v62++] = 0;
} while (v62 <= 19);
- Txt[idx].textLoaded = true;
+ _text[idx]._textLoadedFl = true;
_vm->_fileManager.constructFilename(_vm->_globals.HOPLINK, filename);
file = _vm->_globals.NFICHIER;
- if (strncmp(file.c_str(), oldname.c_str(), strlen(file.c_str())) != 0) {
+ if (strncmp(file.c_str(), _oldName.c_str(), strlen(file.c_str())) != 0) {
// Starting to access a new file, so read in the index file for the file
- oldname = file;
- nom_index = Common::String(file.c_str(), file.size() - 3);
- nom_index += "IND";
+ _oldName = file;
+ _indexName = Common::String(file.c_str(), file.size() - 3);
+ _indexName += "IND";
- if (!f.open(nom_index))
- error("Error opening file - %s", nom_index.c_str());
+ if (!f.open(_indexName))
+ error("Error opening file - %s", _indexName.c_str());
int filesize = f.size();
for (int i = 0; i < (filesize / 4); ++i)
- Index[i] = f.readUint32LE();
+ _index[i] = f.readUint32LE();
f.close();
}
int v11, v69;
if (filename[0] != 'Z' || filename[1] != 'O') {
if (!f.open(file))
- error("Error opening file - %s", nom_index.c_str());
+ error("Error opening file - %s", _indexName.c_str());
v69 = 2048;
- f.seek(Index[messageId]);
+ f.seek(_index[messageId]);
- texte_tmp = _vm->_globals.dos_malloc2(0x80Au);
- if (texte_tmp == g_PTRNUL)
+ _tempText = _vm->_globals.dos_malloc2(0x80Au);
+ if (_tempText == g_PTRNUL)
error("Error allocating text");
- Common::fill(&texte_tmp[0], &texte_tmp[0x80a], 0);
- f.read(texte_tmp, 0x800u);
+ Common::fill(&_tempText[0], &_tempText[0x80a], 0);
+ f.read(_tempText, 0x800u);
f.close();
_vm->_globals.texte_long = 2048;
} else {
@@ -206,13 +216,13 @@ void FontManager::BOITE(int idx, int messageId, const Common::String &filename,
v9 = _vm->_globals.dos_malloc2(0x6Eu);
Common::fill(&v9[0], &v9[0x6e], 0);
- texte_tmp = v9;
- const byte *v10 = _vm->_globals.BUF_ZONE + Index[messageId];
+ _tempText = v9;
+ const byte *v10 = _vm->_globals.BUF_ZONE + _index[messageId];
memcpy(v9, v10, 0x60u);
v11 = 0;
WRITE_LE_UINT16((uint16 *)v9 + 48, (int16)READ_LE_UINT16(v10 + 96));
}
- byte *v59 = texte_tmp;
+ byte *v59 = _tempText;
byte *v60;
if (!v69)
goto LABEL_43;
@@ -232,21 +242,21 @@ void FontManager::BOITE(int idx, int messageId, const Common::String &filename,
v59++;
};
- v60 = texte_tmp;
+ v60 = _tempText;
if (v69) {
int v64 = 0;
for (;;) {
byte v14 = *(v60 + v64);
if (v14 == '\r' || v14 == '\n') {
*(v60 + v64) = 0;
- if (!Txt[idx].field3FE)
+ if (!_text[idx]._field3FE)
break;
}
++v64;
if (v69 <= v64)
goto LABEL_43;
}
- Txt[idx].field3FE = v64;
+ _text[idx]._field3FE = v64;
_vm->_globals.largeur_boite = 0;
if (v64 + 1 > 0) {
@@ -261,18 +271,18 @@ void FontManager::BOITE(int idx, int messageId, const Common::String &filename,
int v17 = _vm->_globals.largeur_boite / 2;
if (v17 < 0)
v17 = -v17;
- Txt[idx].xp = 320 - v17;
+ _text[idx]._pos.x = 320 - v17;
v73 = _vm->_eventsManager._startPos.x + 320 - v17;
lineCount = 1;
if (v64 + 1 > 0) {
- Txt[idx].lines[0] = Common::String((const char *)v60, v64);
+ _text[idx]._lines[0] = Common::String((const char *)v60, v64);
}
} else {
LABEL_43:
if (!_vm->_globals.largeur_boite)
_vm->_globals.largeur_boite = 240;
int v65 = 0;
- byte *v61 = texte_tmp;
+ byte *v61 = _tempText;
int v21;
int lineSize;
do {
@@ -308,29 +318,29 @@ LABEL_57:
while (actualSize < lineSize && *(v61 + v65 + actualSize))
++actualSize;
- Txt[idx].lines[v20] = Common::String((const char *)v61 + v65, actualSize);
- TRIER_TEXT[lineCount++] = lineSize;
+ _text[idx]._lines[v20] = Common::String((const char *)v61 + v65, actualSize);
+ _textSortArray[lineCount++] = lineSize;
v65 += lineSize;
v11 = v21;
} while (v21 != 37);
for (int i = 0; i <= 19; i++) {
- int v22 = TRIER_TEXT[i];
+ int v22 = _textSortArray[i];
if (v22 <= 0) {
- TRIER_TEXT[i] = 0;
+ _textSortArray[i] = 0;
} else {
int ptrc = 0;
if (v22 - 1 > 0) {
- for (int v23 = 0; v23 < TRIER_TEXT[i] - 1; v23++) {
- Common::String &line = Txt[idx].lines[i];
+ for (int v23 = 0; v23 < _textSortArray[i] - 1; v23++) {
+ Common::String &line = _text[idx]._lines[i];
byte v24 = (v23 >= (int)line.size()) ? '\0' : line.c_str()[v23];
if ((byte)v24 <= 0x1Fu)
v24 = 32;
ptrc += _vm->_objectsManager.getWidth(_vm->_globals.police, (byte)v24 - 32);
}
}
- TRIER_TEXT[i] = ptrc;
+ _textSortArray[i] = ptrc;
}
}
for (int i = 0; i <= 19; i++) {
@@ -339,21 +349,21 @@ LABEL_57:
++v25;
if (v25 == 20)
v25 = 0;
- if (TRIER_TEXT[i] < TRIER_TEXT[v25])
- TRIER_TEXT[i] = 0;
+ if (_textSortArray[i] < _textSortArray[v25])
+ _textSortArray[i] = 0;
} while (v25 != i);
};
for (int i = 0; i <= 19; i++) {
- if (TRIER_TEXT[i])
- _vm->_globals.largeur_boite = TRIER_TEXT[i];
+ if (_textSortArray[i])
+ _vm->_globals.largeur_boite = _textSortArray[i];
}
- if ((uint16)(Txt[idx].field3FC - 2) > 1u) {
+ if (_text[idx]._textType > 3) {
int i;
- for (i = xp - _vm->_eventsManager._startPos.x; _vm->_globals.largeur_boite + i > 638 && i > -2 && Txt[idx].field3FC; i -= 2)
+ for (i = xp - _vm->_eventsManager._startPos.x; _vm->_globals.largeur_boite + i > 638 && i > -2 && _text[idx]._textType; i -= 2)
;
- Txt[idx].xp = i;
+ _text[idx]._pos.x = i;
v73 = _vm->_eventsManager._startPos.x + i;
} else {
if (_vm->_globals.nbrligne == (SCREEN_WIDTH - 1)) {
@@ -364,7 +374,7 @@ LABEL_57:
while (_vm->_globals.largeur_boite + v73 > 1278 && v73 > -2)
v73 -= 2;
}
- Txt[idx].xp = v73;
+ _text[idx]._pos.x = v73;
}
}
_vm->_globals.hauteur_boite = (_vm->_globals.police_h + 1) * lineCount + 2;
@@ -372,20 +382,20 @@ LABEL_57:
int v55 = yp;
int v53 = _vm->_globals.largeur_boite + 10;
int v51 = (_vm->_globals.police_h + 1) * lineCount + 12;
- if (Txt[idx].field3FC == 6) {
+ if (_text[idx]._textType == 6) {
int v27 = v53 / 2;
if (v27 < 0)
v27 = -v27;
- Txt[idx].xp = 315 - v27;
+ _text[idx]._pos.x = 315 - v27;
int v28 = _vm->_eventsManager._startPos.x + 315 - v27;
v73 = _vm->_eventsManager._startPos.x + 315 - v27;
- Txt[idx].yp = 50;
+ _text[idx]._pos.y = 50;
v70 = 50;
v55 = 50;
v56 = v28;
}
- int v29 = Txt[idx].field3FC;
- if (v29 == 1 || v29 == 3 || (uint16)(v29 - 5) <= 1u) {
+ int textType = _text[idx]._textType;
+ if (textType == 1 || textType == 3 || textType == 5 || textType == 6) {
int v49 = v51 * v53;
byte *ptrd = _vm->_globals.dos_malloc2(v49);
if (ptrd == g_PTRNUL) {
@@ -401,13 +411,13 @@ LABEL_57:
_vm->_graphicsManager.Plot_Vline(_vm->_graphicsManager.VESA_BUFFER, v56, v70, v51, (byte)-2);
_vm->_graphicsManager.Plot_Vline(_vm->_graphicsManager.VESA_BUFFER, v53 + v56, v70, v51, (byte)-2);
}
- Txt[idx].lineCount = lineCount;
+ _text[idx]._lineCount = lineCount;
int v75 = v73 + 5;
int v71 = v70 + 5;
if (lineCount > 0) {
for (int lineNum = 0; lineNum < lineCount; ++lineNum) {
- TEXT_NOW1(v75, v71, Txt[idx].lines[lineNum], Txt[idx].colour);
+ displayText(v75, v71, _text[idx]._lines[lineNum], _text[idx]._color);
v71 += _vm->_globals.police_h + 1;
}
}
@@ -415,27 +425,29 @@ LABEL_57:
int blockWidth = v53 + 1;
int blockHeight = v51 + 1;
- Txt[idx].width = blockWidth;
- Txt[idx].height = blockHeight;
- int v32 = Txt[idx].field3FC;
- if (v32 == 6 || v32 == 1 || v32 == 3 || v32 == 5) {
- if (Txt[idx].textBlock != g_PTRNUL)
- Txt[idx].textBlock = _vm->_globals.dos_free2(Txt[idx].textBlock);
+ _text[idx]._width = blockWidth;
+ _text[idx]._height = blockHeight;
+ textType = _text[idx]._textType;
+ if (textType == 6 || textType == 1 || textType == 3 || textType == 5) {
+ if (_text[idx]._textBlock != g_PTRNUL)
+ _text[idx]._textBlock = _vm->_globals.dos_free2(_text[idx]._textBlock);
int blockSize = blockHeight * blockWidth;
ptre = _vm->_globals.dos_malloc2(blockSize + 20);
if (ptre == g_PTRNUL)
error("Cutting a block for text box (%d)", blockSize);
- Txt[idx].textBlock = ptre;
- Txt[idx].width = blockWidth;
- Txt[idx].height = blockHeight;
- _vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager.VESA_BUFFER, Txt[idx].textBlock, v56, v55, Txt[idx].width, blockHeight);
+ _text[idx]._textBlock = ptre;
+ _text[idx]._width = blockWidth;
+ _text[idx]._height = blockHeight;
+ _vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager.VESA_BUFFER, _text[idx]._textBlock, v56, v55, _text[idx]._width, blockHeight);
}
- texte_tmp = _vm->_globals.dos_free2(texte_tmp);
+ _tempText = _vm->_globals.dos_free2(_tempText);
}
}
-
-void FontManager::TEXT_NOW(int xp, int yp, const Common::String &message, int col) {
+/**
+ * Directly display text
+ */
+void FontManager::displayTextVesa(int xp, int yp, const Common::String &message, int col) {
const char *srcP;
char currChar;
int charIndex;
@@ -458,7 +470,7 @@ void FontManager::TEXT_NOW(int xp, int yp, const Common::String &message, int co
}
-void FontManager::TEXT_NOW1(int xp, int yp, const Common::String &message, int col) {
+void FontManager::displayText(int xp, int yp, const Common::String &message, int col) {
for (uint idx = 0; idx < message.size(); ++idx) {
char currentChar = message[idx];
diff --git a/engines/hopkins/font.h b/engines/hopkins/font.h
index 08b32377a7..dbe6a2dc67 100644
--- a/engines/hopkins/font.h
+++ b/engines/hopkins/font.h
@@ -24,66 +24,66 @@
#define HOPKINS_FONT_H
#include "common/scummsys.h"
+#include "common/events.h"
#include "common/str.h"
namespace Hopkins {
+#define MAX_TEXT 11
+
class HopkinsEngine;
struct TxtItem {
- bool textOn;
- int field2;
- Common::String filename;
- int16 xp;
- int16 yp;
- int messageId;
- int fieldE;
- int field10;
- int lineCount;
- Common::String lines[10];
- int field3FC;
- int field3FE;
- byte *textBlock;
- int16 width;
- int16 height;
- bool textLoaded;
- int colour;
+ bool _textOnFl;
+// int _field2; // Unused variable
+ Common::String _filename;
+ Common::Point _pos;
+ int _messageId;
+ int _fieldE; // Useless variable
+ int _field10; // Useless variable
+ int _lineCount;
+ Common::String _lines[10];
+ int _textType;
+ int _field3FE;
+ byte *_textBlock;
+ int16 _width;
+ int16 _height;
+ bool _textLoadedFl;
+ int _color;
};
-struct ListeTxtItem {
- bool enabled;
- int16 xp;
- int16 yp;
- int16 width;
- int16 height;
+struct TxtItemList {
+ bool _enabledFl;
+ Common::Point _pos;
+ int16 _width;
+ int16 _height;
};
-
class FontManager {
private:
HopkinsEngine *_vm;
public:
- TxtItem Txt[12];
- ListeTxtItem ListeTxt[12];
- int TRIER_TEXT[21];
- Common::String oldname;
- Common::String nom_index;
- int Index[4048];
- byte *texte_tmp;
+ TxtItem _text[12];
+ TxtItemList _textList[12];
+ int _textSortArray[21];
+ Common::String _oldName;
+ Common::String _indexName;
+ int _index[4048];
+ byte *_tempText;
public:
FontManager();
void setParent(HopkinsEngine *vm);
void clearAll();
- void TEXTE_ON(int idx);
- void TEXTE_OFF(int idx);
- void COUL_TXT(int idx, byte colByte);
- void OPTI_COUL_TXT(int idx1, int idx2, int idx3, int idx4);
- void DOS_TEXT(int idx, int messageId, const Common::String &filename, int xp, int yp, int a6, int a7, int a8, int a9, int a10);
- void BOITE(int idx, int messageId, const Common::String &filename, int xp, int yp);
+ void showText(int idx);
+ void hideText(int idx);
+ void setTextColor(int idx, byte colByte);
+ void setOptimalColor(int idx1, int idx2, int idx3, int idx4);
+ void initTextBuffers(int idx, int messageId, const Common::String &filename, int xp, int yp, int a6, int a7, int textType, int a9, int a10);
+ void box(int idx, int messageId, const Common::String &filename, int xp, int yp);
- void TEXT_NOW(int xp, int yp, const Common::String &message, int col);
- void TEXT_NOW1(int xp, int yp, const Common::String &message, int col);
+ void displayTextVesa(int xp, int yp, const Common::String &message, int col);
+ void displayText(int xp, int yp, const Common::String &message, int col);
void TEXT_COMPUT(int xp, int yp, const Common::String &msg, int col);
};
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index ff2a0735a0..54f2c55ae2 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -3697,7 +3697,7 @@ void HopkinsEngine::Credits() {
}
void HopkinsEngine::BTOCEAN() {
- _fontManager.TEXTE_OFF(9);
+ _fontManager.hideText(9);
if (_eventsManager._mouseCursorId == 16) {
_eventsManager.getMouseX();
if (_objectsManager.NUMZONE > 0) {
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index 44123cb84f..a050663090 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -316,8 +316,6 @@ void ObjectsManager::AFF_SPRITES() {
int v11;
uint16 *v12;
int v13;
- int v20;
- int v21;
int y1_1;
int y1_2;
int v25;
@@ -333,13 +331,13 @@ void ObjectsManager::AFF_SPRITES() {
// Handle copying any background areas that text are going to be drawn on
_vm->_globals.NBTRI = 0;
for (int idx = 0; idx <= 10; ++idx) {
- if (_vm->_fontManager.ListeTxt[idx].enabled && _vm->_fontManager.Txt[idx].field3FC != 2) {
- v1 = _vm->_fontManager.ListeTxt[idx].xp;
+ if (_vm->_fontManager._textList[idx]._enabledFl && _vm->_fontManager._text[idx]._textType != 2) {
+ v1 = _vm->_fontManager._textList[idx]._pos.x;
x1_1 = v1 - 2;
if ((int16)(v1 - 2) < _vm->_graphicsManager.min_x)
x1_1 = _vm->_graphicsManager.min_x;
- v2 = _vm->_fontManager.ListeTxt[idx].yp;
+ v2 = _vm->_fontManager._textList[idx]._pos.y;
y1_1 = v2 - 2;
if ((int16)(v2 - 2) < _vm->_graphicsManager.min_y)
@@ -352,10 +350,10 @@ void ObjectsManager::AFF_SPRITES() {
destY = _vm->_graphicsManager.min_y;
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager.VESA_SCREEN, x1_1, y1_1,
- _vm->_fontManager.ListeTxt[idx].width + 4, _vm->_fontManager.ListeTxt[idx].height + 4,
+ _vm->_fontManager._textList[idx]._width + 4, _vm->_fontManager._textList[idx]._height + 4,
_vm->_graphicsManager.VESA_BUFFER,
destX, destY);
- _vm->_fontManager.ListeTxt[idx].enabled = false;
+ _vm->_fontManager._textList[idx]._enabledFl = false;
}
}
@@ -521,42 +519,39 @@ void ObjectsManager::AFF_SPRITES() {
// Loop to draw any on-screen text
for (int idx = 0; idx <= 10; ++idx) {
- if (_vm->_fontManager.Txt[idx].textOn) {
- if ((uint16)(_vm->_fontManager.Txt[idx].field3FC - 2) > 1)
- _vm->_fontManager.BOITE(idx,
- _vm->_fontManager.Txt[idx].messageId, _vm->_fontManager.Txt[idx].filename,
- _vm->_eventsManager._startPos.x + _vm->_fontManager.Txt[idx].xp, _vm->_fontManager.Txt[idx].yp);
+ if (_vm->_fontManager._text[idx]._textOnFl) {
+ if (_vm->_fontManager._text[idx]._textType > 3)
+ _vm->_fontManager.box(idx,
+ _vm->_fontManager._text[idx]._messageId, _vm->_fontManager._text[idx]._filename,
+ _vm->_eventsManager._startPos.x + _vm->_fontManager._text[idx]._pos.x, _vm->_fontManager._text[idx]._pos.y);
else
- _vm->_fontManager.BOITE(
- idx,
- _vm->_fontManager.Txt[idx].messageId,
- _vm->_fontManager.Txt[idx].filename,
- _vm->_fontManager.Txt[idx].xp,
- _vm->_fontManager.Txt[idx].yp);
- _vm->_fontManager.ListeTxt[idx].enabled = true;
+ _vm->_fontManager.box(idx,
+ _vm->_fontManager._text[idx]._messageId, _vm->_fontManager._text[idx]._filename,
+ _vm->_fontManager._text[idx]._pos.x, _vm->_fontManager._text[idx]._pos.y);
+ _vm->_fontManager._textList[idx]._enabledFl = true;
- if ((uint16)(_vm->_fontManager.Txt[idx].field3FC - 2) > 1)
- _vm->_fontManager.ListeTxt[idx].xp = _vm->_eventsManager._startPos.x + _vm->_fontManager.Txt[idx].xp;
+ if (_vm->_fontManager._text[idx]._textType > 3)
+ _vm->_fontManager._textList[idx]._pos.x = _vm->_eventsManager._startPos.x + _vm->_fontManager._text[idx]._pos.x;
else
- _vm->_fontManager.ListeTxt[idx].xp = _vm->_fontManager.Txt[idx].xp;
+ _vm->_fontManager._textList[idx]._pos.x = _vm->_fontManager._text[idx]._pos.x;
- _vm->_fontManager.ListeTxt[idx].yp = _vm->_fontManager.Txt[idx].yp;
- _vm->_fontManager.ListeTxt[idx].width = _vm->_fontManager.Txt[idx].width;
- _vm->_fontManager.ListeTxt[idx].height = _vm->_fontManager.Txt[idx].height;
-
- if (_vm->_fontManager.ListeTxt[idx].xp < _vm->_graphicsManager.min_x)
- _vm->_fontManager.ListeTxt[idx].xp = _vm->_graphicsManager.min_x - 1;
- if (_vm->_fontManager.ListeTxt[idx].yp < _vm->_graphicsManager.min_y)
- _vm->_fontManager.ListeTxt[idx].yp = _vm->_graphicsManager.min_y - 1;
-
- v20 = _vm->_fontManager.ListeTxt[idx].xp;
- if (_vm->_fontManager.ListeTxt[idx].width + v20 > _vm->_graphicsManager.max_x)
- _vm->_fontManager.ListeTxt[idx].width = _vm->_graphicsManager.max_x - v20;
- v21 = _vm->_fontManager.ListeTxt[idx].yp;
- if (_vm->_fontManager.ListeTxt[idx].height + v21 > _vm->_graphicsManager.max_y)
- _vm->_fontManager.ListeTxt[idx].height = _vm->_graphicsManager.max_y - v21;
- if (_vm->_fontManager.ListeTxt[idx].width <= 0 || _vm->_fontManager.ListeTxt[idx].height <= 0)
- _vm->_fontManager.ListeTxt[idx].enabled = false;
+ _vm->_fontManager._textList[idx]._pos.y = _vm->_fontManager._text[idx]._pos.y;
+ _vm->_fontManager._textList[idx]._width = _vm->_fontManager._text[idx]._width;
+ _vm->_fontManager._textList[idx]._height = _vm->_fontManager._text[idx]._height;
+
+ if (_vm->_fontManager._textList[idx]._pos.x < _vm->_graphicsManager.min_x)
+ _vm->_fontManager._textList[idx]._pos.x = _vm->_graphicsManager.min_x - 1;
+ if (_vm->_fontManager._textList[idx]._pos.y < _vm->_graphicsManager.min_y)
+ _vm->_fontManager._textList[idx]._pos.y = _vm->_graphicsManager.min_y - 1;
+
+ int posX = _vm->_fontManager._textList[idx]._pos.x;
+ if (_vm->_fontManager._textList[idx]._width + posX > _vm->_graphicsManager.max_x)
+ _vm->_fontManager._textList[idx]._width = _vm->_graphicsManager.max_x - posX;
+ int posY = _vm->_fontManager._textList[idx]._pos.y;
+ if (_vm->_fontManager._textList[idx]._height + posY > _vm->_graphicsManager.max_y)
+ _vm->_fontManager._textList[idx]._height = _vm->_graphicsManager.max_y - posY;
+ if (_vm->_fontManager._textList[idx]._width <= 0 || _vm->_fontManager._textList[idx]._height <= 0)
+ _vm->_fontManager._textList[idx]._enabledFl = false;
}
}
@@ -1665,7 +1660,7 @@ void ObjectsManager::VERIFZONE() {
_vm->_eventsManager._mouseCursorId = 4;
_vm->_eventsManager.changeMouseCursor(4);
if (_vm->_globals.zozo_73 == 1) {
- _vm->_fontManager.TEXTE_OFF(5);
+ _vm->_fontManager.hideText(5);
_vm->_globals.zozo_73 = 0;
return;
}
@@ -1686,8 +1681,8 @@ LABEL_54:
|| _vm->_globals.ZONEP[v4].fieldE
|| _vm->_globals.ZONEP[v4].fieldF)) {
if (_vm->_globals.old_zone_68 != v4) {
- _vm->_fontManager.DOS_TEXT(5, _vm->_globals.ZONEP[v4].field12, _vm->_globals.FICH_ZONE, 0, 430, 20, 25, 0, 0, 252);
- _vm->_fontManager.TEXTE_ON(5);
+ _vm->_fontManager.initTextBuffers(5, _vm->_globals.ZONEP[v4].field12, _vm->_globals.FICH_ZONE, 0, 430, 20, 25, 0, 0, 252);
+ _vm->_fontManager.showText(5);
_vm->_globals.zozo_73 = 1;
}
_vm->_globals.force_to_data_0 += 25;
@@ -2688,7 +2683,7 @@ void ObjectsManager::BTGAUCHE() {
int v17;
int v18;
- _vm->_fontManager.TEXTE_OFF(9);
+ _vm->_fontManager.hideText(9);
destX = _vm->_eventsManager.getMouseX();
destY = _vm->_eventsManager.getMouseY();
@@ -2841,7 +2836,7 @@ LABEL_65:
_vm->_globals.SAUVEGARDE->data[svField3] = _vm->_globals.OBJET_EN_COURS;
_vm->_globals.GOACTION = 1;
}
- _vm->_fontManager.TEXTE_OFF(5);
+ _vm->_fontManager.hideText(5);
_vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100);
ARRET_PERSO_FLAG = 0;
if (_vm->_eventsManager._mouseCursorId == 21 && _vm->_globals.BOBZONE[NUMZONE]) {
@@ -2869,7 +2864,7 @@ void ObjectsManager::PARADISE() {
ARRET_PERSO_NUM = 0;
result = _vm->_globals.SAUVEGARDE->data[svField1];
if (result && _vm->_globals.SAUVEGARDE->data[svField2] && result != 4 && result > 3) {
- _vm->_fontManager.TEXTE_OFF(5);
+ _vm->_fontManager.hideText(5);
if (!_vm->_globals.FORET || ((uint16)(NUMZONE - 20) > 1u && (uint16)(NUMZONE - 22) > 1u)) {
if (_vm->_graphicsManager.DOUBLE_ECRAN == true) {
_vm->_graphicsManager.no_scroll = 2;
@@ -2975,8 +2970,8 @@ void ObjectsManager::CLEAR_ECRAN() {
CLEAR_SPR();
_vm->_graphicsManager.FIN_VISU();
- _vm->_fontManager.TEXTE_OFF(5);
- _vm->_fontManager.TEXTE_OFF(9);
+ _vm->_fontManager.hideText(5);
+ _vm->_fontManager.hideText(9);
_vm->_globals.CLEAR_VBOB();
_vm->_animationManager.clearAnim();
_vm->_linesManager.CLEAR_ZONE();
@@ -4920,11 +4915,11 @@ void ObjectsManager::SPECIAL_INI(const Common::String &a1) {
++v5;
} while (v5 <= 4);
VBOB(_vm->_globals.SPRITE_ECRAN, 5, 15, 28, 1);
- _vm->_fontManager.TEXTE_OFF(9);
+ _vm->_fontManager.hideText(9);
if (!_vm->_soundManager.TEXTOFF) {
- _vm->_fontManager.DOS_TEXT(9, 383, _vm->_globals.FICH_TEXTE, 220, 72, 20, 25, 6, 36, 253);
+ _vm->_fontManager.initTextBuffers(9, 383, _vm->_globals.FICH_TEXTE, 220, 72, 20, 25, 6, 36, 253);
if (!_vm->_soundManager.TEXTOFF)
- _vm->_fontManager.TEXTE_ON(9);
+ _vm->_fontManager.showText(9);
}
if (!_vm->_soundManager.VOICEOFF)
_vm->_soundManager.VOICE_MIX(383, 4);
@@ -4938,7 +4933,7 @@ void ObjectsManager::SPECIAL_INI(const Common::String &a1) {
++v6;
} while (v6 <= 199);
}
- _vm->_fontManager.TEXTE_OFF(9);
+ _vm->_fontManager.hideText(9);
VBOB_OFF(5);
v7 = 0;
do {
diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp
index 6f3a06ab6b..84ae0443cd 100644
--- a/engines/hopkins/script.cpp
+++ b/engines/hopkins/script.cpp
@@ -134,37 +134,37 @@ int ScriptManager::Traduction(byte *a1) {
} while (_vm->_soundManager.SOUND_FLAG);
}
if (!_vm->_soundManager.TEXTOFF) {
- _vm->_fontManager.DOS_TEXT(9, v3, _vm->_globals.FICH_TEXTE, 2 * v67, 2 * v65 + 40, 20, 25, 6, v2, 253);
+ _vm->_fontManager.initTextBuffers(9, v3, _vm->_globals.FICH_TEXTE, 2 * v67, 2 * v65 + 40, 20, 25, 6, v2, 253);
if (!_vm->_soundManager.TEXTOFF)
- _vm->_fontManager.TEXTE_ON(9);
+ _vm->_fontManager.showText(9);
}
if (!_vm->_soundManager.VOICEOFF)
_vm->_soundManager.VOICE_MIX(v3, 4);
}
if (TRAVAILOBJET == 1) {
if (_vm->_globals.SAUVEGARDE->data[svField356]) {
- _vm->_fontManager.DOS_TEXT(9, 635, _vm->_globals.FICH_TEXTE, 55, 20, 20, 25, v69, 35, 253);
+ _vm->_fontManager.initTextBuffers(9, 635, _vm->_globals.FICH_TEXTE, 55, 20, 20, 25, v69, 35, 253);
if (!_vm->_soundManager.TEXTOFF)
- _vm->_fontManager.TEXTE_ON(9);
+ _vm->_fontManager.showText(9);
if (!_vm->_soundManager.VOICEOFF)
_vm->_soundManager.VOICE_MIX(635, 4);
goto LABEL_104;
}
if (_vm->_globals.FR == 1 && !_vm->_soundManager.TEXTOFF)
- _vm->_fontManager.DOS_TEXT(9, v3, "OBJET1.TXT", 2 * v67, 60, 20, 25, 6, v2, 253);
- if (!_vm->_globals.FR && !_vm->_soundManager.TEXTOFF)
- _vm->_fontManager.DOS_TEXT(9, v3, "OBJETAN.TXT", 2 * v67, 60, 20, 25, 6, v2, 253);
- if (_vm->_globals.FR == 2) {
+ _vm->_fontManager.initTextBuffers(9, v3, "OBJET1.TXT", 2 * v67, 60, 20, 25, 6, v2, 253);
+ else if (!_vm->_globals.FR && !_vm->_soundManager.TEXTOFF)
+ _vm->_fontManager.initTextBuffers(9, v3, "OBJETAN.TXT", 2 * v67, 60, 20, 25, 6, v2, 253);
+ else if (_vm->_globals.FR == 2) {
if (_vm->_soundManager.TEXTOFF) {
LABEL_98:
if (!_vm->_soundManager.VOICEOFF)
_vm->_soundManager.VOICE_MIX(v3, 5);
goto LABEL_104;
}
- _vm->_fontManager.DOS_TEXT(9, v3, "OBJETES.TXT", 2 * v67, 60, 20, 25, 6, v2, 253);
+ _vm->_fontManager.initTextBuffers(9, v3, "OBJETES.TXT", 2 * v67, 60, 20, 25, 6, v2, 253);
}
if (!_vm->_soundManager.TEXTOFF)
- _vm->_fontManager.TEXTE_ON(9);
+ _vm->_fontManager.showText(9);
goto LABEL_98;
}
}
@@ -543,7 +543,7 @@ LABEL_1141:
_vm->_objectsManager.OPTI_ONE(20, 0, 14, 4);
}
if (v76 == 12) {
- _vm->_fontManager.TEXTE_OFF(9);
+ _vm->_fontManager.hideText(9);
_vm->_eventsManager.VBL();
_vm->_eventsManager.VBL();
_vm->_talkManager.PARLER_PERSO("bqetueur.pe2");
@@ -695,8 +695,8 @@ LABEL_1141:
_vm->_graphicsManager.FADE_OUTW();
_vm->_globals.CACHE_OFF();
_vm->_objectsManager.SPRITE_OFF(0);
- _vm->_fontManager.TEXTE_OFF(5);
- _vm->_fontManager.TEXTE_OFF(9);
+ _vm->_fontManager.hideText(5);
+ _vm->_fontManager.hideText(9);
_vm->_graphicsManager.FIN_VISU();
_vm->_objectsManager.CLEAR_ECRAN();
@@ -1927,10 +1927,10 @@ LABEL_1141:
} while (_vm->_objectsManager.BOBPOSI(1) != 32);
_vm->_objectsManager.BOBANIM_OFF(1);
_vm->_objectsManager.BOBANIM_ON(2);
- _vm->_fontManager.TEXTE_OFF(9);
+ _vm->_fontManager.hideText(9);
if (!_vm->_soundManager.TEXTOFF) {
- _vm->_fontManager.DOS_TEXT(9, 617, _vm->_globals.FICH_TEXTE, 91, 41, 20, 25, 3, 30, 253);
- _vm->_fontManager.TEXTE_ON(9);
+ _vm->_fontManager.initTextBuffers(9, 617, _vm->_globals.FICH_TEXTE, 91, 41, 20, 25, 3, 30, 253);
+ _vm->_fontManager.showText(9);
}
if (!_vm->_soundManager.VOICEOFF)
_vm->_soundManager.VOICE_MIX(617, 4);
@@ -1993,8 +1993,8 @@ LABEL_1141:
_vm->_graphicsManager.FADE_OUTW();
_vm->_globals.CACHE_OFF();
_vm->_objectsManager.SPRITE_OFF(0);
- _vm->_fontManager.TEXTE_OFF(5);
- _vm->_fontManager.TEXTE_OFF(9);
+ _vm->_fontManager.hideText(5);
+ _vm->_fontManager.hideText(9);
_vm->_graphicsManager.FIN_VISU();
_vm->_graphicsManager.LOAD_IMAGE("IM20f");
_vm->_animationManager.loadAnim("ANIM20f");
diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp
index a13f757d77..31ebb3cc3a 100644
--- a/engines/hopkins/talk.cpp
+++ b/engines/hopkins/talk.cpp
@@ -65,8 +65,8 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) {
Common::String v16;
v15 = 0;
- _vm->_fontManager.TEXTE_OFF(5);
- _vm->_fontManager.TEXTE_OFF(9);
+ _vm->_fontManager.hideText(5);
+ _vm->_fontManager.hideText(9);
_vm->_eventsManager.VBL();
_vm->_graphicsManager.no_scroll = 1;
bool oldDisableInventFl = _vm->_globals._disableInventFl;
@@ -320,14 +320,14 @@ int TalkManager::DIALOGUE() {
v21 = v20 - 20 * v3;
v18 = v20 - 20 * v3 - 1;
v4 = v20 - 20 * v3 - 20 * v2;
- _vm->_fontManager.DOS_TEXT(5, PLIGNE1, FQUEST, 5, v4 - 20 * v19, 0, 0, 0, 65, 255);
- _vm->_fontManager.DOS_TEXT(6, PLIGNE2, FQUEST, 5, v4, 0, 0, 0, 65, 255);
- _vm->_fontManager.DOS_TEXT(7, PLIGNE3, FQUEST, 5, v21, 0, 0, 0, 65, 255);
- _vm->_fontManager.DOS_TEXT(8, PLIGNE4, FQUEST, 5, v20, 0, 0, 0, 65, 255);
- _vm->_fontManager.TEXTE_ON(5);
- _vm->_fontManager.TEXTE_ON(6);
- _vm->_fontManager.TEXTE_ON(7);
- _vm->_fontManager.TEXTE_ON(8);
+ _vm->_fontManager.initTextBuffers(5, PLIGNE1, FQUEST, 5, v4 - 20 * v19, 0, 0, 0, 65, 255);
+ _vm->_fontManager.initTextBuffers(6, PLIGNE2, FQUEST, 5, v4, 0, 0, 0, 65, 255);
+ _vm->_fontManager.initTextBuffers(7, PLIGNE3, FQUEST, 5, v21, 0, 0, 0, 65, 255);
+ _vm->_fontManager.initTextBuffers(8, PLIGNE4, FQUEST, 5, v20, 0, 0, 0, 65, 255);
+ _vm->_fontManager.showText(5);
+ _vm->_fontManager.showText(6);
+ _vm->_fontManager.showText(7);
+ _vm->_fontManager.showText(8);
v5 = -1;
v6 = 0;
@@ -335,24 +335,24 @@ int TalkManager::DIALOGUE() {
v7 = _vm->_eventsManager.getMouseY();
if ((v4 - 20 * v19) < v7 && (v4 - 1) > v7) {
v8 = v7;
- _vm->_fontManager.OPTI_COUL_TXT(6, 7, 8, 5);
+ _vm->_fontManager.setOptimalColor(6, 7, 8, 5);
v5 = PLIGNE1;
v7 = v8;
}
if (v7 > v4 && v18 > v7) {
v9 = v7;
- _vm->_fontManager.OPTI_COUL_TXT(5, 7, 8, 6);
+ _vm->_fontManager.setOptimalColor(5, 7, 8, 6);
v5 = PLIGNE2;
v7 = v9;
}
if (v21 < v7 && (v20 - 1) > v7) {
v10 = v7;
- _vm->_fontManager.OPTI_COUL_TXT(5, 6, 8, 7);
+ _vm->_fontManager.setOptimalColor(5, 6, 8, 7);
v5 = PLIGNE3;
v7 = v10;
}
if (v20 < v7 && v7 < 419) {
- _vm->_fontManager.OPTI_COUL_TXT(5, 6, 7, 8);
+ _vm->_fontManager.setOptimalColor(5, 6, 7, 8);
v5 = PLIGNE4;
}
@@ -364,10 +364,10 @@ int TalkManager::DIALOGUE() {
} while (!_vm->shouldQuit() && v6 != 1);
_vm->_soundManager.VOICE_MIX(v5, 1);
- _vm->_fontManager.TEXTE_OFF(5);
- _vm->_fontManager.TEXTE_OFF(6);
- _vm->_fontManager.TEXTE_OFF(7);
- _vm->_fontManager.TEXTE_OFF(8);
+ _vm->_fontManager.hideText(5);
+ _vm->_fontManager.hideText(6);
+ _vm->_fontManager.hideText(7);
+ _vm->_fontManager.hideText(8);
if (STATI) {
v11 = BUFFERPERSO;
@@ -472,8 +472,8 @@ int TalkManager::DIALOGUE_REP(int idx) {
}
if (!_vm->_soundManager.TEXTOFF) {
- _vm->_fontManager.DOS_TEXT(9, v22, FREPON, v25, v24, 20, 25, 5, v23, 252);
- _vm->_fontManager.TEXTE_ON(9);
+ _vm->_fontManager.initTextBuffers(9, v22, FREPON, v25, v24, 20, 25, 5, v23, 252);
+ _vm->_fontManager.showText(9);
}
if (!_vm->_soundManager.VOICE_MIX(v22, 1)) {
v14 = 0;
@@ -505,7 +505,7 @@ int TalkManager::DIALOGUE_REP(int idx) {
}
if (!_vm->_soundManager.TEXTOFF)
- _vm->_fontManager.TEXTE_OFF(9);
+ _vm->_fontManager.hideText(9);
if (STATI) {
v15 = BUFFERPERSO;
v16 = (int16)READ_LE_UINT16((uint16 *)BUFFERPERSO + 43);
@@ -1205,8 +1205,8 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) {
Common::String v22;
Common::String v23;
- _vm->_fontManager.TEXTE_OFF(5);
- _vm->_fontManager.TEXTE_OFF(9);
+ _vm->_fontManager.hideText(5);
+ _vm->_fontManager.hideText(9);
_vm->_eventsManager.VBL();
_vm->_graphicsManager.no_scroll = 1;
_vm->_linesManager.CLEAR_ZONE();