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 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (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, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 24 #ifndef SCUMM_ACTOR_HE_H 25 #define SCUMM_ACTOR_HE_H 26 27 #include "scumm/actor.h" 28 29 namespace Scumm { 30 31 struct AuxBlock { 32 bool visible; 33 Common::Rect r; 34 resetAuxBlock35 void reset() { 36 visible = false; 37 r.left = r.top = 0; 38 r.right = r.bottom = -1; 39 } 40 }; 41 42 struct AuxEntry { 43 int actorNum; 44 int subIndex; 45 }; 46 47 class ActorHE : public Actor { 48 public: ActorHE(ScummEngine * scumm,int id)49 ActorHE(ScummEngine *scumm, int id) : Actor(scumm, id) {} 50 51 virtual void initActor(int mode); 52 53 virtual void hideActor(); 54 55 void drawActorToBackBuf(int x, int y); 56 57 void setHEFlag(int bit, int set); 58 59 void setUserCondition(int slot, int set); 60 bool isUserConditionSet(int slot) const; 61 62 void setTalkCondition(int slot); 63 bool isTalkConditionSet(int slot) const; 64 65 public: 66 /** This rect is used to clip actor drawing. */ 67 Common::Rect _clipOverride; 68 69 bool _heNoTalkAnimation; 70 bool _heTalking; 71 byte _heFlags; 72 73 AuxBlock _auxBlock; 74 75 struct { 76 int16 posX; 77 int16 posY; 78 int16 color; 79 byte sentence[128]; 80 } _heTalkQueue[16]; 81 82 83 virtual void prepareDrawActorCostume(BaseCostumeRenderer *bcr); 84 virtual void setActorCostume(int c); 85 }; 86 87 } // End of namespace Scumm 88 89 #endif 90