ScummVM API documentation
adv_inv.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_ADV_R_ADV_INV_H
24#define M4_ADV_R_ADV_INV_H
25
26#include "common/array.h"
27#include "common/serializer.h"
28
29namespace M4 {
30
31struct InvObj {
32 char *name = nullptr;
33 char *verbs = nullptr;
34 int32 scene = 0, cel = 0, cursor = 0;
35};
36
39 int32 _tail = 0;
40
41 InventoryBase() {}
42 virtual ~InventoryBase();
43
44 void syncGame(Common::Serializer &s);
45
46 virtual void add(const Common::String &name, const Common::String &verb, int32 sprite, int32 cursor) = 0;
47 virtual void set_scroll(int32 scroll) = 0;
48 virtual void remove(const Common::String &name) = 0;
49};
50
54void inv_init(int32 num_objects);
55
65void inv_register_thing(const Common::String &itemName, const Common::String &itemVerbs, int32 scene, int32 cel, int32 cursor);
66
67int32 inv_where_is(const Common::String &itemName);
68bool inv_player_has(const Common::String &itemName);
69bool inv_put_thing_in(const Common::String &itemName, int32 scene);
70int32 inv_get_cursor(const Common::String &itemName);
71int32 inv_get_cel(const Common::String &itemName);
72const char *inv_get_verbs(const Common::String &itemName);
73void inv_give_to_player(const Common::String &itemName);
74void inv_move_object(const Common::String &itemName, int32 scene);
75bool inv_object_is_here(const Common::String &itemName);
76bool inv_object_in_scene(const Common::String &itemName, int32 scene);
77
78void inv_sync_game(Common::Serializer &s);
79
80} // End of namespace M4
81
82#endif
Definition: array.h:52
Definition: serializer.h:80
Definition: str.h:59
Definition: database.h:28
void inv_register_thing(const Common::String &itemName, const Common::String &itemVerbs, int32 scene, int32 cel, int32 cursor)
void inv_init(int32 num_objects)
Definition: adv_inv.h:31
Definition: adv_inv.h:37