22 #ifndef PARALLACTION_ZONE_H 23 #define PARALLACTION_ZONE_H 25 #include "common/list.h" 26 #include "common/ptr.h" 28 #include "parallaction/graphics.h" 80 kFlagsNoMasked = 0x80,
81 kFlagsLooping = 0x100,
83 kFlagsCharacter = 0x400,
87 kFlagsYourself = 0x1000,
88 kFlagsScaled = 0x2000,
89 kFlagsSelfuse = 0x4000,
90 kFlagsIsAnimation = 0x1000000,
91 kFlagsAnimLinked = 0x2000000
95 enum CommandFlags : uint {
96 kFlagsAll = 0xFFFFFFFFU,
99 kFlagsExit = 0x10000000,
100 kFlagsEnter = 0x20000000,
101 kFlagsGlobal = 0x40000000,
142 #define NUM_QUESTIONS 40 143 #define NUM_ANSWERS 20 150 CommandList _commands;
155 bool _hasCounterCondition;
169 Answer* _answers[NUM_ANSWERS];
175 int balloonWinding();
179 Question *_questions[NUM_QUESTIONS];
189 #define MAX_WALKPOINT_LISTS 20 190 #define FREE_HEAR_CHANNEL -1 191 #define MUSIC_HEAR_CHANNEL -2 210 uint16 _doorStartFrame;
212 uint16 _doorStartFrame2_br;
225 PointList _pathLists[MAX_WALKPOINT_LISTS];
232 _doorStartPos.
x = -1000;
233 _doorStartPos.
y = -1000;
234 _doorStartFrame2_br = 0;
235 _doorStartPos2_br.
x = -1000;
236 _doorStartPos2_br.
y = -1000;
237 _hearChannel = FREE_HEAR_CHANNEL;
249 delete _speakDialogue;
253 #define ACTIONTYPE(z) ((z)->_type & 0xFFFF) 254 #define ITEMTYPE(z) ((z)->_type & 0xFFFF0000) 256 #define PACK_ZONETYPE(zt,it) (((zt) & 0xFFFF) | (((it) & 0xFFFF) << 16)) 258 #define ZONENAME_LENGTH 32 260 #define INVALID_LOCATION_INDEX ((uint32)-1) 261 #define INVALID_ZONE_INDEX ((uint32)-1) 273 char _name[ZONENAME_LENGTH];
280 CommandList _commands;
287 AnimationPtr _linkedAnim;
292 void translate(int16 x, int16 y);
294 bool hitRect(
int x,
int y)
const;
296 void setRect(int16 left, int16 top, int16 right, int16 bottom) {
305 r.top = _top; r.bottom = _bottom;
310 virtual int16 getX() {
return _left; }
311 virtual void setX(int16 value) { _left = value; }
313 virtual int16 getY() {
return _top; }
314 virtual void setY(int16 value) { _top = value; }
332 void setRange(int16 min, int16 max);
334 int16 getValue()
const;
335 void setValue(int16 value);
353 typedef Accessor::FuncType AccessorFunc;
354 typedef Mutator::FuncType MutatorFunc;
362 _accessor =
new Accessor(instance, accessor);
363 _mutator =
new Mutator(instance, mutator);
367 _accessor =
new Accessor(instance, accessor);
376 int16 getValue()
const {
378 return (*_accessor)();
381 void setValue(int16 value) {
399 void setValue(int16 value);
402 void setField(
Animation *anim, AnimationField::AccessorFunc accessor, AnimationField::MutatorFunc mutator);
403 void setField(
Animation *anim, AnimationField::AccessorFunc accessor);
404 void setImmediate(int16 value);
405 void setRandom(int16 seed);
408 enum InstructionFlags {
452 InstructionList _instructions;
459 int16 findLocal(
const char* name);
460 int16 addLocal(
const char *name, int16 value = 0, int16 min = -10000, int16 max = 10000);
477 uint16 getFrameNum()
const;
478 byte* getFrameData()
const;
481 bool hitFrameRect(
int x,
int y)
const;
483 int16 getBottom()
const;
490 void forceXYZF(int16 x, int16 y, int16 z, int16 f);
493 int16 getX()
override {
return _left; }
494 void setX(int16 value)
override { _left = value; }
496 int16 getY()
override {
return _top; }
497 void setY(int16 value)
override { _top = value; }
499 int16 getZ() {
return _z; }
500 void setZ(int16 value) { _z = value; }
502 int16 getF() {
return _frame; }
503 void setF(int16 value);
519 Table(uint32 size,
const char** data);
527 uint count()
const {
return _used; }
528 const char *item(uint index)
const;
530 virtual void addData(
const char* s);
531 virtual void clear();
532 virtual uint16 lookup(
const char* s);
541 void clear()
override;
Definition: objects.h:388
Definition: objects.h:349
Definition: objects.h:145
Definition: objects.h:193
int16 right
Definition: rect.h:146
Definition: objects.h:107
Definition: objects.h:318
Definition: objects.h:466
Definition: objects.h:443
Definition: objects.h:535
int16 left
Definition: rect.h:145
Definition: objects.h:165
int16 x
Definition: rect.h:46
int16 y
Definition: rect.h:47
Definition: objects.h:178
Definition: objects.h:263
Definition: objects.h:415
Definition: graphics.h:300
Definition: objects.h:509