ScummVM API documentation
inventory.h
1
2/* ScummVM - Graphic Adventure Engine
3 *
4 * ScummVM is the legal property of its developers, whose names
5 * are too numerous to list here. Please refer to the COPYRIGHT
6 * file distributed with this source distribution.
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23#ifndef M4_RIDDLE_INVENTORY_H
24#define M4_RIDDLE_INVENTORY_H
25
26#include "common/array.h"
27#include "m4/m4_types.h"
28#include "m4/adv_r/adv_inv.h"
29
30namespace M4 {
31namespace Riddle {
32
33#define INVENTORY_COUNT 123
34
36 const char *_asset = nullptr;
37 const char *_name = nullptr;
38 int _scene = 0;
39
40 InventoryItem() {}
41 InventoryItem(const char *name, int scene) : _asset(name), _name(name), _scene(scene) {}
42};
43
44struct Inventory : public InventoryBase {
45public:
47public:
48 void init();
49
50 void add(const Common::String &name, const Common::String &verbs, int32 sprite, int32 cursor) override;
51 void set_scroll(int32 scroll) override;
52 void remove(const Common::String &name) override;
53
54 static const char *get_name(int32 id);
55 void reset();
56};
57
58} // namespace Riddle
59} // namespace M4
60
61#endif
Definition: str.h:59
Definition: database.h:28
Definition: adv_inv.h:37
Definition: inventory.h:44
Definition: inventory.h:35