xoreos
0.0.5
src
engines
sonic
areabackground.h
Go to the documentation of this file.
1
/* xoreos - A reimplementation of BioWare's Aurora engine
2
*
3
* xoreos is the legal property of its developers, whose names
4
* can be found in the AUTHORS file distributed with this source
5
* distribution.
6
*
7
* xoreos is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 3
10
* of the License, or (at your option) any later version.
11
*
12
* xoreos 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 xoreos. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
25
#ifndef ENGINES_SONIC_AREABACKGROUND_H
26
#define ENGINES_SONIC_AREABACKGROUND_H
27
28
#include "
src/graphics/guielement.h
"
29
30
#include "
src/graphics/aurora/texturehandle.h
"
31
32
#include "
src/events/notifyable.h
"
33
34
namespace
Common
{
35
class
UString;
36
}
37
38
namespace
Engines
{
39
40
namespace
Sonic {
41
42
class
AreaBackground
:
public
Graphics::GUIElement
,
public
Events::Notifyable
{
43
public
:
44
AreaBackground
(
const
Common::UString
&name);
45
~AreaBackground
();
46
47
uint32
getImageWidth
()
const
;
48
uint32
getImageHeight
()
const
;
49
50
// Renderable
51
void
calculateDistance
();
52
void
render
(
Graphics::RenderPass
pass
);
53
54
private
:
55
Graphics::Aurora::TextureHandle
_texture
;
56
57
float
_textureX1
;
58
float
_textureY1
;
59
float
_textureX2
;
60
float
_textureY2
;
61
62
void
loadTexture
(
const
Common::UString
&name);
63
void
setPosition
(
float
x,
float
y);
64
65
void
notifyCameraMoved
();
66
};
67
68
}
// End of namespace Sonic
69
70
}
// End of namespace Engines
71
72
#endif // ENGINES_SONIC_AREABACKGROUND_H
Engines::Sonic::AreaBackground::~AreaBackground
~AreaBackground()
Definition:
areabackground.cpp:62
Common
Definition:
2dafile.h:39
Common::UString
A class holding an UTF-8 string.
Definition:
ustring.h:48
Engines::Sonic::AreaBackground::setPosition
void setPosition(float x, float y)
Definition:
areabackground.cpp:120
texturehandle.h
A handle to an Aurora texture.
Engines::Sonic::AreaBackground::getImageHeight
uint32 getImageHeight() const
Definition:
areabackground.cpp:70
Engines::Sonic::AreaBackground::_textureY1
float _textureY1
Definition:
areabackground.h:58
guielement.h
A GUI element.
Engines::Sonic::AreaBackground::AreaBackground
AreaBackground(const Common::UString &name)
Definition:
areabackground.cpp:53
Graphics::RenderPass
RenderPass
Definition:
types.h:97
Engines::Sonic::AreaBackground::_textureX2
float _textureX2
Definition:
areabackground.h:59
notifyable.h
A class that can be notified by the NotificationManager.
Engines
Definition:
console.cpp:69
Engines::Sonic::AreaBackground
Definition:
areabackground.h:42
Engines::Sonic::AreaBackground::_textureY2
float _textureY2
Definition:
areabackground.h:60
Graphics::GUIElement
An element of the GUI.
Definition:
guielement.h:33
Engines::Sonic::AreaBackground::_texture
Graphics::Aurora::TextureHandle _texture
Definition:
areabackground.h:55
uint32
uint32_t uint32
Definition:
types.h:204
Engines::Sonic::AreaBackground::_textureX1
float _textureX1
Definition:
areabackground.h:57
Engines::Sonic::AreaBackground::loadTexture
void loadTexture(const Common::UString &name)
Definition:
areabackground.cpp:95
Engines::Sonic::AreaBackground::calculateDistance
void calculateDistance()
Calculate the object's distance.
Definition:
areabackground.cpp:74
Engines::Sonic::AreaBackground::getImageWidth
uint32 getImageWidth() const
Definition:
areabackground.cpp:66
Engines::Sonic::AreaBackground::render
void render(Graphics::RenderPass pass)
Render the object.
Definition:
areabackground.cpp:77
pass
#define pass
Definition:
fft.cpp:257
Graphics::Aurora::TextureHandle
A handle to a texture.
Definition:
texturehandle.h:51
Events::Notifyable
Definition:
notifyable.h:35
Engines::Sonic::AreaBackground::notifyCameraMoved
void notifyCameraMoved()
Definition:
areabackground.cpp:135
Generated on Sun Nov 18 2018 15:13:40 for xoreos by
1.8.14