mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
DREAMWEB: 'enterSymbol' ported to C++
This commit is contained in:
parent
ee0f3bcaad
commit
156d3a997e
@ -160,6 +160,7 @@ generator = cpp(context, "DreamGen", blacklist = [
|
||||
'eden',
|
||||
'endpaltostart',
|
||||
'entercode',
|
||||
'entersymbol',
|
||||
'eraseoldobs',
|
||||
'examineob',
|
||||
'examineobtext',
|
||||
|
@ -9077,75 +9077,6 @@ void DreamGenContext::dumpKeypad() {
|
||||
multiDump();
|
||||
}
|
||||
|
||||
void DreamGenContext::enterSymbol() {
|
||||
STACK_CHECK;
|
||||
data.byte(kManisoffscreen) = 1;
|
||||
getRidOfReels();
|
||||
dx = 2007;
|
||||
loadIntoTemp();
|
||||
data.byte(kSymboltopx) = 24;
|
||||
data.byte(kSymboltopdir) = 0;
|
||||
data.byte(kSymbolbotx) = 24;
|
||||
data.byte(kSymbolbotdir) = 0;
|
||||
redrawMainScrn();
|
||||
showSymbol();
|
||||
underTextLine();
|
||||
workToScreenM();
|
||||
data.byte(kGetback) = 0;
|
||||
symbolloop:
|
||||
delPointer();
|
||||
updateSymbolTop();
|
||||
updateSymbolBot();
|
||||
showSymbol();
|
||||
readMouse();
|
||||
showPointer();
|
||||
vSync();
|
||||
dumpPointer();
|
||||
dumpTextLine();
|
||||
dumpSymbol();
|
||||
bx = offset_symbollist;
|
||||
checkCoords();
|
||||
_cmp(data.byte(kGetback), 0);
|
||||
if (flags.z())
|
||||
goto symbolloop;
|
||||
_cmp(data.byte(kSymbolbotnum), 3);
|
||||
if (!flags.z())
|
||||
goto symbolwrong;
|
||||
_cmp(data.byte(kSymboltopnum), 5);
|
||||
if (!flags.z())
|
||||
goto symbolwrong;
|
||||
al = 43;
|
||||
removeSetObject();
|
||||
al = 46;
|
||||
placeSetObject();
|
||||
ah = data.byte(kRoomnum);
|
||||
_add(ah, 12);
|
||||
al = 0;
|
||||
turnAnyPathOn();
|
||||
data.byte(kManisoffscreen) = 0;
|
||||
redrawMainScrn();
|
||||
getRidOfTemp();
|
||||
restoreReels();
|
||||
workToScreenM();
|
||||
al = 13;
|
||||
playChannel1();
|
||||
return;
|
||||
symbolwrong:
|
||||
al = 46;
|
||||
removeSetObject();
|
||||
al = 43;
|
||||
placeSetObject();
|
||||
ah = data.byte(kRoomnum);
|
||||
_add(ah, 12);
|
||||
al = 0;
|
||||
turnAnyPathOff();
|
||||
data.byte(kManisoffscreen) = 0;
|
||||
redrawMainScrn();
|
||||
getRidOfTemp();
|
||||
restoreReels();
|
||||
workToScreenM();
|
||||
}
|
||||
|
||||
void DreamGenContext::quitSymbol() {
|
||||
STACK_CHECK;
|
||||
_cmp(data.byte(kSymboltopx), 24);
|
||||
|
@ -57,7 +57,6 @@ public:
|
||||
static const uint16 offset_gameerror1 = 0x0a7d;
|
||||
static const uint16 offset_gameerror3 = 0x0b12;
|
||||
static const uint16 offset_gameerror7 = 0x0c13;
|
||||
static const uint16 offset_symbollist = 0x09c1;
|
||||
static const uint16 offset_speechfilename = 0x0ec9;
|
||||
static const uint16 offset_discopslist = 0x0a53;
|
||||
static const uint16 offset_atmospherelist = 0x0edc;
|
||||
@ -756,7 +755,6 @@ public:
|
||||
void discOps();
|
||||
void middlePanel();
|
||||
void monitorLogo();
|
||||
void enterSymbol();
|
||||
void dirFile();
|
||||
void pickupConts();
|
||||
void lockLightOff();
|
||||
@ -834,7 +832,7 @@ public:
|
||||
void priest();
|
||||
void printmessage2();
|
||||
void loadNews();
|
||||
void rollEm();
|
||||
void wearShades();
|
||||
void hangOnPQ();
|
||||
void findOpenPos();
|
||||
void describeOb();
|
||||
@ -848,7 +846,7 @@ public:
|
||||
void getBack1();
|
||||
void fadeFromWhite();
|
||||
void useWindow();
|
||||
void wearShades();
|
||||
void rollEm();
|
||||
void delEverything();
|
||||
void fadeScreenDown();
|
||||
void poolGuard();
|
||||
|
@ -1711,20 +1711,6 @@ void DreamGenContext::checkCoords() {
|
||||
checkCoords(destList);
|
||||
break;
|
||||
}
|
||||
case offset_symbollist: {
|
||||
RectWithCallback symbolList[] = {
|
||||
{ kSymbolx+40,kSymbolx+64,kSymboly+2,kSymboly+16,&DreamGenContext::quitSymbol },
|
||||
{ kSymbolx,kSymbolx+52,kSymboly+20,kSymboly+50,&DreamGenContext::setTopLeft },
|
||||
{ kSymbolx+52,kSymbolx+104,kSymboly+20,kSymboly+50,&DreamGenContext::setTopRight },
|
||||
{ kSymbolx,kSymbolx+52,kSymboly+50,kSymboly+80,&DreamGenContext::setBotLeft },
|
||||
{ kSymbolx+52,kSymbolx+104,kSymboly+50,kSymboly+80,&DreamGenContext::setBotRight },
|
||||
{ 0,320,0,200,&DreamGenContext::blank },
|
||||
{ 0xFFFF,0,0,0,0 }
|
||||
};
|
||||
checkCoords(symbolList);
|
||||
|
||||
break;
|
||||
}
|
||||
case offset_diarylist: {
|
||||
RectWithCallback diaryList[] = {
|
||||
{ kDiaryx+94,kDiaryx+110,kDiaryy+97,kDiaryy+113,&DreamGenContext::diaryKeyN },
|
||||
@ -2082,6 +2068,63 @@ uint8 *DreamGenContext::getObTextStartCPP() {
|
||||
return result;
|
||||
}
|
||||
|
||||
void DreamGenContext::enterSymbol() {
|
||||
data.byte(kManisoffscreen) = 1;
|
||||
getRidOfReels();
|
||||
loadIntoTemp("DREAMWEB.G12");
|
||||
data.byte(kSymboltopx) = 24;
|
||||
data.byte(kSymboltopdir) = 0;
|
||||
data.byte(kSymbolbotx) = 24;
|
||||
data.byte(kSymbolbotdir) = 0;
|
||||
redrawMainScrn();
|
||||
showSymbol();
|
||||
underTextLine();
|
||||
workToScreenM();
|
||||
data.byte(kGetback) = 0;
|
||||
do {
|
||||
delPointer();
|
||||
updateSymbolTop();
|
||||
updateSymbolBot();
|
||||
showSymbol();
|
||||
readMouse();
|
||||
showPointer();
|
||||
vSync();
|
||||
dumpPointer();
|
||||
dumpTextLine();
|
||||
dumpSymbol();
|
||||
RectWithCallback symbolList[] = {
|
||||
{ kSymbolx+40,kSymbolx+64,kSymboly+2,kSymboly+16,&DreamGenContext::quitSymbol },
|
||||
{ kSymbolx,kSymbolx+52,kSymboly+20,kSymboly+50,&DreamGenContext::setTopLeft },
|
||||
{ kSymbolx+52,kSymbolx+104,kSymboly+20,kSymboly+50,&DreamGenContext::setTopRight },
|
||||
{ kSymbolx,kSymbolx+52,kSymboly+50,kSymboly+80,&DreamGenContext::setBotLeft },
|
||||
{ kSymbolx+52,kSymbolx+104,kSymboly+50,kSymboly+80,&DreamGenContext::setBotRight },
|
||||
{ 0,320,0,200,&DreamGenContext::blank },
|
||||
{ 0xFFFF,0,0,0,0 }
|
||||
};
|
||||
checkCoords(symbolList);
|
||||
} while (data.byte(kGetback) == 0);
|
||||
if ((data.byte(kSymbolbotnum) == 3) && (data.byte(kSymboltopnum) == 5)) {
|
||||
removeSetObject(43);
|
||||
placeSetObject(46);
|
||||
turnAnyPathOn(0, data.byte(kRoomnum) + 12);
|
||||
data.byte(kManisoffscreen) = 0;
|
||||
redrawMainScrn();
|
||||
getRidOfTemp();
|
||||
restoreReels();
|
||||
workToScreenM();
|
||||
playChannel1(13);
|
||||
} else {
|
||||
removeSetObject(46);
|
||||
placeSetObject(43);
|
||||
turnAnyPathOff(0, data.byte(kRoomnum) + 12);
|
||||
data.byte(kManisoffscreen) = 0;
|
||||
redrawMainScrn();
|
||||
getRidOfTemp();
|
||||
restoreReels();
|
||||
workToScreenM();
|
||||
}
|
||||
}
|
||||
|
||||
void DreamGenContext::zoomOnOff() {
|
||||
if (data.word(kWatchingtime) != 0) {
|
||||
blank();
|
||||
|
@ -364,6 +364,7 @@
|
||||
void loadRoomData(const Room &room, bool skipDat);
|
||||
void restoreAll();
|
||||
void restoreReels();
|
||||
void enterSymbol();
|
||||
void viewFolder();
|
||||
void checkFolderCoords();
|
||||
void loadFolder();
|
||||
|
Loading…
Reference in New Issue
Block a user