ScummVM API documentation
inventoryitem.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  * Additional copyright for this file:
8  * Copyright (C) 1995-1997 Presto Studios, Inc.
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  *
23  */
24 
25 #ifndef PEGASUS_ITEMS_INVENTORY_INVENTORYITEM_H
26 #define PEGASUS_ITEMS_INVENTORY_INVENTORYITEM_H
27 
28 #include "pegasus/items/item.h"
29 
30 namespace Pegasus {
31 
32 // JMPInventoryInfo contains the resource data used by InventoryItems.
33 
35  TimeValue panelStart;
36  TimeValue panelStop;
37 };
38 
39 class InventoryItem : public Item {
40 public:
41  InventoryItem(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant);
42  ~InventoryItem() override;
43 
44  ItemType getItemType() override;
45 
46  void getPanelTimes(TimeValue &, TimeValue &) const;
47  TimeValue getLeftAreaTime() const;
48 
49  void setAnimationTime(const TimeValue);
50  TimeValue getAnimationTime() const;
51 
52  virtual void toggleItemState() {}
53 
54  // Must affect images in left area.
55  void select() override;
56  void deselect() override;
57 
58 protected:
59  JMPInventoryInfo _inventoryInfo;
60  ItemStateInfo _leftAreaInfo;
61  TimeValue _itemAnimationTime;
62 };
63 
64 } // End of namespace Pegasus
65 
66 #endif
Definition: item.h:294
Definition: inventoryitem.h:34
Definition: item.h:61
Definition: ai_action.h:33
Definition: inventoryitem.h:39