ScummVM API documentation
resource.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 LASTEXPRESS_RESOURCE_H
23 #define LASTEXPRESS_RESOURCE_H
24 
25 #include "lastexpress/data/archive.h"
26 #include "lastexpress/shared.h"
27 
28 #include "common/array.h"
29 
30 namespace LastExpress {
31 
32 class Background;
33 class Cursor;
34 class Font;
35 
37 public:
38  ResourceManager(bool demo);
39  ~ResourceManager() override;
40 
41  // Loading
42  bool loadArchive(ArchiveIndex type);
43  bool isArchivePresent(ArchiveIndex type);
44  Common::SeekableReadStream *getFileStream(const Common::String &name) const;
45 
46  // Archive functions
47  bool hasFile(const Common::Path &path) const override;
48  int listMembers(Common::ArchiveMemberList &list) const override;
49  const Common::ArchiveMemberPtr getMember(const Common::Path &path) const override;
51 
52  // Resource loading
53  Background *loadBackground(const Common::String &name) const;
54  Cursor *loadCursor() const;
55  Font *loadFont() const;
56 
57 private:
58  bool _isDemo;
59 
60  bool loadArchive(const Common::Path &name);
61  void reset();
62 
64 
65  friend class Debugger;
66 };
67 
68 } // End of namespace LastExpress
69 
70 #endif // LASTEXPRESS_RESOURCE_H
const Common::ArchiveMemberPtr getMember(const Common::Path &path) const override
Definition: font.h:48
Definition: str.h:59
Definition: array.h:52
Definition: list.h:44
Definition: path.h:52
Definition: stream.h:745
int listMembers(Common::ArchiveMemberList &list) const override
Definition: animation.h:45
Definition: archive.h:141
bool hasFile(const Common::Path &path) const override
Definition: cursor.h:62
Definition: background.h:51
Common::SeekableReadStream * createReadStreamForMember(const Common::Path &path) const override
Definition: atari-cursor.h:38
Definition: resource.h:36
Definition: debug.h:47