22 #ifndef TINSEL_INV_OBJECT_H 23 #define TINSEL_INV_OBJECT_H 25 #include "common/memstream.h" 26 #include "tinsel/tinsel.h" 27 #include "tinsel/dw.h" 32 enum class InvObjAttr {
43 NOTEBOOK_CLUE = 0x200,
45 NOTEBOOK_TITLE = 0x800,
46 V3ATTR_X1000 = 0x1000,
47 V3ATTR_X2000 = 0x2000,
53 int32 getId()
const {
return _id; }
54 SCNHANDLE getIconFilm()
const {
return _hIconFilm; };
55 void setIconFilm(
SCNHANDLE hIconFilm) { _hIconFilm = hIconFilm; }
56 SCNHANDLE getScript()
const {
return _hScript; }
58 bool hasAttribute(InvObjAttr attribute)
const {
59 return getAttribute() & (int32)attribute;
64 return (TinselVersion == 0 ? T0_SIZE : T1_SIZE);
67 static const int T0_SIZE = 3 * 4;
68 static const int T1_SIZE = T0_SIZE + 4;
70 int32 getAttribute()
const {
87 bool isNotebookTitle()
const {
88 return (getAttribute() & (
int)InvObjAttr::NOTEBOOK_TITLE) != 0;
90 int32 getUnknown()
const {
93 int32 getTitle()
const {
98 return InventoryObject::SIZE() + 8;
111 virtual void SetObjectFilm(
int id,
SCNHANDLE hFilm) = 0;
112 virtual int GetObjectIndexIfExists(
int id)
const = 0;
113 virtual int numObjects()
const = 0;
116 InventoryObjects *InstantiateInventoryObjects(
const byte *invObjects,
int numObjects);
120 #endif // TINSEL_INV_OBJECT_H Definition: inv_objects.h:80
uint32 SCNHANDLE
Definition: dw.h:31
Definition: inv_objects.h:105
Definition: memstream.h:103
uint32 readUint32()
Definition: stream.h:883
Definition: inv_objects.h:50