diff options
author | Bertrand Augereau | 2011-12-04 15:50:12 +0100 |
---|---|---|
committer | Bertrand Augereau | 2011-12-04 16:16:31 +0100 |
commit | 024fe9ced52a1081a743646ef4459cfd34093e8e (patch) | |
tree | ae4d1819e85576d987a4ee07158f239a03d132ae | |
parent | 6df11b314db7b32720d1754b8e116f7f32c7e462 (diff) | |
download | scummvm-rg350-024fe9ced52a1081a743646ef4459cfd34093e8e.tar.gz scummvm-rg350-024fe9ced52a1081a743646ef4459cfd34093e8e.tar.bz2 scummvm-rg350-024fe9ced52a1081a743646ef4459cfd34093e8e.zip |
DREAMWEB: 'security' ported to C++
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 34 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/people.cpp | 24 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 24 insertions, 37 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 3622ba603b..fbd6b134a8 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -392,6 +392,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'scanfornames', 'screenupdate', 'scrollmonitor', + 'security', 'seecommandtail', 'setallchanges', 'setlocation', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 39c5d0fddf..aa2c3b96dd 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -650,40 +650,6 @@ combatover2: data.byte(kMandead) = 2; } -void DreamGenContext::security() { - STACK_CHECK; - _cmp(es.word(bx+3), 32); - if (flags.z()) - goto securwait; - _cmp(es.word(bx+3), 69); - if (!flags.z()) - goto notaftersec; - return; -notaftersec: - data.word(kWatchingtime) = 10; - checkSpeed(); - if (!flags.z()) - goto gotsecurframe; - _inc(es.word(bx+3)); - goto gotsecurframe; -securwait: - _cmp(data.byte(kLastweapon), 1); - if (!flags.z()) - goto gotsecurframe; - data.word(kWatchingtime) = 10; - _cmp(data.byte(kManspath), 9); - if (!flags.z()) - goto gotsecurframe; - _cmp(data.byte(kFacing), 0); - if (!flags.z()) - goto gotsecurframe; - data.byte(kLastweapon) = -1; - _inc(es.word(bx+3)); -gotsecurframe: - showGameReel(); - addToPeopleList(); -} - void DreamGenContext::heavy() { STACK_CHECK; al = es.byte(bx+7); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 1264eb82e2..952ebfc865 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -862,7 +862,6 @@ public: void setTopLeft(); void searchForString(); void selectOpenOb(); - void security(); void showSlots(); void useGun(); void autoAppear(); diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index 4ab30c63f1..04b5db1f93 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -38,7 +38,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = { &DreamGenContext::bartender, NULL, &DreamGenContext::tattooMan, &DreamGenContext::attendant, &DreamGenContext::keeper, &DreamGenContext::candles1, - &DreamGenContext::smallCandle, &DreamGenContext::security, + &DreamGenContext::smallCandle, NULL, &DreamGenContext::copper, &DreamGenContext::poolGuard, NULL, &DreamGenContext::businessMan, &DreamGenContext::train, &DreamGenContext::aide, @@ -70,7 +70,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { /*&DreamGenContext::bartender*/NULL, &DreamGenContext::otherSmoker, /*&DreamGenContext::tattooMan*/NULL, /*&DreamGenContext::attendant*/NULL, /*&DreamGenContext::keeper*/NULL, /*&DreamGenContext::candles1*/NULL, - /*&DreamGenContext::smallcandle*/NULL, /*&DreamGenContext::security*/NULL, + /*&DreamGenContext::smallcandle*/NULL, &DreamGenContext::security, /*&DreamGenContext::copper*/NULL, /*&DreamGenContext::poolGuard*/NULL, &DreamGenContext::rockstar, /*&DreamGenContext::businessMan*/NULL, /*&DreamGenContext::train*/NULL, /*&DreamGenContext::aide*/NULL, @@ -364,5 +364,25 @@ void DreamGenContext::drunk(ReelRoutine &routine) { addToPeopleList(&routine); } +void DreamGenContext::security(ReelRoutine &routine) { + if (routine.reelPointer() == 32) { + if (data.byte(kLastweapon) == 1) { + data.word(kWatchingtime) = 10; + if ((data.byte(kManspath) == 9) && (data.byte(kFacing) == 0)) { + data.byte(kLastweapon) = -1; + routine.incReelPointer(); + } + } + } else if (routine.reelPointer() == 69) + return; + else { + data.word(kWatchingtime) = 10; + if (checkSpeed(routine)) + routine.incReelPointer(); + } + showGameReel(&routine); + addToPeopleList(&routine); +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index cc168d4930..d540279a8d 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -400,6 +400,7 @@ void smokeBloke(ReelRoutine &routine); void manAsleep(ReelRoutine &routine); void drunk(ReelRoutine &routine); + void security(ReelRoutine &routine); void singleKey(uint8 key, uint16 x, uint16 y); void showKeypad(); void showOuterPad(); |