mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-04 08:17:40 +00:00
DIRECTOR: Fix MacArchive::getFileSize()
This commit is contained in:
parent
40923700b5
commit
10b2abcd9b
@ -110,7 +110,7 @@ void Archive::listUnaccessedChunks() {
|
||||
debugC(5, kDebugLoading, "Unaccessed Chunks in '%s':\n%s", _pathName.toString(g_director->_dirSeparator).c_str(), s.c_str());
|
||||
}
|
||||
|
||||
int Archive::getFileSize() {
|
||||
uint32 Archive::getFileSize() {
|
||||
if (!_stream)
|
||||
return 0;
|
||||
|
||||
@ -301,6 +301,13 @@ MacArchive::~MacArchive() {
|
||||
delete _resFork;
|
||||
}
|
||||
|
||||
uint32 MacArchive::getFileSize() {
|
||||
if (!_resFork)
|
||||
return 0;
|
||||
|
||||
return _resFork->getResForkDataSize();
|
||||
}
|
||||
|
||||
void MacArchive::close() {
|
||||
Archive::close();
|
||||
delete _resFork;
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
Common::Path getPathName() const { return _pathName; }
|
||||
Common::String getFileName() const;
|
||||
void setPathName(const Common::Path &name) { _pathName = name; }
|
||||
int getFileSize();
|
||||
virtual uint32 getFileSize();
|
||||
|
||||
bool isOpen() const { return _stream != 0; }
|
||||
|
||||
@ -102,6 +102,7 @@ public:
|
||||
MacArchive();
|
||||
~MacArchive() override;
|
||||
|
||||
uint32 getFileSize() override;
|
||||
void close() override;
|
||||
bool openFile(const Common::Path &path) override;
|
||||
bool openStream(Common::SeekableReadStream *stream, uint32 startOffset = 0) override;
|
||||
|
@ -719,7 +719,7 @@ Datum Lingo::getTheEntity(int entity, Datum &id, int field) {
|
||||
d = 0; // Let's pretend the movie is compactified
|
||||
break;
|
||||
case kTheMovieFileSize:
|
||||
d = movie->getArchive()->getFileSize();
|
||||
d = (int)movie->getArchive()->getFileSize();
|
||||
break;
|
||||
case kTheMoviePath:
|
||||
case kThePathName:
|
||||
|
Loading…
Reference in New Issue
Block a user