19#include <OgreResource.h>
55 Ogre::ResourceManager *creator,
const String &name,
56 Ogre::ResourceHandle handle,
const String &group,
57 bool is_manual =
false, Ogre::ManualResourceLoader *loader = NULL
368 virtual void loadImpl() override final;
A background file representation.
Definition: VGearsBackgroundFile.h:32
PaletteFile::Color Color
Definition: VGearsBackgroundFile.h:285
std::array< Layer, LAYER_COUNT > & GetLayers(void)
Retrieves the background layers.
Definition: VGearsBackgroundFile.h:330
void AddAllSprites(SpritePtrList &sprites)
Adds all sprites to the background.
Definition: VGearsBackgroundFile.cpp:82
BackgroundFile(Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool is_manual=false, Ogre::ManualResourceLoader *loader=NULL)
Constructor.
Definition: VGearsBackgroundFile.cpp:25
virtual void unloadImpl() override final
Unloads the file.
Definition: VGearsBackgroundFile.cpp:44
std::vector< SpriteData * > SpritePtrList
Definition: VGearsBackgroundFile.h:231
Ogre::Image * CreateImage(const PaletteFilePtr &palette)
Creates an image from a palette.
Definition: VGearsBackgroundFile.cpp:102
std::vector< SpriteData > SpriteList
Definition: VGearsBackgroundFile.h:229
std::vector< uint8 > Buffer
Definition: VGearsBackgroundFile.h:287
std::array< Layer, LAYER_COUNT > layers_
The list of layers.
Definition: VGearsBackgroundFile.h:405
std::array< Page, PAGE_COUNT > pages_
The background pages.
Definition: VGearsBackgroundFile.h:415
virtual ~BackgroundFile()
Destructor.
Definition: VGearsBackgroundFile.cpp:32
virtual size_t CalculateSize() const
Calculates the size of the background.
Definition: VGearsBackgroundFile.cpp:55
std::array< uint8, PALETTE_ENTRY_COUNT > palette_
The color palette.
Definition: VGearsBackgroundFile.h:410
std::vector< Color > Colors
Definition: VGearsBackgroundFile.h:289
std::array< Page, PAGE_COUNT > & GetPages(void)
Retrieves the background pages.
Definition: VGearsBackgroundFile.h:346
std::array< uint8, PALETTE_ENTRY_COUNT > & GetPalette(void)
Retrieves the background palette.
Definition: VGearsBackgroundFile.h:337
void SortSprites()
Sorts the sprites.
Definition: VGearsBackgroundFile.cpp:94
@ PAGE_COUNT
Number of pages in a background.
Definition: VGearsBackgroundFile.h:129
@ PAGE_DATA_HEIGHT
Height of the background page, in pixels.
Definition: VGearsBackgroundFile.h:84
@ PAGE_DATA_WIDTH
Width of the background page, in pixels.
Definition: VGearsBackgroundFile.h:77
@ LAYER_COUNT
Number of layers in a background.
Definition: VGearsBackgroundFile.h:117
@ SPRITE_HEIGHT
Height of sprites, in pixels.
Definition: VGearsBackgroundFile.h:105
@ SPRITE_WIDTH
Width of sprites, in pixels.
Definition: VGearsBackgroundFile.h:98
@ PALETTE_ENTRY_COUNT
Number of palettes in a background.
Definition: VGearsBackgroundFile.h:122
@ PAGE_DATA_SIZE
Size of the background page, in pixels.
Definition: VGearsBackgroundFile.h:91
@ SPRITE_PIXEL_COUNT
Size of sprites, in pixels.
Definition: VGearsBackgroundFile.h:112
static bool SpriteSorter(SpriteData sprite1, SpriteData sprite2)
Sorting algorithm for sprite sorting.
Definition: VGearsBackgroundFile.cpp:273
static const String RESOURCE_TYPE
The type of resource.
Definition: VGearsBackgroundFile.h:68
virtual void loadImpl() override final
Loads the file.
Definition: VGearsBackgroundFile.cpp:34
Ogre::ColourValue Color
Definition: VGearsPaletteFile.h:66
Definition: FF7NameLookup.h:24
Ogre::uint16 uint16
Definition: TypeDefine.h:32
Ogre::String String
Definition: TypeDefine.h:37
Ogre::SharedPtr< BackgroundFile > BackgroundFilePtr
Definition: VGearsBackgroundFile.h:427
Ogre::SharedPtr< PaletteFile > PaletteFilePtr
Definition: VGearsPaletteFile.h:117
Ogre::uint8 uint8
Definition: TypeDefine.h:31
A layer of a background.
Definition: VGearsBackgroundFile.h:241
uint16 height
Layer height.
Definition: VGearsBackgroundFile.h:256
SpriteList sprites
List of sprites in the layer.
Definition: VGearsBackgroundFile.h:282
uint16 unknown_0E[4]
Unknown.
Definition: VGearsBackgroundFile.h:277
uint16 unknown_06
Unknown.
Definition: VGearsBackgroundFile.h:263
bool enabled
Indicates if the layer is used.
Definition: VGearsBackgroundFile.h:246
uint16 unknown_08[3]
Unknown.
Definition: VGearsBackgroundFile.h:270
uint16 width
Layer width.
Definition: VGearsBackgroundFile.h:251
A background page/.
Definition: VGearsBackgroundFile.h:294
Colors colors
Background color list.
Definition: VGearsBackgroundFile.h:322
bool enabled
Indicates if the page is used.
Definition: VGearsBackgroundFile.h:299
uint16 value_size
Definition: VGearsBackgroundFile.h:309
Buffer data
Data buffer.
Definition: VGearsBackgroundFile.h:317
uint16 unknown_02
Unknown data.
Definition: VGearsBackgroundFile.h:304
Data for sprites.
Definition: VGearsBackgroundFile.h:135
uint16 height
Sprite height.
Definition: VGearsBackgroundFile.h:168
uint8 animation_frame
Animation frame of the sprite.
Definition: VGearsBackgroundFile.h:188
uint16 unknown_04[2]
Unused data.
Definition: VGearsBackgroundFile.h:145
bool has_blending[2]
Indicates if the sprite uses color blending.
Definition: VGearsBackgroundFile.h:193
uint16 colour_depth
Color depth.
Definition: VGearsBackgroundFile.h:218
uint16 width
Sprite width.
Definition: VGearsBackgroundFile.h:163
Pixel dst
Pixel destination.
Definition: VGearsBackgroundFile.h:140
uint16 palette_page
Palete page for the sprite.
Definition: VGearsBackgroundFile.h:173
uint16 depth
Sprite depth (Z-index).
Definition: VGearsBackgroundFile.h:178
uint16 data_page
The page with the sprite data.
Definition: VGearsBackgroundFile.h:203
Pixel src2
Pixel alternate source.
Definition: VGearsBackgroundFile.h:158
uint8 animation_id
Animation ID of the sprite.
Definition: VGearsBackgroundFile.h:183
Ogre::Vector3 src_big
Sprite source.
Definition: VGearsBackgroundFile.h:226
uint16 data_page2
Page with alternate sprite data.
Definition: VGearsBackgroundFile.h:211
uint16 blending
The type of blending used.
Definition: VGearsBackgroundFile.h:198
Pixel src
Pixel source.
Definition: VGearsBackgroundFile.h:150
Pixel coordinates.
Definition: TypeDefine.h:76