ScummVM API documentation
Macs2::Macs2AmigaArchive Class Reference

#include <amiga_archive.h>

Inheritance diagram for Macs2::Macs2AmigaArchive:
Common::Archive

Public Member Functions

bool open ()
 
void close ()
 
bool isOpen () const
 
uint16 getSceneCount () const
 
uint16 getResourceCount () const
 
const AmigaInfoDatagetInfo () const
 
Common::SeekableReadStreamcreateReadStreamForResource (AmigaResourceType type, uint16 id) const
 
Common::SeekableReadStreamcreateSceneTableStream () const
 
bool hasResource (AmigaResourceType type, uint16 id) const
 
bool hasFile (const Common::Path &path) const override
 
int listMembers (Common::ArchiveMemberList &list) const override
 
const Common::ArchiveMemberPtr getMember (const Common::Path &path) const override
 
Common::SeekableReadStreamcreateReadStreamForMember (const Common::Path &path) const override
 
- Public Member Functions inherited from Common::Archive
virtual bool isPathDirectory (const Path &path) const
 
virtual int listMatchingMembers (ArchiveMemberList &list, const Path &pattern, bool matchPathComponents=false) const
 
virtual SeekableReadStreamcreateReadStreamForMemberAltStream (const Path &path, AltStreamType altStreamType) const
 
virtual SeekableReadStreamcreateReadStreamForMemberNext (const Path &path, const Archive *starting) const
 
Common::Error dumpArchive (const Path &destPath)
 
virtual char getPathSeparator () const
 
virtual bool getChildren (const Common::Path &path, Common::Array< Common::String > &list, ListMode mode=kListDirectoriesOnly, bool hidden=true) const
 

Static Public Member Functions

static Common::String makeResourceName (AmigaResourceType type, uint16 id)
 
static bool parseResourceName (const Common::String &name, AmigaResourceType &type, uint16 &id)
 
static AmigaResourceType typeFromTag (uint16 tag)
 
static const char * typeToString (AmigaResourceType type)
 
static bool decodePlanarSprite (const byte *mxoo, uint32 mxooSize, uint16 &width, uint16 &height, Common::Array< byte > &pixels)
 

Additional Inherited Members

- Public Types inherited from Common::Archive
enum  ListMode { kListFilesOnly = 1, kListDirectoriesOnly = 2, kListAll = 3 }
 

Detailed Description

Amiga MACS2 container: Mdir (MXDR) index + DataA/DataB/... (MXMF) volumes.

Members are exposed as Common::Archive paths: "scene_table" - first PP20 block (decompressed MXOO) "OO_0104", "MM_0004".. - typed resources (PP20 decompressed; MXMM raw) "Info" - raw MXIN game metadata (if present on disk)

Based on FORMAT.md / extract_macs2 Amiga mode in scummvm-tools.

Member Function Documentation

◆ open()

bool Macs2::Macs2AmigaArchive::open ( )

Open Mdir + DataA (and additional DataB.. volumes referenced by Mdir). Looks up files via SearchMan / the game directory.

◆ createReadStreamForResource()

Common::SeekableReadStream* Macs2::Macs2AmigaArchive::createReadStreamForResource ( AmigaResourceType  type,
uint16  id 
) const

Decompressed resource stream, or nullptr if missing. Caller owns the stream.

◆ createSceneTableStream()

Common::SeekableReadStream* Macs2::Macs2AmigaArchive::createSceneTableStream ( ) const

Decompressed first MXMF PP20 block (scene/base table).

◆ hasFile()

bool Macs2::Macs2AmigaArchive::hasFile ( const Common::Path path) const
overridevirtual

Check if a member with the given name is present in the Archive. Patterns are not allowed, as this is meant to be a quick File::exists() replacement. This returns "true" for both files and directories.

Implements Common::Archive.

◆ listMembers()

int Macs2::Macs2AmigaArchive::listMembers ( Common::ArchiveMemberList list) const
overridevirtual

Add all members of the Archive to the list. Must only append to list, and not remove elements from it.

Returns
The number of names added to list.

Implements Common::Archive.

◆ getMember()

const Common::ArchiveMemberPtr Macs2::Macs2AmigaArchive::getMember ( const Common::Path path) const
overridevirtual

Return an ArchiveMember representation of the given file.

Implements Common::Archive.

◆ createReadStreamForMember()

Common::SeekableReadStream* Macs2::Macs2AmigaArchive::createReadStreamForMember ( const Common::Path path) const
overridevirtual

Create a stream bound to a member with the specified name in the archive. If no member with this name exists, 0 is returned.

Returns
The newly created input stream.

Implements Common::Archive.

◆ decodePlanarSprite()

static bool Macs2::Macs2AmigaArchive::decodePlanarSprite ( const byte *  mxoo,
uint32  mxooSize,
uint16 &  width,
uint16 &  height,
Common::Array< byte > &  pixels 
)
static

Decode an Amiga planar MXOO sprite body into chunky 8bpp pixels. Returns false if the resource is not a simple sprite.


The documentation for this class was generated from the following file: