aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Kołodziejski2004-11-19 22:43:20 +0000
committerPaweł Kołodziejski2004-11-19 22:43:20 +0000
commita7b7a281f1759a96b39195f0885bb5de25471404 (patch)
treef0bdab396806e94be4b74229dd1d814d232d9606
parent309108430c743d8b5b19caa073da2d774e6b447d (diff)
downloadscummvm-rg350-a7b7a281f1759a96b39195f0885bb5de25471404.tar.gz
scummvm-rg350-a7b7a281f1759a96b39195f0885bb5de25471404.tar.bz2
scummvm-rg350-a7b7a281f1759a96b39195f0885bb5de25471404.zip
changed file constructor to dymanic
svn-id: r15842
-rw-r--r--gui/walkthrough.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/gui/walkthrough.cpp b/gui/walkthrough.cpp
index 080129a755..88052c7600 100644
--- a/gui/walkthrough.cpp
+++ b/gui/walkthrough.cpp
@@ -60,16 +60,18 @@ static int getNextWordLength(byte *src, int maxLength) {
bool WalkthroughDialog::loadWalkthroughText() {
char filename[260];
- File file;
+ File *file = new File();
sprintf(filename, "%s.wkt", _gameName);
- file.open(filename);
- if (!file.isOpen())
+ file->open(filename);
+ if (!file->isOpen())
return false;
- int bufferSize = file.size();
+ int bufferSize = file->size();
byte *buffer = (byte *)malloc(bufferSize);
- file.read(buffer, bufferSize);
- file.close();
+ file->read(buffer, bufferSize);
+ file->close();
+
+ delete file;
_linesArray.clear();