ScummVM API documentation
resources.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 MADS_RESOURCES_H
23 #define MADS_RESOURCES_H
24 
25 #include "common/scummsys.h"
26 #include "common/file.h"
27 #include "common/serializer.h"
28 #include "common/str.h"
29 
30 namespace MADS {
31 namespace Nebular {
32 
33 enum RESPREFIX {
34  RESPREFIX_GL = 1, RESPREFIX_SC = 2, RESPREFIX_RM = 3
35 };
36 
37 enum EXTTYPE {
38  EXT_NONE = -1, EXT_SS = 1, EXT_AA = 2, EXT_DAT = 3, EXT_HH = 4,
39  EXT_ART = 5, EXT_INT = 6
40 };
41 
42 class RexNebularEngine;
43 
44 class Resources {
45 public:
49  static void init(RexNebularEngine *vm);
50 
51  static Common::Path formatName(RESPREFIX resType, int id, const Common::String &ext);
52  static Common::Path formatName(int prefix, char asciiCh, int id,
53  EXTTYPE extType, const Common::String &suffix);
54  static Common::Path formatResource(const Common::String &resName, const Common::String &hagFilename);
55  static Common::Path formatAAName(int idx);
56 };
57 
61 class File : public Common::File {
62 public:
66  File() : Common::File() {
67  }
68 
72  File(const Common::Path &filename) {
73  openFile(filename);
74  }
75 
79  void openFile(const Common::Path &filename);
80 };
81 
82 class SynchronizedList : public Common::Array<int> {
83 public:
87  void synchronize(Common::Serializer &s);
88 };
89 
90 } // namespace Nebular
91 } // namespace MADS
92 
93 #endif
Definition: str.h:59
Definition: nebular.h:51
Definition: array.h:52
Definition: path.h:52
Definition: resources.h:44
Definition: resources.h:61
Definition: serializer.h:80
Definition: file.h:47
Definition: algorithm.h:29
Definition: mps_installer.h:31
Definition: resources.h:82
File(const Common::Path &filename)
Definition: resources.h:72
File()
Definition: resources.h:66
static void init(RexNebularEngine *vm)