ScummVM API documentation
bankman.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 QUEEN_BANKMAN_H
23#define QUEEN_BANKMAN_H
24
25#include "common/util.h"
26#include "queen/structs.h"
27
28namespace Queen {
29
30class Resource;
31
33public:
34
37
39 void load(const char *bankname, uint32 bankslot);
40
42 void unpack(uint32 srcframe, uint32 dstframe, uint32 bankslot);
43
45 void overpack(uint32 srcframe, uint32 dstframe, uint32 bankslot);
46
48 void close(uint32 bankslot);
49
51 BobFrame *fetchFrame(uint32 index);
52
54 void eraseFrame(uint32 index);
55
57 void eraseFrames(bool joe);
58
59 enum {
60 MAX_BANK_SIZE = 110,
61 MAX_FRAMES_NUMBER = 256,
62 MAX_BANKS_NUMBER = 18
63 };
64
65private:
66
67 struct PackedBank {
68 uint32 indexes[MAX_BANK_SIZE];
69 uint8 *data;
70 char name[20];
71 };
72
74 BobFrame _frames[MAX_FRAMES_NUMBER];
75
77 PackedBank _banks[MAX_BANKS_NUMBER];
78
79 Resource *_res;
80};
81
82} // End of namespace Queen
83
84#endif
Definition: bankman.h:32
void eraseFrames(bool joe)
erase all unpacked frames
void overpack(uint32 srcframe, uint32 dstframe, uint32 bankslot)
unpack a frame over an existing one from a loaded bank
void load(const char *bankname, uint32 bankslot)
load a bank into the specified slot
BobFrame * fetchFrame(uint32 index)
get a reference to unpacked frame
void eraseFrame(uint32 index)
erase a frame
void close(uint32 bankslot)
close a bank
void unpack(uint32 srcframe, uint32 dstframe, uint32 bankslot)
unpack a frame from a loaded bank
Definition: resource.h:41
Definition: bankman.h:28
Definition: structs.h:575