Handles map files.
More...
#include <VGearsMapFile.h>
|
| MapFile (Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool is_manual=false, Ogre::ManualResourceLoader *loader=NULL) |
| Constructor. More...
|
|
virtual | ~MapFile () |
| Destructor. More...
|
|
virtual const String & | GetScriptName () const |
| Retrieves the map script name. More...
|
|
virtual const String & | GetBackground2dName () const |
| Retrieves the map background file name. More...
|
|
virtual const String & | GetTextsName () const |
| Retrieves the map texts file name. More...
|
|
virtual const String & | GetWalkmeshName () const |
| Retrieves the map walkmesh file name. More...
|
|
virtual const Ogre::Real & | GetForwardDirection () const |
| Retrieves the map forward direction. More...
|
|
virtual PointList & | GetPoints () |
| Retrieves the list of entity points in the map. More...
|
|
virtual TriggerList & | GetTriggers () |
| Retrieves the map triggers. More...
|
|
virtual void | SetScriptName (const String &script_name) |
| Sets the map script name. More...
|
|
virtual void | SetBackground2dName (const String &background2d_name) |
| Sets the map background file name. More...
|
|
virtual void | SetTextsName (const String &texts_name) |
| Sets the map field texts file name. More...
|
|
virtual void | SetWalkmeshName (const String &walkmesh_name) |
| Sets the map walkmesh file name. More...
|
|
virtual void | SetForwardDirection (const Ogre::Real &forward_direction) |
| Sets the map forward direction. More...
|
|
| 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...
|
|
◆ Point
◆ PointList
◆ Trigger
◆ TriggerList
◆ MapFile()
VGears::MapFile::MapFile |
( |
Ogre::ResourceManager * |
creator, |
|
|
const String & |
name, |
|
|
Ogre::ResourceHandle |
handle, |
|
|
const String & |
group, |
|
|
bool |
is_manual = false , |
|
|
Ogre::ManualResourceLoader * |
loader = NULL |
|
) |
| |
Constructor.
- Parameters
-
[in] | creator | Pointer to the ResourceManager that is creating this resource. |
[in] | name | The unique name of the resource. |
[in] | handle | |
- Todo:
- Understand and document.
- Parameters
-
[in] | group | The name of the resource group to which this resource belong. |
[in] | is_manual | True if the resource is manually loaded, false otherwise. |
[in] | loader | Pointer 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. |
◆ ~MapFile()
VGears::MapFile::~MapFile |
( |
| ) |
|
|
virtual |
◆ calculateSize()
size_t VGears::MapFile::calculateSize |
( |
void |
| ) |
const |
|
protectedvirtual |
Calculates the size of the map.
It's the size of the tiles, script, walkmesh and forward direction.
- Returns
- The size of the map.
◆ GetBackground2dName()
const String & VGears::MapFile::GetBackground2dName |
( |
| ) |
const |
|
virtual |
Retrieves the map background file name.
- Returns
- The background file name.
◆ GetForwardDirection()
const Ogre::Real & VGears::MapFile::GetForwardDirection |
( |
| ) |
const |
|
virtual |
Retrieves the map forward direction.
The forward direction is the direction the playable character moves when 'up' is pressed.
- Returns
- The forward direction.
◆ GetPoints()
Retrieves the list of entity points in the map.
- Returns
- The list of entity points in the map.
◆ GetScriptName()
const String & VGears::MapFile::GetScriptName |
( |
| ) |
const |
|
virtual |
Retrieves the map script name.
- Returns
- The script name.
◆ GetTextsName()
const String & VGears::MapFile::GetTextsName |
( |
| ) |
const |
|
virtual |
Retrieves the map texts file name.
- Returns
- The texts file name.
◆ GetTriggers()
Retrieves the map triggers.
- Returns
- The list of triggers.
◆ GetWalkmeshName()
const String & VGears::MapFile::GetWalkmeshName |
( |
| ) |
const |
|
virtual |
Retrieves the map walkmesh file name.
- Returns
- The walkmesh file name.
◆ loadImpl()
void VGears::MapFile::loadImpl |
( |
void |
| ) |
|
|
overrideprotectedvirtual |
◆ SetBackground2dName()
void VGears::MapFile::SetBackground2dName |
( |
const String & |
background2d_name | ) |
|
|
virtual |
Sets the map background file name.
- Parameters
-
[in] | background2d_name | The background file name. |
◆ SetForwardDirection()
void VGears::MapFile::SetForwardDirection |
( |
const Ogre::Real & |
forward_direction | ) |
|
|
virtual |
Sets the map forward direction.
The forward direction is the direction the playable character moves when 'up' is pressed.
- Parameters
-
[in] | forward_direction | The forward direction. |
◆ SetScriptName()
void VGears::MapFile::SetScriptName |
( |
const String & |
script_name | ) |
|
|
virtual |
Sets the map script name.
- Parameters
-
[in] | script_name | The script name. |
◆ SetTextsName()
void VGears::MapFile::SetTextsName |
( |
const String & |
texts_name | ) |
|
|
virtual |
Sets the map field texts file name.
- Parameters
-
[in] | texts_name | The texts file name. |
◆ SetWalkmeshName()
void VGears::MapFile::SetWalkmeshName |
( |
const String & |
walkmesh_name | ) |
|
|
virtual |
Sets the map walkmesh file name.
- Parameters
-
[in] | walkmesh_name | The walkmesh file name. |
◆ unloadImpl()
void VGears::MapFile::unloadImpl |
( |
void |
| ) |
|
|
overrideprotectedvirtual |
◆ background_2d_name_
String VGears::MapFile::background_2d_name_ |
|
private |
The background file name.
◆ forward_direction_
Ogre::Real VGears::MapFile::forward_direction_ |
|
private |
◆ points_
The list of entity points.
◆ RESOURCE_TYPE
const String VGears::MapFile::RESOURCE_TYPE |
|
static |
◆ script_name_
String VGears::MapFile::script_name_ |
|
private |
◆ texts_name_
String VGears::MapFile::texts_name_ |
|
private |
The background file name.
◆ triggers_
◆ walkmesh_name_
String VGears::MapFile::walkmesh_name_ |
|
private |
The documentation for this class was generated from the following files: