V-Gears 0
Free Final Fantasy VII engine.
VGears::TriggersFile Class Reference

Handles trigger files. More...

#include <VGearsTriggersFile.h>

Inheritance diagram for VGears::TriggersFile:
Collaboration diagram for VGears::TriggersFile:

Classes

struct  Arrow
 A map arrow. More...
 
struct  Gateway
 A gateway. More...
 
struct  Range
 Trigger range. More...
 
struct  Trigger
 A trigger. More...
 
struct  TriggerData
 Trigger data. More...
 
struct  TriggerVertex
 Each of the trigger vertices. More...
 

Public Member Functions

 TriggersFile (Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool is_manual=false, Ogre::ManualResourceLoader *loader=nullptr)
 Constructor. More...
 
virtual ~TriggersFile ()
 Destructor. More...
 
const RangeGetCameraRange () const
 Retrieves the camera range. More...
 
float MovementRotation () const
 Retrieves the movement rotation. More...
 
const std::array< Gateway, 12 > & GetGateways () const
 Retrieves the list of gateways. More...
 
- Public Member Functions inherited from VGears::Resource
 Resource (Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool manual, Ogre::ManualResourceLoader *loader)
 Constructor. More...
 
virtual ~Resource ()=default
 Destructor. More...
 

Static Public Attributes

static const String RESOURCE_TYPE
 The type pf resource. More...
 

Protected Member Functions

virtual void loadImpl () override
 Loads the file. More...
 
virtual void unloadImpl () override
 Unloads the file. More...
 
virtual size_t calculateSize (void) const override
 Calculates the size of the palette. More...
 
- Protected Member Functions inherited from VGears::Resource
virtual Ogre::DataStreamPtr openResource ()
 Opens the resource. More...
 

Private Attributes

std::unique_ptr< TriggerDatatrigger_data_
 The trigger data. More...
 

Friends

class TriggerFileSerializer
 

Detailed Description

Handles trigger files.

Constructor & Destructor Documentation

◆ TriggersFile()

VGears::TriggersFile::TriggersFile ( Ogre::ResourceManager *  creator,
const String name,
Ogre::ResourceHandle  handle,
const String group,
bool  is_manual = false,
Ogre::ManualResourceLoader *  loader = nullptr 
)

Constructor.

Parameters
[in]creatorPointer to the ResourceManager that is creating this resource.
[in]nameThe unique name of the resource.
[in]handle
Todo:
Understand and document.
Parameters
[in]groupThe name of the resource group to which this resource belong.
[in]is_manualTrue if the resource is manually loaded, false otherwise.
[in]loaderPointer to a ManualResourceLoader implementation which will be called when the Resource wishes to load (should be supplied if is_manual is set to true). It can be null, but the Resource will never be able to reload if anything ever causes it to unload. Therefore provision of a proper ManualResourceLoader instance is strongly recommended.

◆ ~TriggersFile()

VGears::TriggersFile::~TriggersFile ( )
virtual

Destructor.

Member Function Documentation

◆ calculateSize()

size_t VGears::TriggersFile::calculateSize ( void  ) const
overrideprotectedvirtual

Calculates the size of the palette.

Returns
The size of the palette.
Todo:
Units?

◆ GetCameraRange()

const Range & VGears::TriggersFile::GetCameraRange ( ) const
inline

Retrieves the camera range.

Returns
The camera range.

◆ GetGateways()

const std::array< Gateway, 12 > & VGears::TriggersFile::GetGateways ( ) const
inline

Retrieves the list of gateways.

◆ loadImpl()

void VGears::TriggersFile::loadImpl ( void  )
overrideprotectedvirtual

Loads the file.

◆ MovementRotation()

float VGears::TriggersFile::MovementRotation ( ) const
inline

Retrieves the movement rotation.

The movement rotation is the angle in which the player moves when "up" is pressed.

Returns
The movement rotation.

◆ unloadImpl()

void VGears::TriggersFile::unloadImpl ( void  )
overrideprotectedvirtual

Unloads the file.

Friends And Related Function Documentation

◆ TriggerFileSerializer

friend class TriggerFileSerializer
friend

Member Data Documentation

◆ RESOURCE_TYPE

const String VGears::TriggersFile::RESOURCE_TYPE
static

The type pf resource.

◆ trigger_data_

std::unique_ptr<TriggerData> VGears::TriggersFile::trigger_data_
private

The trigger data.


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