aboutsummaryrefslogtreecommitdiff
path: root/engines/lilliput/lilliput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lilliput/lilliput.cpp')
-rw-r--r--engines/lilliput/lilliput.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp
index 6730f5bf3f..caf83019f0 100644
--- a/engines/lilliput/lilliput.cpp
+++ b/engines/lilliput/lilliput.cpp
@@ -143,7 +143,6 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd)
_byte12A09 = 0;
_byte1881D = 0;
_byte16552 = 0;
- _byte18AED = 0;
_rulesBuffer2PrevIndx = 0;
_word16EFA = 0;
@@ -699,8 +698,8 @@ void LilliputEngine::displayFunction17() {
displayFunction4();
}
-void LilliputEngine::displayFunction18(byte *buf, int var2, int var4) {
- debugC(2, kDebugEngine, "displayFunction18(buf, %d, %d)", var2, var4);
+void LilliputEngine::displayString(byte *buf, int var2, int var4) {
+ debugC(2, kDebugEngine, "displayString(buf, %d, %d)", var2, var4);
int index = var2;
int tmpVar4 = (var4 >> 8) + ((var4 & 0xFF) << 8);
@@ -974,13 +973,14 @@ void LilliputEngine::sub18A3E(byte param1) {
++_displayStringIndex;
}
-void LilliputEngine::sub18AEE(int param1) {
- debugC(2, kDebugEngine, "sub18AEE(%d)", param1);
+void LilliputEngine::prepareGoldAmount(int param1) {
+ debugC(2, kDebugEngine, "prepareGoldAmount(%d)", param1);
static const int _array18AE3[6] = {10000, 1000, 100, 10, 1};
int count;
int var1 = param1;
+ bool hideZeros = true;
for (int i = 0; i < 5; i++) {
count = 0;
while (var1 >= 0) {
@@ -988,12 +988,14 @@ void LilliputEngine::sub18AEE(int param1) {
var1 -= _array18AE3[i];
}
var1 += _array18AE3[i];
- byte tmpVal = var1 + 0x30;
+ --count;
+
+ byte tmpVal = count + 0x30;
if (i == 4)
sub18A3E(tmpVal);
- else if ((var1 != 0) || (_byte18AED != 1)) {
- _byte18AED = 0;
+ else if ((count != 0) || (!hideZeros)) {
+ hideZeros = false;
sub18A3E(tmpVal);
}
}