26 #ifndef SAGA2_TARGET_H 27 #define SAGA2_TARGET_H 31 struct StandingTileInfo;
33 const int kMaxObjDist = kPlatformWidth * kTileUVSize * 8;
34 const int kMaxTileDist = kPlatformWidth * kTileUVSize * 2;
35 const int kMaxMetaDist = kPlatformWidth * kTileUVSize * 8;
41 kSpecificMetaTileTarget,
42 kMetaTilePropertyTarget,
43 kSpecificObjectTarget,
44 kObjectPropertyTarget,
56 void deleteTarget(Target *t);
60 int32 targetArchiveSize(
const Target *t);
74 int16 *
const distArray;
97 int16 *
const distArray;
119 Actor **
const actorArray;
120 int16 *
const distArray;
142 virtual int32 archiveSize()
const = 0;
147 virtual int16 getType()
const = 0;
150 virtual size_t size()
const = 0;
153 virtual void clone(
void *mem)
const = 0;
156 virtual bool operator == (
const Target &t)
const = 0;
157 bool operator != (
const Target &t)
const {
158 return !operator == (t);
163 void *
operator new (size_t,
void *p) {
167 virtual bool isObjectTarget()
const;
168 virtual bool isActorTarget()
const;
194 int32 archiveSize()
const;
199 int16 getType()
const;
205 void clone(
void *mem)
const;
208 bool operator == (
const Target &t)
const;
213 return _loc == lt._loc;
216 return _loc != lt._loc;
256 int32 archiveSize()
const;
261 int16 getType()
const;
267 void clone(
void *mem)
const;
270 bool operator == (
const Target &t)
const;
280 TilePropertyID _tileProp;
290 int32 archiveSize()
const;
295 int16 getType()
const;
301 void clone(
void *mem)
const;
304 bool operator == (
const Target &t)
const;
315 virtual bool isTarget(
342 int32 archiveSize()
const;
347 int16 getType()
const;
353 void clone(
void *mem)
const;
356 bool operator == (
const Target &t)
const;
366 MetaTilePropertyID _metaProp;
378 int32 archiveSize()
const;
383 int16 getType()
const;
389 void clone(
void *mem)
const;
392 bool operator == (
const Target &t)
const;
417 bool isObjectTarget()
const;
426 virtual bool isTarget(
GameObject *testObj)
const = 0;
431 virtual int16 object(
448 assert(isObject(_obj));
456 int32 archiveSize()
const;
461 int16 getType()
const;
467 void clone(
void *mem)
const;
470 bool operator == (
const Target &t)
const;
488 return GameObject::objectAddress(_obj);
497 ObjectPropertyID _objProp;
507 int32 archiveSize()
const;
512 int16 getType()
const;
518 void clone(
void *mem)
const;
521 bool operator == (
const Target &t)
const;
533 bool isActorTarget()
const;
536 virtual bool isTarget(
Actor *testActor)
const = 0;
560 int32 archiveSize()
const;
565 int16 getType()
const;
571 void clone(
void *mem)
const;
574 bool operator == (
const Target &t)
const;
576 bool isTarget(
Actor *testActor)
const;
597 Actor *getTargetActor()
const {
607 ActorPropertyID _actorProp;
617 int32 archiveSize()
const;
622 int16 getType()
const;
628 void clone(
void *mem)
const;
631 bool operator == (
const Target &t)
const;
633 bool isTarget(
Actor *testActor)
const;
646 typedef uint8 TargetPlaceHolder[kTargetBytes];
Definition: memstream.h:194
Definition: tcoords.h:127
Definition: objects.h:768
Definition: objects.h:118