xoreos  0.0.5
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 
29 
31 
32 #include "src/events/notifyable.h"
33 
34 namespace Common {
35  class UString;
36 }
37 
38 namespace Engines {
39 
40 namespace Sonic {
41 
43 public:
44  AreaBackground(const Common::UString &name);
46 
47  uint32 getImageWidth() const;
48  uint32 getImageHeight() const;
49 
50  // Renderable
51  void calculateDistance();
53 
54 private:
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
Definition: 2dafile.h:39
A class holding an UTF-8 string.
Definition: ustring.h:48
void setPosition(float x, float y)
A handle to an Aurora texture.
A GUI element.
AreaBackground(const Common::UString &name)
RenderPass
Definition: types.h:97
A class that can be notified by the NotificationManager.
An element of the GUI.
Definition: guielement.h:33
Graphics::Aurora::TextureHandle _texture
uint32_t uint32
Definition: types.h:204
void loadTexture(const Common::UString &name)
void calculateDistance()
Calculate the object&#39;s distance.
void render(Graphics::RenderPass pass)
Render the object.
#define pass
Definition: fft.cpp:257
A handle to a texture.
Definition: texturehandle.h:51