Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JKRArchive Class Referenceabstract

#include <JKRArchive.h>

+ Inheritance diagram for JKRArchive:
+ Collaboration diagram for JKRArchive:

Classes

class  CArcName
 
struct  SDIDirEntry
 
struct  SDIFileEntry
 
struct  SDirEntry
 

Public Types

enum  EMountMode {
  UNKNOWN_MOUNT_MODE = 0 , MOUNT_MEM = 1 , MOUNT_ARAM = 2 , MOUNT_DVD = 3 ,
  MOUNT_COMP = 4
}
 
enum  EMountDirection { UNKNOWN_MOUNT_DIRECTION = 0 , MOUNT_DIRECTION_HEAD = 1 , MOUNT_DIRECTION_TAIL = 2 }
 

Public Member Functions

virtual ~JKRArchive ()
 
bool getDirEntry (SDirEntry *, u32) const
 
voidgetIdxResource (u32)
 
voidgetResource (u16)
 
u32 readIdxResource (void *, u32, u32)
 
u32 readResource (void *, u32, u16)
 
u32 countResource (void) const
 
u32 getFileAttribute (u32) const
 
SDIFileEntryfindNameResource (const char *) const
 
bool isSameName (CArcName &, u32, u16) const
 
SDIDirEntryfindResType (u32) const
 
SDIDirEntryfindDirectory (const char *, u32) const
 
SDIFileEntryfindTypeResource (u32, const char *) const
 
SDIFileEntryfindFsResource (const char *, u32) const
 
SDIFileEntryfindIdxResource (u32) const
 
SDIFileEntryfindPtrResource (const void *) const
 
SDIFileEntryfindIdResource (u16) const
 
virtual bool becomeCurrent (const char *)
 
virtual voidgetResource (const char *)
 
virtual voidgetResource (u32, const char *)
 
virtual u32 readResource (void *, u32, const char *)
 
virtual u32 readResource (void *, u32, u32, const char *)
 
virtual void removeResourceAll (void)
 
virtual bool removeResource (void *)
 
virtual bool detachResource (void *)
 
virtual u32 getResSize (const void *) const
 
virtual u32 countFile (const char *) const
 
virtual JKRFileFindergetFirstFile (const char *) const
 
virtual u32 getExpandedResSize (const void *res) const
 
virtual voidfetchResource (SDIFileEntry *, u32 *)=0
 
virtual voidfetchResource (void *, u32, SDIFileEntry *, u32 *)=0
 
virtual void setExpandSize (SDIFileEntry *, u32)
 
virtual u32 getExpandSize (SDIFileEntry *) const
 
u32 countFile () const
 
s32 countDirectory () const
 
u8 getMountMode () const
 
bool isFileEntry (u32 param_0)
 
- Public Member Functions inherited from JKRFileLoader
 JKRFileLoader (void)
 
virtual ~JKRFileLoader ()
 
bool isMounted () const
 
u32 getVolumeType () const
 
virtual void unmount (void)
 
- Public Member Functions inherited from JKRDisposer
 JKRDisposer ()
 
virtual ~JKRDisposer ()
 

Static Public Member Functions

static JKRArchivecheck_mount_already (s32, JKRHeap *)
 
static JKRArchivemount (const char *, EMountMode, JKRHeap *, EMountDirection)
 
static JKRArchivemount (void *, JKRHeap *, EMountDirection)
 
static JKRArchivemount (s32, EMountMode, JKRHeap *, EMountDirection)
 
static voidgetGlbResource (u32, const char *, JKRArchive *)
 
static JKRCompression convertAttrToCompressionType (u32 attr)
 
static u32 getCurrentDirID ()
 
static void setCurrentDirID (u32 dirID)
 
- Static Public Member Functions inherited from JKRFileLoader
static voidgetGlbResource (const char *)
 
static voidgetGlbResource (const char *, JKRFileLoader *)
 
static bool removeResource (void *, JKRFileLoader *)
 
static bool detachResource (void *, JKRFileLoader *)
 
static JKRFileLoaderfindVolume (const char **)
 
static const charfetchVolumeName (char *, s32, const char *)
 
static JKRFileLoadergetCurrentVolume ()
 
static void setCurrentVolume (JKRFileLoader *fileLoader)
 
static JSUList< JKRFileLoader > & getVolumeList ()
 

Public Attributes

JKRHeapmHeap
 
u8 mMountMode
 
