aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2012-03-07 08:33:48 +0100
committerStrangerke2012-04-06 08:22:54 +0200
commit6217fa5e3ee08790cfe5b775256740eeec8a0a1a (patch)
tree0d3e55039beeb2360e17df9381dbd58ffa0eb064
parent9e21d04e26f7378e3eb2fc5c7961987ed869ea5d (diff)
downloadscummvm-rg350-6217fa5e3ee08790cfe5b775256740eeec8a0a1a.tar.gz
scummvm-rg350-6217fa5e3ee08790cfe5b775256740eeec8a0a1a.tar.bz2
scummvm-rg350-6217fa5e3ee08790cfe5b775256740eeec8a0a1a.zip
MORTEVIELLE: some more renaming, match menu item size in setText()
-rw-r--r--engines/mortevielle/actions.cpp35
-rw-r--r--engines/mortevielle/dialogs.cpp20
-rw-r--r--engines/mortevielle/graphics.cpp8
-rw-r--r--engines/mortevielle/graphics.h2
-rw-r--r--engines/mortevielle/menu.cpp50
-rw-r--r--engines/mortevielle/menu.h6
-rw-r--r--engines/mortevielle/mor.cpp88
-rw-r--r--engines/mortevielle/mor.h2
-rw-r--r--engines/mortevielle/mor2.cpp34
-rw-r--r--engines/mortevielle/mortevielle.cpp2
-rw-r--r--engines/mortevielle/mouse.cpp9
-rw-r--r--engines/mortevielle/outtext.cpp8
-rw-r--r--engines/mortevielle/ovd1.cpp9
-rw-r--r--engines/mortevielle/ovd1.h2
-rw-r--r--engines/mortevielle/parole2.cpp2
-rw-r--r--engines/mortevielle/parole2.h2
-rw-r--r--engines/mortevielle/prog.cpp4
-rw-r--r--engines/mortevielle/saveload.cpp3
-rw-r--r--engines/mortevielle/var_mor.cpp2
-rw-r--r--engines/mortevielle/var_mor.h6
20 files changed, 143 insertions, 151 deletions
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp
index 7766272cf7..8f30e0da6b 100644
--- a/engines/mortevielle/actions.cpp
+++ b/engines/mortevielle/actions.cpp
@@ -47,8 +47,6 @@ namespace Mortevielle {
* @remarks Originally called 'taller'
*/
void fctMove() {
- int cx;
-
if ((g_s._currPlace == 26) && (g_msg[4] == g_vm->_menu._moveMenu[6])) {
g_s._currPlace = LANDING;
g_caff = g_s._currPlace;
@@ -85,7 +83,7 @@ void fctMove() {
return;
}
tsort();
- cx = 0;
+ int cx = 0;
do {
++cx;
} while (g_vm->_menu._moveMenu[cx] != g_msg[4]);
@@ -95,7 +93,8 @@ void fctMove() {
t1deva();
if (cx == 2)
t1neig();
- goto L2;
+ tmlieu(g_s._currPlace);
+ return;
}
if (g_s._currPlace == 23) {
@@ -103,7 +102,8 @@ void fctMove() {
t1deau();
if (cx == 2)
t1derr();
- goto L2;
+ tmlieu(g_s._currPlace);
+ return;
}
if ((g_s._currPlace == BUREAU) && (cx == 1))
@@ -175,7 +175,6 @@ void fctMove() {
if ((cx < 5) || (cx == 13) || (cx == 14))
affrep();
debloc(g_s._currPlace);
-L2:
tmlieu(g_s._currPlace);
}
@@ -315,7 +314,7 @@ void fctInventoryTake() {
modinv();
avpoing(cz);
g_crep = 998;
- clsf2();
+ clearScreenType2();
}
/**
@@ -623,7 +622,7 @@ void fctOpen() {
|| ((g_s._currPlace > RED_ROOM) && (g_s._currPlace < DINING_ROOM))
|| (g_s._currPlace == OWN_ROOM) || (g_s._currPlace == PURPLE_ROOM) || (g_s._currPlace == BLUE_ROOM)) {
if (getRandomNumber(1, 4) == 3)
- parole(7, 9, 1);
+ startSpeech(7, 9, 1);
}
g_touv[tmpPlace] = chr(g_num);
aniof(1, g_num);
@@ -691,7 +690,7 @@ void fctPlace() {
aniof(1, 1);
repon(2, 165);
maivid();
- parole(6, -9, 1);
+ startSpeech(6, -9, 1);
// Do you want to enter the hidden passage?
int answer = Alert::show(g_vm->getEngineString(S_YES_NO), 1);
@@ -703,7 +702,7 @@ void fctPlace() {
hideMouse();
hirs();
dessine_rouleau();
- clsf2();
+ clearScreenType2();
clsf3();
showMouse();
tinke();
@@ -792,7 +791,7 @@ void fctTurn() {
g_crep = 997;
if ((g_s._currPlace == ATTIC) && (g_s._atticRodHoleObjectId == 159) && (g_s._atticBallHoleObjectId == 141)) {
repon(2, 167);
- parole(7, 9, 1);
+ startSpeech(7, 9, 1);
int answer = Alert::show(g_vm->getEngineString(S_YES_NO), 1);
if (answer == 1)
g_vm->_endGame = true;
@@ -802,7 +801,7 @@ void fctTurn() {
if ((g_s._currPlace == SECRET_PASSAGE) && (g_s._secretPassageObjectId == 143)) {
repon(2, 175);
clsf3();
- parole(6, -9, 1);
+ startSpeech(6, -9, 1);
int answer = Alert::show(g_vm->getEngineString(S_YES_NO), 1);
if (answer == 1) {
g_s._currPlace = CRYPT;
@@ -928,7 +927,7 @@ void fctKnock() {
if (g_s._currPlace == 26) {
int rand = (getRandomNumber(0, 8)) - 4;
- parole(11, rand, 1);
+ startSpeech(11, rand, 1);
int p;
ecfren(p, rand, g_s._faithScore, g_ment);
int l = g_ment;
@@ -1146,7 +1145,7 @@ void fctEnter() {
g_crep = 179;
else {
g_x = (getRandomNumber(0, 10)) - 5;
- parole(7, g_x, 1);
+ startSpeech(7, g_x, 1);
aniof(1, 1);
g_x = convertBitIndexToCharacterIndex(z);
@@ -1167,7 +1166,7 @@ void fctEnter() {
}
} else {
g_x = (getRandomNumber(0, 10)) - 5;
- parole(7, g_x, 1);
+ startSpeech(7, g_x, 1);
aniof(1, 1);
g_s._currPlace = g_ment;
@@ -1201,7 +1200,7 @@ void fctSleep() {
tmlieu(g_s._currPlace);
}
clsf3();
- clsf2();
+ clearScreenType2();
ecrf2();
ecr2(g_vm->getEngineString(S_WANT_TO_WAKE_UP));
updateHour(j, h, m);
@@ -1573,7 +1572,7 @@ void MortevielleEngine::endGame() {
tlu(13, 152);
maivid();
clsf1();
- clsf2();
+ clearScreenType2();
clsf3();
repon(9, 1509);
tkey1(false);
@@ -1607,7 +1606,7 @@ void MortevielleEngine::endGame() {
* @remarks Originally called 'tencore'
*/
void MortevielleEngine::loseGame() {
- clsf2();
+ clearScreenType2();
musique(0);
tkey1(false);
maivid();
diff --git a/engines/mortevielle/dialogs.cpp b/engines/mortevielle/dialogs.cpp
index d538774842..717a256b8f 100644
--- a/engines/mortevielle/dialogs.cpp
+++ b/engines/mortevielle/dialogs.cpp
@@ -85,7 +85,7 @@ int Alert::show(const Common::String &msg, int n) {
}
g_vm->_screenSurface.putxy(cx, g_vm->_screenSurface._textPos.y);
g_vm->_screenSurface._textPos.y += 6;
- g_vm->_screenSurface.writeg(st, 4);
+ g_vm->_screenSurface.drawString(st, 4);
++i;
} while (chaine[i] != ']');
}
@@ -134,14 +134,14 @@ int Alert::show(const Common::String &msg, int n) {
Common::String tmp(" ");
tmp += s[quoi];
tmp += " ";
- g_vm->_screenSurface.writeg(tmp, 0);
+ g_vm->_screenSurface.drawString(tmp, 0);
}
setPosition(ix, coldep, esp);
Common::String tmp2 = " ";
tmp2 += s[ix];
tmp2 += " ";
- g_vm->_screenSurface.writeg(tmp2, 1);
+ g_vm->_screenSurface.drawString(tmp2, 1);
quoi = ix;
showMouse();
@@ -155,7 +155,7 @@ int Alert::show(const Common::String &msg, int n) {
Common::String tmp3(" ");
tmp3 += s[quoi];
tmp3 += " ";
- g_vm->_screenSurface.writeg(tmp3, 0);
+ g_vm->_screenSurface.drawString(tmp3, 0);
quoi = 0;
showMouse();
@@ -171,7 +171,7 @@ int Alert::show(const Common::String &msg, int n) {
Common::String tmp4(" ");
tmp4 += s[n];
tmp4 += " ";
- g_vm->_screenSurface.writeg(tmp4, 1);
+ g_vm->_screenSurface.drawString(tmp4, 1);
}
charecr(50, (NUM_LINES + 1) << 4);
showMouse();
@@ -275,7 +275,7 @@ void Alert::setButtonText(Common::String c, int coldep, int nbcase, Common::Stri
tmp += str[l];
tmp += " ";
- g_vm->_screenSurface.writeg(tmp, 0);
+ g_vm->_screenSurface.drawString(tmp, 0);
x += esp + 40;
}
}
@@ -406,9 +406,9 @@ void f3f8::draw() {
// Write the F3 and F8 text strings
g_vm->_screenSurface.putxy(3, 44);
- g_vm->_screenSurface.writeg(f3, 5);
+ g_vm->_screenSurface.drawString(f3, 5);
g_vm->_screenSurface._textPos.y = 51;
- g_vm->_screenSurface.writeg(f8, 5);
+ g_vm->_screenSurface.drawString(f8, 5);
// Get the width of the written text strings
int f3Width = g_vm->_screenSurface.getStringWidth(f3);
@@ -426,7 +426,7 @@ void f3f8::draw() {
void f3f8::checkForF8(int SpeechNum, bool drawAni50Fl) {
teskbd();
do {
- parole(SpeechNum, 0, 0);
+ startSpeech(SpeechNum, 0, 0);
waitForF3F8(g_key);
CHECK_QUIT;
@@ -468,7 +468,7 @@ void f3f8::ani50() {
pictout(adani, g_crep, 63, 12);
g_crep = animof(2, 1);
pictout(adani, g_crep, 63, 12);
- g_f2_all = (g_res == 1);
+ g_largestClearScreen = (g_res == 1);
repon(2, kDialogStringIndex + 143);
}
diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp
index f3737607de..1c26a5cea1 100644
--- a/engines/mortevielle/graphics.cpp
+++ b/engines/mortevielle/graphics.cpp
@@ -1046,16 +1046,16 @@ void ScreenSurface::setPixel(const Common::Point &pt, int palIndex) {
/**
* Write out a string
+ * @remarks Originally called 'writeg'
*/
-void ScreenSurface::writeg(const Common::String &l, int c) {
+void ScreenSurface::drawString(const Common::String &l, int command) {
int i, x;
Common::Point pt;
int cecr = 0;
- /* debug('writeg : '+l);*/
-
if (l == "")
return;
+
hideMouse();
pt = _textPos;
@@ -1065,7 +1065,7 @@ void ScreenSurface::writeg(const Common::String &l, int c) {
i = 10;
x = pt.x + i * l.size();
- switch (c) {
+ switch (command) {
case 1:
case 3: {
cecr = 0;
diff --git a/engines/mortevielle/graphics.h b/engines/mortevielle/graphics.h
index 253b708d70..9f4a4799ab 100644
--- a/engines/mortevielle/graphics.h
+++ b/engines/mortevielle/graphics.h
@@ -92,7 +92,7 @@ public:
void fillRect(int colour, const Common::Rect &bounds);
void clearScreen();
void putxy(int x, int y) { _textPos = Common::Point(x, y); }
- void writeg(const Common::String &l, int c);
+ void drawString(const Common::String &l, int command);
int getStringWidth(const Common::String &s);
void drawLine(int x, int y, int xx, int yy, int coul);
diff --git a/engines/mortevielle/menu.cpp b/engines/mortevielle/menu.cpp
index b60c70b4af..f2f19b6eee 100644
--- a/engines/mortevielle/menu.cpp
+++ b/engines/mortevielle/menu.cpp
@@ -42,13 +42,14 @@ namespace Mortevielle {
/**
* Setup a menu's contents
+ * @remarks Originally called 'menut'
*/
-void Menu::menut(int no, Common::String name) {
- byte h = hi(no);
- byte l = lo(no);
+void Menu::setText(int menuId, Common::String name) {
+ byte h = hi(menuId);
+ byte l = lo(menuId);
Common::String s = name;
- while (s.size() < 20)
+ while (s.size() < 30)
s += ' ';
switch (h) {
@@ -77,11 +78,11 @@ void Menu::menut(int no, Common::String name) {
/**
* _disable a menu item
- * @param no Hi byte represents menu number, lo byte reprsents item index
+ * @param menuId Hi byte represents menu number, lo byte reprsents item index
*/
-void Menu::disableMenuItem(int no) {
- byte h = hi(no);
- byte l = lo(no);
+void Menu::disableMenuItem(int menuId) {
+ byte h = hi(menuId);
+ byte l = lo(menuId);
switch (h) {
case MENU_INVENTORY:
@@ -110,12 +111,12 @@ void Menu::disableMenuItem(int no) {
/**
* Enable a menu item
- * @param no Hi byte represents menu number, lo byte reprsents item index
+ * @param menuId Hi byte represents menu number, lo byte reprsents item index
* @remarks Originally called menu_enable
*/
-void Menu::enableMenuItem(int no) {
- byte h = hi(no);
- byte l = lo(no);
+void Menu::enableMenuItem(int menuId) {
+ byte h = hi(menuId);
+ byte l = lo(menuId);
switch (h) {
case MENU_INVENTORY:
@@ -242,7 +243,7 @@ void Menu::invers(int ix) {
break;
}
if ((s[0] != '*') && (s[0] != '<'))
- g_vm->_screenSurface.writeg(s, ix);
+ g_vm->_screenSurface.drawString(s, ix);
else
g_msg4 = OPCODE_NONE;
}
@@ -309,42 +310,42 @@ void Menu::menuDown(int ii) {
switch (ii) {
case 1:
if (_inventoryStringArray[cx][0] != '*')
- g_vm->_screenSurface.writeg(_inventoryStringArray[cx], 4);
+ g_vm->_screenSurface.drawString(_inventoryStringArray[cx], 4);
break;
case 2:
if (_moveStringArray[cx][0] != '*')
- g_vm->_screenSurface.writeg(_moveStringArray[cx], 4);
+ g_vm->_screenSurface.drawString(_moveStringArray[cx], 4);
break;
case 3:
if (_actionStringArray[cx][0] != '*')
- g_vm->_screenSurface.writeg(_actionStringArray[cx], 4);
+ g_vm->_screenSurface.drawString(_actionStringArray[cx], 4);
break;
case 4:
if (_selfStringArray[cx][0] != '*')
- g_vm->_screenSurface.writeg(_selfStringArray[cx], 4);
+ g_vm->_screenSurface.drawString(_selfStringArray[cx], 4);
break;
case 5:
if (_discussStringArray[cx][0] != '*')
- g_vm->_screenSurface.writeg(_discussStringArray[cx], 4);
+ g_vm->_screenSurface.drawString(_discussStringArray[cx], 4);
break;
case 6:
- g_vm->_screenSurface.writeg(g_vm->getEngineString(S_SAVE_LOAD + cx), 4);
+ g_vm->_screenSurface.drawString(g_vm->getEngineString(S_SAVE_LOAD + cx), 4);
break;
case 7: {
Common::String s = g_vm->getEngineString(S_SAVE_LOAD + 1);
s += ' ';
s += (char)(48 + cx);
- g_vm->_screenSurface.writeg(s, 4);
+ g_vm->_screenSurface.drawString(s, 4);
}
break;
case 8:
if (cx == 1)
- g_vm->_screenSurface.writeg(g_vm->getEngineString(S_RESTART), 4);
+ g_vm->_screenSurface.drawString(g_vm->getEngineString(S_RESTART), 4);
else {
Common::String s = g_vm->getEngineString(S_SAVE_LOAD + 2);
s += ' ';
s += (char)(47 + cx);
- g_vm->_screenSurface.writeg(s, 4);
+ g_vm->_screenSurface.drawString(s, 4);
}
break;
default:
@@ -360,7 +361,6 @@ void Menu::menuDown(int ii) {
* Menu is being removed, so restore the previous background area.
*/
void Menu::menuUp(int xx) {
- /* debug('menuUp'); */
if (g_test0) {
charecr(10, (g_menuConstants[xx - 1][1] + 1) << 1);
@@ -383,7 +383,6 @@ void Menu::menuUp(int xx) {
* Erase the menu
*/
void Menu::eraseMenu() {
- /* debug('eraseMenu'); */
_menuActive = false;
g_vm->setMouseClick(false);
menuUp(g_msg3);
@@ -478,8 +477,7 @@ void Menu::initMenu() {
f.read(g_lettres, 7 * 24);
f.close();
- // Ask to swap floppy
- dem2();
+ // Skipped: dialog asking to swap floppy
for (i = 1; i <= 8; ++i)
_inventoryStringArray[i] = "* ";
diff --git a/engines/mortevielle/menu.h b/engines/mortevielle/menu.h
index 923c5aa3b6..cdd343a9ed 100644
--- a/engines/mortevielle/menu.h
+++ b/engines/mortevielle/menu.h
@@ -48,9 +48,9 @@ public:
int _inventoryMenu[9];
int _moveMenu[8];
public:
- void menut(int no, Common::String name);
- void disableMenuItem(int no);
- void enableMenuItem(int no);
+ void setText(int menuId, Common::String name);
+ void disableMenuItem(int menuId);
+ void enableMenuItem(int menuId);
void displayMenu();
void drawMenu();
void menuUp(int xx);
diff --git a/engines/mortevielle/mor.cpp b/engines/mortevielle/mor.cpp
index ebce8e4a14..36e06115c1 100644
--- a/engines/mortevielle/mor.cpp
+++ b/engines/mortevielle/mor.cpp
@@ -160,12 +160,16 @@ void clsf1() {
showMouse();
}
-void clsf2() {
+/**
+ * Engine function - Clear Screen - Type 2
+ * @remarks Originally called 'clsf2'
+ */
+void clearScreenType2() {
hideMouse();
- if (g_f2_all) {
+ if (g_largestClearScreen) {
g_vm->_screenSurface.fillRect(0, Common::Rect(1, 176, 633, 199));
g_vm->_screenSurface.drawBox(0, 175, 634, 24, 15);
- g_f2_all = false;
+ g_largestClearScreen = false;
} else {
g_vm->_screenSurface.fillRect(0, Common::Rect(1, 176, 633, 190));
g_vm->_screenSurface.drawBox(0, 175, 634, 15, 15);
@@ -183,21 +187,21 @@ void ecr2(Common::String str_) {
int tlig = 59 + (g_res - 1) * 36;
if ((int)str_.size() < tlig)
- g_vm->_screenSurface.writeg(str_, 5);
+ g_vm->_screenSurface.drawString(str_, 5);
else if ((int)str_.size() < (tlig << 1)) {
g_vm->_screenSurface.putxy(8, 176);
- g_vm->_screenSurface.writeg(copy(str_, 1, (tlig - 1)), 5);
+ g_vm->_screenSurface.drawString(copy(str_, 1, (tlig - 1)), 5);
g_vm->_screenSurface.putxy(8, 182);
- g_vm->_screenSurface.writeg(copy(str_, tlig, tlig << 1), 5);
+ g_vm->_screenSurface.drawString(copy(str_, tlig, tlig << 1), 5);
} else {
- g_f2_all = true;
- clsf2();
+ g_largestClearScreen = true;
+ clearScreenType2();
g_vm->_screenSurface.putxy(8, 176);
- g_vm->_screenSurface.writeg(copy(str_, 1, (tlig - 1)), 5);
+ g_vm->_screenSurface.drawString(copy(str_, 1, (tlig - 1)), 5);
g_vm->_screenSurface.putxy(8, 182);
- g_vm->_screenSurface.writeg(copy(str_, tlig, ((tlig << 1) - 1)), 5);
+ g_vm->_screenSurface.drawString(copy(str_, tlig, ((tlig << 1) - 1)), 5);
g_vm->_screenSurface.putxy(8, 190);
- g_vm->_screenSurface.writeg(copy(str_, tlig << 1, tlig * 3), 5);
+ g_vm->_screenSurface.drawString(copy(str_, tlig << 1, tlig * 3), 5);
}
}
@@ -211,7 +215,7 @@ void clsf3() {
void ecr3(Common::String text) {
clsf3();
g_vm->_screenSurface.putxy(8, 192);
- g_vm->_screenSurface.writeg(text, 5);
+ g_vm->_screenSurface.drawString(text, 5);
}
void ecrf6() {
@@ -245,7 +249,7 @@ void clsf10() {
co = 580 - (g_vm->_screenSurface.getStringWidth(st) / 2);
g_vm->_screenSurface.putxy(co, 92);
- g_vm->_screenSurface.writeg(st, 4);
+ g_vm->_screenSurface.drawString(st, 4);
g_vm->_screenSurface.fillRect(15, Common::Rect(560, 24, 610, 86));
/* rempli(69,12,32,5,255);*/
@@ -301,7 +305,7 @@ void modobj(int m) {
if (m != 500)
strp = deline(m - 501 + kInventoryStringIndex);
- g_vm->_menu.menut(g_vm->_menu._inventoryMenu[8], strp);
+ g_vm->_menu.setText(g_vm->_menu._inventoryMenu[8], strp);
g_vm->_menu.disableMenuItem(g_vm->_menu._inventoryMenu[8]);
}
@@ -314,11 +318,11 @@ void repon(int f, int m) {
tmpStr = deline(m - 501 + kInventoryStringIndex);
if ((int) tmpStr.size() > ((58 + (g_res - 1) * 37) << 1))
- g_f2_all = true;
+ g_largestClearScreen = true;
else
- g_f2_all = false;
+ g_largestClearScreen = false;
- clsf2();
+ clearScreenType2();
displayStr(tmpStr, 8, 176, 85, 3, 5);
} else {
modif(m);
@@ -327,7 +331,7 @@ void repon(int f, int m) {
if (f == 1)
f = 6;
if (f == 2) {
- clsf2();
+ clearScreenType2();
ecrf2();
text1(8, 182, 103, m);
if ((m == 68) || (m == 69))
@@ -423,42 +427,42 @@ void showPeoplePresent(int per) {
clsf10();
if ((per & 128) == 128) {
g_vm->_screenSurface.putxy(xp, 24);
- g_vm->_screenSurface.writeg("LEO", 4);
+ g_vm->_screenSurface.drawString("LEO", 4);
g_vm->_menu.enableMenuItem(g_vm->_menu._discussMenu[1]);
}
if ((per & 64) == 64) {
g_vm->_screenSurface.putxy(xp, 32);
- g_vm->_screenSurface.writeg("PAT", 4);
+ g_vm->_screenSurface.drawString("PAT", 4);
g_vm->_menu.enableMenuItem(g_vm->_menu._discussMenu[2]);
}
if ((per & 32) == 32) {
g_vm->_screenSurface.putxy(xp, 40);
- g_vm->_screenSurface.writeg("GUY", 4);
+ g_vm->_screenSurface.drawString("GUY", 4);
g_vm->_menu.enableMenuItem(g_vm->_menu._discussMenu[3]);
}
if ((per & 16) == 16) {
g_vm->_screenSurface.putxy(xp, 48);
- g_vm->_screenSurface.writeg("EVA", 4);
+ g_vm->_screenSurface.drawString("EVA", 4);
g_vm->_menu.enableMenuItem(g_vm->_menu._discussMenu[4]);
}
if ((per & 8) == 8) {
g_vm->_screenSurface.putxy(xp, 56);
- g_vm->_screenSurface.writeg("BOB", 4);
+ g_vm->_screenSurface.drawString("BOB", 4);
g_vm->_menu.enableMenuItem(g_vm->_menu._discussMenu[5]);
}
if ((per & 4) == 4) {
g_vm->_screenSurface.putxy(xp, 64);
- g_vm->_screenSurface.writeg("LUC", 4);
+ g_vm->_screenSurface.drawString("LUC", 4);
g_vm->_menu.enableMenuItem(g_vm->_menu._discussMenu[6]);
}
if ((per & 2) == 2) {
g_vm->_screenSurface.putxy(xp, 72);
- g_vm->_screenSurface.writeg("IDA", 4);
+ g_vm->_screenSurface.drawString("IDA", 4);
g_vm->_menu.enableMenuItem(g_vm->_menu._discussMenu[7]);
}
if ((per & 1) == 1) {
g_vm->_screenSurface.putxy(xp, 80);
- g_vm->_screenSurface.writeg("MAX", 4);
+ g_vm->_screenSurface.drawString("MAX", 4);
g_vm->_menu.enableMenuItem(g_vm->_menu._discussMenu[8]);
}
g_ipers = per;
@@ -617,11 +621,11 @@ void displayAloneText() {
clsf10();
g_vm->_screenSurface.putxy(580 - (g_vm->_screenSurface.getStringWidth(sYou) / 2), 30);
- g_vm->_screenSurface.writeg(sYou, 4);
+ g_vm->_screenSurface.drawString(sYou, 4);
g_vm->_screenSurface.putxy(580 - (g_vm->_screenSurface.getStringWidth(sAre) / 2), 50);
- g_vm->_screenSurface.writeg(sAre, 4);
+ g_vm->_screenSurface.drawString(sAre, 4);
g_vm->_screenSurface.putxy(580 - (g_vm->_screenSurface.getStringWidth(sAlone) / 2), 70);
- g_vm->_screenSurface.writeg(sAlone, 4);
+ g_vm->_screenSurface.drawString(sAlone, 4);
g_ipers = 0;
}
@@ -673,15 +677,15 @@ void drawClock() {
g_vm->_screenSurface.putxy(568, 154);
if (g_hour > 11)
- g_vm->_screenSurface.writeg("PM ", 1);
+ g_vm->_screenSurface.drawString("PM ", 1);
else
- g_vm->_screenSurface.writeg("AM ", 1);
+ g_vm->_screenSurface.drawString("AM ", 1);
g_vm->_screenSurface.putxy(550, 160);
if ((g_day >= 0) && (g_day <= 8)) {
Common::String tmp = g_vm->getEngineString(S_DAY);
tmp.insertChar((char)(g_day + 49), 0);
- g_vm->_screenSurface.writeg(tmp, 1);
+ g_vm->_screenSurface.drawString(tmp, 1);
}
}
@@ -1196,7 +1200,7 @@ void dprog() {
g_jh = 0;
if (!g_s._ipre)
g_blo = true;
- g_t = ti1;
+ g_t = kTime1;
g_mh = readclock();
}
@@ -1398,7 +1402,7 @@ void cavegre() {
ecrf2();
ecr3(g_vm->getEngineString(S_SOMEONE_ENTERS));
int rand = (getRandomNumber(0, 4)) - 2;
- parole(2, rand, 1);
+ startSpeech(2, rand, 1);
// The original was doing here a useless loop.
// It has been removed
@@ -1409,9 +1413,9 @@ void cavegre() {
void writetp(Common::String s, int t) {
if (g_res == 2)
- g_vm->_screenSurface.writeg(s, t);
+ g_vm->_screenSurface.drawString(s, t);
else
- g_vm->_screenSurface.writeg(copy(s, 1, 25), t);
+ g_vm->_screenSurface.drawString(copy(s, 1, 25), t);
}
void aniof(int ouf, int num) {
@@ -1442,35 +1446,35 @@ void musique(int so) {
/* musik(0) */
;
} else if ((g_prebru == 0) && (!g_s._ipre)) {
- parole(10, 1, 1);
+ startSpeech(10, 1, 1);
++g_prebru;
} else {
bool i = false;
if ((g_s._currPlace == MOUNTAIN) || (g_s._currPlace == MANOR_FRONT) || (g_s._currPlace == MANOR_BACK)) {
if (getRandomNumber(1, 3) == 2) {
- parole(9, getRandomNumber(2, 4), 1);
+ startSpeech(9, getRandomNumber(2, 4), 1);
i = true;
}
}
else if (g_s._currPlace == CHAPEL) {
if (getRandomNumber(1, 2) == 1) {
- parole(8, 1, 1);
+ startSpeech(8, 1, 1);
i = true;
}
}
else if (g_s._currPlace == WELL) {
if (getRandomNumber(1, 2) == 2) {
- parole(12, 1, 1);
+ startSpeech(12, 1, 1);
i = true;
}
}
else if (g_s._currPlace == 23) {
- parole(13, 1, 1);
+ startSpeech(13, 1, 1);
i = true;
}
if (!i)
- parole(getRandomNumber(1, 17), 1, 2);
+ startSpeech(getRandomNumber(1, 17), 1, 2);
}
}
diff --git a/engines/mortevielle/mor.h b/engines/mortevielle/mor.h
index 05dba14d6d..fcabee51d2 100644
--- a/engines/mortevielle/mor.h
+++ b/engines/mortevielle/mor.h
@@ -44,7 +44,7 @@ extern void text1(int x, int y, int nb, int m);
extern void initouv();
extern void ecrf1();
extern void clsf1();
-extern void clsf2();
+extern void clearScreenType2();
extern void ecrf2();
extern void ecr2(Common::String str_);
extern void clsf3();
diff --git a/engines/mortevielle/mor2.cpp b/engines/mortevielle/mor2.cpp
index d026ccf080..48ca45e4da 100644
--- a/engines/mortevielle/mor2.cpp
+++ b/engines/mortevielle/mor2.cpp
@@ -98,9 +98,9 @@ void tinke() {
if (!g_blo) {
if ((hour == 12) || ((hour > 18) && (hour < 21)) || ((hour >= 0) && (hour < 7)))
- g_t = ti2;
+ g_t = kTime2;
else
- g_t = ti1;
+ g_t = kTime1;
cf = g_s._faithScore;
if ((cf > 33) && (cf < 66))
g_t -= (g_t / 3);
@@ -169,7 +169,7 @@ void tinke() {
ecrf2();
ecr3(g_vm->getEngineString(S_HEAR_NOISE));
int rand = (getRandomNumber(0, 4)) - 2;
- parole(1, rand, 1);
+ startSpeech(1, rand, 1);
clsf3();
}
}
@@ -254,12 +254,12 @@ void tmlieu(int roomId) {
nomp = deline(g_v_lieu[i][roomId] + kMenuPlaceStringIndex);
while (nomp.size() < 20)
nomp += ' ';
- g_vm->_menu.menut(g_vm->_menu._moveMenu[i], nomp);
+ g_vm->_menu.setText(g_vm->_menu._moveMenu[i], nomp);
++i;
}
nomp = "* ";
for (int cx = 7; cx >= i; --cx)
- g_vm->_menu.menut(g_vm->_menu._moveMenu[cx], nomp);
+ g_vm->_menu.setText(g_vm->_menu._moveMenu[cx], nomp);
}
@@ -289,8 +289,8 @@ void unsetSearchMenu() {
for (int cx = 1; cx <= 11; ++cx)
g_vm->_menu.enableMenuItem(_actionMenu[cx]);
- g_vm->_menu.menut(OPCODE_SOUND, g_vm->getEngineString(S_PROBE));
- g_vm->_menu.menut(OPCODE_LIFT, g_vm->getEngineString(S_RAISE));
+ g_vm->_menu.setText(OPCODE_SOUND, g_vm->getEngineString(S_PROBE));
+ g_vm->_menu.setText(OPCODE_LIFT, g_vm->getEngineString(S_RAISE));
}
/* NIVEAU 6 */
@@ -310,7 +310,7 @@ void tperd() {
clsf1();
g_vm->_screenSurface.drawBox(60, 35, 400, 50, 15);
repon(9, g_crep);
- clsf2();
+ clearScreenType2();
clsf3();
g_col = false;
g_syn = false;
@@ -390,12 +390,12 @@ void modinv() {
++cy;
r = (ord(g_s._sjer[cx]) + 400);
nomp = deline(r - 501 + kInventoryStringIndex);
- g_vm->_menu.menut(g_vm->_menu._inventoryMenu[cy], nomp);
+ g_vm->_menu.setText(g_vm->_menu._inventoryMenu[cy], nomp);
g_vm->_menu.enableMenuItem(g_vm->_menu._inventoryMenu[cx]);
}
if (cy < 6)
for (int cx = cy + 1; cx <= 6; ++cx) {
- g_vm->_menu.menut(g_vm->_menu._inventoryMenu[cx], " ");
+ g_vm->_menu.setText(g_vm->_menu._inventoryMenu[cx], " ");
g_vm->_menu.disableMenuItem(g_vm->_menu._inventoryMenu[cx]);
}
}
@@ -412,7 +412,7 @@ void sparl(float adr, float rep) {
key = 0;
do {
- parole(repint, haut[g_caff - 69], 0);
+ startSpeech(repint, haut[g_caff - 69], 0);
f3f8::waitForF3F8(key);
CHECK_QUIT;
} while (key != 66);
@@ -443,8 +443,8 @@ void setSearchMenu() {
for (int cx = 1; cx <= 11; ++cx)
g_vm->_menu.disableMenuItem(_actionMenu[cx]);
- g_vm->_menu.menut(OPCODE_SOUND, g_vm->getEngineString(S_SUITE));
- g_vm->_menu.menut(OPCODE_LIFT, g_vm->getEngineString(S_STOP));
+ g_vm->_menu.setText(OPCODE_SOUND, g_vm->getEngineString(S_SUITE));
+ g_vm->_menu.setText(OPCODE_LIFT, g_vm->getEngineString(S_STOP));
}
void mennor() {
@@ -574,9 +574,9 @@ L1:
g_crep = 138;
repon(2, g_crep);
if (g_crep == 138)
- parole(5, 2, 1);
+ startSpeech(5, 2, 1);
else
- parole(4, 4, 1);
+ startSpeech(4, 4, 1);
if (g_iouv == 0)
g_s._faithScore += 2;
@@ -601,8 +601,8 @@ L1:
} else {
repon(2, 136);
int rand = (getRandomNumber(0, 4)) - 2;
- parole(3, rand, 1);
- clsf2();
+ startSpeech(3, rand, 1);
+ clearScreenType2();
displayAloneText();
debloc(21);
affrep();
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp
index 7ed3e921a5..8dd5ac3b35 100644
--- a/engines/mortevielle/mortevielle.cpp
+++ b/engines/mortevielle/mortevielle.cpp
@@ -155,7 +155,7 @@ Common::ErrorCode MortevielleEngine::initialise() {
init_lieu();
g_soundOff = false;
- g_f2_all = false;
+ g_largestClearScreen = false;
teskbd();
dialpre();
diff --git a/engines/mortevielle/mouse.cpp b/engines/mortevielle/mouse.cpp
index 4fcbb02fd0..3b381dd1b0 100644
--- a/engines/mortevielle/mouse.cpp
+++ b/engines/mortevielle/mouse.cpp
@@ -174,15 +174,14 @@ void hideMouse() {
* @remarks Originally called 'show_mouse'
*/
void showMouse() {
- int i, j, k, l;
- bool imp;
+ int k, l;
mouse_shwn = mouse_shwn + 1;
if (mouse_shwn != 1)
return;
- j = p_o_s;
- imp = odd(y_s);
- i = x_s & 7;
+ int j = p_o_s;
+ bool imp = odd(y_s);
+ int i = x_s & 7;
switch (g_currGraphicalDevice) {
case MODE_CGA:
k = 0;
diff --git a/engines/mortevielle/outtext.cpp b/engines/mortevielle/outtext.cpp
index 02c03b8668..d8e2309a4c 100644
--- a/engines/mortevielle/outtext.cpp
+++ b/engines/mortevielle/outtext.cpp
@@ -192,7 +192,7 @@ void displayStr(Common::String inputStr, int x, int y, int dx, int dy, int typ)
while (!stringParsed) {
switch (inputStr[p]) {
case '@':
- g_vm->_screenSurface.writeg(s, typ);
+ g_vm->_screenSurface.drawString(s, typ);
s = "";
++p;
xc = x;
@@ -204,7 +204,7 @@ void displayStr(Common::String inputStr, int x, int y, int dx, int dy, int typ)
xc += tab;
++p;
if (l_motsuiv(p, inputStr.c_str(), tab) + xc > xf) {
- g_vm->_screenSurface.writeg(s, typ);
+ g_vm->_screenSurface.drawString(s, typ);
s = "";
xc = x;
yc += 6;
@@ -216,7 +216,7 @@ void displayStr(Common::String inputStr, int x, int y, int dx, int dy, int typ)
j = x;
do {
g_vm->_screenSurface.putxy(j, i);
- g_vm->_screenSurface.writeg(" ", 0);
+ g_vm->_screenSurface.drawString(" ", 0);
j += 6;
} while (j <= xf);
i += 6;
@@ -228,7 +228,7 @@ void displayStr(Common::String inputStr, int x, int y, int dx, int dy, int typ)
break;
case '$':
stringParsed = true;
- g_vm->_screenSurface.writeg(s, typ);
+ g_vm->_screenSurface.drawString(s, typ);
break;
default:
s += inputStr[p];
diff --git a/engines/mortevielle/ovd1.cpp b/engines/mortevielle/ovd1.cpp
index 303323590c..d5bb43a83a 100644
--- a/engines/mortevielle/ovd1.cpp
+++ b/engines/mortevielle/ovd1.cpp
@@ -45,13 +45,6 @@ namespace Mortevielle {
// For ScummVM, we need to do check for file errors where we do the file access
const int ioresult = 0;
-/**
- * Check for disk 2 being in the drive
- */
-void dem2() {
- // Deprecated under ScummVM
-}
-
void charpal() {
Common::File f; // tabdb records
Common::File ft; // tfxx
@@ -245,7 +238,7 @@ void suite() {
Common::String cpr = "COPYRIGHT 1989 : LANKHOR";
g_vm->_screenSurface.putxy(104 + 72 * g_res, 185);
- g_vm->_screenSurface.writeg(cpr, 0);
+ g_vm->_screenSurface.drawString(cpr, 0);
}
} // End of namespace Mortevielle
diff --git a/engines/mortevielle/ovd1.h b/engines/mortevielle/ovd1.h
index 13a8f5db2e..25633a4111 100644
--- a/engines/mortevielle/ovd1.h
+++ b/engines/mortevielle/ovd1.h
@@ -30,8 +30,6 @@
namespace Mortevielle {
-extern void dem2();
-//extern void apzuul();
extern void charpal();
extern void chartex();
extern void dialpre();
diff --git a/engines/mortevielle/parole2.cpp b/engines/mortevielle/parole2.cpp
index 3682dc99d0..ff6ad7faec 100644
--- a/engines/mortevielle/parole2.cpp
+++ b/engines/mortevielle/parole2.cpp
@@ -83,7 +83,7 @@ void trait_ph() {
-void parole(int rep, int ht, int typ) {
+void startSpeech(int rep, int ht, int typ) {
int savph[501];
int tempo;
diff --git a/engines/mortevielle/parole2.h b/engines/mortevielle/parole2.h
index 01cf277422..3fab74d02f 100644
--- a/engines/mortevielle/parole2.h
+++ b/engines/mortevielle/parole2.h
@@ -33,7 +33,7 @@ namespace Mortevielle {
extern void rot_chariot();
extern void init_chariot();
extern void trait_ph();
-extern void parole(int rep, int ht, int typ);
+extern void startSpeech(int rep, int ht, int typ);
} // End of namespace Mortevielle
diff --git a/engines/mortevielle/prog.cpp b/engines/mortevielle/prog.cpp
index 1407e0e219..36d5265ed3 100644
--- a/engines/mortevielle/prog.cpp
+++ b/engines/mortevielle/prog.cpp
@@ -56,7 +56,7 @@ void changeGraphicalDevice(int newDevice) {
showPeoplePresent(g_ipers);
else
displayAloneText();
- clsf2();
+ clearScreenType2();
clsf3();
g_maff = 68;
afdes(0);
@@ -133,7 +133,7 @@ void tmaj3() {
void tsitu() {
if (!g_col)
- clsf2();
+ clearScreenType2();
g_syn = false;
g_iesc = false;
if (!g_anyone) {
diff --git a/engines/mortevielle/saveload.cpp b/engines/mortevielle/saveload.cpp
index a53d218c86..0efafe7fba 100644
--- a/engines/mortevielle/saveload.cpp
+++ b/engines/mortevielle/saveload.cpp
@@ -164,8 +164,9 @@ Common::Error SavegameManager::saveGame(int n, const Common::String &saveName) {
// Close the save file
f->finalize();
delete f;
+
+ // Skipped: dialog asking to swap floppy
- dem2();
showMouse();
return Common::kNoError;
}
diff --git a/engines/mortevielle/var_mor.cpp b/engines/mortevielle/var_mor.cpp
index 9218cadb53..0fe22fc64d 100644
--- a/engines/mortevielle/var_mor.cpp
+++ b/engines/mortevielle/var_mor.cpp
@@ -95,7 +95,7 @@ bool g_blo,
g_main1,
g_choisi,
g_test0,
- g_f2_all,
+ g_largestClearScreen,
g_imen,
g_cache,
g_iesc,
diff --git a/engines/mortevielle/var_mor.h b/engines/mortevielle/var_mor.h
index 11bc4e0fe4..7517beb992 100644
--- a/engines/mortevielle/var_mor.h
+++ b/engines/mortevielle/var_mor.h
@@ -91,8 +91,8 @@ const int kTempoNoise = 78;
const int kTempoF = 80;
const int kTempoM = 89;
-const int ti1 = 410;
-const int ti2 = 250;
+const int kTime1 = 410;
+const int kTime2 = 250;
const int maxti = 7975;
const int maxtd = 600;
const int kMaxRect = 14;
@@ -240,7 +240,7 @@ extern bool g_blo,
g_main1,
g_choisi,
g_test0,
- g_f2_all,
+ g_largestClearScreen,
g_imen,
g_cache,
g_iesc,