mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-05 18:41:12 +00:00
DREAMWEB: Port 'lookatplace' to C++
This commit is contained in:
parent
5843fc1157
commit
0cd53d5d3e
@ -562,6 +562,7 @@ generator = cpp(context, "DreamGen", blacklist = [
|
||||
'lockmon',
|
||||
'look',
|
||||
'lookatcard',
|
||||
'lookatplace',
|
||||
'lookininterface',
|
||||
'loopchannel0',
|
||||
'louis',
|
||||
|
@ -1647,77 +1647,6 @@ endheartalk:
|
||||
data.byte(kPointermode) = 0;
|
||||
}
|
||||
|
||||
void DreamGenContext::lookAtPlace() {
|
||||
STACK_CHECK;
|
||||
_cmp(data.byte(kCommandtype), 224);
|
||||
if (flags.z())
|
||||
goto alreadyinfo;
|
||||
data.byte(kCommandtype) = 224;
|
||||
al = 27;
|
||||
commandOnly();
|
||||
alreadyinfo:
|
||||
ax = data.word(kMousebutton);
|
||||
_and(ax, 1);
|
||||
if (flags.z())
|
||||
return /* (noinfo) */;
|
||||
_cmp(ax, data.word(kOldbutton));
|
||||
if (flags.z())
|
||||
return /* (noinfo) */;
|
||||
bl = data.byte(kDestpos);
|
||||
_cmp(bl, 15);
|
||||
if (!flags.c())
|
||||
return /* (noinfo) */;
|
||||
push(bx);
|
||||
delPointer();
|
||||
delTextLine();
|
||||
getUnderCentre();
|
||||
ds = data.word(kTempgraphics3);
|
||||
al = 0;
|
||||
ah = 0;
|
||||
di = 60;
|
||||
bx = 72;
|
||||
showFrame();
|
||||
al = 4;
|
||||
ah = 0;
|
||||
di = 60;
|
||||
bx = 72+55;
|
||||
showFrame();
|
||||
_cmp(data.byte(kForeignrelease), 0);
|
||||
if (flags.z())
|
||||
goto _tmp1;
|
||||
al = 4;
|
||||
ah = 0;
|
||||
di = 60;
|
||||
bx = 72+55+21;
|
||||
showFrame();
|
||||
_tmp1:
|
||||
bx = pop();
|
||||
bh = 0;
|
||||
_add(bx, bx);
|
||||
es = data.word(kTraveltext);
|
||||
si = es.word(bx);
|
||||
_add(si, (66*2));
|
||||
findNextColon();
|
||||
di = 63;
|
||||
bx = 84;
|
||||
_cmp(data.byte(kForeignrelease), 0);
|
||||
if (flags.z())
|
||||
goto _tmp2;
|
||||
bx = 84+4;
|
||||
_tmp2:
|
||||
dl = 191;
|
||||
al = 0;
|
||||
ah = 0;
|
||||
printDirect();
|
||||
workToScreenM();
|
||||
cx = 500;
|
||||
hangOnP();
|
||||
data.byte(kPointermode) = 0;
|
||||
data.byte(kPointerframe) = 0;
|
||||
putUnderCentre();
|
||||
workToScreenM();
|
||||
}
|
||||
|
||||
void DreamGenContext::locationPic() {
|
||||
STACK_CHECK;
|
||||
getDestInfo();
|
||||
|
@ -491,7 +491,6 @@ public:
|
||||
void findOpenPos();
|
||||
void searchForSame();
|
||||
void rollEm();
|
||||
void lookAtPlace();
|
||||
void findAllOpen();
|
||||
void fillOpen();
|
||||
void getEitherAd();
|
||||
|
@ -4584,4 +4584,36 @@ void DreamGenContext::showDiaryKeys() {
|
||||
showDiaryPage();
|
||||
}
|
||||
|
||||
void DreamGenContext::lookAtPlace() {
|
||||
if (data.byte(kCommandtype) != 224) {
|
||||
data.byte(kCommandtype) = 224;
|
||||
commandOnly(27);
|
||||
}
|
||||
|
||||
if (!(data.word(kMousebutton) & 1) ||
|
||||
data.word(kMousebutton) == data.word(kOldbutton) ||
|
||||
data.byte(kDestpos) >= 15)
|
||||
return; // noinfo
|
||||
|
||||
delPointer();
|
||||
delTextLine();
|
||||
getUnderCentre();
|
||||
showFrame(tempGraphics3(), 60, 72, 0, 0);
|
||||
showFrame(tempGraphics3(), 60, 72 + 55, 4, 0);
|
||||
if (data.byte(kForeignrelease))
|
||||
showFrame(tempGraphics3(), 60, 72+55+21, 4, 0);
|
||||
|
||||
uint16 offset = kTextstart + getSegment(data.word(kTraveltext)).word(data.byte(kDestpos) * 2);
|
||||
const uint8 *string = getSegment(data.word(kTraveltext)).ptr(offset, 0);
|
||||
findNextColon(&string);
|
||||
uint16 y = (data.byte(kForeignrelease)) ? 84 + 4 : 84;
|
||||
printDirect(&string, 63, &y, 191, 191 & 1);
|
||||
workToScreenM();
|
||||
hangOnP(500);
|
||||
data.byte(kPointermode) = 0;
|
||||
data.byte(kPointerframe) = 0;
|
||||
putUnderCentre();
|
||||
workToScreenM();
|
||||
}
|
||||
|
||||
} // End of namespace DreamGen
|
||||
|
@ -374,5 +374,6 @@
|
||||
DreamBase::deleteExText(textNum);
|
||||
}
|
||||
void signOn();
|
||||
void lookAtPlace();
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user