u8 field_0x3d [3]
 
s32 mEntryNum
 
SArcDataInfomArcInfoBlock
 
SDIDirEntrymNodes
 
SDIFileEntrymFiles
 
s32mExpandedSize
 
charmStringTable
 
- Public Attributes inherited from JKRDisposer
JKRHeapmHeap
 
JSULink< JKRDisposermLink
 

Protected Member Functions

 JKRArchive ()
 
 JKRArchive (s32, EMountMode)
 

Protected Attributes

u32 field_0x58
 
JKRCompression mCompression
 
EMountDirection mMountDirection
 
- Protected Attributes inherited from JKRFileLoader
JSULink< JKRFileLoadermFileLoaderLink
 
const charmVolumeName
 
u32 mVolumeType
 
bool mIsMounted
 
u8 field_0x31 [3]
 
u32 mMountCount
 

Static Private Attributes

static u32 sCurrentDirID
 

Additional Inherited Members

- Static Public Attributes inherited from JKRFileLoader
static JKRFileLoadersCurrentVolume
 
static JSUList< JKRFileLoadersVolumeList
 

Member Enumeration Documentation

◆ EMountDirection

Enumerator
UNKNOWN_MOUNT_DIRECTION 
MOUNT_DIRECTION_HEAD 
MOUNT_DIRECTION_TAIL 

◆ EMountMode

Enumerator
UNKNOWN_MOUNT_MODE 
MOUNT_MEM 
MOUNT_ARAM 
MOUNT_DVD 
MOUNT_COMP 

Constructor & Destructor Documentation

◆ JKRArchive() [1/2]

JKRArchive::JKRArchive ( )
protected

◆ JKRArchive() [2/2]

JKRArchive::JKRArchive ( s32  entryNumber,
JKRArchive::EMountMode  mountMode 
)
protected

◆ ~JKRArchive()

JKRArchive::~JKRArchive ( )
virtual

Member Function Documentation

◆ becomeCurrent()

bool JKRArchive::becomeCurrent ( const char path)
virtual

Implements JKRFileLoader.

◆ check_mount_already()

JKRArchive * JKRArchive::check_mount_already ( s32  entryNum,
JKRHeap heap 
)
static

◆ convertAttrToCompressionType()

static JKRCompression JKRArchive::convertAttrToCompressionType ( u32  attr)
inlinestatic

◆ countDirectory()

s32 JKRArchive::countDirectory ( ) const
inline

◆ countFile() [1/2]

u32 JKRArchive::countFile ( ) const
inline

◆ countFile() [2/2]

u32 JKRArchive::countFile ( const char path) const
virtual

Implements JKRFileLoader.

◆ countResource()

u32 JKRArchive::countResource ( void  ) const

◆ detachResource()

bool JKRArchive::detachResource ( void resource)
virtual

Implements JKRFileLoader.

◆ fetchResource() [1/2]

virtual void * JKRArchive::fetchResource ( SDIFileEntry ,
u32  
)
pure virtual

◆ fetchResource() [2/2]

virtual void * JKRArchive::fetchResource ( void ,
u32  ,
SDIFileEntry ,
u32  
)
pure virtual

◆ findDirectory()

JKRArchive::SDIDirEntry * JKRArchive::findDirectory ( const char name,
u32  directoryId 
) const

◆ findFsResource()

JKRArchive::SDIFileEntry * JKRArchive::findFsResource ( const char name,
u32  directoryId 
) const

◆ findIdResource()

JKRArchive::SDIFileEntry * JKRArchive::findIdResource ( u16  id) const

◆ findIdxResource()

JKRArchive::SDIFileEntry * JKRArchive::findIdxResource ( u32  fileIndex) const

◆ findNameResource()

JKRArchive::SDIFileEntry * JKRArchive::findNameResource ( const char name) const

◆ findPtrResource()

JKRArchive::SDIFileEntry * JKRArchive::findPtrResource ( const void resource) const

◆ findResType()

JKRArchive::SDIDirEntry * JKRArchive::findResType ( u32  type) const

◆ findTypeResource()

JKRArchive::SDIFileEntry * JKRArchive::findTypeResource ( u32  type,
const char name 
) const

◆ getCurrentDirID()

static u32 JKRArchive::getCurrentDirID ( )
inlinestatic

◆ getDirEntry()

bool JKRArchive::getDirEntry ( SDirEntry dirEntry,
u32  index 
) const

