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 ACCESS_RESOURCES_H
23 #define ACCESS_RESOURCES_H
24 
25 #include "common/scummsys.h"
26 #include "common/array.h"
27 #include "common/language.h"
28 #include "common/path.h"
29 #include "common/rect.h"
30 #include "common/str-array.h"
31 #include "common/stream.h"
32 
33 namespace Access {
34 
35 extern const byte INITIAL_PALETTE[18 * 3];
36 
37 extern const char *const GENERAL_MESSAGES[];
38 extern const char *const ESP_GENERAL_MESSAGES[];
39 
40 extern const int INVCOORDS[][4];
41 
42 class AccessEngine;
43 
44 class Resources {
45  struct DATEntry {
46  byte _gameId;
47  byte _discType;
48  byte _demoType;
49  Common::Language _language;
50  uint _fileOffset;
51  };
52  struct RoomEntry {
53  Common::String _desc;
54  Common::Point _travelPos;
55  Common::Array<byte> _data;
56  };
57  struct DeathEntry {
58  byte _screenId;
59  Common::String _msg;
60  };
61  struct InventoryEntry {
62  Common::String _desc;
63  int _combo[4];
64  };
65 protected:
66  AccessEngine *_vm;
67  Common::Array<DATEntry> _datIndex;
68 
72  uint findEntry(byte gameId, byte discType, byte demoType, Common::Language language);
73 
78 
82  virtual void load(Common::SeekableReadStream &s);
83 public:
90  Common::String CANT_GET_THERE;
91 public:
92  Resources(AccessEngine *vm) : _vm(vm) {}
93  virtual ~Resources() {}
94  static Resources *init(AccessEngine *vm);
95 
99  bool load(Common::U32String &errorMessage);
100 };
101 
102 } // End of namespace Access
103 
104 #endif /* ACCESS_RESOURCES_H */
Common::String readString(Common::SeekableReadStream &s)
Definition: resources.h:44
Definition: str.h:59
Definition: access.h:84
Definition: stream.h:745
uint findEntry(byte gameId, byte discType, byte demoType, Common::Language language)
Definition: ustr.h:57
Definition: rect.h:45
virtual void load(Common::SeekableReadStream &s)
Definition: access.h:62
Language
Definition: language.h:45