CorsixTH engine (the C++ part)
Open source implementation of Theme Hospital
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
sound_archive Class Reference

Utility class for accessing Theme Hospital's SOUND-0.DAT. More...

#include <th_sound.h>

Public Member Functions

bool load_from_th_file (const uint8_t *pData, size_t iDataLength)
 
size_t get_number_of_sounds () const
 Returns the number of sounds present in the archive.
 
const charget_sound_name (size_t iIndex) const
 Gets the name of the sound at a given index.
 
size_t get_sound_duration (size_t iIndex)
 Gets the duration (in milliseconds) of the sound at a given index.
 
SDL_RWopsload_sound (size_t iIndex)
 Opens the sound at a given index into an SDL_RWops structure.
 

Detailed Description

Utility class for accessing Theme Hospital's SOUND-0.DAT.

Member Function Documentation

◆ get_number_of_sounds()

size_t sound_archive::get_number_of_sounds ( ) const

Returns the number of sounds present in the archive.

◆ get_sound_duration()

size_t sound_archive::get_sound_duration ( size_t  iIndex)

Gets the duration (in milliseconds) of the sound at a given index.

◆ get_sound_name()

const char * sound_archive::get_sound_name ( size_t  iIndex) const

Gets the name of the sound at a given index.

◆ load_from_th_file()

bool sound_archive::load_from_th_file ( const uint8_t *  pData,
size_t  iDataLength 
)

◆ load_sound()

SDL_RWops * sound_archive::load_sound ( size_t  iIndex)

Opens the sound at a given index into an SDL_RWops structure.

The caller is responsible for closing/freeing the result.


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