ScummVM API documentation
actor_he.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 
23 #ifndef SCUMM_ACTOR_HE_H
24 #define SCUMM_ACTOR_HE_H
25 
26 #include "scumm/actor.h"
27 
28 namespace Scumm {
29 
30 #define ACTOR_GENERAL_FLAG_IGNORE_ERASE 0x00000001
31 
32 #define HE100_CHORE_REDIRECT_INIT 1024
33 #define HE100_CHORE_REDIRECT_WALK 1025
34 #define HE100_CHORE_REDIRECT_STAND 1026
35 #define HE100_CHORE_REDIRECT_START_TALK 1027
36 #define HE100_CHORE_REDIRECT_STOP_TALK 1028
37 
38  struct HEEraseAuxEntry {
39  int actor;
40  int32 x1, y1, x2, y2;
41 };
42 
44  int actor;
45  int auxIndex;
46 };
47 
48 struct HEAnimAuxData {
49  HEAnimAuxData() : auxDefaultSearchBlock(nullptr), externalDataPtr(nullptr), auxDataBlock(nullptr), actor(0) {}
50  byte *auxDefaultSearchBlock;
51  byte *externalDataPtr;
52  const byte *auxDataBlock;
53  int actor;
54 };
55 
57  int globFileOffset;
58  Common::File fileHandle;
59  int globType;
60  int globNum;
61  int roomNum;
62 };
63 
64 class ActorHE : public Actor {
65 public:
66  ActorHE(ScummEngine *scumm, int id);
67 
68  void initActor(int mode) override;
69 
70  void hideActor() override;
71 
72  void drawActorToBackBuf(int x, int y);
73 
74  void setActorEraseType(int eraseValue);
75 
76  void setCondition(int slot, int set);
77  bool isConditionSet(int slot) const;
78 
79  void setUserCondition(int slot, int set);
80  bool isUserConditionSet(int slot) const;
81 
82  void setTalkCondition(int slot);
83  bool isTalkConditionSet(int slot) const;
84 
85  void clearActorUpdateInfo();
86  void setActorUpdateArea(int x1, int y1, int x2, int y2);
87 
88 public:
91 
92  bool _heNoTalkAnimation = false;
93  bool _heTalking = false;
94  byte _generalFlags = 0;
95 
96  int _auxActor = 0;
97  int32 _auxEraseX1 = 0, _auxEraseY1 = 0, _auxEraseX2 = 0, _auxEraseY2 = 0;
98 
99  // 80 is the maximum number of strips that any hi-res HE game is going to have
100  int _screenUpdateTableMin[80] = {};
101  int _screenUpdateTableMax[80] = {};
102 
103  struct {
104  int16 posX;
105  int16 posY;
106  int16 color;
107  byte sentence[128];
108  } _heTalkQueue[16] = {};
109 
110 
111  void prepareDrawActorCostume(BaseCostumeRenderer *bcr) override;
112  void setActorCostume(int c) override;
113 };
114 
115 } // End of namespace Scumm
116 
117 #endif
Definition: actor_he.h:38
Definition: rect.h:144
Common::Rect _clipOverride
Definition: actor_he.h:90
Definition: scumm.h:519
Definition: actor_he.h:48
Definition: actor_he.h:64
Definition: file.h:47
Definition: actor_he.h:56
Definition: actor_he.h:43
Definition: actor.h:97
Definition: base-costume.h:68
Definition: actor.h:30