25 #ifndef PEGASUS_ITEMS_ITEM_H 26 #define PEGASUS_ITEMS_ITEM_H 28 #include "common/endian.h" 30 #include "pegasus/types.h" 31 #include "pegasus/util.h" 37 class SeekableReadStream;
45 TimeValue infoLeftTime;
46 TimeValue infoRightStart;
47 TimeValue infoRightStop;
48 uint32 dragSpriteNormalID;
49 uint32 dragSpriteUsedID;
68 static const short kLeftAreaExtra = 0;
69 static const short kMiddleAreaExtra = 1;
70 static const short kRightAreaExtra = 2;
88 static const uint32 kItemInfoResType =
MKTAG(
'I',
't',
'e',
'm');
89 static const uint32 kLeftAreaInfoResType =
MKTAG(
'L',
'e',
'f',
't');
90 static const uint32 kMiddleAreaInfoResType =
MKTAG(
'M',
'i',
'd',
'l');
91 static const uint32 kRightAreaInfoResType =
MKTAG(
'R',
'g',
'h',
't');
92 static const uint32 kItemExtraInfoResType =
MKTAG(
'I',
'X',
't',
'r');
94 static const uint16 kItemBaseResID = 128;
98 static const ItemID kAirMask = 7;
99 static const ItemID kAntidote = 8;
100 static const ItemID kArgonCanister = 9;
101 static const ItemID kCardBomb = 10;
102 static const ItemID kCrowbar = 11;
103 static const ItemID kGasCanister = 12;
104 static const ItemID kHistoricalLog = 13;
105 static const ItemID kJourneymanKey = 14;
106 static const ItemID kKeyCard = 15;
107 static const ItemID kMachineGun = 16;
108 static const ItemID kMarsCard = 17;
109 static const ItemID kNitrogenCanister = 18;
110 static const ItemID kOrangeJuiceGlassFull = 19;
111 static const ItemID kOrangeJuiceGlassEmpty = 20;
112 static const ItemID kPoisonDart = 21;
113 static const ItemID kSinclairKey = 22;
114 static const ItemID kStunGun = 23;
115 static const ItemID kArgonPickup = 24;
119 static const ItemID kAIBiochip = 0;
120 static const ItemID kArthurBiochip = 1;
121 static const ItemID kInterfaceBiochip = 1;
122 static const ItemID kMapBiochip = 2;
123 static const ItemID kOpticalBiochip = 3;
124 static const ItemID kPegasusBiochip = 4;
125 static const ItemID kRetinalScanBiochip = 5;
126 static const ItemID kShieldBiochip = 6;
128 static const ItemID kNumItems = 25;
132 static const ItemState kAI000 = 0;
133 static const ItemState kAI005 = 1;
134 static const ItemState kAI006 = 2;
135 static const ItemState kAI010 = 3;
136 static const ItemState kAI015 = 4;
137 static const ItemState kAI016 = 5;
138 static const ItemState kAI020 = 6;
139 static const ItemState kAI024 = 7;
140 static const ItemState kAI100 = 8;
141 static const ItemState kAI101 = 9;
142 static const ItemState kAI105 = 10;
143 static const ItemState kAI106 = 11;
144 static const ItemState kAI110 = 12;
145 static const ItemState kAI111 = 13;
146 static const ItemState kAI115 = 14;
147 static const ItemState kAI116 = 15;
148 static const ItemState kAI120 = 16;
149 static const ItemState kAI121 = 17;
150 static const ItemState kAI124 = 18;
151 static const ItemState kAI125 = 19;
152 static const ItemState kAI126 = 20;
153 static const ItemState kAI200 = 21;
154 static const ItemState kAI201 = 22;
155 static const ItemState kAI202 = 23;
156 static const ItemState kAI205 = 24;
157 static const ItemState kAI206 = 25;
158 static const ItemState kAI210 = 26;
159 static const ItemState kAI211 = 27;
160 static const ItemState kAI212 = 28;
161 static const ItemState kAI215 = 29;
162 static const ItemState kAI216 = 30;
163 static const ItemState kAI220 = 31;
164 static const ItemState kAI221 = 32;
165 static const ItemState kAI222 = 33;
166 static const ItemState kAI224 = 34;
167 static const ItemState kAI225 = 35;
168 static const ItemState kAI226 = 36;
169 static const ItemState kAI300 = 37;
170 static const ItemState kAI301 = 38;
171 static const ItemState kAI302 = 39;
172 static const ItemState kAI303 = 40;
173 static const ItemState kAI305 = 41;
174 static const ItemState kAI306 = 42;
175 static const ItemState kAI310 = 43;
176 static const ItemState kAI311 = 44;
177 static const ItemState kAI312 = 45;
178 static const ItemState kAI313 = 46;
179 static const ItemState kAI315 = 47;
180 static const ItemState kAI316 = 48;
181 static const ItemState kAI320 = 49;
182 static const ItemState kAI321 = 50;
183 static const ItemState kAI322 = 51;
184 static const ItemState kAI323 = 52;
185 static const ItemState kAI324 = 53;
186 static const ItemState kAI325 = 54;
187 static const ItemState kAI326 = 55;
188 static const ItemState kNormalItem = 56;
189 static const ItemState kMapUnavailable = 57;
190 static const ItemState kMapEngaged = 58;
191 static const ItemState kOptical000 = 59;
192 static const ItemState kOptical001 = 60;
193 static const ItemState kOptical002 = 61;
194 static const ItemState kOptical010 = 62;
195 static const ItemState kOptical011 = 63;
196 static const ItemState kOptical012 = 64;
197 static const ItemState kOptical020 = 65;
198 static const ItemState kOptical021 = 66;
199 static const ItemState kOptical100 = 67;
200 static const ItemState kOptical101 = 68;
201 static const ItemState kOptical102 = 69;
202 static const ItemState kOptical110 = 70;
203 static const ItemState kOptical111 = 71;
204 static const ItemState kOptical112 = 72;
205 static const ItemState kOptical120 = 73;
206 static const ItemState kOptical121 = 74;
207 static const ItemState kOptical200 = 75;
208 static const ItemState kOptical201 = 76;
209 static const ItemState kOptical210 = 77;
210 static const ItemState kOptical211 = 78;
211 static const ItemState kPegasusTSA00 = 79;
212 static const ItemState kPegasusTSA10 = 80;
213 static const ItemState kPegasusPrehistoric00 = 81;
214 static const ItemState kPegasusPrehistoric01 = 82;
215 static const ItemState kPegasusPrehistoric10 = 83;
216 static const ItemState kPegasusPrehistoric11 = 84;
217 static const ItemState kPegasusMars00 = 85;
218 static const ItemState kPegasusMars01 = 86;
219 static const ItemState kPegasusMars10 = 87;
220 static const ItemState kPegasusMars11 = 88;
221 static const ItemState kPegasusNorad00 = 89;
222 static const ItemState kPegasusNorad01 = 90;
223 static const ItemState kPegasusNorad10 = 91;
224 static const ItemState kPegasusNorad11 = 92;
225 static const ItemState kPegasusWSC00 = 93;
226 static const ItemState kPegasusWSC01 = 94;
227 static const ItemState kPegasusWSC10 = 95;
228 static const ItemState kPegasusWSC11 = 96;
229 static const ItemState kPegasusCaldoria = 97;
230 static const ItemState kRetinalSimulating = 98;
231 static const ItemState kShieldNormal = 99;
232 static const ItemState kShieldRadiation = 100;
233 static const ItemState kShieldPlasma = 101;
234 static const ItemState kShieldCardBomb = 102;
235 static const ItemState kShieldDraining = 103;
236 static const ItemState kAirMaskEmptyOff = 104;
237 static const ItemState kAirMaskEmptyFilter = 105;
238 static const ItemState kAirMaskLowOff = 106;
239 static const ItemState kAirMaskLowFilter = 107;
240 static const ItemState kAirMaskLowOn = 108;
241 static const ItemState kAirMaskFullOff = 109;
242 static const ItemState kAirMaskFullFilter = 110;
243 static const ItemState kAirMaskFullOn = 111;
244 static const ItemState kArgonEmpty = 112;
245 static const ItemState kArgonFull = 113;
246 static const ItemState kFlashlightOff = 114;
247 static const ItemState kFlashlightOn = 115;
248 static const ItemState kNitrogenEmpty = 116;
249 static const ItemState kNitrogenFull = 117;
250 static const ItemState kFullGlass = 118;
251 static const ItemState kArthur000 = 119;
252 static const ItemState kArthur002 = 120;
253 static const ItemState kArthur010 = 121;
254 static const ItemState kArthur012 = 122;
255 static const ItemState kArthur100 = 123;
256 static const ItemState kArthur102 = 124;
257 static const ItemState kArthur110 = 125;
258 static const ItemState kArthur112 = 126;
262 static const uint32 kRetinalScanSearching = 0;
263 static const uint32 kRetinalScanActivated = 1;
264 static const uint32 kShieldIntro = 2;
265 static const uint32 kRemoveAirMask = 3;
266 static const uint32 kRemoveArgon = 4;
267 static const uint32 kRemoveCrowbar = 5;
268 static const uint32 kGasCanLoop = 6;
269 static const uint32 kRemoveJourneymanKey = 7;
270 static const uint32 kRemoveMarsCard = 8;
271 static const uint32 kRemoveNitrogen = 9;
272 static const uint32 kRemoveGlass = 10;
273 static const uint32 kRemoveDart = 11;
274 static const uint32 kRemoveSinclairKey = 12;
296 Item(
const ItemID
id,
const NeighborhoodID neighborhood,
const RoomID room,
const DirectionConstant direction);
304 virtual ActorID getItemOwner()
const;
305 virtual void setItemOwner(
const ActorID owner);
307 void getItemRoom(NeighborhoodID &neighborhood, RoomID &room, DirectionConstant &direction)
const;
308 void setItemRoom(
const NeighborhoodID neighborhood,
const RoomID room,
const DirectionConstant direction);
309 NeighborhoodID getItemNeighborhood()
const;
311 virtual WeightType getItemWeight();
313 virtual void setItemState(
const ItemState state);
314 virtual ItemState getItemState()
const;
316 virtual ItemType getItemType() = 0;
318 TimeValue getInfoLeftTime()
const;
319 void getInfoRightTimes(TimeValue &, TimeValue &)
const;
320 TimeValue getSharedAreaTime()
const;
322 Sprite *getDragSprite(
const DisplayElementID)
const;
332 virtual void select();
333 virtual void deselect();
334 virtual bool isSelected() {
return _isSelected; }
336 virtual void activate() { _isActive =
true; }
337 virtual bool isActive() {
return _isActive; }
338 virtual void pickedUp() {}
339 virtual void addedToInventory() {}
340 virtual void removedFromInventory() {}
341 virtual void dropped() {}
345 virtual void giveUpSharedArea() {}
346 virtual void takeSharedArea() {}
354 NeighborhoodID _itemNeighborhood;
356 DirectionConstant _itemDirection;
357 ActorID _itemOwnerID;
358 WeightType _itemWeight;
359 ItemState _itemState;
361 NeighborhoodID _originalNeighborhood;
362 RoomID _originalRoom;
363 DirectionConstant _originalDirection;
371 static void getItemStateEntry(
ItemStateInfo, uint32, ItemState &, TimeValue &);
372 static void findItemStateEntryByState(
ItemStateInfo, ItemState, TimeValue &);
Definition: elements.h:168
Definition: algorithm.h:29
#define MKTAG(a0, a1, a2, a3)
Definition: endian.h:188
Definition: ai_action.h:33