DREAMWEB: Port 'showslots' to C++
This commit is contained in:
parent
984010faae
commit
2887686d56
5 changed files with 16 additions and 36 deletions
|
@ -765,6 +765,7 @@ generator = cpp(context, "DreamGen", blacklist = [
|
||||||
'showryanpage',
|
'showryanpage',
|
||||||
'showsaveops',
|
'showsaveops',
|
||||||
'showseconduse',
|
'showseconduse',
|
||||||
|
'showslots',
|
||||||
'showsymbol',
|
'showsymbol',
|
||||||
'showtime',
|
'showtime',
|
||||||
'showwatch',
|
'showwatch',
|
||||||
|
|
|
@ -3004,39 +3004,6 @@ gotkeyp:
|
||||||
showDiaryPage();
|
showDiaryPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DreamGenContext::showSlots() {
|
|
||||||
STACK_CHECK;
|
|
||||||
di = (60)+7;
|
|
||||||
bx = (52)+8;
|
|
||||||
al = 2;
|
|
||||||
ds = data.word(kTempgraphics);
|
|
||||||
ah = 0;
|
|
||||||
showFrame();
|
|
||||||
di = (60)+10;
|
|
||||||
bx = (52)+11;
|
|
||||||
cl = 0;
|
|
||||||
slotloop:
|
|
||||||
push(cx);
|
|
||||||
push(di);
|
|
||||||
push(bx);
|
|
||||||
_cmp(cl, data.byte(kCurrentslot));
|
|
||||||
if (!flags.z())
|
|
||||||
goto nomatchslot;
|
|
||||||
al = 3;
|
|
||||||
ds = data.word(kTempgraphics);
|
|
||||||
ah = 0;
|
|
||||||
showFrame();
|
|
||||||
nomatchslot:
|
|
||||||
bx = pop();
|
|
||||||
di = pop();
|
|
||||||
cx = pop();
|
|
||||||
_add(bx, 10);
|
|
||||||
_inc(cl);
|
|
||||||
_cmp(cl, 7);
|
|
||||||
if (!flags.z())
|
|
||||||
goto slotloop;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DreamGenContext::clearBuffers() {
|
void DreamGenContext::clearBuffers() {
|
||||||
STACK_CHECK;
|
STACK_CHECK;
|
||||||
es = data.word(kBuffers);
|
es = data.word(kBuffers);
|
||||||
|
|
|
@ -479,7 +479,7 @@ public:
|
||||||
void clearBuffers();
|
void clearBuffers();
|
||||||
void getObTextStart();
|
void getObTextStart();
|
||||||
void checkObjectSize();
|
void checkObjectSize();
|
||||||
void showSlots();
|
void fillOpen();
|
||||||
void useCashCard();
|
void useCashCard();
|
||||||
void moneyPoke();
|
void moneyPoke();
|
||||||
void doSomeTalk();
|
void doSomeTalk();
|
||||||
|
@ -518,7 +518,6 @@ public:
|
||||||
void rollEm();
|
void rollEm();
|
||||||
void lookAtPlace();
|
void lookAtPlace();
|
||||||
void findAllOpen();
|
void findAllOpen();
|
||||||
void fillOpen();
|
|
||||||
void deleteExObject();
|
void deleteExObject();
|
||||||
void getEitherAd();
|
void getEitherAd();
|
||||||
void setPickup();
|
void setPickup();
|
||||||
|
|
|
@ -3927,7 +3927,6 @@ void DreamGenContext::talk() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DreamGenContext::discOps() {
|
void DreamGenContext::discOps() {
|
||||||
if (data.byte(kCommandtype) != 249) {
|
if (data.byte(kCommandtype) != 249) {
|
||||||
data.byte(kCommandtype) = 249;
|
data.byte(kCommandtype) = 249;
|
||||||
|
@ -4564,4 +4563,17 @@ void DreamGenContext::lookAtCard() {
|
||||||
putBackObStuff();
|
putBackObStuff();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DreamGenContext::showSlots() {
|
||||||
|
showFrame(tempGraphics(), kOpsx + 7, kOpsy + 8, 2, 0);
|
||||||
|
|
||||||
|
uint16 y = kOpsy + 11;
|
||||||
|
|
||||||
|
for (int slot = 0; slot < 7; slot++) {
|
||||||
|
if (slot == data.byte(kCurrentslot))
|
||||||
|
showFrame(tempGraphics(), kOpsx + 10, y, 3, 0);
|
||||||
|
|
||||||
|
y += 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // End of namespace DreamGen
|
} // End of namespace DreamGen
|
||||||
|
|
|
@ -393,5 +393,6 @@
|
||||||
void notHeldError();
|
void notHeldError();
|
||||||
void useGun();
|
void useGun();
|
||||||
void identifyOb();
|
void identifyOb();
|
||||||
|
void showSlots();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue