V-Gears 0
Free Final Fantasy VII engine.
FF7FieldScriptFormatter Class Reference

Handles the formatting of field scripts. More...

#include <FieldDataInstaller.h>

Inheritance diagram for FF7FieldScriptFormatter:
Collaboration diagram for FF7FieldScriptFormatter:

Public Member Functions

 FF7FieldScriptFormatter (const std::string &field_name, const VGears::ModelListFilePtr &models, const std::vector< std::string > &field_id_to_name_lookup, FieldSpawnPointsMap &spawn_points)
 Constructor. More...
 
virtual std::string GetFriendlyAnimationName (int char_id, int id) override
 Retreieves an animation name from iths ID. More...
 
- Public Member Functions inherited from BaseFF7FieldScriptFormatter
 BaseFF7FieldScriptFormatter (const std::string &field_name, const std::vector< std::string > &field_id_to_name_lookup, FieldSpawnPointsMap &spawn_points)
 Constructor. More...
 
virtual std::string GetSpawnPointName (unsigned int map_id, const std::string &entity, const std::string &function_name, unsigned int address) override
 Composes a spawn point name. More...
 
virtual std::string GetMapName (unsigned int map_id) override
 Retrieves a map name from it's ID. More...
 
virtual std::string GetFriendlyVarName (unsigned int bank, unsigned int addr) override
 Retrieves a user friendly variable name. More...
 
virtual std::string GetFriendlyEntityName (const std::string &entity) override
 Retrieves a user friendly entity name. More...
 
virtual std::string GetFriendlyCharName (int char_id) override
 Retrieves a user friendly character name. More...
 
virtual std::string GetFriendlyFunctionName (const std::string &entity, const std::string &function_name) override
 Retrieves a user friendly function name. More...
 
virtual std::string GetFunctionComment (const std::string &entity, const std::string &function_name) override
 Retrieves the header comment for a function in an entity. More...
 
- Public Member Functions inherited from FieldScriptFormatter
virtual void AddSpawnPoint (unsigned int map_id, const std::string &entity, const std::string &function_name, unsigned int address, int x, int y, int triangle_id, int angle)
 Adds an spawn point. More...
 
virtual std::string GetSpawnPointName (unsigned int map_id, const std::string &entity, const std::string &function_name, unsigned int address)
 Retrieves the name of a spawn point. More...
 
virtual std::string GetMapName (unsigned int map_id)
 Retrieves the name of a map. More...
 
- Public Member Functions inherited from ScriptFormatter
virtual ~ScriptFormatter ()=default
 
virtual std::string GetFriendlyVarName (unsigned int bank, unsigned int addr)
 Retrieves a friendly name for a variable. More...
 
virtual std::string GetFriendlyEntityName (const std::string &entity_name)
 Retrieves a friendly name for an entity. More...
 
virtual std::string GetFriendlyAnimationName (int animation_id, int id)
 Retrieves a friendly name for an animation. More...
 
virtual std::string GetFriendlyCharName (int char_id)
 Retrieves a friendly name for a character. More...
 
virtual std::string GetFriendlyFunctionName (const std::string &entity_name, const std::string &function_name)
 Retrieves a friendly name for a function. More...
 
virtual std::string GetFunctionComment (const std::string &entity_name, const std::string &function_name)
 Retrieves the header comment for a function in an entity. More...
 

Private Attributes

const VGears::ModelListFilePtrmodel_loader_
 The field model loader. More...
 

Additional Inherited Members

- Protected Attributes inherited from BaseFF7FieldScriptFormatter
std::string field_name_
 The field name. More...
 
FieldSpawnPointsMapspawn_points_
 The list of spawn points. More...
 
const std::vector< std::string > & field_id_to_name_lookup_
 Look up table relatingfield IDs and names. More...
 

Detailed Description

Handles the formatting of field scripts.

Constructor & Destructor Documentation

◆ FF7FieldScriptFormatter()

FF7FieldScriptFormatter::FF7FieldScriptFormatter ( const std::string &  field_name,
const VGears::ModelListFilePtr models,
const std::vector< std::string > &  field_id_to_name_lookup,
FieldSpawnPointsMap spawn_points 
)
inline

Constructor.

Parameters
[in]field_nameThe field name.
[in]modelsThe list of field models.
[in]field_id_to_name_lookupField name lookup table to use.
[in]spawn_pointsThe list of spawn points.

Member Function Documentation

◆ GetFriendlyAnimationName()

virtual std::string FF7FieldScriptFormatter::GetFriendlyAnimationName ( int  char_id,
int  id 
)
inlineoverridevirtual

Retreieves an animation name from iths ID.

Parameters
[in]char_idID of the character the animation belogs to.
[in]idAnimation ID.
Returns
The animation name. If there is no name assigned, or it can't be found, a string with the animation ID.

Reimplemented from ScriptFormatter.

Member Data Documentation

◆ model_loader_

const VGears::ModelListFilePtr& FF7FieldScriptFormatter::model_loader_
private

The field model loader.


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