ScummVM API documentation
knowledgeset.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 STARK_RESOURCES_KNOWLEDGE_SET_H
23 #define STARK_RESOURCES_KNOWLEDGE_SET_H
24 
25 #include "common/str.h"
26 
27 #include "engines/stark/gfx/renderentry.h"
28 #include "engines/stark/resources/object.h"
29 
30 namespace Stark {
31 
32 namespace Formats {
33 class XRCReadStream;
34 }
35 
36 namespace Resources {
37 
38 class InventoryItem;
39 
43 class KnowledgeSet : public Object {
44 public:
45  static const Type::ResourceType TYPE = Type::kKnowledgeSet;
46 
47  enum SubType {
48  kInventory = 1,
49  kState = 2,
50  kPersons = 3,
51  kLocations = 4,
52  kDiary = 5
53  };
54 
55  KnowledgeSet(Object *parent, byte subType, uint16 index, const Common::String &name);
56  virtual ~KnowledgeSet();
57 
58  // Resource API
59  void saveLoad(ResourceSerializer *serializer) override;
60 
62  void addItem(InventoryItem *item);
63 
65  void removeItem(InventoryItem *item);
66 
68  Gfx::RenderEntryArray getInventoryRenderEntries() const;
69 
71  Visual *getInventoryItemVisual(uint16 itemIndex);
72 
74  int16 getNeighborInventoryItem(int16 selectedItem, bool forward);
75 
76 protected:
77  void printData() override;
78 
79  Common::Array<uint16> _inventoryItemOrder;
80 };
81 
82 } // End of namespace Resources
83 } // End of namespace Stark
84 
85 #endif // STARK_RESOURCES_KNOWLEDGE_SET_H
Definition: knowledgeset.h:43
Definition: str.h:59
Definition: visual.h:29
Definition: array.h:52
Definition: item.h:280
Definition: console.h:27
Definition: object.h:143
Definition: stateprovider.h:51