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

Formatter for field scripts. More...

#include <FieldScriptFormatter.h>

Inheritance diagram for FieldScriptFormatter:
Collaboration diagram for FieldScriptFormatter:

Public Member Functions

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...
 

Detailed Description

Formatter for field scripts.

Member Function Documentation

◆ AddSpawnPoint()

void FieldScriptFormatter::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 
)
virtual

Adds an spawn point.

If the spawn is new, a new record will be added to the spawn point database. If it was already there, update the record to add the origin.

Parameters
[in]map_idThe target map ID.
[in]entityThe entity that acts as the spawn point.
[in]function_nameThe spawn function name.
[in]address
Todo:
Understand and document.
Parameters
[in]xX coordinate of the field at which to spawn.
[in]yY coordinate of the field at which to spawn.
[in]triangle_idTriangle at which to spawn.
[in]angleOrientation at which to spawn.

Reimplemented in FF7FieldScriptGatewayCollector.

◆ GetMapName()

std::string FieldScriptFormatter::GetMapName ( unsigned int  map_id)
virtual

Retrieves the name of a map.

The name of a map is usually it's ID.

Parameters
[in]map_idThe map ID.
Returns
The map name.

Reimplemented in BaseFF7FieldScriptFormatter.

◆ GetSpawnPointName()

std::string FieldScriptFormatter::GetSpawnPointName ( unsigned int  map_id,
const std::string &  entity,
const std::string &  function_name,
unsigned int  address 
)
virtual

Retrieves the name of a spawn point.

Parameters
[in]map_idThe target map ID.
[in]entityThe entity that acts as the spawn point.
[in]function_nameThe spawn function name.
[in]address
Todo:
Understand and document.
Returns
The name of the spawn point.

Reimplemented in BaseFF7FieldScriptFormatter.


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