diff options
author | Filippos Karapetis | 2011-12-15 23:45:09 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-15 23:45:09 +0200 |
commit | 60f9b91ced244fd7bdb822cc4471a937d38d6179 (patch) | |
tree | 0b871ee90710ae275211fcea62b46c02fecbe4ba | |
parent | 5bf9c1e024f597e56e8289c3fb122dca0749be01 (diff) | |
download | scummvm-rg350-60f9b91ced244fd7bdb822cc4471a937d38d6179.tar.gz scummvm-rg350-60f9b91ced244fd7bdb822cc4471a937d38d6179.tar.bz2 scummvm-rg350-60f9b91ced244fd7bdb822cc4471a937d38d6179.zip |
DREAMWEB: Port 'mugger' to C++, remove the unused 'findpuztext' function and fix tasm-recover
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 8 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 86 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 2 | ||||
-rw-r--r-- | engines/dreamweb/people.cpp | 44 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 51 insertions, 90 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index d902e38d3d..bb350fc5e2 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -157,6 +157,11 @@ p = parser(skip_binary_data = [ 'increment2', 'keypadax', 'keypadcx', + 'soundbuffer', + 'cursloc', + 'liftsoundcount', + 'playblock', + 'gotfrom', # vgagrafx.asm 'cityname', 'extragraphics1', @@ -405,6 +410,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'findnextcolon', 'findobname', 'findormake', + 'findpuztext', 'findroominloc', 'findsetobject', 'findsource', @@ -468,6 +474,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'hangonpq', 'hangonw', 'heavy', + 'helicopter', 'hotelbell', 'hotelcontrol', 'initialinv', @@ -563,6 +570,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'moretalk', 'mousecall', 'movemap', + 'mugger', 'multidump', 'multiget', 'multiput', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 92bb062aab..8892c84b2d 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -26,81 +26,6 @@ namespace DreamGen { -void DreamGenContext::mugger() { - STACK_CHECK; - ax = es.word(bx+3); - _cmp(ax, 138); - if (flags.z()) - goto endmugger1; - _cmp(ax, 176); - if (flags.z()) - return /* (endmugger2) */; - _cmp(ax, 2); - if (!flags.z()) - goto havesetwatch; - data.word(kWatchingtime) = 175*2; -havesetwatch: - checkSpeed(); - if (!flags.z()) - goto notmugger; - _inc(es.word(bx+3)); -notmugger: - showGameReel(); - al = data.byte(kMapx); - es.byte(bx+1) = al; - return; -endmugger1: - push(es); - push(bx); - createPanel2(); - showIcon(); - al = 41; - findPuzText(); - di = 33+20; - bx = 104; - dl = 241; - ah = 0; - printDirect(); - workToScreen(); - cx = 300; - hangOn(); - bx = pop(); - es = pop(); - push(es); - push(bx); - es.word(bx+3) = 140; - data.byte(kManspath) = 2; - data.byte(kFinaldest) = 2; - findXYFromPath(); - data.byte(kResetmanxy) = 1; - al = 'W'; - ah = 'E'; - cl = 'T'; - ch = 'A'; - findExObject(); - data.byte(kCommand) = al; - data.byte(kObjecttype) = 4; - removeObFromInv(); - al = 'W'; - ah = 'E'; - cl = 'T'; - ch = 'B'; - findExObject(); - data.byte(kCommand) = al; - data.byte(kObjecttype) = 4; - removeObFromInv(); - makeMainScreen(); - al = 48; - bl = 68-32; - bh = 54+64; - cx = 70; - dx = 10; - setupTimedUse(); - data.byte(kBeenmugged) = 1; - bx = pop(); - es = pop(); -} - void DreamGenContext::businessMan() { STACK_CHECK; data.byte(kPointermode) = 0; @@ -3358,17 +3283,6 @@ notfoundinside: goto insideloop; } -void DreamGenContext::findPuzText() { - STACK_CHECK; - ah = 0; - si = ax; - _add(si, si); - es = data.word(kPuzzletext); - ax = es.word(si); - _add(ax, (66*2)); - si = ax; -} - void DreamGenContext::useGun() { STACK_CHECK; _cmp(data.byte(kObjecttype), 4); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index fbefd91099..5a61fcb33e 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -540,7 +540,6 @@ public: void findPathOfPoint(); void getDestInfo(); void read(); - void mugger(); void searchForString(); void selectOpenOb(); void useGun(); @@ -549,7 +548,6 @@ public: void searchForFiles(); void getExAd(); void initialMonCols(); - void findPuzText(); void swapWithInv(); void adjustRight(); void transferToEx(); diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index 8b68c52d3e..e4e368211e 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -42,7 +42,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = { NULL, &DreamGenContext::poolGuard, NULL, &DreamGenContext::businessMan, NULL, NULL, - &DreamGenContext::mugger, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -74,7 +74,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { &DreamGenContext::copper, /*&DreamGenContext::poolGuard*/NULL, &DreamGenContext::rockstar, /*&DreamGenContext::businessMan*/NULL, &DreamGenContext::train, &DreamGenContext::genericPerson /*aide*/, - /*&DreamGenContext::mugger*/NULL, &DreamGenContext::helicopter, + &DreamGenContext::mugger, &DreamGenContext::helicopter, &DreamGenContext::introMagic1, &DreamGenContext::introMusic, &DreamGenContext::introMagic2, &DreamGenContext::candles2, &DreamGenContext::gates, &DreamGenContext::introMagic3, @@ -908,4 +908,44 @@ void DreamGenContext::helicopter(ReelRoutine &routine) { } } +void DreamGenContext::mugger(ReelRoutine &routine) { + if (routine.reelPointer() != 138) { + if (routine.reelPointer() == 176) + return; // endmugger2 + + if (routine.reelPointer() == 2) + data.word(kWatchingtime) = 175 * 2; // set watch + + if (checkSpeed(routine)) + routine.incReelPointer(); + + showGameReel(&routine); + routine.mapX = data.byte(kMapx); + } else { + createPanel2(); + showIcon(); + + uint16 offset = kTextstart + getSegment(data.word(kPuzzletext)).word(41 * 2); + const uint8 *string = getSegment(data.word(kPuzzletext)).ptr(offset, 0); + uint16 y = 104; + printDirect(&string, 33 + 20, &y, 241, 241 & 1); + workToScreenCPP(); + hangOn(300); + routine.setReelPointer(140); + data.byte(kManspath) = 2; + data.byte(kFinaldest) = 2; + findXYFromPath(); + data.byte(kResetmanxy) = 1; + data.byte(kCommand) = findExObject("WETA"); + data.byte(kObjecttype) = 4; + removeObFromInv(); + data.byte(kCommand) = findExObject("WETB"); + data.byte(kObjecttype) = 4; + removeObFromInv(); + makeMainScreen(); + DreamBase::setupTimedUse(48, 70, 10, 68 - 32, 54 + 64); + data.byte(kBeenmugged) = 1; + } +} + } // End of namespace DreamGen diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 0f5a5ca115..33e43eba32 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -382,6 +382,7 @@ void bartender(ReelRoutine &routine); void heavy(ReelRoutine &routine); void helicopter(ReelRoutine &routine); + void mugger(ReelRoutine &routine); void singleKey(uint8 key, uint16 x, uint16 y); void loadSaveBox(); uint8 nextSymbol(uint8 symbol); |