maxton / GameArchives

A C# library for reading several video game archive formats, and a sample file explorer.
GNU Lesser General Public License v3.0
95 stars 20 forks source link

Amplitude PS2 .ark missing some files #23

Open mtolly opened 4 years ago

mtolly commented 4 years ago

While working on Amplitude PS2 (ark v2) modification I discovered compressed texture files are missing from the visible/extractable contents in ArchiveExplorer.

The culprit appears to be this line which skips any files that do not have a zero for the final part of the file entry. However Pikmin's notes say that this just means it's a gzip-compressed file.

For example this file should be present at arenas/constructo/gen/backdrop01.bmp.gz (not to be confused with the uncompressed arenas/constructo/backdrop01.bmp which is an actual Windows bitmap, possibly the source file included by mistake?)

I have not yet checked to see if any other Ark versions such as GH1/2/80s have these kinds of files.

PikminGuts92 commented 4 years ago

I have not yet checked to see if any other Ark versions such as GH1/2/80s have these kinds of files.

I know for a fact EyeToy: AntiGrav uses that reserved field. However, the game instead uses .z extension (zlib compression) for related entries. It's also on ark v2.

maxton commented 4 years ago

IIRC both gzip and zlib are just wrappers around DEFLATE compression, we should be able to just do something like the library does for compressed FSAR files (https://github.com/maxton/GameArchives/blob/master/Library/FSAR/FSARFile.cs#L75)