26 #include "common/scummsys.h" 27 #include "common/serializer.h" 28 #include "scumm/scumm.h" 64 uint16 heJumpOffsetTable[16];
65 uint16 heJumpCountTable[16];
66 uint32 heCondMaskTable[16];
73 memset(animType, 0,
sizeof(animType));
74 memset(curpos, 0xFF,
sizeof(curpos));
75 memset(start, 0xFF,
sizeof(start));
76 memset(end, 0xFF,
sizeof(end));
77 memset(frame, 0xFF,
sizeof(frame));
93 static byte kInvalidBox;
114 byte _scalex, _scaley;
119 uint16 _lastValidX, _lastValidY;
124 byte _talkStartFrame;
127 bool _needRedraw, _needBgReset, _visible;
132 int16 _talkPosX, _talkPosY;
133 uint16 _talkScript, _walkScript;
141 int _heOffsX, _heOffsY;
144 uint32 _hePaletteNum;
159 int32 deltaXFactor, deltaYFactor;
171 point3.
x = point3.
y = 0;
183 uint16 _palette[256];
186 uint16 _targetFacing;
187 uint _speedx, _speedy;
188 byte _animProgress, _animSpeed;
189 bool _costumeNeedsInit;
191 int16 _animVariable[27];
199 virtual void hideActor();
202 virtual void initActor(
int mode);
205 putActor(_pos.
x, _pos.
y, _room);
208 void putActor(
int room) {
209 putActor(_pos.
x, _pos.
y, room);
212 void putActor(
int x,
int y) {
213 putActor(x, y, _room);
216 void putActor(
int x,
int y,
int room);
217 void setActorWalkSpeed(uint newSpeedX, uint newSpeedY);
221 int remapDirection(
int dir,
bool is_walking);
222 virtual void setupActorScale();
224 void setBox(
int box);
225 int updateActorDirection(
bool is_walking);
228 void adjustActorPos();
231 virtual void setDirection(
int direction);
232 void faceToObject(
int obj);
233 virtual void turnToDirection(
int newdir);
234 virtual void walkActor();
235 void drawActorCostume(
bool hitTestMode =
false);
237 virtual void animateCostume();
238 virtual void setActorCostume(
int c);
240 void animateLimb(
int limb,
int f);
242 bool actorHitTest(
int x,
int y);
244 const byte *getActorName();
245 void startWalkActor(
int x,
int y,
int dir);
246 void stopActorMoving();
248 void startWalkAnim(
int cmd,
int angle);
250 void runActorTalkScript(
int f);
251 virtual void startAnimActor(
int frame);
253 void remapActorPalette(
int r_fact,
int g_fact,
int b_fact,
int threshold);
254 void remapActorPaletteColor(
int slot,
int color);
256 void animateActor(
int anim);
258 bool isInCurrentRoom()
const {
259 return _room == _vm->_currentRoom;
265 p.
x *= V12_X_MULTIPLIER;
266 p.
y *= V12_Y_MULTIPLIER;
275 int getRoom()
const {
279 int getFacing()
const {
283 void setFacing(
int newFacing) {
287 int getAnimVar(byte var)
const;
288 void setAnimVar(byte var,
int value);
290 void setAnimSpeed(byte newAnimSpeed) {
291 _animSpeed = newAnimSpeed;
295 int getAnimSpeed()
const {
299 int getAnimProgress()
const {
300 return _animProgress;
303 int getElevation()
const {
307 void setElevation(
int newElevation) {
308 if (_elevation != newElevation) {
309 _elevation = newElevation;
314 void setPalette(
int idx,
int val) {
319 void setScale(
int sx,
int sy) {
327 void classChanged(
int cls,
bool value);
332 bool isInClass(
int cls);
334 virtual bool isPlayer();
336 bool findPathTowards(byte box, byte box2, byte box3,
Common::Point &foundPath);
343 void initActor(
int mode)
override;
344 void walkActor()
override;
352 void setupActorScale()
override;
356 uint _stepX, _stepThreshold;
357 const int _facingXYratio;
364 void initActor(
int mode)
override;
365 void walkActor()
override;
369 bool isPlayer()
override;
377 void initActor(
int mode)
override;
378 void walkActor()
override;
379 void turnToDirection(
int newdir)
override;
380 void startAnimActor(
int frame)
override;
383 int updateActorDirection();
386 enum ActorV0MiscFlags {
387 kActorMiscFlagStrong = 0x01,
388 kActorMiscFlagGTFriend = 0x02,
389 kActorMiscFlagWatchedTV = 0x04,
390 kActorMiscFlagEdsEnemy = 0x08,
391 kActorMiscFlag_10 = 0x10,
392 kActorMiscFlag_20 = 0x20,
393 kActorMiscFlagFreeze = 0x40,
394 kActorMiscFlagHide = 0x80
403 byte _walkboxQueue[0x10];
404 byte _walkboxQueueIndex;
406 byte _costCommandNew;
411 byte _walkCountModulo;
412 bool _newWalkBoxEntered;
417 byte _walkYCountGreaterThanXCount;
423 byte _walkMaxXYCountInc;
428 bool _tmp_NewWalkBoxEntered;
430 int8 _animFrameRepeat;
431 int8 _limbFrameRepeatNew[8];
432 int8 _limbFrameRepeat[8];
434 bool _limb_flipped[8];
438 bool walkBoxQueueAdd(
int box);
439 bool walkBoxQueueFind(
int box);
440 void walkboxQueueReverse();
445 void initActor(
int mode)
override;
446 void animateActor(
int anim);
447 void animateCostume()
override;
449 void limbFrameCheck(
int limb);
451 void directionUpdate();
453 void setDirection(
int direction)
override;
454 void startAnimActor(
int f)
override;
456 bool calcWalkDistances();
457 void walkActor()
override;
458 void actorSetWalkTo();
459 byte actorWalkXCalculate();
460 byte actorWalkYCalculate();
461 byte updateWalkbox();
463 void walkBoxQueueReset();
464 bool walkBoxQueuePrepare();
469 void setActorToTempPosition();
470 void setActorToOriginalPosition();
Common::Point _pos
Definition: actor.h:99
Definition: serializer.h:79
byte version
Definition: detection.h:225
Definition: serializer.h:308
int16 x
Definition: rect.h:46
Definition: base-costume.h:68
int16 y
Definition: rect.h:47