Skip to content

Commit

Permalink
DREAMWEB: Port 'usebuttona' to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegr committed Dec 12, 2011
1 parent cc079c7 commit 273fc3f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 29 deletions.
1 change: 1 addition & 0 deletions devtools/tasmrecover/tasm-recover
Expand Up @@ -750,6 +750,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'undertextline',
'updatepeople',
'usebalcony',
'usebuttona',
'usecardreader1',
'usecardreader2',
'usecardreader3',
Expand Down
28 changes: 0 additions & 28 deletions engines/dreamweb/dreamgen.cpp
Expand Up @@ -4849,34 +4849,6 @@ void DreamGenContext::useGun() {
putBackObStuff();
}

void DreamGenContext::useButtonA() {
STACK_CHECK;
al = 95;
isSetObOnMap();
if (flags.z())
goto donethisbit;
showFirstUse();
al = 0;
ah = data.byte(kRoomnum);
_dec(ah);
turnAnyPathOn();
al = 9;
removeSetObject();
al = 95;
placeSetObject();
data.word(kWatchingtime) = 15*2;
data.word(kReeltowatch) = 71;
data.word(kEndwatchreel) = 85;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
data.byte(kGetback) = 1;
_inc(data.byte(kProgresspoints));
return;
donethisbit:
showSecondUse();
putBackObStuff();
}

void DreamGenContext::quitKey() {
STACK_CHECK;
_cmp(data.byte(kCommandtype), 222);
Expand Down
1 change: 0 additions & 1 deletion engines/dreamweb/dreamgen.h
Expand Up @@ -610,7 +610,6 @@ class DreamGenContext : public DreamBase, public Context {
void searchForFiles();
void getExAd();
void initialMonCols();
void useButtonA();
void execCommand();
void updateSymbolBot();
void findPuzText();
Expand Down
20 changes: 20 additions & 0 deletions engines/dreamweb/stubs.cpp
Expand Up @@ -4242,4 +4242,24 @@ void DreamGenContext::monkSpeaking() {
getRidOfTemp();
}

void DreamGenContext::useButtonA() {
if (!isSetObOnMap(95)) {
showFirstUse();
turnAnyPathOn(0, data.byte(kRoomnum) - 1);
removeSetObject(9);
placeSetObject(95);
data.word(kWatchingtime) = 15 * 2;
data.word(kReeltowatch) = 71;
data.word(kEndwatchreel) = 85;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
data.byte(kGetback) = 1;
data.byte(kProgresspoints)++;
} else {
// Done this bit
showSecondUse();
putBackObStuff();
}
}

} // End of namespace DreamGen
1 change: 1 addition & 0 deletions engines/dreamweb/stubs.h
Expand Up @@ -564,5 +564,6 @@
void showPuzText();
void monkSpeaking();
void rollEndCredits2();
void useButtonA();

#endif

0 comments on commit 273fc3f

Please sign in to comment.