aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/location.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2007-02-25 20:35:47 +0000
committerNicola Mettifogo2007-02-25 20:35:47 +0000
commitcacff9a9f26eff5111b1f5eef3491ac406f1245d (patch)
tree389ab1f28c51810e5634b98239319fa097d09a47 /engines/parallaction/location.cpp
parent0c77177ef1d8ffc27710c5b2562069a4e3f6ed02 (diff)
downloadscummvm-rg350-cacff9a9f26eff5111b1f5eef3491ac406f1245d.tar.gz
scummvm-rg350-cacff9a9f26eff5111b1f5eef3491ac406f1245d.tar.bz2
scummvm-rg350-cacff9a9f26eff5111b1f5eef3491ac406f1245d.zip
wrapped archive routines into a new class named Archive. File-level static variables have been made members of the new class.
svn-id: r25866
Diffstat (limited to 'engines/parallaction/location.cpp')
-rw-r--r--engines/parallaction/location.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/parallaction/location.cpp b/engines/parallaction/location.cpp
index 81167ef158..f767b49fe6 100644
--- a/engines/parallaction/location.cpp
+++ b/engines/parallaction/location.cpp
@@ -61,26 +61,26 @@ void Parallaction::parseLocation(const char *filename) {
strcat(archivefile, filename);
strcat(archivefile, ".loc");
- if (strcmp(_disk, "null")) closeArchive();
+ if (strcmp(_disk, "null")) _archive.close();
_languageDir[2] = '\0';
- openArchive(_languageDir);
+ _archive.open(_languageDir);
_languageDir[2] = '/';
- if (!openArchivedFile(archivefile)) {
+ if (!_archive.openArchivedFile(archivefile)) {
sprintf(archivefile, "%s%s.loc", _languageDir, filename);
- if (!openArchivedFile(archivefile))
+ if (!_archive.openArchivedFile(archivefile))
errorFileNotFound(filename);
}
- uint32 count = getArchivedFileLength(archivefile);
+ uint32 count = _archive.getArchivedFileLength(archivefile);
location_src = (char*)memAlloc(0x4000);
_locationScript = new Script(location_src);
- readArchivedFile(location_src, count);
- closeArchivedFile();
- closeArchive();
+ _archive.readArchivedFile(location_src, count);
+ _archive.closeArchivedFile();
+ _archive.close();
fillBuffers(*_locationScript, true);
while (scumm_stricmp(_tokens[0], "ENDLOCATION")) {
@@ -134,7 +134,7 @@ void Parallaction::parseLocation(const char *filename) {
if (!scumm_stricmp(_tokens[0], "DISK")) {
strcpy(_disk, _tokens[1]);
strcpy(archivefile, _disk);
- openArchive(archivefile);
+ _archive.open(archivefile);
}
if (!scumm_stricmp(_tokens[0], "LOCALFLAGS")) {
_si = 1; // _localFlagNames[0] = 'visited'