Repository navigation
Expand file tree
/
Copy pathArticleDefinition.cpp
More file actions
105 lines (90 loc) · 2.71 KB
/
Copy pathArticleDefinition.cpp
File metadata and controls
105 lines (90 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*
* Copyright 2011 OpenXcom Developers.
*
* This file is part of OpenXcom.
*
* OpenXcom is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* OpenXcom is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ArticleDefinition.h"
namespace OpenXcom
{
/**
* Constructor
* @param type_id Article type of this instance.
*/
ArticleDefinition::ArticleDefinition(UfopaediaTypeId type_id) : _type_id(type_id)
{}
/**
* Destructor
*/
ArticleDefinition::~ArticleDefinition()
{}
/**
* Get the article definition type. (Text, TextImage, Craft, ...)
* @returns The type of article definition of this instance.
*/
UfopaediaTypeId ArticleDefinition::getType() const
{
return _type_id;
}
/**
* Constructor
*/
ArticleDefinitionRect::ArticleDefinitionRect() : x(0), y(0), width(0), height(0) {}
/**
* Set the rectangle parameters in a function
*/
void ArticleDefinitionRect::set(int set_x, int set_y, int set_width, int set_height)
{
x = set_x;
y = set_y;
width = set_width;
height = set_height;
}
/**
* Constructor (only setting type of base class)
*/
ArticleDefinitionCraft::ArticleDefinitionCraft() : ArticleDefinition(UFOPAEDIA_TYPE_CRAFT), craft(0)
{}
/**
* Constructor (only setting type of base class)
*/
ArticleDefinitionCraftWeapon::ArticleDefinitionCraftWeapon() : ArticleDefinition(UFOPAEDIA_TYPE_CRAFT_WEAPON), weapon(0)
{}
/**
* Constructor (only setting type of base class)
*/
ArticleDefinitionText::ArticleDefinitionText() : ArticleDefinition(UFOPAEDIA_TYPE_TEXT)
{}
/**
* Constructor (only setting type of base class)
*/
ArticleDefinitionTextImage::ArticleDefinitionTextImage() : ArticleDefinition(UFOPAEDIA_TYPE_TEXTIMAGE), text_width(0)
{}
/**
* Constructor (only setting type of base class)
*/
ArticleDefinitionBaseFacility::ArticleDefinitionBaseFacility() : ArticleDefinition(UFOPAEDIA_TYPE_BASE_FACILITY), facility(0)
{}
/**
* Constructor (only setting type of base class)
*/
ArticleDefinitionItem::ArticleDefinitionItem() : ArticleDefinition(UFOPAEDIA_TYPE_ITEM), item(0)
{}
/**
* Constructor (only setting type of base class)
*/
ArticleDefinitionUfo::ArticleDefinitionUfo() : ArticleDefinition(UFOPAEDIA_TYPE_UFO), ufo(0)
{}
}