ScummVM API documentation
scalpel_people.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef SHERLOCK_SCALPEL_PEOPLE_H
23 #define SHERLOCK_SCALPEL_PEOPLE_H
24 
25 #include "common/scummsys.h"
26 #include "sherlock/people.h"
27 
28 namespace Sherlock {
29 
30 class SherlockEngine;
31 
32 namespace Scalpel {
33 
34 // Animation sequence identifiers for characters
35 enum ScalpelSequences {
36  WALK_RIGHT = 0, WALK_DOWN = 1, WALK_LEFT = 2, WALK_UP = 3, STOP_LEFT = 4,
37  STOP_DOWN = 5, STOP_RIGHT = 6, STOP_UP = 7, WALK_UPRIGHT = 8,
38  WALK_DOWNRIGHT = 9, WALK_UPLEFT = 10, WALK_DOWNLEFT = 11,
39  STOP_UPRIGHT = 12, STOP_UPLEFT = 13, STOP_DOWNRIGHT = 14,
40  STOP_DOWNLEFT = 15, TALK_RIGHT = 6, TALK_LEFT = 4
41 };
42 
43 class ScalpelPerson : public Person {
44 public:
45  ScalpelPerson() : Person() {}
46  ~ScalpelPerson() override {}
47 
51  virtual void synchronize(Serializer &s);
52 
56  void adjustSprite() override;
57 
61  void gotoStand() override;
62 
67  void setWalking() override;
68 
72  void walkToCoords(const Point32 &destPos, int destDir) override;
73 
77  Common::Point getSourcePoint() const override;
78 };
79 
80 class ScalpelPeople : public People {
81 public:
83  ~ScalpelPeople() override {}
84 
85  ScalpelPerson &operator[](PeopleId id) { return *(ScalpelPerson *)_data[id]; }
86  ScalpelPerson &operator[](int idx) { return *(ScalpelPerson *)_data[idx]; }
87 
91  void setTalking(int speaker);
92 
96  void synchronize(Serializer &s) override;
97 
101  void setTalkSequence(int speaker, int sequenceNum = 1) override;
102 
106  const Common::Point restrictToZone(int zoneId, const Common::Point &destPos) override;
107 
111  bool loadWalk() override;
112 
122  void setListenSequence(int speaker, int sequenceNum = 1) override;
123 };
124 
125 } // End of namespace Scalpel
126 
127 } // End of namespace Sherlock
128 
129 #endif
virtual void synchronize(Serializer &s)
Definition: animation.h:29
Definition: serializer.h:79
void walkToCoords(const Point32 &destPos, int destDir) override
Definition: scalpel_people.h:80
Definition: sherlock.h:76
Definition: rect.h:45
Definition: scalpel_people.h:43
Definition: people.h:58
Definition: objects.h:101
Common::Point getSourcePoint() const override
Definition: people.h:98