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
33namespace Access {
34
35extern const byte INITIAL_PALETTE[18 * 3];
36
37extern const int INVCOORDS[][4];
38
39class AccessEngine;
40
41class Resources {
42 struct DATEntry {
43 byte _gameId;
44 byte _discType;
45 byte _demoType;
46 Common::Language _language;
47 uint _fileOffset;
48 };
49 struct DeathEntry {
50 byte _screenId;
51 Common::String _msg;
52 };
53 struct InventoryEntry {
54 Common::String _desc;
55 int _combo[4];
56 };
57protected:
58 struct RoomEntry {
59 Common::String _desc;
60 Common::Point _travelPos;
62 };
63
64 AccessEngine *_vm;
66
70 uint findEntry(byte gameId, byte discType, byte demoType, Common::Language language);
71
76public:
82 Common::String CANT_GET_THERE;
83public:
84 Resources(AccessEngine *vm) : _vm(vm) {}
85 virtual ~Resources() {}
86 static Resources *init(AccessEngine *vm);
87
91 bool load(Common::U32String &errorMessage);
92
96 virtual const byte *getCursor(int num) const = 0;
97
102 virtual int getCursorWidth(int num) const { return 16; }
103
108 virtual int getCursorHeight(int num) const { return 16; }
109
113 virtual const char *getEgoName() const = 0;
114
118 virtual int getRMouse(int i, int j) const = 0;
119
124 virtual int inButtonXRange(int x) const = 0;
125
131 virtual const char *getGeneralMessage(int command) const;
132};
133
134} // End of namespace Access
135
136#endif /* ACCESS_RESOURCES_H */
Definition: access.h:141
Definition: resources.h:41
virtual void load(Common::SeekableReadStream &s)
virtual int getCursorWidth(int num) const
Definition: resources.h:102
virtual int inButtonXRange(int x) const =0
virtual int getCursorHeight(int num) const
Definition: resources.h:108
bool load(Common::U32String &errorMessage)
virtual int getRMouse(int i, int j) const =0
virtual const char * getEgoName() const =0
uint findEntry(byte gameId, byte discType, byte demoType, Common::Language language)
virtual const char * getGeneralMessage(int command) const
virtual const byte * getCursor(int num) const =0
Definition: stream.h:745
Definition: str.h:59
Definition: ustr.h:57
Language
Definition: language.h:45
Definition: access.h:62
Definition: resources.h:58
Definition: rect.h:144