xoreos  0.0.5
ingame.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_NWN_GUI_INGAME_INGAME_H
26 #define ENGINES_NWN_GUI_INGAME_INGAME_H
27 
28 #include <vector>
29 
30 #include "src/common/types.h"
31 #include "src/common/scopedptr.h"
32 #include "src/common/ptrvector.h"
33 
34 #include "src/events/types.h"
35 
36 namespace Common {
37  class UString;
38 }
39 
40 namespace Engines {
41 
42 namespace NWN {
43 
44 class Module;
45 
46 class IngameMainMenu;
47 
48 class Object;
49 class Creature;
50 
51 class CharacterInfo;
52 class Quickbar;
53 class Quickchat;
54 class Compass;
55 class Dialog;
56 
58 class IngameGUI {
59 public:
60  IngameGUI(Module &module, ::Engines::Console *console = 0);
61  ~IngameGUI();
62 
63  uint32 showMain();
64  void abortMain();
65 
66  void show();
67  void hide();
68 
69  void addEvent(const Events::Event &event);
70  void processEventQueue();
71 
73  void setArea(const Common::UString &area);
74 
76  void updatePartyMember(size_t partyMember, const Creature &creature, bool force = false);
77 
79  bool hasRunningConversation() const;
80 
82  bool startConversation(const Common::UString &conv,
83  Creature &pc, Object &obj, bool playHello = true);
85  void stopConversation();
86 
87 private:
89 
91 
95 
97 
101  std::vector<uint32> _lastPartyMemberChange;
102 
104 
105 
107  void setPortrait(size_t partyMember, const Common::UString &portrait);
108 
110  void setName(size_t partyMember, const Common::UString &name);
111 
113  void setHealth(size_t partyMember, uint32 current, uint32 max);
114 
116  void setHealthy (size_t partyMember);
118  void setSick (size_t partyMember);
120  void setPoisoned(size_t partyMember);
121 };
122 
123 } // End of namespace NWN
124 
125 } // End of namespace Engines
126 
127 #endif // ENGINES_NWN_GUI_INGAME_INGAME_H
Basic event types.
void setPoisoned(size_t partyMember)
Set party member to "poisoned" (green health bar).
Definition: ingame.cpp:156
Definition: 2dafile.h:39
void setPortrait(size_t partyMember, const Common::UString &portrait)
Set the party member&#39;s portrait.
Definition: ingame.cpp:131
A class holding an UTF-8 string.
Definition: ustring.h:48
void addEvent(const Events::Event &event)
Definition: ingame.cpp:99
void setArea(const Common::UString &area)
Set the current area.
Definition: ingame.cpp:143
Common::ScopedPtr< Compass > _compass
The compass.
Definition: ingame.h:94
A simple scoped smart pointer template.
SDL_Event Event
Definition: types.h:42
std::vector< uint32 > _lastPartyMemberChange
The time that party member was changed last.
Definition: ingame.h:101
A vector of pointer to objects, with automatic deletion.
Definition: ptrvector.h:44
Common::ScopedPtr< Quickchat > _quickchat
The quick chat.
Definition: ingame.h:93
Common::ScopedPtr< Quickbar > _quickbar
The quick bar.
Definition: ingame.h:92
uint32 _lastCompassChange
The time the compass was changed last.
Definition: ingame.h:99
The NWN ingame GUI elements.
Definition: ingame.h:58
IngameGUI(Module &module, ::Engines::Console *console=0)
Definition: ingame.cpp:44
Low-level type definitions to handle fixed width types portably.
A vector storing pointer to objects, with automatic deletion.
A scoped plain pointer, allowing pointer-y access and normal deletion.
Definition: scopedptr.h:120
Common::ScopedPtr< IngameMainMenu > _main
The ingame main menu.
Definition: ingame.h:90
uint32 showMain()
Show the ingame main menu.
Definition: ingame.cpp:63
void stopConversation()
Stop a conversation.
Definition: ingame.cpp:199
void updatePartyMember(size_t partyMember, const Creature &creature, bool force=false)
Update the party member.
Definition: ingame.cpp:160
void abortMain()
Abort the ingame main menu.
Definition: ingame.cpp:71
void setSick(size_t partyMember)
Set party member to "sick" (brown health bar).
Definition: ingame.cpp:152
uint32_t uint32
Definition: types.h:204
void setHealth(size_t partyMember, uint32 current, uint32 max)
Set the party member&#39;s health.
Definition: ingame.cpp:135
void setName(size_t partyMember, const Common::UString &name)
Set the party member&#39;s name.
Definition: ingame.cpp:139
Common::PtrVector< CharacterInfo > _party
The party member character panels.
Definition: ingame.h:103
bool hasRunningConversation() const
Do we have a currently running conversation?
Definition: ingame.cpp:174
void setHealthy(size_t partyMember)
Set party member to "healthy" (red health bar).
Definition: ingame.cpp:148
void hide()
Hide the ingame GUI elements.
Definition: ingame.cpp:87
bool startConversation(const Common::UString &conv, Creature &pc, Object &obj, bool playHello=true)
Start a conversation.
Definition: ingame.cpp:178
Common::ScopedPtr< Dialog > _dialog
The current dialog.
Definition: ingame.h:96
void show()
Show the ingame GUI elements.
Definition: ingame.cpp:75