DREAMWEB: 'turnanypathon' and 'turnanypathoff' ported to C++
This commit is contained in:
parent
09def52554
commit
49d1872876
5 changed files with 33 additions and 62 deletions
|
@ -178,6 +178,8 @@ generator = cpp(context, "DreamGen", blacklist = [
|
||||||
'pixelcheckset',
|
'pixelcheckset',
|
||||||
'turnpathon',
|
'turnpathon',
|
||||||
'turnpathoff',
|
'turnpathoff',
|
||||||
|
'turnanypathon',
|
||||||
|
'turnanypathoff',
|
||||||
], skip_output = [
|
], skip_output = [
|
||||||
# These functions are processed but not output
|
# These functions are processed but not output
|
||||||
'dreamweb',
|
'dreamweb',
|
||||||
|
|
|
@ -14946,58 +14946,6 @@ gotfirst:
|
||||||
al = es.byte(bx+6);
|
al = es.byte(bx+6);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DreamGenContext::turnanypathon() {
|
|
||||||
STACK_CHECK;
|
|
||||||
push(ax);
|
|
||||||
push(ax);
|
|
||||||
cl = 255;
|
|
||||||
ch = ah;
|
|
||||||
_add(ch, 100);
|
|
||||||
findormake();
|
|
||||||
ax = pop();
|
|
||||||
al = ah;
|
|
||||||
ah = 0;
|
|
||||||
cx = 144;
|
|
||||||
_mul(cx);
|
|
||||||
es = data.word(kReels);
|
|
||||||
bx = (0);
|
|
||||||
_add(bx, ax);
|
|
||||||
ax = pop();
|
|
||||||
ah = 0;
|
|
||||||
_add(ax, ax);
|
|
||||||
_add(ax, ax);
|
|
||||||
_add(ax, ax);
|
|
||||||
_add(bx, ax);
|
|
||||||
al = 255;
|
|
||||||
es.byte(bx+6) = al;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DreamGenContext::turnanypathoff() {
|
|
||||||
STACK_CHECK;
|
|
||||||
push(ax);
|
|
||||||
push(ax);
|
|
||||||
cl = 0;
|
|
||||||
ch = ah;
|
|
||||||
_add(ch, 100);
|
|
||||||
findormake();
|
|
||||||
ax = pop();
|
|
||||||
al = ah;
|
|
||||||
ah = 0;
|
|
||||||
cx = 144;
|
|
||||||
_mul(cx);
|
|
||||||
es = data.word(kReels);
|
|
||||||
bx = (0);
|
|
||||||
_add(bx, ax);
|
|
||||||
ax = pop();
|
|
||||||
ah = 0;
|
|
||||||
_add(ax, ax);
|
|
||||||
_add(ax, ax);
|
|
||||||
_add(ax, ax);
|
|
||||||
_add(bx, ax);
|
|
||||||
al = 0;
|
|
||||||
es.byte(bx+6) = al;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DreamGenContext::checkifpathison() {
|
void DreamGenContext::checkifpathison() {
|
||||||
STACK_CHECK;
|
STACK_CHECK;
|
||||||
push(ax);
|
push(ax);
|
||||||
|
@ -17970,8 +17918,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
|
||||||
case addr_isitdescribed: isitdescribed(); break;
|
case addr_isitdescribed: isitdescribed(); break;
|
||||||
case addr_findpathofpoint: findpathofpoint(); break;
|
case addr_findpathofpoint: findpathofpoint(); break;
|
||||||
case addr_findfirstpath: findfirstpath(); break;
|
case addr_findfirstpath: findfirstpath(); break;
|
||||||
case addr_turnanypathon: turnanypathon(); break;
|
|
||||||
case addr_turnanypathoff: turnanypathoff(); break;
|
|
||||||
case addr_checkifpathison: checkifpathison(); break;
|
case addr_checkifpathison: checkifpathison(); break;
|
||||||
case addr_afternewroom: afternewroom(); break;
|
case addr_afternewroom: afternewroom(); break;
|
||||||
case addr_atmospheres: atmospheres(); break;
|
case addr_atmospheres: atmospheres(); break;
|
||||||
|
|
|
@ -111,8 +111,6 @@ public:
|
||||||
static const uint16 addr_atmospheres = 0xca0c;
|
static const uint16 addr_atmospheres = 0xca0c;
|
||||||
static const uint16 addr_afternewroom = 0xca08;
|
static const uint16 addr_afternewroom = 0xca08;
|
||||||
static const uint16 addr_checkifpathison = 0xca04;
|
static const uint16 addr_checkifpathison = 0xca04;
|
||||||
static const uint16 addr_turnanypathoff = 0xca00;
|
|
||||||
static const uint16 addr_turnanypathon = 0xc9fc;
|
|
||||||
static const uint16 addr_findfirstpath = 0xc9f0;
|
static const uint16 addr_findfirstpath = 0xc9f0;
|
||||||
static const uint16 addr_findpathofpoint = 0xc9ec;
|
static const uint16 addr_findpathofpoint = 0xc9ec;
|
||||||
static const uint16 addr_isitdescribed = 0xc9e8;
|
static const uint16 addr_isitdescribed = 0xc9e8;
|
||||||
|
@ -1305,7 +1303,7 @@ public:
|
||||||
void bresenhams();
|
void bresenhams();
|
||||||
void getbackfromops();
|
void getbackfromops();
|
||||||
//void frameoutv();
|
//void frameoutv();
|
||||||
void opensarters();
|
void showbyte();
|
||||||
void screenupdate();
|
void screenupdate();
|
||||||
//void addlength();
|
//void addlength();
|
||||||
void wornerror();
|
void wornerror();
|
||||||
|
@ -1317,7 +1315,7 @@ public:
|
||||||
void mainscreen();
|
void mainscreen();
|
||||||
void watchreel();
|
void watchreel();
|
||||||
void showfolder();
|
void showfolder();
|
||||||
void turnanypathoff();
|
//void turnanypathoff();
|
||||||
void openfilefromc();
|
void openfilefromc();
|
||||||
void gettime();
|
void gettime();
|
||||||
//void clearwork();
|
//void clearwork();
|
||||||
|
@ -1342,7 +1340,7 @@ public:
|
||||||
void opentomb();
|
void opentomb();
|
||||||
//void makename();
|
//void makename();
|
||||||
void buttonfour();
|
void buttonfour();
|
||||||
void dosometalk();
|
void restoreall();
|
||||||
//void lockmon();
|
//void lockmon();
|
||||||
//void dochange();
|
//void dochange();
|
||||||
void getanyaddir();
|
void getanyaddir();
|
||||||
|
@ -1418,7 +1416,6 @@ public:
|
||||||
//void cancelch1();
|
//void cancelch1();
|
||||||
void loadold();
|
void loadold();
|
||||||
void loadtempcharset();
|
void loadtempcharset();
|
||||||
void showbyte();
|
|
||||||
void useslab();
|
void useslab();
|
||||||
void dumpzoom();
|
void dumpzoom();
|
||||||
//void aboutturn();
|
//void aboutturn();
|
||||||
|
@ -1525,7 +1522,7 @@ public:
|
||||||
void wearwatch();
|
void wearwatch();
|
||||||
void runintroseq();
|
void runintroseq();
|
||||||
//void doblocks();
|
//void doblocks();
|
||||||
void restoreall();
|
void opensarters();
|
||||||
//void delpointer();
|
//void delpointer();
|
||||||
void attendant();
|
void attendant();
|
||||||
void nextsymbol();
|
void nextsymbol();
|
||||||
|
@ -1828,7 +1825,7 @@ public:
|
||||||
void gates();
|
void gates();
|
||||||
void newgame();
|
void newgame();
|
||||||
void showwatch();
|
void showwatch();
|
||||||
void turnanypathon();
|
//void turnanypathon();
|
||||||
void restorereels();
|
void restorereels();
|
||||||
void setwalk();
|
void setwalk();
|
||||||
void useroutine();
|
void useroutine();
|
||||||
|
@ -1992,6 +1989,7 @@ public:
|
||||||
void emergencypurge();
|
void emergencypurge();
|
||||||
void usemenu();
|
void usemenu();
|
||||||
void alleybarksound();
|
void alleybarksound();
|
||||||
|
void dosometalk();
|
||||||
void usecart();
|
void usecart();
|
||||||
void intromusic();
|
void intromusic();
|
||||||
void quitkey();
|
void quitkey();
|
||||||
|
|
|
@ -51,6 +51,27 @@ void DreamGenContext::turnpathoff(uint8 param) {
|
||||||
roomsPaths[8 * param + 6] = 0x00;
|
roomsPaths[8 * param + 6] = 0x00;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DreamGenContext::turnanypathon(uint8 param, uint8 room) {
|
||||||
|
findormake(param, 0xff, room + 100);
|
||||||
|
uint8 *paths = segRef(data.word(kReels)).ptr(kPathdata + 144 * room, 0);
|
||||||
|
paths[8 * param + 6] = 0xff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DreamGenContext::turnanypathon() {
|
||||||
|
turnanypathon(al, ah);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DreamGenContext::turnanypathoff(uint8 param, uint8 room) {
|
||||||
|
findormake(param, 0x00, room + 100);
|
||||||
|
uint8 *paths = segRef(data.word(kReels)).ptr(kPathdata + 144 * room, 0);
|
||||||
|
paths[8 * param + 6] = 0x00;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DreamGenContext::turnanypathoff() {
|
||||||
|
turnanypathoff(al, ah);
|
||||||
|
}
|
||||||
|
|
||||||
void DreamGenContext::getroomspaths() {
|
void DreamGenContext::getroomspaths() {
|
||||||
es = data.word(kReels);
|
es = data.word(kReels);
|
||||||
bx = data.byte(kRoomnum) * 144;
|
bx = data.byte(kRoomnum) * 144;
|
||||||
|
|
|
@ -107,6 +107,10 @@
|
||||||
void turnpathoff(uint8 param);
|
void turnpathoff(uint8 param);
|
||||||
void turnpathon();
|
void turnpathon();
|
||||||
void turnpathoff();
|
void turnpathoff();
|
||||||
|
void turnanypathon(uint8 param, uint8 room);
|
||||||
|
void turnanypathoff(uint8 param, uint8 room);
|
||||||
|
void turnanypathon();
|
||||||
|
void turnanypathoff();
|
||||||
void getroomspaths();
|
void getroomspaths();
|
||||||
uint8 *getroomspathsCPP();
|
uint8 *getroomspathsCPP();
|
||||||
void makebackob(SetObject *objData);
|
void makebackob(SetObject *objData);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue