Skip to content

Commit

Permalink
MORTEVIELLE: Converted string() usage to Common::String
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster authored and Strangerke committed Apr 6, 2012
1 parent eb6d9e5 commit 70984b8
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 9 deletions.
32 changes: 27 additions & 5 deletions engines/mortevielle/alert.cpp
Expand Up @@ -118,7 +118,12 @@ static void fait_choix(Common::String c, int &coldep, int &nbcase, Common::Strin
i = i + 2;
while (str[l].size() < 3) str[l] = str[l] + ' ';
putxy(x, 98);
writeg(string(' ') + str[l] + ' ', 0);

Common::String tmp(" ");
tmp += str[l];
tmp += " ";

writeg(tmp, 0);
x = x + esp + 40;
}
}
Expand Down Expand Up @@ -198,10 +203,19 @@ int do_alert(Common::String str_, int n) {
hide_mouse();
if (quoi != 0) {
posit(quoi, coldep, esp);
writeg(string(' ') + s[quoi] + ' ', 0);

Common::String tmp(" ");
tmp += s[quoi];
tmp += " ";
writeg(tmp, 0);
}
posit(ix, coldep, esp);
writeg(string(' ') + s[ix] + ' ', 1);

Common::String tmp2 = " ";
tmp2 += s[ix];
tmp2 += " ";
writeg(tmp2, 1);

quoi = ix;
show_mouse();
}
Expand All @@ -210,7 +224,12 @@ int do_alert(Common::String str_, int n) {
if ((quoi != 0) && ! newaff) {
hide_mouse();
posit(quoi, coldep, esp);
writeg(string(' ') + s[quoi] + ' ', 0);

Common::String tmp3(" ");
tmp3 += s[quoi];
tmp3 += " ";
writeg(tmp3, 0);

quoi = 0;
show_mouse();
}
Expand All @@ -222,7 +241,10 @@ int do_alert(Common::String str_, int n) {
if (! test3) {
quoi = n;
posit(n, coldep, esp);
writeg(string(' ') + s[n] + ' ', 1);
Common::String tmp4(" ");
tmp4 += s[n];
tmp4 += " ";
writeg(tmp4, 1);
}
charecr(50, succ(int, nligne) << 4);
show_mouse();
Expand Down
5 changes: 4 additions & 1 deletion engines/mortevielle/menu.cpp
Expand Up @@ -53,7 +53,10 @@ namespace Mortevielle {
while (s.size() < 30) s = s + ' ';
switch (h) {
case invent :
if (l != 7) inv[l] = string(' ') + s;
if (l != 7) {
inv[l] = s;
inv[l].insertChar(' ', 0);
}
break;
case depla :
dep[l] = s;
Expand Down
7 changes: 5 additions & 2 deletions engines/mortevielle/mor.cpp
Expand Up @@ -675,8 +675,11 @@ void pendule() {
if (heu > 11) writeg("PM ", 1);
else writeg("AM ", 1);
putxy(550, 160);
if ((jou >= 0) && (jou <= 8))
writeg(string(chr(jou + 49)) + "& jour", 1);
if ((jou >= 0) && (jou <= 8)) {
Common::String tmp("& jour");
tmp.insertChar((char)(jou + 49), 0);
writeg(tmp, 1);
}
}

/*************
Expand Down
3 changes: 2 additions & 1 deletion engines/mortevielle/mor2.cpp
Expand Up @@ -77,7 +77,8 @@ void tinke() {
for (cx = 1; cx <= 10; cx ++) if (s.pourc[cx] == '*') cf = cf + 1;
if (cf == 10) stpo = "10";
else stpo = chr(cf + 48);
stpou = string(d3) + d5 + d4 + d3 + d1 + stpo + '0' + d2 + d4 + d3 + d6 + d4;

stpou = Common::String(d3) + d5 + d4 + d3 + d1 + stpo + '0' + d2 + d4 + d3 + d6 + d4;
}
if (m > min) {
min = 30;
Expand Down

0 comments on commit 70984b8

Please sign in to comment.