ScummVM API documentation
art.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 HARVESTER_ART_H
23#define HARVESTER_ART_H
24
25#include "harvester/bitmap.h"
26
27namespace Graphics {
28class Screen;
29}
30
31namespace Harvester {
32
33class ResourceManager;
34
35class Art {
36public:
37 bool load(ResourceManager &resources);
38 bool loadQuickTipsResources(ResourceManager &resources, bool useTextboxPanel);
39 static bool loadPaletteResource(ResourceManager &resources, const Common::String &path, byte *dest);
40 void drawWaitFrame(Graphics::Screen &screen) const;
41
42 const byte *getWaitPalette() const { return _waitPalette; }
43 const Common::Array<AbmFrame> &getWaitFrames() const { return _waitFrames; }
44 const IndexedBitmap &getInventoryBitmap() const { return _inventoryBitmap; }
45 const IndexedBitmap &getLogoBitmap() const { return _logoBitmap; }
46 const IndexedBitmap &getTipsBitmap() const { return _tipsBitmap; }
47 const IndexedBitmap *getQuickTipsTextboxBitmap() const;
48 const Common::Array<IndexedBitmap> &getAmmoIcons() const { return _ammoIcons; }
49 const IndexedBitmap *getTextboxBitmap(uint index) const {
50 return index < _textboxes.size() ? &_textboxes[index] : nullptr;
51 }
52
53private:
54 bool loadPalette(ResourceManager &resources, const Common::String &path, byte *dest) const;
55 bool loadBitmap(ResourceManager &resources, const Common::String &path, IndexedBitmap &bitmap) const;
56 bool loadAnimation(ResourceManager &resources, const Common::String &path, Common::Array<AbmFrame> &frames) const;
57 void blitTransparentAnimationFrame(Graphics::Screen &screen, const Common::Array<AbmFrame> &frames,
58 uint frameIndex, int x, int y) const;
59
60 byte _waitPalette[256 * 3] = { 0 };
61 Common::Array<AbmFrame> _waitFrames;
64 IndexedBitmap _inventoryBitmap;
65 IndexedBitmap _logoBitmap;
66 IndexedBitmap _tipsBitmap;
67};
68
69} // End of namespace Harvester
70
71#endif // HARVESTER_ART_H
Definition: array.h:52
Definition: str.h:59
Definition: screen.h:47
Definition: art.h:35
Definition: resources.h:32
Definition: formatinfo.h:28
Definition: bitmap.h:33
Definition: atari-screen.h:58