V-Gears 0
Free Final Fantasy VII engine.
FF7ModelListFile.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 The V-Gears Team
3 *
4 * This file is part of V-Gears
5 *
6 * V-Gears is free software: you can redistribute it and/or modify it under
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, version 3.0 (GPLv3) of the License.
9 *
10 * V-Gears is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#pragma once
17
18#include <OgreColourValue.h>
20
21namespace VGears{
22
26 class ModelListFile : public Resource{
27
28 public:
29
49 Ogre::ResourceManager* creator, const String &name,
50 Ogre::ResourceHandle handle, const String& group,
51 bool is_manual = false, Ogre::ManualResourceLoader* loader = NULL
52 );
53
57 virtual ~ModelListFile();
58
62 static const String RESOURCE_TYPE;
63
68
73
78 };
79
80 typedef std::vector<AnimationDescription> AnimationList;
81
86
90 PLAYER = 0,
91
95 NPC = 1,
96
100 UNKNOWN
101 };
102
107
112
117
124
129
130
131 Ogre::ColourValue light_colors[10];
132
137 };
138
139 typedef std::vector<ModelDescription> ModelList;
140
146 virtual uint16 GetScale() const;
147
153 virtual void SetScale(uint16 scale);
154
158 virtual ModelList& GetModels();
159
160 protected:
161
165 virtual void loadImpl() override;
166
170 virtual void unloadImpl() override;
171
178 virtual size_t calculateSize( void ) const;
179
180 private:
181
190
195 };
196
197 typedef Ogre::SharedPtr<ModelListFile> ModelListFilePtr;
198}
Handles model list files.
Definition: FF7ModelListFile.h:26
static const String RESOURCE_TYPE
The type of resource.
Definition: FF7ModelListFile.h:62
virtual size_t calculateSize(void) const
Calculates the size of the palette.
Definition: FF7ModelListFile.cpp:41
virtual void SetScale(uint16 scale)
Sets the scale for the models.
Definition: FF7ModelListFile.cpp:47
ModelListFile(Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool is_manual=false, Ogre::ManualResourceLoader *loader=NULL)
Constructor.
Definition: FF7ModelListFile.cpp:23
virtual uint16 GetScale() const
Retrieves the scale for the models.
Definition: FF7ModelListFile.cpp:45
std::vector< AnimationDescription > AnimationList
Definition: FF7ModelListFile.h:80
virtual void loadImpl() override
Loads the file.
Definition: FF7ModelListFile.cpp:30
ModelType
Types of models.
Definition: FF7ModelListFile.h:85
@ PLAYER
Playable character.
Definition: FF7ModelListFile.h:90
@ UNKNOWN
Unknown character type.
Definition: FF7ModelListFile.h:100
@ NPC
Non playable character.
Definition: FF7ModelListFile.h:95
uint16 scale_
The models scale.
Definition: FF7ModelListFile.h:189
ModelList models_
The list of models.
Definition: FF7ModelListFile.h:194
virtual void unloadImpl() override
Unloads the file.
Definition: FF7ModelListFile.cpp:36
std::vector< ModelDescription > ModelList
Definition: FF7ModelListFile.h:139
virtual ModelList & GetModels()
Retrieves the model list.
Definition: FF7ModelListFile.cpp:43
virtual ~ModelListFile()
Destructor.
Definition: FF7ModelListFile.cpp:28
A resource.
Definition: VGearsResource.h:29
Definition: FF7NameLookup.h:24
Ogre::SharedPtr< ModelListFile > ModelListFilePtr
Definition: FF7ModelListFile.h:197
Ogre::uint16 uint16
Definition: TypeDefine.h:32
Ogre::String String
Definition: TypeDefine.h:37
An animation description.
Definition: FF7ModelListFile.h:67
String name
The animation name.
Definition: FF7ModelListFile.h:72
uint16 unknown
Unknown data.
Definition: FF7ModelListFile.h:77
A model.
Definition: FF7ModelListFile.h:106
AnimationList animations
List of animations assigned to the model.
Definition: FF7ModelListFile.h:136
String hrc_name
HRC file name.
Definition: FF7ModelListFile.h:123
String name
The model name.
Definition: FF7ModelListFile.h:111
String scale
Scale for the model.
Definition: FF7ModelListFile.h:128
Ogre::ColourValue light_colors[10]
Definition: FF7ModelListFile.h:131
ModelType type
The model type.
Definition: FF7ModelListFile.h:116