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