DREAMWEB: Migrate loadTempText() to using datafile prefix variable.

This commit is contained in:
D G Turner 2012-02-24 05:19:29 +00:00
parent 542014c309
commit 31bf535a83
5 changed files with 10 additions and 9 deletions

View File

@ -813,7 +813,7 @@ public:
void loadGraphicsSegment(GraphicsFile &file, Common::File &inFile, unsigned int len);
void loadTextSegment(TextFile &file, Common::File &inFile, unsigned int len);
void loadTravelText();
void loadTempText(const char *fileName);
void loadTempText(const char *suffix);
void sortOutMap();
void loadRoomData(const Room &room, bool skipDat);
void useTempCharset(GraphicsFile *charset);

View File

@ -398,7 +398,7 @@ void DreamWebEngine::loadFolder() {
loadGraphicsFile(_folderGraphics2, "DREAMWEB.G10"); // folder graphics 2
loadGraphicsFile(_folderGraphics3, "DREAMWEB.G11"); // folder graphics 3
loadGraphicsFile(_folderCharset, "DREAMWEB.C02"); // character set 3
loadTempText("DREAMWEB.T50"); // folder text
loadTempText("T50"); // folder text
}
void DreamWebEngine::showFolder() {
@ -717,7 +717,7 @@ void DreamWebEngine::updateSymbolBot() {
void DreamWebEngine::useDiary() {
getRidOfReels();
loadGraphicsFile(_diaryGraphics, "DREAMWEB.G14");
loadTempText("DREAMWEB.T51");
loadTempText("T51");
loadGraphicsFile(_diaryCharset, "DREAMWEB.C02");
createPanel();
showIcon();

View File

@ -178,7 +178,7 @@ void DreamWebEngine::madman(ReelRoutine &routine) {
return;
}
if (newReelPointer == 10) {
loadTempText("DREAMWEB.T82");
loadTempText("T82");
_vars._combatCount = (uint8)-1;
_speechCount = 0;
}

View File

@ -2238,8 +2238,9 @@ void DreamWebEngine::loadTravelText() {
loadTextFile(_travelText, "DREAMWEB.T81"); // location descs
}
void DreamWebEngine::loadTempText(const char *fileName) {
loadTextFile(_textFile1, fileName);
void DreamWebEngine::loadTempText(const char *suffix) {
Common::String fileName = getDatafilePrefix() + suffix;
loadTextFile(_textFile1, fileName.c_str());
}
void DreamWebEngine::drawFloor() {
@ -2789,7 +2790,7 @@ void DreamWebEngine::showGun() {
fadeScreenUp();
hangOn(160);
playChannel0(12, 0);
loadTempText("DREAMWEB.T83");
loadTempText("T83");
rollEndCreditsGameLost();
getRidOfTempText();
}

View File

@ -26,7 +26,7 @@
namespace DreamWeb {
void DreamWebEngine::endGame() {
loadTempText("DREAMWEB.T83");
loadTempText("T83");
monkSpeaking();
if (_quitRequested)
return;
@ -141,7 +141,7 @@ void DreamWebEngine::hangOne(uint16 delay) {
}
void DreamWebEngine::intro() {
loadTempText("DREAMWEB.T82");
loadTempText("T82");
loadPalFromIFF();
setMode();
_newLocation = 50;