xoreos  0.0.5
creature.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_JADE_CREATURE_H
26 #define ENGINES_JADE_CREATURE_H
27 
28 #include "src/common/types.h"
29 #include "src/common/scopedptr.h"
30 #include "src/common/ustring.h"
31 
32 #include "src/aurora/types.h"
33 
35 
37 
38 namespace Engines {
39 
40 namespace Jade {
41 
42 class Creature : public Object {
43 public:
45  Creature();
47  Creature(const Aurora::GFF3Struct &creature);
48  ~Creature();
49 
51  void createFakePC();
52 
53  // Basic visuals
54 
55  void show();
56  void hide();
57 
58  // Basic properties
59 
60  bool isPC() const;
61 
62  int32 getAutoBalance() const;
63 
64  // Positioning
65 
67  void setPosition(float x, float y, float z);
69  void setOrientation(float x, float y, float z, float angle);
70 
71  // Object/Cursor interactions
72 
73  void enter();
74  void leave();
75 
77  virtual void highlight(bool enabled);
78 
79 private:
80  bool _isPC;
81 
83 
86 
88 
89 
90  void load(const Aurora::GFF3Struct &creature);
91 
92  void loadBlueprint(const Aurora::GFF3Struct &gff);
93  void loadInstance(const Aurora::GFF3Struct &gff);
94  void loadAppearance();
95 
96  void loadBody();
97  void loadHead();
98 };
99 
100 } // End of namespace Jade
101 
102 } // End of namespace Engines
103 
104 #endif // ENGINES_JADE_CREATURE_H
An object within a Jade Empire area.
void enter()
The cursor entered the creature.
Definition: creature.cpp:202
void setPosition(float x, float y, float z)
Set the creature&#39;s position.
Definition: creature.cpp:78
uint32 _headType
The creature&#39;s type of head if separate from the model.
Definition: creature.h:85
void show()
Show the creature&#39;s model.
Definition: creature.cpp:60
void hide()
Hide the creature&#39;s model.
Definition: creature.cpp:65
void loadInstance(const Aurora::GFF3Struct &gff)
Definition: creature.cpp:150
void createFakePC()
Create a fake player character creature for testing purposes.
Definition: creature.cpp:195
A simple scoped smart pointer template.
void leave()
The cursor left the creature.
Definition: creature.cpp:206
Basic Aurora graphics types.
int32 getAutoBalance() const
Definition: creature.cpp:74
Creature()
Create a dummy creature instance.
Definition: creature.cpp:53
void load(const Aurora::GFF3Struct &creature)
Definition: creature.cpp:94
Low-level type definitions to handle fixed width types portably.
bool _isPC
Is the creature a PC?
Definition: creature.h:80
An object within a Jade area.
Definition: object.h:53
virtual void highlight(bool enabled)
(Un)Highlight the creature.
Definition: creature.cpp:210
Unicode string handling.
Basic type definitions to handle files used in BioWare&#39;s Aurora engine.
Common::ScopedPtr< Graphics::Aurora::Model > _model
The creature&#39;s model.
Definition: creature.h:87
void setOrientation(float x, float y, float z, float angle)
Set the creature&#39;s orientation.
Definition: creature.cpp:86
A struct within a GFF3.
Definition: gff3file.h:164
uint32_t uint32
Definition: types.h:204
uint32 _appearance
The creature&#39;s general appearance.
Definition: creature.h:84
void loadBlueprint(const Aurora::GFF3Struct &gff)
Definition: creature.cpp:123
bool isPC() const
Is the creature a player character?
Definition: creature.cpp:70
int32_t int32
Definition: types.h:203