ScummVM API documentation
staticprovider.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_STATIC_PROVIDER_H
23 #define STARK_SERVICES_STATIC_PROVIDER_H
24 
25 #include "common/array.h"
26 #include "common/path.h"
27 #include "common/scummsys.h"
28 
29 namespace Stark {
30 
31 namespace Resources {
32 class Anim;
33 class Image;
34 class Level;
35 class Location;
36 class Sound;
37 }
38 
39 class ArchiveLoader;
40 class Global;
41 class VisualImageXMG;
42 
50 public:
51  explicit StaticProvider(ArchiveLoader *archiveLoader);
52 
53  enum UIElement {
54  kInventoryScrollUpArrow = 1,
55  kInventoryScrollDownArrow = 2,
56  kImages = 4,
57  kActionMenuBg = 5,
58  kTextScrollUpArrow = 6,
59  kTextScrollDownArrow = 7,
60  kQuit = 8,
61  kCheckMark = 13,
62  kVolume = 14,
63  kDiaryNormal = 15,
64  kInventory = 16,
65  kExitArrow = 17,
66  kExitArrowLeft = 18,
67  kExitArrowRight = 19,
68  kTextBackgroundActive = 20,
69  kTextBackgroundPassive = 21,
70  kDiaryTabbed = 22
71  };
72 
73  enum UIImage {
74  kInventoryBg = 0,
75  kDialogOptionBullet = 4
76  };
77 
78  enum UISound {
79  kActionMouthHover = 0,
80  kActionHover = 1,
81  kInventoryNewItem = 2
82  };
83 
85  void init();
86 
88  void onGameLoop();
89 
91  void shutdown();
92 
94  Resources::Level *getLevel() const { return _level; }
95 
97  VisualImageXMG *getCursorImage(uint32 cursor) const;
98 
100  VisualImageXMG *getUIElement(UIElement element) const;
101  VisualImageXMG *getUIElement(UIElement element, uint32 index) const;
102 
104  VisualImageXMG *getUIImage(UIImage image) const;
105 
107  Resources::Sound *getUISound(UISound sound) const;
108 
110  void goToAnimScriptStatement(UIElement stockUIElement, int animScriptItemIndex);
111 
113  Resources::Location *loadLocation(const char *locationName);
114 
116  bool isStaticLocation() const;
117 
119  Resources::Location *getLocation() const;
120 
122  Resources::Sound *getLocationSound(uint16 index) const;
123 
125  void unloadLocation(Resources::Location *location);
126 
127 private:
128  ArchiveLoader *_archiveLoader;
129 
130  Resources::Level *_level;
131  Resources::Location *_location;
134 
135  Common::Path buildLocationArchiveName(const char *locationName) const;
136 };
137 
138 } // End of namespace Stark
139 
140 #endif // STARK_SERVICES_STATIC_PROVIDER_H
Definition: location.h:51
Definition: array.h:52
Resources::Level * getLevel() const
Definition: staticprovider.h:94
Definition: sound.h:47
Definition: path.h:52
Definition: archiveloader.h:64
Definition: console.h:27
Definition: staticprovider.h:49
Definition: level.h:39
Definition: image.h:45
Definition: movie_decoder.h:32