diff options
author | Willem Jan Palenstijn | 2011-12-27 18:34:23 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-12-27 18:40:25 +0100 |
commit | 08be0411b1bfba715d5c1b50b50a893a27e12f8c (patch) | |
tree | fb57b47176caf204312ce4ee90ebf67e50c06200 /engines/dreamweb/newplace.cpp | |
parent | df7bb24184ea599280640107c19f898c43d74ac3 (diff) | |
download | scummvm-rg350-08be0411b1bfba715d5c1b50b50a893a27e12f8c.tar.gz scummvm-rg350-08be0411b1bfba715d5c1b50b50a893a27e12f8c.tar.bz2 scummvm-rg350-08be0411b1bfba715d5c1b50b50a893a27e12f8c.zip |
DREAMWEB: Streamline text file handling
Diffstat (limited to 'engines/dreamweb/newplace.cpp')
-rw-r--r-- | engines/dreamweb/newplace.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/dreamweb/newplace.cpp b/engines/dreamweb/newplace.cpp index 4d82d7032f..21975eecd5 100644 --- a/engines/dreamweb/newplace.cpp +++ b/engines/dreamweb/newplace.cpp @@ -92,7 +92,8 @@ void DreamBase::selectLocation() { getRidOfTemp(); getRidOfTemp2(); getRidOfTemp3(); - deallocateMem(data.word(kTraveltext)); + + _travelText.clear(); } void DreamBase::showCity() { @@ -120,8 +121,7 @@ void DreamBase::lookAtPlace() { if (_foreignRelease) showFrame(tempGraphics3(), 60, 72+55+21, 4, 0); - uint16 offset = kTextstart + getSegment(data.word(kTraveltext)).word(data.byte(kDestpos) * 2); - const uint8 *string = getSegment(data.word(kTraveltext)).ptr(offset, 0); + const uint8 *string = (const uint8 *)_travelText.getString(data.byte(kDestpos)); findNextColon(&string); uint16 y = (_foreignRelease) ? 84 + 4 : 84; printDirect(&string, 63, &y, 191, 191 & 1); @@ -153,8 +153,7 @@ void DreamBase::locationPic() { if (data.byte(kDestpos) == data.byte(kReallocation)) showFrame(tempGraphics(), 104, 140 + 14, 3, 0); // Currently in this location - uint16 offset = kTextstart + getSegment(data.word(kTraveltext)).word(data.byte(kDestpos) * 2); - const uint8 *string = getSegment(data.word(kTraveltext)).ptr(offset, 0); + const uint8 *string = (const uint8 *)_travelText.getString(data.byte(kDestpos)); DreamBase::printDirect(string, 50, 20, 241, 241 & 1); } |