Skip to content

Commit

Permalink
DREAMWEB: Port 'afternewroom' to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegr committed Dec 8, 2011
1 parent cd9a65f commit e287ac0
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 40 deletions.
1 change: 1 addition & 0 deletions devtools/tasmrecover/tasm-recover
Expand Up @@ -154,6 +154,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'adjustlen',
'advisor',
'afterintroroom',
'afternewroom',
'aide',
'alleybarksound',
'allocatebuffers',
Expand Down
39 changes: 0 additions & 39 deletions engines/dreamweb/dreamgen.cpp
Expand Up @@ -6781,45 +6781,6 @@ void DreamGenContext::findFirstPath() {
al = es.byte(bx+6);
}

void DreamGenContext::afterNewRoom() {
STACK_CHECK;
_cmp(data.byte(kNowinnewroom), 0);
if (flags.z())
return /* (notnew) */;
data.word(kTimecount) = 0;
createPanel();
data.byte(kCommandtype) = 0;
findRoomInLoc();
_cmp(data.byte(kRyanon), 1);
if (flags.z())
goto ryansoff;
al = data.byte(kRyanx);
_add(al, 12);
ah = data.byte(kRyany);
_add(ah, 12);
findPathOfPoint();
data.byte(kManspath) = dl;
findXYFromPath();
data.byte(kResetmanxy) = 1;
ryansoff:
data.byte(kNewobs) = 1;
drawFloor();
data.word(kLookcounter) = 160;
data.byte(kNowinnewroom) = 0;
showIcon();
spriteUpdate();
printSprites();
underTextLine();
reelsOnScreen();
mainScreen();
getUnderZoom();
zoom();
workToScreenM();
walkIntoRoom();
reminders();
atmospheres();
}

void DreamGenContext::printmessage2() {
STACK_CHECK;
push(dx);
Expand Down
1 change: 0 additions & 1 deletion engines/dreamweb/dreamgen.h
Expand Up @@ -680,7 +680,6 @@ class DreamGenContext : public DreamBase, public Context {
void searchForFiles();
void monkSpeaking();
void madmanRun();
void afterNewRoom();
void getExAd();
void initialMonCols();
void useButtonA();
Expand Down
34 changes: 34 additions & 0 deletions engines/dreamweb/stubs.cpp
Expand Up @@ -3865,4 +3865,38 @@ void DreamGenContext::watchReel() {
plotReel(reelPointer);
}

void DreamGenContext::afterNewRoom() {
if (data.byte(kNowinnewroom) == 0)
return; // notnew

data.word(kTimecount) = 0;
createPanel();
data.byte(kCommandtype) = 0;
findRoomInLoc();
if (data.byte(kRyanon) != 1) {
al = data.byte(kRyanx) + 12;
ah = data.byte(kRyany) + 12;
findPathOfPoint();
data.byte(kManspath) = dl;
findXYFromPath();
data.byte(kResetmanxy) = 1;
}
data.byte(kNewobs) = 1;
drawFloor();
data.word(kLookcounter) = 160;
data.byte(kNowinnewroom) = 0;
showIcon();
spriteUpdate();
printSprites();
underTextLine();
reelsOnScreen();
mainScreen();
getUnderZoom();
zoom();
workToScreenM();
walkIntoRoom();
reminders();
atmospheres();
}

} // End of namespace DreamGen
1 change: 1 addition & 0 deletions engines/dreamweb/stubs.h
Expand Up @@ -548,5 +548,6 @@
void removeFreeObject(uint8 index) {
DreamBase::removeFreeObject(index);
}
void afterNewRoom();

#endif

0 comments on commit e287ac0

Please sign in to comment.