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

A flevel file. More...

#include <VGearsFLevelFile.h>

Inheritance diagram for VGears::FLevelFile:
Collaboration diagram for VGears::FLevelFile:

Public Member Functions

 FLevelFile (Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool is_manual=false, Ogre::ManualResourceLoader *loader=NULL)
 Constructor. More...
 
virtual ~FLevelFile ()
 Destructor. More...
 
const std::vector< u8 > & GetRawScript () const
 Retrieves the scripts in the level. More...
 
const BackgroundFilePtrGetBackground () const
 Retrieves the level background. More...
 
const CameraMatrixFilePtrGetCameraMatrix () const
 Retrieves the level cameara matrix. More...
 
const ModelListFilePtrGetModelList () const
 Retrieves the level model list. More...
 
const PaletteFilePtrGetPalette () const
 Retrieves the color palette for the level. More...
 
const WalkmeshFilePtrGetWalkmesh () const
 Retrieves the level walkmesh. More...
 
const TriggersFilePtrGetTriggers () const
 Retrieves the level triggers. More...
 
void SetRawScript (const std::vector< u8 > &script_data)
 Sets the scripts for the level. More...
 
void SetBackground (const BackgroundFilePtr &background)
 Sets the background for the level. More...
 
void SetCameraMatrix (const CameraMatrixFilePtr &camera_matrix)
 Sets the camera matrix for the level. More...
 
void SetModelList (const ModelListFilePtr &model_list)
 Sets the model list for the level. More...
 
void SetPalette (const PaletteFilePtr &palette)
 Sets the color palette for the level. More...
 
void SetWalkmesh (const WalkmeshFilePtr &walkmesh)
 Sets the level walkmesh. More...
 
void SetTriggers (const TriggersFilePtr &triggers)
 Sets the triggers for the level. More...
 
String GetBackground2DName (void) const
 Retrieves the level background name. More...
 
String GetBackgroundTextureName (void) const
 Retrieves the level background texture name. 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 resource type. More...
 

Protected Types

typedef std::vector< HRCFilePtrHRCList
 
typedef ModelListFile::ModelList ModelList
 
typedef ModelListFile::AnimationList AnimationList
 

Protected Member Functions

virtual void loadImpl (void) override
 Loads the file. More...
 
void LoadModels (void)
 Loads the level models. More...
 
void LoadAnimations (const HRCFilePtr &model, const AnimationList &animations)
 Loads the level animations. More...
 
virtual void unloadImpl (void) override
 Unloads the file. More...
 
virtual size_t calculateSize (void) const override
 Calculates the size of the level. More...
 
virtual const StringGetResourceType (void) const
 Retrieves the resource type. More...
 
- Protected Member Functions inherited from VGears::Resource
virtual Ogre::DataStreamPtr openResource ()
 Opens the resource. More...
 

Static Protected Attributes

static const String SUFFIX_BACKGROUND_TEXTURE
 Background texture file names suffix. More...
 
static const String SUFFIX_BACKGROUND_2D
 Background file names suffix. More...
 

Private Attributes

BackgroundFilePtr background_
 The level background. More...
 
CameraMatrixFilePtr camera_matrix_
 The level camera matrix. More...
 
ModelListFilePtr model_list_
 The level model list. More...
 
PaletteFilePtr palette_
 The level color palette. More...
 
WalkmeshFilePtr walkmesh_
 The level walkmesh. More...
 
TriggersFilePtr triggers_
 The level triggers. More...
 
std::vector< u8raw_script_
 The level script data. More...
 
FLevelTextureLoaderbackground_texture_loader_
 The background texture loader. More...
 
Ogre::TexturePtr background_texture_
 The background texture. More...
 
FLevelBackground2DLoaderbackground_2d_loader_
 The background loader. More...
 
Background2DFilePtr background_2d_
 The background loader. More...
 
HRCList hrc_files_
 The list of HRC files. More...
 

Detailed Description

A flevel file.

Flevel files are LXS compressed files containing level data in the game PC version.

Member Typedef Documentation

◆ AnimationList

◆ HRCList

typedef std::vector<HRCFilePtr> VGears::FLevelFile::HRCList
protected

◆ ModelList

Constructor & Destructor Documentation

◆ FLevelFile()

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

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.

◆ ~FLevelFile()

VGears::FLevelFile::~FLevelFile ( )
virtual

Destructor.

Member Function Documentation

◆ calculateSize()

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

Calculates the size of the level.

Returns
Always 0.

◆ GetBackground()

const BackgroundFilePtr & VGears::FLevelFile::GetBackground ( void  ) const

Retrieves the level background.

Returns
The background file in the level.

◆ GetBackground2DName()

String VGears::FLevelFile::GetBackground2DName ( void  ) const

Retrieves the level background name.

Returns
The background name.

◆ GetBackgroundTextureName()

String VGears::FLevelFile::GetBackgroundTextureName ( void  ) const

Retrieves the level background texture name.

Returns
The background texture name.

◆ GetCameraMatrix()

const CameraMatrixFilePtr & VGears::FLevelFile::GetCameraMatrix ( void  ) const

