ScummVM API documentation
services.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef STARK_SERVICES_SERVICES_H
23 #define STARK_SERVICES_SERVICES_H
24 
25 #include "common/singleton.h"
26 #include "common/scummsys.h"
27 
28 namespace Common {
29 class RandomSource;
30 }
31 
32 namespace Stark {
33 
34 namespace Gfx {
35 class Driver;
36 }
37 
38 class ArchiveLoader;
39 class DialogPlayer;
40 class Diary;
41 class FontProvider;
42 class GameInterface;
43 class Global;
44 class ResourceProvider;
45 class StaticProvider;
46 class Scene;
47 class UserInterface;
48 class Settings;
49 class StateProvider;
50 class GameChapter;
51 class GameMessage;
52 
56 class StarkServices : public Common::Singleton<StarkServices> {
57 public:
58  StarkServices() {
59  archiveLoader = nullptr;
60  dialogPlayer = nullptr;
61  diary = nullptr;
62  gfx = nullptr;
63  global = nullptr;
64  resourceProvider = nullptr;
65  randomSource = nullptr;
66  scene = nullptr;
67  staticProvider = nullptr;
68  gameInterface = nullptr;
69  userInterface = nullptr;
70  fontProvider = nullptr;
71  settings = nullptr;
72  gameChapter = nullptr;
73  gameMessage = nullptr;
74  stateProvider = nullptr;
75  }
76 
77  ArchiveLoader *archiveLoader;
78  DialogPlayer *dialogPlayer;
79  Diary *diary;
80  Gfx::Driver *gfx;
81  Global *global;
82  ResourceProvider *resourceProvider;
83  Common::RandomSource *randomSource;
84  Scene *scene;
85  StaticProvider *staticProvider;
86  GameInterface *gameInterface;
87  UserInterface *userInterface;
88  FontProvider *fontProvider;
89  Settings *settings;
90  GameChapter *gameChapter;
91  GameMessage *gameMessage;
92  StateProvider *stateProvider;
93 };
94 
96 #define StarkArchiveLoader StarkServices::instance().archiveLoader
97 #define StarkDialogPlayer StarkServices::instance().dialogPlayer
98 #define StarkDiary StarkServices::instance().diary
99 #define StarkGfx StarkServices::instance().gfx
100 #define StarkGlobal StarkServices::instance().global
101 #define StarkResourceProvider StarkServices::instance().resourceProvider
102 #define StarkRandomSource StarkServices::instance().randomSource
103 #define StarkScene StarkServices::instance().scene
104 #define StarkStaticProvider StarkServices::instance().staticProvider
105 #define StarkGameInterface StarkServices::instance().gameInterface
106 #define StarkUserInterface StarkServices::instance().userInterface
107 #define StarkFontProvider StarkServices::instance().fontProvider
108 #define StarkSettings StarkServices::instance().settings
109 #define StarkGameChapter StarkServices::instance().gameChapter
110 #define StarkGameMessage StarkServices::instance().gameMessage
111 #define StarkStateProvider StarkServices::instance().stateProvider
112 
113 } // End of namespace Stark
114 
115 #endif // STARK_SERVICES_SERVICES_H
Definition: random.h:44
Definition: gameinterface.h:41
Definition: gamemessage.h:35
Definition: driver.h:44
Definition: archiveloader.h:64
Definition: fontprovider.h:41
Definition: diary.h:43
Definition: console.h:27
Definition: dialogplayer.h:41
Definition: algorithm.h:29
Definition: scene.h:41
Definition: stateprovider.h:103
Definition: staticprovider.h:49
Definition: settings.h:45
Definition: userinterface.h:74
Definition: global.h:77
Definition: services.h:56
Definition: resourceprovider.h:48
Definition: singleton.h:42
Definition: gamechapter.h:35