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

Handles LZS compressed flevel files. More...

#include <VGearsLZSFLevelFile.h>

Inheritance diagram for VGears::LZSFLevelFile:
Collaboration diagram for VGears::LZSFLevelFile:

Public Member Functions

 LZSFLevelFile (Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool is_manual=false, Ogre::ManualResourceLoader *loader=NULL)
 Constructor. More...
 
virtual ~LZSFLevelFile ()
 Destructor. More...
 
- Public Member Functions inherited from VGears::FLevelFile
 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 type of resource. More...
 
- Static Public Attributes inherited from VGears::FLevelFile
static const String RESOURCE_TYPE
 The resource type. More...
 

Protected Member Functions

virtual const StringgetResourceType () const
 Checks the resource type. More...
 
virtual Ogre::DataStreamPtr openResource () override
 Opens the resource. More...
 
- Protected Member Functions inherited from VGears::FLevelFile
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...
 
virtual Ogre::DataStreamPtr openResource ()
 Opens the resource. More...
 

Additional Inherited Members

- Protected Types inherited from VGears::FLevelFile
typedef std::vector< HRCFilePtrHRCList
 
typedef ModelListFile::ModelList ModelList
 
typedef ModelListFile::AnimationList AnimationList
 
- Static Protected Attributes inherited from VGears::FLevelFile
static const String SUFFIX_BACKGROUND_TEXTURE
 Background texture file names suffix. More...
 
static const String SUFFIX_BACKGROUND_2D
 Background file names suffix. More...
 

Detailed Description

Handles LZS compressed flevel files.

Constructor & Destructor Documentation

◆ LZSFLevelFile()

VGears::LZSFLevelFile::LZSFLevelFile ( 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.

◆ ~LZSFLevelFile()

VGears::LZSFLevelFile::~LZSFLevelFile ( )
virtual

Destructor.

Member Function Documentation

◆ getResourceType()

const String & VGears::LZSFLevelFile::getResourceType ( ) const
protectedvirtual

Checks the resource type.

Returns
The resource type.

◆ openResource()

Ogre::DataStreamPtr VGears::LZSFLevelFile::openResource ( )
overrideprotectedvirtual

Opens the resource.

Reimplemented from VGears::Resource.

Member Data Documentation

◆ RESOURCE_TYPE

const String VGears::LZSFLevelFile::RESOURCE_TYPE
static

The type of resource.


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