![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
A flevel file. More...
#include <VGearsFLevelFile.h>
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 BackgroundFilePtr & | GetBackground () const |
Retrieves the level background. More... | |
const CameraMatrixFilePtr & | GetCameraMatrix () const |
Retrieves the level cameara matrix. More... | |
const ModelListFilePtr & | GetModelList () const |
Retrieves the level model list. More... | |
const PaletteFilePtr & | GetPalette () const |
Retrieves the color palette for the level. More... | |
const WalkmeshFilePtr & | GetWalkmesh () const |
Retrieves the level walkmesh. More... | |
const TriggersFilePtr & | GetTriggers () 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... | |
![]() | |
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< HRCFilePtr > | HRCList |
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 String & | GetResourceType (void) const |
Retrieves the resource type. More... | |
![]() | |
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< u8 > | raw_script_ |
The level script data. More... | |
FLevelTextureLoader * | background_texture_loader_ |
The background texture loader. More... | |
Ogre::TexturePtr | background_texture_ |
The background texture. More... | |
FLevelBackground2DLoader * | background_2d_loader_ |
The background loader. More... | |
Background2DFilePtr | background_2d_ |
The background loader. More... | |
HRCList | hrc_files_ |
The list of HRC files. More... | |
A flevel file.
Flevel files are LXS compressed files containing level data in the game PC version.
|
protected |
|
protected |
|
protected |
VGears::FLevelFile::FLevelFile | ( | Ogre::ResourceManager * | creator, |
const String & | name, | ||
Ogre::ResourceHandle | handle, | ||
const String & | group, | ||
bool | is_manual = false , |
||
Ogre::ManualResourceLoader * | loader = NULL |
||
) |
Constructor.
[in] | creator | Pointer to the ResourceManager that is creating this resource. |
[in] | name | The unique name of the resource. |
[in] | handle |
[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. |
|
virtual |
Destructor.
|
overrideprotectedvirtual |
Calculates the size of the level.
const BackgroundFilePtr & VGears::FLevelFile::GetBackground | ( | void | ) | const |
Retrieves the level background.
String VGears::FLevelFile::GetBackground2DName | ( | void | ) | const |
Retrieves the level background name.
String VGears::FLevelFile::GetBackgroundTextureName | ( | void | ) | const |
Retrieves the level background texture name.
const CameraMatrixFilePtr & VGears::FLevelFile::GetCameraMatrix | ( | void | ) | const |
Retrieves the level cameara matrix.
const ModelListFilePtr & VGears::FLevelFile::GetModelList | ( | ) | const |
Retrieves the level model list.
const PaletteFilePtr & VGears::FLevelFile::GetPalette | ( | void | ) | const |
Retrieves the color palette for the level.
const std::vector< u8 > & VGears::FLevelFile::GetRawScript | ( | ) | const |
Retrieves the scripts in the level.
|
protectedvirtual |
Retrieves the resource type.
const TriggersFilePtr & VGears::FLevelFile::GetTriggers | ( | ) | const |
Retrieves the level triggers.
const WalkmeshFilePtr & VGears::FLevelFile::GetWalkmesh | ( | ) | const |
Retrieves the level walkmesh.
|
protected |
Loads the level animations.
|
overrideprotectedvirtual |
Loads the file.
|
protected |
Loads the level models.
void VGears::FLevelFile::SetBackground | ( | const BackgroundFilePtr & | background | ) |
Sets the background for the level.
[in] | background | The background for the level. |
void VGears::FLevelFile::SetCameraMatrix | ( | const CameraMatrixFilePtr & | camera_matrix | ) |
Sets the camera matrix for the level.
[in] | camera_matrix | The camera matrix for the level. |
void VGears::FLevelFile::SetModelList | ( | const ModelListFilePtr & | model_list | ) |
Sets the model list for the level.
[in] | model_list | The model list for the level. |
void VGears::FLevelFile::SetPalette | ( | const PaletteFilePtr & | palette | ) |
Sets the color palette for the level.
[in] | palette | The color palette for the level. |
void VGears::FLevelFile::SetRawScript | ( | const std::vector< u8 > & | script_data | ) |
Sets the scripts for the level.
[in] | script_data | The scripts for the level. |
void VGears::FLevelFile::SetTriggers | ( | const TriggersFilePtr & | triggers | ) |
Sets the triggers for the level.
[in] | triggers | The triggers for the level. |
void VGears::FLevelFile::SetWalkmesh | ( | const WalkmeshFilePtr & | walkmesh | ) |
Sets the level walkmesh.
[in] | walkmesh | The walkmesh for the level. |
|
overrideprotectedvirtual |
Unloads the file.
|
private |
The level background.
|
private |
The background loader.
|
private |
The background loader.
|
private |
The background texture.
|
private |
The background texture loader.
|
private |
The level camera matrix.
|
private |
The list of HRC files.
HRC files describe bone hierarchy.
|
private |
The level model list.
|
private |
The level color palette.
|
private |
The level script data.
|
static |
The resource type.
|
staticprotected |
Background file names suffix.
|
staticprotected |
Background texture file names suffix.
|
private |
The level triggers.
|
private |
The level walkmesh.