The battle data installer.
More...
#include <BattleDataInstaller.h>
The battle data installer.
◆ BattleDataInstaller()
BattleDataInstaller::BattleDataInstaller |
( |
const std::string |
input_dir, |
|
|
const std::string |
output_dir, |
|
|
Ogre::ResourceGroupManager * |
res_mgr |
|
) |
| |
Constructor.
- Parameters
-
[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] | res_mgr | The application resource manager.. |
◆ ~BattleDataInstaller()
BattleDataInstaller::~BattleDataInstaller |
( |
| ) |
|
◆ BuildAttackFileName()
std::string BattleDataInstaller::BuildAttackFileName |
( |
Attack |
attack | ) |
|
|
private |
Constructs a file name for the XML file to save an attack to.
The filename will be "dame/attack/[ID]_[NAME].xml" where [ID] is the attack ID, padded with '0' to a length of 4, and [NAME] is the attack name using only alphanumeric characters.
- Parameters
-
[in] | attack | The attack to be saved. |
- Returns
- The name for the attack file.
◆ BuildEnemyFileName()
std::string BattleDataInstaller::BuildEnemyFileName |
( |
Enemy |
enemy | ) |
|
|
private |
Constructs a file name for the XML file to save an enemy to.
The filename will be "dame/enemy/[ID]_[NAME].xml" where [ID] is the enemy ID, padded with '0' to a length of 4, and [NAME] is the enemy name using only alphanumeric characters.
- Parameters
-
[in] | enemy | The enemy to be saved. |
- Returns
- The name for the enemy file.
◆ ConvertModel()
unsigned int BattleDataInstaller::ConvertModel |
( |
| ) |
|
Converts a model.
- Returns
- The total number of converted models.
◆ ConvertModelsInit()
unsigned int BattleDataInstaller::ConvertModelsInit |
( |
| ) |
|
Prepres the installer for model conversion.
- Returns
- The total number of models to convert.
◆ DecompileHrc()
void BattleDataInstaller::DecompileHrc |
( |
File |
compiled, |
|
|
Model |
model, |
|
|
std::string |
path, |
|
|
std::string |
skeleton_name |
|
) |
| |
|
private |
Decompiles a compiled HRC file.
To be used for battle enemy and playable character models, since they have a well-defined bone hierarchy. For battle background models, use {
- See also
- DecompileSceneHrc}. Note that this is not a general purpose HRC decompiler, it only works for files in battle.lgp.
- Parameters
-
[in] | compiled | The compiles HRC file. |
[in] | model | The model. |
[in] | path | Path to save the decompiled file to. |
[in] | skeleton_name | Name for the skeleton. |
◆ DecompileSceneHrc()
void BattleDataInstaller::DecompileSceneHrc |
( |
File |
compiled, |
|
|
Model |
model, |
|
|
std::string |
path, |
|
|
std::string |
skeleton_name |
|
) |
| |
|
private |
Decompiles a compiled HRC file.
To be used only for battle background HRC files, since they don't have a defined bone hierarchy, and every bone is assumed to be a child of the previous one. For enemy and playable character models, use {
- See also
- DecompileHrc}. Note that this is not a general purpose HRC decompiler, it only works for files in battle.lgp.
- Parameters
-
[in] | compiled | The compiles HRC file. |
[in] | model | The model. |
[in] | path | Path to save the decompiled file to. |
[in] | skeleton_name | Name for the skeleton. |
◆ ExportMesh()
void BattleDataInstaller::ExportMesh |
( |
const std::string |
outdir, |
|
|
const Ogre::MeshPtr & |
mesh |
|
) |
| |
|
private |
Exports a mesh to a file.
The file will have the mesh name.
- Parameters
-
[in] | outdir | Path to the directory where the file will be saved. |
[in] | mesh | The mesh to export. |
◆ ExtractGZipScene()
File * BattleDataInstaller::ExtractGZipScene |
( |
File |
file | ) |
|
|
private |
Extract a gzipped file.
- Parameters
-
- Returns
- Uncompressed file. NULL if errors were encountered (they will be logged to console).
◆ GenerateRsdFiles()
void BattleDataInstaller::GenerateRsdFiles |
( |
Model |
model, |
|
|
std::string |
path |
|
) |
| |
|
private |
Generates all required .rsd models for a model.
- Parameters
-
[in] | model | Model information. |
[in] | path | Output path. |
◆ InitializeModels()
unsigned int BattleDataInstaller::InitializeModels |
( |
| ) |
|
Prepares the installer for 3D model processing.
- Returns
- The total number of models to process.
◆ InitializeScenes()
unsigned int BattleDataInstaller::InitializeScenes |
( |
| ) |
|
Prepares the installer for scene processing.
- Returns
- The total number of scenes to process.
◆ ProcessModel()
unsigned int BattleDataInstaller::ProcessModel |
( |
| ) |
|
Processes the 3D model.
Saves .hrc, .a and .p files for later conversion. .tex files are converted directly to png.
- Returns
- The total number of processed models.
◆ ProcessScene()
unsigned int BattleDataInstaller::ProcessScene |
( |
| ) |
|
Processes the next battle scene.
- Returns
- The total number of processed scenes.
◆ WriteAttacks()
void BattleDataInstaller::WriteAttacks |
( |
| ) |
|
Writes attack data to files.
◆ WriteCharacterData()
void BattleDataInstaller::WriteCharacterData |
( |
| ) |
|
Writes playable character data.
◆ WriteEnemies()
void BattleDataInstaller::WriteEnemies |
( |
| ) |
|
Writes enemy data to files.
◆ WriteFormations()
void BattleDataInstaller::WriteFormations |
( |
| ) |
|
Writes formation data to files.
◆ WriteSceneData()
void BattleDataInstaller::WriteSceneData |
( |
| ) |
|
Writes battle scene data.
◆ attack_map_
std::map<int, std::string> BattleDataInstaller::attack_map_ |
|
private |
Map of attacks, ID and xml file path.
◆ attacks_
std::vector<Attack> BattleDataInstaller::attacks_ |
|
private |
Attack data read from the scenes;.
◆ battle_lgp_file_names_
std::vector<std::string> BattleDataInstaller::battle_lgp_file_names_ |
|
private |
◆ battle_lgp_files_
std::vector<File> BattleDataInstaller::battle_lgp_files_ |
|
private |
The files in the original battle.lgp file.
◆ character_data_
List of models for playable character;.
◆ enemies_
std::vector<Enemy> BattleDataInstaller::enemies_ |
|
private |
Enemy data read from the scenes;.
◆ enemy_map_
std::map<int, std::string> BattleDataInstaller::enemy_map_ |
|
private |
Map of enemies, ID and xml file path.
◆ formation_map_
std::map<int, std::string> BattleDataInstaller::formation_map_ |
|
private |
Map of formations, ID and xml file path.
◆ formations_
std::vector<Formation> BattleDataInstaller::formations_ |
|
private |
Formations data read from the scenes;.
◆ input_dir_
std::string BattleDataInstaller::input_dir_ |
|
private |
The path to the directory from which to read the PC game data.
◆ materials_
std::vector<std::string> BattleDataInstaller::materials_ |
|
private |
List of model materials;.
◆ models_
std::vector<Model> BattleDataInstaller::models_ |
|
private |
List of models files found in battle.lgp.
◆ next_model_to_convert_
unsigned int BattleDataInstaller::next_model_to_convert_ |
|
private |
◆ next_model_to_process_
unsigned int BattleDataInstaller::next_model_to_process_ |
|
private |
◆ next_scene_
unsigned int BattleDataInstaller::next_scene_ |
|
private |
Next scene file to process;.
◆ output_dir_
std::string BattleDataInstaller::output_dir_ |
|
private |
The path to the directory where to save the V-Gears data.
◆ res_mgr_
Ogre::ResourceGroupManager* BattleDataInstaller::res_mgr_ |
|
private |
Pointer to the application resource manager.
◆ scene_bin_
File BattleDataInstaller::scene_bin_ |
|
private |
The original scene.bin file.
◆ scene_data_
std::vector<SceneModel> BattleDataInstaller::scene_data_ |
|
private |
List of models for battle scenes;.
◆ scenes_
◆ scenes_uncompressed_
std::vector<File*> BattleDataInstaller::scenes_uncompressed_ |
|
private |
List of uncompressed scenes.
◆ total_scenes_
unsigned int BattleDataInstaller::total_scenes_ |
|
private |
Number of scenes in SCENE.BIN;.
◆ write_output_line_
std::function<void(std::string)> BattleDataInstaller::write_output_line_ |
|
private |
Function used to print text to the log output, line by line.
The documentation for this class was generated from the following files: