22 #ifndef MACS2_GAMEOBJECTS_H 23 #define MACS2_GAMEOBJECTS_H 25 #include "common/array.h" 26 #include "common/rect.h" 27 #include "common/singleton.h" 30 class MemoryReadStream;
31 class MemoryReadStreamEndian;
32 class SeekableReadStream;
49 int _currentSceneIndex;
56 int _currentActorIndex;
77 uint16 readNumAnimations();
79 void seekToAnimation(uint16 index);
83 void skipCurrentAnimationFrame();
86 enum ObjectOrientation : uint16 {
89 OrientationNorthEast = 2,
91 OrientationSouthEast = 4,
93 OrientationSouthWest = 6,
95 OrientationNorthWest = 8,
96 OrientationStandingNorth = 9,
97 OrientationStandingNorthEast = 10,
98 OrientationStandingEast = 11,
99 OrientationStandingSouthEast = 12,
100 OrientationStandingSouth = 13,
101 OrientationStandingSouthWest = 14,
102 OrientationStandingWest = 15,
103 OrientationStandingNorthWest = 16,
104 OrientationPickup = 17
111 uint32 _dataOffset = 0;
114 uint16 _overloadAnimationSourceKey = 0;
115 bool _overloadAnimationMirrored =
false;
116 bool _useOverloadAnimation =
false;
120 uint16 _overloadAnimTriggerDirection = 0x7FFF;
123 uint16 _specialAnimTriggers[5] = {0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF};
127 uint16 _sceneIndex = 0;
131 ObjectOrientation _orientation = OrientationNone;
136 uint16 _verticalOffsetScale = 0;
138 uint16 _objectAdjust1 = 0;
139 uint16 _objectAdjust2 = 0;
141 uint16 _pickupFrameStart = 0;
143 uint16 _pickupFrameEnd = 0;
145 bool _snapToTarget =
false;
148 bool _hasShading =
false;
151 bool _hasScaling =
false;
153 bool _hasDoubleResAnim =
false;
158 bool _hasBoundsAttachment =
false;
159 uint16 _boundsAttachmentObjectID = 0;
160 uint16 _boundsAttachmentValue1 = 0;
161 uint16 _boundsAttachmentValue2 = 0;
162 uint16 _boundsAttachmentValue3 = 0;
165 int16 _dirtyLeft = 0;
167 int16 _dirtyRight = 0;
168 int16 _dirtyBottom = 0;
169 int16 _lastDrawX = 0;
170 int16 _lastDrawY = 0;
171 uint16 _lastDrawWidth = 0;
172 uint16 _lastDrawHeight = 0;
174 void resetDrawBounds() {
202 uint32 _resourceOffsets[32] = {0};
208 bool stepDirectionSet =
false;
211 int16 stepDeltaX = 0;
212 int16 stepDeltaY = 0;
214 int16 currentPathIndex = 0;
216 uint16 motionTargetVerticalOffset = 0;
217 uint16 motionVerticalOffsetDelta = 0;
218 uint16 motionDistanceUnits = 0;
219 uint16 motionProgress = 0;
231 bool isAnimSlotLoaded(uint16 orient)
const;
239 static bool isNpcIndex(uint16 objectIndex);
243 static GameObject *getObjectByIndex(uint16 index);
250 #endif // MACS2_GAMEOBJECTS_H Definition: gameobjects.h:107
Definition: gameobjects.h:70
Definition: gameobjects.h:37
Definition: memstream.h:103
Definition: gameobjects.h:206
Definition: gameobjects.h:44
Definition: algorithm.h:29
Definition: memstream.h:43
Definition: actionbar.h:31
Definition: gameobjects.h:234
Definition: singleton.h:42