EAMWEB: 'loadtemptext' and 'loadtraveltext' ported to C++

This commit is contained in:
Bertrand Augereau 2011-11-30 10:06:03 +01:00
parent eb1fbcd6aa
commit 5d704ef12f
5 changed files with 21 additions and 22 deletions

View File

@ -312,6 +312,8 @@ generator = cpp(context, "DreamGen", blacklist = [
'folderexit',
'getlocation',
'setlocation',
'loadtemptext',
'loadtraveltext',
], skip_output = [
# These functions are processed but not output
'dreamweb',

View File

@ -12258,19 +12258,6 @@ void DreamGenContext::randomnum2() {
ds = pop();
}
void DreamGenContext::loadtraveltext() {
STACK_CHECK;
dx = 2234;
standardload();
data.word(kTraveltext) = ax;
}
void DreamGenContext::loadtemptext() {
STACK_CHECK;
standardload();
data.word(kTextfile1) = ax;
}
void DreamGenContext::getridofreels() {
STACK_CHECK;
_cmp(data.byte(kRoomloaded), 0);

View File

@ -56,8 +56,6 @@ public:
static const uint16 addr_dontloadseg = 0xcb64;
static const uint16 addr_getridofall = 0xcb3c;
static const uint16 addr_getridofreels = 0xcb38;
static const uint16 addr_loadtemptext = 0xcb2c;
static const uint16 addr_loadtraveltext = 0xcb14;
static const uint16 addr_randomnum2 = 0xcb08;
static const uint16 addr_randomnum1 = 0xcb04;
static const uint16 addr_readkey = 0xcafc;
@ -1126,7 +1124,6 @@ public:
void bothchannels();
void usewire();
void getnamepos();
void loadtemptext();
void femalefan();
void identifyob();
void trysoundalloc();
@ -1159,7 +1156,7 @@ public:
void showslots();
void openfilefromc();
void gettime();
void loadtraveltext();
void candles1();
void fadedos();
void drawfloor();
void loadkeypad();
@ -1243,7 +1240,6 @@ public:
void buttontwo();
void fadescreendownhalf();
void useplate();
void candles1();
void lookininterface();
void manasleep();
void hotelbell();
@ -1354,7 +1350,7 @@ public:
void interviewer();
void purgeanitem();
void madman();
void chewy();
void enablesoundint();
void madmanstelly();
void constant();
void purgealocation();
@ -1382,7 +1378,7 @@ public:
void wheelsound();
void playguitar();
void searchforsame();
void enablesoundint();
void chewy();
void getback1();
void fadefromwhite();
void usewindow();

View File

@ -2311,8 +2311,7 @@ void DreamGenContext::loadfolder() {
loadintotemp2("DREAMWEB.G10");
loadintotemp3("DREAMWEB.G11");
loadtempcharset("DREAMWEB.C02");
dx = kFoldertext; // "DREAMWEB.T50"
loadtemptext();
loadtemptext("DREAMWEB.T50");
}
void DreamGenContext::showfolder() {
@ -2498,5 +2497,17 @@ void DreamGenContext::folderexit() {
showframe(tempGraphics2(), 296, 178, 6, 0);
}
void DreamGenContext::loadtraveltext() {
data.word(kTraveltext) = standardload("DREAMWEB.T81");
}
void DreamGenContext::loadtemptext() {
loadtemptext((const char *)cs.ptr(dx, 0));
}
void DreamGenContext::loadtemptext(const char *fileName) {
data.word(kTextfile1) = standardload(fileName);
}
} /*namespace dreamgen */

View File

@ -369,4 +369,7 @@
void setlocation(uint8 index);
void setlocation();
const uint8 *getTextInFile1(uint16 index);
void loadtemptext();
void loadtemptext(const char *fileName);
void loadtraveltext();