◆ getExpandedResSize()

virtual u32 JKRArchive::getExpandedResSize ( const void res) const
inlinevirtual

◆ getExpandSize()

u32 JKRArchive::getExpandSize ( SDIFileEntry fileEntry) const
virtual

◆ getFileAttribute()

u32 JKRArchive::getFileAttribute ( u32  index) const

◆ getFirstFile()

JKRFileFinder * JKRArchive::getFirstFile ( const char path) const
virtual

Implements JKRFileLoader.

◆ getGlbResource()

void * JKRArchive::getGlbResource ( u32  param_1,
const char path,
JKRArchive archive 
)
static

◆ getIdxResource()

void * JKRArchive::getIdxResource ( u32  index)

◆ getMountMode()

u8 JKRArchive::getMountMode ( ) const
inline

◆ getResource() [1/3]

void * JKRArchive::getResource ( const char path)
virtual

Implements JKRFileLoader.

◆ getResource() [2/3]

void * JKRArchive::getResource ( u16  id)

◆ getResource() [3/3]

void * JKRArchive::getResource ( u32  type,
const char path 
)
virtual

Implements JKRFileLoader.

◆ getResSize()

u32 JKRArchive::getResSize ( const void resource) const
virtual

Implements JKRFileLoader.

◆ isFileEntry()

bool JKRArchive::isFileEntry ( u32  param_0)
inline

◆ isSameName()

bool JKRArchive::isSameName ( JKRArchive::CArcName name,
u32  nameOffset,
u16  nameHash 
) const

◆ mount() [1/3]

JKRArchive * JKRArchive::mount ( const char path,
EMountMode  mountMode,
JKRHeap heap,
EMountDirection  mountDirection 
)
static

◆ mount() [2/3]

JKRArchive * JKRArchive::mount ( s32  entryNum,
JKRArchive::EMountMode  mountMode,
JKRHeap heap,
JKRArchive::EMountDirection  mountDirection 
)
static

◆ mount() [3/3]

JKRArchive * JKRArchive::mount ( void ptr,
JKRHeap heap,
EMountDirection  mountDirection 
)
static

◆ readIdxResource()

u32 JKRArchive::readIdxResource ( void buffer,
u32  bufferSize,
u32  index 
)

◆ readResource() [1/3]

u32 JKRArchive::readResource ( void buffer,
u32  bufferSize,
const char path 
)
virtual

Implements JKRFileLoader.

◆ readResource() [2/3]

u32 JKRArchive::readResource ( void buffer,
u32  bufferSize,
u16  id 
)

◆ readResource() [3/3]

u32 JKRArchive::readResource ( void buffer,
u32  bufferSize,
u32  type,
const char path 
)
virtual

Implements JKRFileLoader.

◆ removeResource()

bool JKRArchive::removeResource ( void resource)
virtual

Implements JKRFileLoader.

Reimplemented in JKRCompArchive, and JKRMemArchive.

◆ removeResourceAll()

void JKRArchive::removeResourceAll ( void  )
virtual

Implements JKRFileLoader.

Reimplemented in JKRCompArchive, and JKRMemArchive.

◆ setCurrentDirID()

static void JKRArchive::setCurrentDirID ( u32  dirID)
inlinestatic

◆ setExpandSize()

void JKRArchive::setExpandSize ( SDIFileEntry fileEntry,
u32  expandSize 
)
virtual

Member Data Documentation

◆ field_0x3d

u8 JKRArchive::field_0x3d[3]

◆ field_0x58

u32 JKRArchive::field_0x58
protected

◆ mArcInfoBlock

SArcDataInfo* JKRArchive::mArcInfoBlock

◆ mCompression

JKRCompression JKRArchive::mCompression
protected

◆ mEntryNum

s32 JKRArchive::mEntryNum

◆ mExpandedSize

s32* JKRArchive::mExpandedSize

◆ mFiles

SDIFileEntry* JKRArchive::mFiles

◆ mHeap

JKRHeap* JKRArchive::mHeap

◆ mMountDirection

EMountDirection JKRArchive::mMountDirection
protected

◆ mMountMode

u8 JKRArchive::mMountMode

◆ mNodes

SDIDirEntry* JKRArchive::mNodes

◆ mStringTable

char* JKRArchive::mStringTable

◆ sCurrentDirID

u32 JKRArchive::sCurrentDirID
staticprivate

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