A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
Kinoko::EGG::Archive Class Reference

Description

Definition at line 25 of file Archive.hh.

Inheritance diagram for Kinoko::EGG::Archive:

Public Member Functions

 ~Archive ()
 Removes the archive from the static list.
 
void unmount ()
 
s32 convertPathToEntryId (const char *path) const
 
void * getFileFast (s32 entryId, Abstract::ArchiveHandle::FileInfo &info) const
 

Static Public Member Functions

static ArchiveFindArchive (void *archiveStart)
 Checks to see if a given archive is already mounted.
 
static ArchiveMount (void *archiveStart)
 Creates a new Archive object or increments the ref count for an already existing Archive.
 

Private Member Functions

 Archive (void *archiveStart)
 
- Private Member Functions inherited from Kinoko::EGG::Disposer

Static Private Member Functions

static constexpr uintptr_t GetLinkOffset ()
 
- Static Private Member Functions inherited from Kinoko::EGG::Disposer
static constexpr u16 getLinkOffset ()
 

Private Attributes

Abstract::ArchiveHandle m_handle
 
s32 m_refCount = 1
 
Abstract::Memory::MEMLink m_link
 

Static Private Attributes

static Abstract::Memory::MEMList s_archiveList
 The linked list of all mounted archives.
 

Constructor & Destructor Documentation

◆ ~Archive()

Kinoko::EGG::Archive::~Archive ( )
0x8020f6ec

Removes the archive from the static list.

Called when the archive's reference count becomes 0.

Definition at line 11 of file Archive.cc.

◆ Archive()

Kinoko::EGG::Archive::Archive ( void * archiveStart)
privateInlined in 0x8020F768

Definition at line 69 of file Archive.cc.

Member Function Documentation

◆ convertPathToEntryId()

s32 Kinoko::EGG::Archive::convertPathToEntryId ( const char * path) const
nodiscard0x8020fa78

Definition at line 23 of file Archive.cc.

◆ FindArchive()

Archive * Kinoko::EGG::Archive::FindArchive ( void * archiveStart)
staticnodiscardInlined in 0x8020F768

Checks to see if a given archive is already mounted.

Parameters
archiveStartThe address of the archive to search for.
Returns
The archive if it is already mounted, or nullptr if it is not.

Definition at line 37 of file Archive.cc.

◆ getFileFast()

void * Kinoko::EGG::Archive::getFileFast ( s32 entryId,
Abstract::ArchiveHandle::FileInfo & info ) const
0x8020fa80

Definition at line 28 of file Archive.cc.

◆ GetLinkOffset()

static constexpr uintptr_t Kinoko::EGG::Archive::GetLinkOffset ( )
inlinestaticnodiscardconstexprprivate

Definition at line 41 of file Archive.hh.

◆ Mount()

Archive * Kinoko::EGG::Archive::Mount ( void * archiveStart)
staticnodiscard0x8020F768

Creates a new Archive object or increments the ref count for an already existing Archive.

Parameters
archiveStartThe address of the archive to mount.
Returns
The Archive, regardless if it is new or already exists.

Definition at line 53 of file Archive.cc.

◆ unmount()

void Kinoko::EGG::Archive::unmount ( )
0x8020fa38

Definition at line 16 of file Archive.cc.

Member Data Documentation

◆ m_handle

Abstract::ArchiveHandle Kinoko::EGG::Archive::m_handle
private

Definition at line 46 of file Archive.hh.

◆ m_link

Abstract::Memory::MEMLink Kinoko::EGG::Archive::m_link
private

Definition at line 48 of file Archive.hh.

◆ m_refCount

s32 Kinoko::EGG::Archive::m_refCount = 1
private

Definition at line 47 of file Archive.hh.

◆ s_archiveList

Abstract::Memory::MEMList Kinoko::EGG::Archive::s_archiveList
staticprivate
Initial value:
=
Abstract::Memory::MEMList(Archive::GetLinkOffset())

The linked list of all mounted archives.

Definition at line 50 of file Archive.hh.