ScummVM API documentation
resource_he.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 SCUMM_HE_RESOURCE_HE_H
23#define SCUMM_HE_RESOURCE_HE_H
24
25#include "common/macresman.h"
26
27namespace Common {
28class PEResources;
29}
30
31namespace Scumm {
32
33class ScummEngine_v70he;
34
36public:
38 virtual ~ResExtractor();
39
40 void setCursor(int id);
41
42protected:
43 struct CachedCursor {
44 bool valid;
45 int id;
46 byte *bitmap;
47 int width, height;
48 int hotspotX, hotspotY;
49 uint32 lastUsed;
50 byte *palette;
51 int palSize;
52 };
53
54 Common::Path _fileName;
56
57 virtual bool extractResource(int id, CachedCursor *cc) = 0;
58
59private:
60 enum {
61 MAX_CACHED_CURSORS = 10
62 };
63
64 ResExtractor::CachedCursor *findCachedCursor(int id);
65 ResExtractor::CachedCursor *getCachedCursorSlot();
66
67 CachedCursor _cursorCache[MAX_CACHED_CURSORS];
68};
69
71public:
73 ~Win32ResExtractor() override;
74
75private:
77
78 bool extractResource(int id, CachedCursor *cc) override;
79};
80
82public:
84 ~MacResExtractor() override {}
85
86private:
87 Common::MacResManager *_resMgr;
88
89 bool extractResource(int id, CachedCursor *cc) override;
90};
91
92} // End of namespace Scumm
93
94#endif
Definition: macresman.h:126
Definition: winexe_pe.h:48
Definition: path.h:52
Definition: resource_he.h:81
Definition: resource_he.h:35
Definition: intern_he.h:154
Definition: resource_he.h:70
Definition: algorithm.h:29
Definition: actor.h:30
Definition: resource_he.h:43