aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Augereau2011-12-05 01:17:21 +0100
committerBertrand Augereau2011-12-05 01:27:44 +0100
commit2ab06a6aae149fd0dd32cb9568d94da0cfa1ea2a (patch)
tree669ab4a790de3e854655dbc14e15c2aa01fb69a5
parent3e5eb3e4f6f5017e528b3ea8819e3db3ad71d285 (diff)
downloadscummvm-rg350-2ab06a6aae149fd0dd32cb9568d94da0cfa1ea2a.tar.gz
scummvm-rg350-2ab06a6aae149fd0dd32cb9568d94da0cfa1ea2a.tar.bz2
scummvm-rg350-2ab06a6aae149fd0dd32cb9568d94da0cfa1ea2a.zip
DREAMWEB: 'nextSymbol' ported to C++
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp17
-rw-r--r--engines/dreamweb/dreamgen.h1
-rw-r--r--engines/dreamweb/stubs.cpp23
-rw-r--r--engines/dreamweb/stubs.h1
5 files changed, 15 insertions, 28 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index e69185d6a7..10d79dbfcb 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -344,6 +344,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'namestoold',
'neterror',
'nextfolder',
+ 'nextsymbol',
'obicons',
'obname',
'obpicture',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index f66cef4c93..9515f04496 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -8877,23 +8877,6 @@ void DreamGenContext::dumpSymbol() {
multiDump();
}
-void DreamGenContext::nextSymbol() {
- STACK_CHECK;
- _inc(al);
- _cmp(al, 6);
- if (flags.z())
- goto topwrap;
- _cmp(al, 12);
- if (flags.z())
- goto botwrap;
- return;
-topwrap:
- al = 0;
- return;
-botwrap:
- al = 6;
-}
-
void DreamGenContext::updateSymbolTop() {
STACK_CHECK;
_cmp(data.byte(kSymboltopdir), 0);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 132d16de66..41280738f9 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -674,7 +674,6 @@ public:
void runIntroSeq();
void nextColon();
void attendant();
- void nextSymbol();
void monks2text();
void clearPalette();
void cantDrop();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index ea1f48706c..aa8450dbbe 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -3120,25 +3120,28 @@ void DreamGenContext::readDestIcon() {
loadIntoTemp3("DREAMWEB.G08");
}
+uint8 DreamGenContext::nextSymbol(uint8 symbol) {
+ uint8 result = symbol + 1;
+ if (result == 6)
+ return 0;
+ if (result == 12)
+ return 6;
+ return result;
+}
+
void DreamGenContext::showSymbol() {
showFrame(tempGraphics(), kSymbolx, kSymboly, 12, 0);
showFrame(tempGraphics(), data.byte(kSymboltopx) + kSymbolx-44, kSymboly+20, data.byte(kSymboltopnum), 32);
- al = data.byte(kSymboltopnum);
- nextSymbol();
- uint8 nextTopSymbol = al;
+ uint8 nextTopSymbol = nextSymbol(data.byte(kSymboltopnum));
showFrame(tempGraphics(), data.byte(kSymboltopx) + kSymbolx+5, kSymboly+20, nextTopSymbol, 32);
- nextSymbol();
- uint8 nextNextTopSymbol = al;
+ uint8 nextNextTopSymbol = nextSymbol(nextTopSymbol);
showFrame(tempGraphics(), data.byte(kSymboltopx) + kSymbolx+54, kSymboly+20, nextNextTopSymbol, 32);
showFrame(tempGraphics(), data.byte(kSymbolbotx) + kSymbolx-44, kSymboly+49, 6 + data.byte(kSymbolbotnum), 32);
- al = data.byte(kSymbolbotnum);
- nextSymbol();
- uint8 nextBotSymbol = al;
+ uint8 nextBotSymbol = nextSymbol(data.byte(kSymbolbotnum));
showFrame(tempGraphics(), data.byte(kSymbolbotx) + kSymbolx+5, kSymboly+49, 6 + nextBotSymbol, 32);
- nextSymbol();
- uint8 nextNextBotSymbol = al;
+ uint8 nextNextBotSymbol = nextSymbol(nextBotSymbol);
showFrame(tempGraphics(), data.byte(kSymbolbotx) + kSymbolx+54, kSymboly+49, 6 + nextNextBotSymbol, 32);
}
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index f403afefc2..5b47d32c38 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -409,6 +409,7 @@
void loadKeypad();
void showKeypad();
void showOuterPad();
+ uint8 nextSymbol(uint8 symbol);
void showSymbol();
void showExit();
void showMan();