Retrieves the level cameara matrix.

Returns
The camera matrix file in the level.

◆ GetModelList()

const ModelListFilePtr & VGears::FLevelFile::GetModelList ( ) const

Retrieves the level model list.

Returns
The level model list file.

◆ GetPalette()

const PaletteFilePtr & VGears::FLevelFile::GetPalette ( void  ) const

Retrieves the color palette for the level.

Returns
The color palette file for the level.

◆ GetRawScript()

const std::vector< u8 > & VGears::FLevelFile::GetRawScript ( ) const

Retrieves the scripts in the level.

Returns
The scripts in the level.

◆ GetResourceType()

const String & VGears::FLevelFile::GetResourceType ( void  ) const
protectedvirtual

Retrieves the resource type.

◆ GetTriggers()

const TriggersFilePtr & VGears::FLevelFile::GetTriggers ( ) const

Retrieves the level triggers.

Returns
The level triggers file.

◆ GetWalkmesh()

const WalkmeshFilePtr & VGears::FLevelFile::GetWalkmesh ( ) const

Retrieves the level walkmesh.

Returns
The level walkmesh file.

◆ LoadAnimations()

void VGears::FLevelFile::LoadAnimations ( const HRCFilePtr model,
const AnimationList animations 
)
protected

Loads the level animations.

◆ loadImpl()

void VGears::FLevelFile::loadImpl ( void  )
overrideprotectedvirtual

Loads the file.

◆ LoadModels()

void VGears::FLevelFile::LoadModels ( void  )
protected

Loads the level models.

◆ SetBackground()

void VGears::FLevelFile::SetBackground ( const BackgroundFilePtr background)

Sets the background for the level.

Parameters
[in]backgroundThe background for the level.

◆ SetCameraMatrix()

void VGears::FLevelFile::SetCameraMatrix ( const CameraMatrixFilePtr camera_matrix)

Sets the camera matrix for the level.

Parameters
[in]camera_matrixThe camera matrix for the level.

◆ SetModelList()

void VGears::FLevelFile::SetModelList ( const ModelListFilePtr model_list)

Sets the model list for the level.

Parameters
[in]model_listThe model list for the level.

◆ SetPalette()

void VGears::FLevelFile::SetPalette ( const PaletteFilePtr palette)

Sets the color palette for the level.

Parameters
[in]paletteThe color palette for the level.

◆ SetRawScript()

void VGears::FLevelFile::SetRawScript ( const std::vector< u8 > &  script_data)

Sets the scripts for the level.

Parameters
[in]script_dataThe scripts for the level.

◆ SetTriggers()

void VGears::FLevelFile::SetTriggers ( const TriggersFilePtr triggers)

Sets the triggers for the level.

Parameters
[in]triggersThe triggers for the level.

◆ SetWalkmesh()

void VGears::FLevelFile::SetWalkmesh ( const WalkmeshFilePtr walkmesh)

Sets the level walkmesh.

Parameters
[in]walkmeshThe walkmesh for the level.

◆ unloadImpl()

void VGears::FLevelFile::unloadImpl ( void  )
overrideprotectedvirtual

Unloads the file.

Member Data Documentation

◆ background_

BackgroundFilePtr VGears::FLevelFile::background_
private

The level background.

◆ background_2d_

Background2DFilePtr VGears::FLevelFile::background_2d_
private

The background loader.

◆ background_2d_loader_

FLevelBackground2DLoader* VGears::FLevelFile::background_2d_loader_
private

The background loader.

◆ background_texture_

Ogre::TexturePtr VGears::FLevelFile::background_texture_
private

The background texture.

◆ background_texture_loader_

FLevelTextureLoader* VGears::FLevelFile::background_texture_loader_
private

The background texture loader.

◆ camera_matrix_

CameraMatrixFilePtr VGears::FLevelFile::camera_matrix_
private

The level camera matrix.

◆ hrc_files_

HRCList VGears::FLevelFile::hrc_files_
private

The list of HRC files.

HRC files describe bone hierarchy.

◆ model_list_

ModelListFilePtr VGears::FLevelFile::model_list_
private

The level model list.

◆ palette_

PaletteFilePtr VGears::FLevelFile::palette_
private

The level color palette.

◆ raw_script_

std::vector<u8> VGears::FLevelFile::raw_script_
private

The level script data.

◆ RESOURCE_TYPE

const String VGears::FLevelFile::RESOURCE_TYPE
static

The resource type.

◆ SUFFIX_BACKGROUND_2D

const String VGears::FLevelFile::SUFFIX_BACKGROUND_2D
staticprotected

Background file names suffix.

◆ SUFFIX_BACKGROUND_TEXTURE

const String VGears::FLevelFile::SUFFIX_BACKGROUND_TEXTURE
staticprotected

Background texture file names suffix.

◆ triggers_

TriggersFilePtr VGears::FLevelFile::triggers_
private

The level triggers.

◆ walkmesh_

WalkmeshFilePtr VGears::FLevelFile::walkmesh_
private

The level walkmesh.


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