![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
The media data installer. More...
#include <MediaDataInstaller.h>
Classes | |
struct | FmtFile |
The structure of each audio file pointer in a sound FMT file. More... | |
Public Member Functions | |
MediaDataInstaller (const std::string input_dir, const std::string output_dir, const bool keep_originals, const bool no_ffmpeg, const bool no_timidity) | |
Constructor. More... | |
~MediaDataInstaller () | |
Destructor. More... | |
void | PopulateMaps () |
Populates the audio name maps. More... | |
void | InstallSprites () |
Extracts all images contained in the menu LGP file and installs them. More... | |
int | InstallSoundsInit () |
Prepares the installer for the sounds extraction. More... | |
bool | InstallSounds () |
Extracts the next sound file contained in the audio.dat file and installs it. More... | |
void | WriteSoundIndex () |
Writes the XML file with all audio entries. More... | |
int | InstallMusicsInit () |
Prepares the installer for the sounds extraction. More... | |
bool | InstallMusics () |
Extracts the next music file contained in the midi.lgp, converts it and installs it. More... | |
void | InstallHQMusics () |
Converts high quality musiscs to OGG. More... | |
void | WriteMusicsIndex () |
Writes the XML file with all music tracks. More... | |
Private Attributes | |
std::string | input_dir_ |
The path to the directory from which to read the PC game data. More... | |
std::string | output_dir_ |
The path to the directory where to save the V-Gears data. More... | |
VGears::LGPArchive | menu_ |
The menu.lgp file. More... | |
BinGZipFile | window_ |
The WINDOW.BIN file. More... | |
File | fmt_ |
The sounds .fmt file. More... | |
File | dat_ |
The sounds .dat file. More... | |
int | processed_sounds_ |
Number of sounds already processed. More... | |
std::unordered_map< int, std::string > | sound_map_ |
Map for sound files with descriptive names. More... | |
std::vector< std::string > | sounds_ |
Sound data for each entry to write to the XML file. More... | |
VGears::LGPArchive | midi_ |
The midi.lgp file. More... | |
int | processed_musics_ |
Number of music tracks already processed. More... | |
std::unordered_map< int, std::string > | musics_map_ |
Map for music files with descriptive names. More... | |
std::vector< std::string > | musics_ |
Sound data for each entry to write to the XML file. More... | |
bool | keep_originals_ |
If true, orginal files will not be deleted after conversion. More... | |
bool | no_ffmpeg_ |
Flag to prevent system calls to ffmpeg. More... | |
bool | no_timidity_ |
Flag to prevent system calls to timidity. More... | |
Static Private Attributes | |
static int | TOTAL_SOUNDS = 723 |
Number of sound files to extract. More... | |
static u8 | WAV_HEADER [78] |
The standard WAV header. More... | |
The media data installer.
MediaDataInstaller::MediaDataInstaller | ( | const std::string | input_dir, |
const std::string | output_dir, | ||
const bool | keep_originals, | ||
const bool | no_ffmpeg, | ||
const bool | no_timidity | ||
) |
Constructor.
[in] | input_dir | Path to the directory containing the original data to parse. |
[in] | output_dir | Path to the directory of the installation data. |
[in] | keep_originals | True to keep original data after conversion, false to remove. |
[in] | no_ffmpeg | True to prevent system calls to ffmpeg command, false to allow. |
[in] | no_timidity | True to prevent system calls to timidity command, false to allow. |
MediaDataInstaller::~MediaDataInstaller | ( | ) |
Destructor.
void MediaDataInstaller::InstallHQMusics | ( | ) |
Converts high quality musiscs to OGG.
There are four of them.
bool MediaDataInstaller::InstallMusics | ( | ) |
Extracts the next music file contained in the midi.lgp, converts it and installs it.
int MediaDataInstaller::InstallMusicsInit | ( | ) |
Prepares the installer for the sounds extraction.
bool MediaDataInstaller::InstallSounds | ( | ) |
Extracts the next sound file contained in the audio.dat file and installs it.
int MediaDataInstaller::InstallSoundsInit | ( | ) |
Prepares the installer for the sounds extraction.
void MediaDataInstaller::InstallSprites | ( | ) |
Extracts all images contained in the menu LGP file and installs them.
For composed textures, it extracts individual images. All images are saved under the "images" directory. This also includes font maps.
void MediaDataInstaller::PopulateMaps | ( | ) |
Populates the audio name maps.
void MediaDataInstaller::WriteMusicsIndex | ( | ) |
Writes the XML file with all music tracks.
void MediaDataInstaller::WriteSoundIndex | ( | ) |
Writes the XML file with all audio entries.
|
private |
The sounds .dat file.
|
private |
The sounds .fmt file.
|
private |
The path to the directory from which to read the PC game data.
|
private |
If true, orginal files will not be deleted after conversion.
|
private |
The menu.lgp file.
|
private |
The midi.lgp file.
|
private |
Sound data for each entry to write to the XML file.
|
private |
Map for music files with descriptive names.
|
private |
Flag to prevent system calls to ffmpeg.
|
private |
Flag to prevent system calls to timidity.
|
private |
The path to the directory where to save the V-Gears data.
|
private |
Number of music tracks already processed.
|
private |
Number of sounds already processed.
|
private |
Map for sound files with descriptive names.
|
private |
Sound data for each entry to write to the XML file.
|
staticprivate |
Number of sound files to extract.
|
staticprivate |
The standard WAV header.
78 bytes to be written to every wav file before anything else.
|
private |
The WINDOW.BIN file.