Skip to content

Commit

Permalink
Resources|libdoomsday: Reading a PK3 file as raw data
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Oct 17, 2017
1 parent a87a87e commit 3e9cc61
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Expand Up @@ -36,7 +36,10 @@ class LIBDOOMSDAY_PUBLIC DataFolder : public de::Folder, public DataBundle
DataFolder(Format format, de::File &sourceFile);
~DataFolder();

de::String describe() const;
de::String describe() const override;

// Stream access.
IIStream const &operator >> (IByteArray &bytes) const override;
};

#endif // LIBDOOMSDAY_DATABUNDLE_H
9 changes: 9 additions & 0 deletions doomsday/apps/libdoomsday/src/filesys/datafolder.cpp
Expand Up @@ -65,3 +65,12 @@ String DataFolder::describe() const

return desc;
}

IIStream const &DataFolder::operator >> (IByteArray &bytes) const
{
if (source())
{
*source() >> bytes;
}
return *this;
}

0 comments on commit 3e9cc61

Please sign in to comment.