OpenXcom
1.0
Open-source clone of the original X-Com
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
src
Ruleset
ExtraSprites.h
1
/*
2
* Copyright 2010-2014 OpenXcom Developers.
3
*
4
* This file is part of OpenXcom.
5
*
6
* OpenXcom is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* OpenXcom is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
#ifndef OPENXCOM_EXTRASPRITES_H
20
#define OPENXCOM_EXTRASPRITES_H
21
22
#include <yaml-cpp/yaml.h>
23
24
namespace
OpenXcom
25
{
26
30
class
ExtraSprites
31
{
32
private
:
33
std::map<int, std::string> _sprites;
34
int
_width, _height;
35
bool
_singleImage;
36
int
_modIndex, _subX, _subY;
37
public
:
39
ExtraSprites
();
41
virtual
~ExtraSprites
();
43
void
load
(
const
YAML::Node &node,
int
modIndex);
45
std::map<int, std::string> *
getSprites
();
47
int
getWidth
()
const
;
49
int
getHeight
()
const
;
51
bool
getSingleImage
()
const
;
53
int
getModIndex
()
const
;
55
int
getSubX
()
const
;
57
int
getSubY
()
const
;
58
59
};
60
61
}
62
63
#endif
OpenXcom::ExtraSprites::getModIndex
int getModIndex() const
Gets the mod index for this external sprite set.
Definition:
ExtraSprites.cpp:95
OpenXcom::ExtraSprites
For adding a set of extra sprite data to the game.
Definition:
ExtraSprites.h:30
OpenXcom::ExtraSprites::~ExtraSprites
virtual ~ExtraSprites()
Cleans up the external sprite set.
Definition:
ExtraSprites.cpp:35
OpenXcom::ExtraSprites::getSprites
std::map< int, std::string > * getSprites()
Gets the list of sprites defined by this mod.
Definition:
ExtraSprites.cpp:59
OpenXcom::ExtraSprites::getWidth
int getWidth() const
Gets the width of the surfaces (used for single images and new spritesets).
Definition:
ExtraSprites.cpp:68
OpenXcom::ExtraSprites::ExtraSprites
ExtraSprites()
Creates a blank external sprite set.
Definition:
ExtraSprites.cpp:28
OpenXcom::ExtraSprites::getSubY
int getSubY() const
Gets the y subdivision.
Definition:
ExtraSprites.cpp:113
OpenXcom::ExtraSprites::getSingleImage
bool getSingleImage() const
Checks if this is a single surface, or a set of surfaces.
Definition:
ExtraSprites.cpp:86
OpenXcom::ExtraSprites::getSubX
int getSubX() const
Gets the x subdivision.
Definition:
ExtraSprites.cpp:104
OpenXcom::ExtraSprites::load
void load(const YAML::Node &node, int modIndex)
Loads the data from YAML.
Definition:
ExtraSprites.cpp:44
OpenXcom::ExtraSprites::getHeight
int getHeight() const
Gets the height of the surfaces (used for single images and new spritesets).
Definition:
ExtraSprites.cpp:77
Generated on Fri Jun 13 2014 20:52:36 for OpenXcom by
1.8.7