Skip to content

Commit

Permalink
AURORA: Write files with virtual types as kFileTypeRES into ERFs
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Jun 27, 2018
1 parent 0351664 commit 9887e97
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/aurora/erfwriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ void ERFWriter::add(const Common::UString &resRef, FileType resType, Common::Rea
if (resType == kFileTypeNone)
resType = kFileTypeRES;

// TODO: Handle file type aliases and "virtual" file types
/* Files with types above this line are not found in ERF archives.
* They have no real numerical type ID usable for ERF archives. */
if (resType >= kFileTypeMAXArchive)
resType = kFileTypeRES;

// TODO: Handle file type aliases

_stream.write(resRef.c_str(), MIN<size_t>(resRef.size(), 16));
_stream.writeZeros(16 - MIN<size_t>(resRef.size(), 16));
Expand Down

0 comments on commit 9887e97

Please sign in to comment.