26 #include "common/scummsys.h" 27 #include "common/serializer.h" 28 #include "scumm/scumm.h" 32 #define CHORE_REDIRECT_INIT 56 33 #define CHORE_REDIRECT_WALK 57 34 #define CHORE_REDIRECT_STAND 58 35 #define CHORE_REDIRECT_START_TALK 59 36 #define CHORE_REDIRECT_STOP_TALK 60 70 uint16 heJumpOffsetTable[16];
71 uint16 heJumpCountTable[16];
72 uint32 heCondMaskTable[16];
79 memset(animType, 0,
sizeof(animType));
80 memset(curpos, 0xFF,
sizeof(curpos));
81 memset(start, 0xFF,
sizeof(start));
82 memset(end, 0xFF,
sizeof(end));
83 memset(frame, 0xFF,
sizeof(frame));
99 static byte kInvalidBox;
120 byte _scalex, _scaley;
125 uint16 _lastValidX, _lastValidY;
130 byte _talkStartFrame;
133 bool _needRedraw, _needBgReset, _visible;
138 int16 _talkPosX, _talkPosY;
139 uint16 _talkScript, _walkScript;
147 int _heOffsX, _heOffsY;
150 uint32 _hePaletteNum;
165 int32 deltaXFactor, deltaYFactor;
177 point3.
x = point3.
y = 0;
189 uint16 _palette[256];
192 uint16 _targetFacing;
193 uint _speedx, _speedy;
194 byte _animProgress, _animSpeed;
195 bool _costumeNeedsInit;
197 int16 _animVariable[27];
205 virtual void hideActor();
208 virtual void initActor(
int mode);
211 putActor(_pos.
x, _pos.
y, _room);
214 void putActor(
int room) {
215 putActor(_pos.
x, _pos.
y, room);
218 void putActor(
int x,
int y) {
219 putActor(x, y, _room);
222 void putActor(
int x,
int y,
int room);
223 void setActorWalkSpeed(uint newSpeedX, uint newSpeedY);
226 virtual int actorWalkStep();
227 virtual int remapDirection(
int dir,
bool is_walking);
228 virtual void setupActorScale();
230 void setBox(
int box);
231 int updateActorDirection(
bool is_walking);
234 void adjustActorPos();
237 virtual void setDirection(
int direction);
238 void faceToObject(
int obj);
239 virtual void turnToDirection(
int newdir);
240 virtual void walkActor();
241 void drawActorCostume(
bool hitTestMode =
false);
243 virtual void animateCostume();
244 virtual void setActorCostume(
int c);
246 void animateLimb(
int limb,
int f);
248 bool actorHitTest(
int x,
int y);
250 const byte *getActorName();
251 void startWalkActor(
int x,
int y,
int dir);
252 void stopActorMoving();
254 void startWalkAnim(
int cmd,
int angle);
256 void runActorTalkScript(
int f);
257 virtual void startAnimActor(
int frame);
259 void remapActorPalette(
int r_fact,
int g_fact,
int b_fact,
int threshold);
260 void remapActorPaletteColor(
int slot,
int color);
262 void animateActor(
int anim);
264 bool isInCurrentRoom()
const {
265 return _room == _vm->_currentRoom;
271 p.
x *= V12_X_MULTIPLIER;
272 p.
y *= V12_Y_MULTIPLIER;
281 int getRoom()
const {
285 int getFacing()
const {
289 void setFacing(
int newFacing) {
293 int getAnimVar(byte var)
const;
294 void setAnimVar(byte var,
int value);
296 void setAnimSpeed(byte newAnimSpeed) {
297 _animSpeed = newAnimSpeed;
301 int getAnimSpeed()
const {
305 int getAnimProgress()
const {
306 return _animProgress;
309 int getElevation()
const {
313 void setElevation(
int newElevation) {
314 if (_elevation != newElevation) {
315 _elevation = newElevation;
325 void setPalette(
int idx,
int val) {
330 void setScale(
int sx,
int sy) {
342 void classChanged(
int cls,
bool value);
347 bool isInClass(
int cls);
349 virtual bool isPlayer();
351 bool findPathTowards(byte box, byte box2, byte box3,
Common::Point &foundPath);
358 void initActor(
int mode)
override;
359 void walkActor()
override;
365 void setupActorScale()
override;
369 virtual int actorWalkStep()
override;
371 const int _facingXYratio;
378 void initActor(
int mode)
override;
379 void walkActor()
override;
383 bool isPlayer()
override;
386 int actorWalkStep()
override;
387 int remapDirection(
int dir,
bool is_walking)
override;
394 void initActor(
int mode)
override;
395 void walkActor()
override;
396 void turnToDirection(
int newdir)
override;
397 void startAnimActor(
int frame)
override;
400 int updateActorDirection();
403 enum ActorV0MiscFlags {
404 kActorMiscFlagStrong = 0x01,
405 kActorMiscFlagGTFriend = 0x02,
406 kActorMiscFlagWatchedTV = 0x04,
407 kActorMiscFlagEdsEnemy = 0x08,
408 kActorMiscFlag_10 = 0x10,
409 kActorMiscFlag_20 = 0x20,
410 kActorMiscFlagFreeze = 0x40,
411 kActorMiscFlagHide = 0x80
420 byte _walkboxQueue[0x10];
421 byte _walkboxQueueIndex;
423 byte _costCommandNew;
428 byte _walkCountModulo;
429 bool _newWalkBoxEntered;
434 byte _walkYCountGreaterThanXCount;
440 byte _walkMaxXYCountInc;
445 bool _tmp_NewWalkBoxEntered;
447 int8 _animFrameRepeat;
448 int8 _limbFrameRepeatNew[8];
449 int8 _limbFrameRepeat[8];
451 bool _limb_flipped[8];
455 bool walkBoxQueueAdd(
int box);
456 bool walkBoxQueueFind(
int box);
457 void walkboxQueueReverse();
462 void initActor(
int mode)
override;
463 void animateActor(
int anim);
464 void animateCostume()
override;
466 void limbFrameCheck(
int limb);
468 void directionUpdate();
470 void setDirection(
int direction)
override;
471 void startAnimActor(
int f)
override;
473 bool calcWalkDistances();
474 void walkActor()
override;
475 void actorSetWalkTo();
476 byte actorWalkXCalculate();
477 byte actorWalkYCalculate();
478 byte updateWalkbox();
480 void walkBoxQueueReset();
481 bool walkBoxQueuePrepare();
486 void setActorToTempPosition();
487 void setActorToOriginalPosition();
Common::Point _pos
Definition: actor.h:105
byte heversion
Definition: detection.h:81
Definition: serializer.h:79
byte version
Definition: detection.h:78
Definition: serializer.h:308
int16 x
Definition: rect.h:46
Definition: base-costume.h:68
int16 y
Definition: rect.h:47