Skip to content

Commit

Permalink
DREAMWEB: 'initialinv', 'pickupob' ported to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegr committed Dec 6, 2011
1 parent 823ff75 commit f224c09
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 52 deletions.
2 changes: 2 additions & 0 deletions devtools/tasmrecover/tasm-recover
Expand Up @@ -324,6 +324,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'hangonp',
'hangonw',
'hotelbell',
'initialinv',
'initman',
'initrain',
'input',
Expand Down Expand Up @@ -408,6 +409,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'paneltomap',
'parseblaster',
'personnametext',
'pickupob',
'pitinterupt',
'pixelcheckset',
'placesetobject',
Expand Down
50 changes: 0 additions & 50 deletions engines/dreamweb/dreamgen.cpp
Expand Up @@ -9116,56 +9116,6 @@ void DreamGenContext::entryAnims() {
turnAnyPathOn();
}

void DreamGenContext::initialInv() {
STACK_CHECK;
_cmp(data.byte(kReallocation), 24);
if (flags.z())
goto isedens;
return;
isedens:
al = 11;
ah = 5;
pickupOb();
al = 12;
ah = 6;
pickupOb();
al = 13;
ah = 7;
pickupOb();
al = 14;
ah = 8;
pickupOb();
al = 18;
al = 18;
ah = 0;
pickupOb();
al = 19;
ah = 1;
pickupOb();
al = 20;
ah = 9;
pickupOb();
al = 16;
ah = 2;
pickupOb();
data.byte(kWatchmode) = 1;
data.word(kReeltohold) = 0;
data.word(kEndofholdreel) = 6;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
switchRyanOff();
}

void DreamGenContext::pickupOb() {
STACK_CHECK;
data.byte(kLastinvpos) = ah;
data.byte(kObjecttype) = 2;
data.byte(kItemframe) = al;
data.byte(kCommand) = al;
getAnyAd();
transferToEx();
}

void DreamGenContext::clearBuffers() {
STACK_CHECK;
es = data.word(kBuffers);
Expand Down
2 changes: 0 additions & 2 deletions engines/dreamweb/dreamgen.h
Expand Up @@ -560,7 +560,6 @@ class DreamGenContext : public Context {
void watchReel();
void openFileFromC();
void getTime();
void pickupOb();
void fadeDOS();
void findText1();
void isRyanHolding();
Expand Down Expand Up @@ -725,7 +724,6 @@ class DreamGenContext : public Context {
void findAllOpen();
void quitSymbol();
void readFromFile();
void initialInv();
void interruptTest();
void findSetObject();
void useDiary();
Expand Down
29 changes: 29 additions & 0 deletions engines/dreamweb/stubs.cpp
Expand Up @@ -3475,5 +3475,34 @@ void DreamGenContext::getBackToOps() {
}
}

void DreamGenContext::pickupOb(uint8 command, uint8 pos) {
data.byte(kLastinvpos) = pos;
data.byte(kObjecttype) = 2;
data.byte(kItemframe) = command;
data.byte(kCommand) = command;
getAnyAd();
transferToEx();
}

void DreamGenContext::initialInv() {
if (data.byte(kReallocation) != 24)
return;

pickupOb(11, 5);
pickupOb(12, 6);
pickupOb(13, 7);
pickupOb(14, 8);
pickupOb(18, 0);
pickupOb(19, 1);
pickupOb(20, 9);
pickupOb(16, 2);
data.byte(kWatchmode) = 1;
data.word(kReeltohold) = 0;
data.word(kEndofholdreel) = 6;
data.byte(kWatchspeed) = 1;
data.byte(kSpeedcount) = 1;
switchRyanOff();
}

} /*namespace dreamgen */

2 changes: 2 additions & 0 deletions engines/dreamweb/stubs.h
Expand Up @@ -503,5 +503,7 @@
void newGame();
void getBackFromOps();
void getBackToOps();
void pickupOb(uint8 command, uint8 pos);
void initialInv();

#endif

0 comments on commit f224c09

Please sign in to comment.