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

Description

Definition at line 23 of file Archive.hh.

Inheritance diagram for 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 EGG::Disposer

Static Private Member Functions

static constexpr uintptr_t GetLinkOffset ()
 
- Static Private Member Functions inherited from 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()

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()

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

Definition at line 69 of file Archive.cc.

Member Function Documentation

◆ convertPathToEntryId()

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

Definition at line 23 of file Archive.cc.

◆ FindArchive()

Archive * 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 * EGG::Archive::getFileFast ( s32 entryId,
Abstract::ArchiveHandle::FileInfo & info ) const
0x8020fa80

Definition at line 28 of file Archive.cc.

◆ GetLinkOffset()

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

Definition at line 39 of file Archive.hh.

◆ Mount()

Archive * 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 EGG::Archive::unmount ( )
0x8020fa38

Definition at line 16 of file Archive.cc.

Member Data Documentation

◆ m_handle

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

Definition at line 44 of file Archive.hh.

◆ m_link

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

Definition at line 46 of file Archive.hh.

◆ m_refCount

s32 EGG::Archive::m_refCount = 1
private

Definition at line 45 of file Archive.hh.

◆ s_archiveList

Abstract::Memory::MEMList 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 48 of file Archive.hh.