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

void unmount ()
s32 convertPathToEntryId (const char *path) const
void * getFileFast (s32 entryId, Abstract::ArchiveHandle::FileInfo &info) const

Static Public Member Functions

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

Private Member Functions

EGG_NEW_DELETE_FRIEND Archive (void *archiveStart)
 ~Archive ()
 Removes the archive from the static list.

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 ( void * archiveStart)
privateInlined in 0x8020F768

Definition at line 69 of file Archive.cc.

◆ ~Archive()

Kinoko::EGG::Archive::~Archive ( )
private0x8020f6ec

Removes the archive from the static list.

Called when the archive's reference count becomes 0.

Definition at line 11 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()

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

Definition at line 42 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 47 of file Archive.hh.

◆ m_link

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

Definition at line 49 of file Archive.hh.

◆ m_refCount

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

Definition at line 48 of file Archive.hh.

◆ s_archiveList

Abstract::Memory::MEMList Kinoko::EGG::Archive::s_archiveList
staticprivate
Initial value:
=
Abstract::Memory::MEMList(Archive::GetLinkOffset())
Intrusive doubly-linked list. Links are placed within the corresponding object.
Definition List.hh:14

The linked list of all mounted archives.

Definition at line 51 of file Archive.hh.