NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
nw4r::snd::detail::FrameHeap Class Reference

Description

Definition at line 11 of file snd_FrameHeap.h.

Classes

struct  Block
 
struct  Section
 

Public Types

typedef void(* FreeCallback) (void *pBuffer, ulong size, void *pCallbackArg)
 

Public Member Functions

bool Create (void *pBase, ulong size)
 
void Destroy ()
 
void Clear ()
 
void * Alloc (ulong size, FreeCallback pCallback, void *pCallbackArg)
 
int SaveState ()
 
void LoadState (int id)
 
int GetCurrentLevel () const
 
ulong GetFreeSize () const
 
bool IsValid () const
 

Private Member Functions

 NW4R_UT_LINKLIST_TYPEDEF_DECL (Block)
 
 NW4R_UT_LINKLIST_TYPEDEF_DECL (Section)
 
bool NewSection ()
 
void ClearSection ()
 

Private Attributes

MEMiHeapHeadmHandle
 
SectionList mSectionList
 

Static Private Attributes

static const int BLOCK_BUFFER_SIZE = ROUND_UP(sizeof(Block), 32)
 
static const int HEAP_ALIGN = 32
 

Member Typedef Documentation

◆ FreeCallback

typedef void(* nw4r::snd::detail::FrameHeap::FreeCallback) (void *pBuffer, ulong size, void *pCallbackArg)

Definition at line 13 of file snd_FrameHeap.h.

Member Function Documentation

◆ IsValid()

bool nw4r::snd::detail::FrameHeap::IsValid ( ) const
inline

Definition at line 30 of file snd_FrameHeap.h.

Member Data Documentation

◆ BLOCK_BUFFER_SIZE

const int nw4r::snd::detail::FrameHeap::BLOCK_BUFFER_SIZE = ROUND_UP(sizeof(Block), 32)
staticprivate

Definition at line 71 of file snd_FrameHeap.h.

◆ HEAP_ALIGN

const int nw4r::snd::detail::FrameHeap::HEAP_ALIGN = 32
staticprivate

Definition at line 72 of file snd_FrameHeap.h.

◆ mHandle

MEMiHeapHead* nw4r::snd::detail::FrameHeap::mHandle
private

Definition at line 79 of file snd_FrameHeap.h.

◆ mSectionList

SectionList nw4r::snd::detail::FrameHeap::mSectionList
private

Definition at line 80 of file snd_FrameHeap.h.