HoverRace  2.0
GameDirector.h
Go to the documentation of this file.
1 
2 // GameDirector.h
3 //
4 // Copyright (c) 2010, 2013-2016 Michael Imamura.
5 //
6 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // A copy of the license should have been attached to the package from which
10 // you have taken this file. If you can not find the license you can not use
11 // this file.
12 //
13 //
14 // The author makes no representations about the suitability of
15 // this software for any purpose. It is provided "as is" "AS IS",
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17 // implied.
18 //
19 // See the License for the specific language governing permissions
20 // and limitations under the License.
21 
22 #pragma once
23 
24 namespace HoverRace {
25  namespace Client {
26  namespace HoverScript {
27  class MetaSession;
28  }
29  class Announcement;
30  class LoadingScene;
31  class Roster;
32  class Rules;
33  class Scene;
34  }
35  namespace Control {
36  class InputEventController;
37  }
38  namespace Display {
39  class Display;
40  }
41  namespace Player {
42  class AvatarGallery;
43  class Player;
44  }
45  namespace VideoServices {
46  class VideoBuffer;
47  }
48 }
49 
50 namespace HoverRace {
51 namespace Client {
52 
58 {
59 public:
60  virtual ~GameDirector() { }
61 
66  virtual Scene *GetForegroundScene() const = 0;
67 
73  virtual void RequestPushScene(const std::shared_ptr<Scene> &scene) = 0;
74 
79  virtual void RequestPopScene() = 0;
80 
87  virtual void RequestReplaceScene(const std::shared_ptr<Scene> &scene) = 0;
88 
93  virtual void RequestMainMenu(
94  std::shared_ptr<LoadingScene> loadingScene =
95  std::shared_ptr<LoadingScene>()) = 0;
96 
101  virtual void RequestStatusPresentation() = 0;
102 
108  virtual void RequestNewPracticeSession(
109  std::shared_ptr<Rules> rules,
110  std::shared_ptr<LoadingScene> loadingScene =
111  std::shared_ptr<LoadingScene>()) = 0;
112 
118  virtual void RequestAnnouncement(std::shared_ptr<Announcement> ann) = 0;
119 
126  virtual void RequestShutdown() = 0;
127 
131  virtual void RequestSoftRestart() = 0;
132 
133  virtual Display::Display *GetDisplay() const = 0;
134 
135  virtual VideoServices::VideoBuffer *GetVideoBuffer() const = 0;
136 
137  virtual Control::InputEventController *GetController() const = 0;
138 
143  virtual Control::InputEventController *ReloadController() = 0;
144 
149  virtual std::shared_ptr<Player::AvatarGallery> ShareAvatarGallery() const = 0;
150 
155  virtual Roster *GetParty() const = 0;
156 
162  virtual std::shared_ptr<Player::Player> ShareUiPilot() const = 0;
163 
164  using sessionChangedSignal_t =
165  boost::signals2::signal<void(std::shared_ptr<HoverScript::MetaSession>)>;
166 
175  virtual sessionChangedSignal_t &GetSessionChangedSignal() = 0;
176 };
177 
178 } // namespace HoverScript
179 } // namespace Client
Interface for game client shells.
Definition: GameDirector.h:57
virtual ~GameDirector()
Definition: GameDirector.h:60
A list of players.
Definition: Roster.h:37
Base class for display managers.
Definition: Display.h:73
Video framebuffer for legacy (8-bit, palettized) rendering.
Definition: VideoBuffer.h:54
std::shared_ptr< Scene > scene
Definition: ClientApp.cpp:100
Scenes are analogous to fullscreen windows that are layered on top of each other. ...
Definition: Scene.h:43
boost::signals2::signal< void(std::shared_ptr< HoverScript::MetaSession >)> sessionChangedSignal_t
Definition: GameDirector.h:165
Definition: Announcement.h:24
std::shared_ptr< Announcement > ann
Definition: ClientApp.cpp:110
Translates input events into actions.
Definition: Controller.h:106