From 5d704ef12f3d388f32dcbb6ce8dc7b76fdeb7c62 Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Wed, 30 Nov 2011 10:06:03 +0100 Subject: EAMWEB: 'loadtemptext' and 'loadtraveltext' ported to C++ --- engines/dreamweb/dreamgen.cpp | 13 ------------- engines/dreamweb/dreamgen.h | 10 +++------- engines/dreamweb/stubs.cpp | 15 +++++++++++++-- engines/dreamweb/stubs.h | 3 +++ 4 files changed, 19 insertions(+), 22 deletions(-) (limited to 'engines') diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 225f0af6a2..99be36006c 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -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); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index e39fd47773..d4e6e083fe 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -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(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index fa3b59d9d1..a566f8f222 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -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 */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 16be8ee717..5236ed4ddf 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -369,4 +369,7 @@ void setlocation(uint8 index); void setlocation(); const uint8 *getTextInFile1(uint16 index); + void loadtemptext(); + void loadtemptext(const char *fileName); + void loadtraveltext(); -- cgit v1.2.3