ScummVM API documentation
costumeemi.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 GRIM_COSTUMEEMI_H
23 #define GRIM_COSTUMEEMI_H
24 
25 #include "common/stream.h"
26 
27 #include "engines/grim/object.h"
28 #include "engines/grim/costume.h"
29 #include "engines/grim/emi/costume/emichore.h"
30 
31 namespace Grim {
32 
33 typedef uint32 tag32;
34 
35 class EMISkelComponent;
36 class EMIMeshComponent;
37 class Material;
38 class EMIModel;
39 
40 class EMICostume : public Costume {
41 public:
42  EMICostume(const Common::String &filename, Actor *owner, Costume *prevCost);
43 
44  void load(Common::SeekableReadStream *data) override;
45 
46  void draw() override;
47  int update(uint time) override;
48 
49  void playChore(int num, uint msecs = 0) override;
50  void playChoreLooping(int num, uint msecs = 0) override;
51 
52  void saveState(SaveGame *state) const override;
53  bool restoreState(SaveGame *state) override;
54 
55  Material *loadMaterial(const Common::String &name, bool clamp);
56  Material *findMaterial(const Common::String &name);
57 
58  void setHead(const char *joint, const Math::Vector3d &offset);
59  void setHeadLimits(float yawRange, float maxPitch, float minPitch);
60 
61  EMIModel *getEMIModel() const;
62  EMIModel *getEMIModel(int num) const;
63 public:
64  EMIChore *_wearChore;
65  EMISkelComponent *_emiSkel;
66 private:
68  static bool compareChores(const Chore *c1, const Chore *c2);
69  Component *loadEMIComponent(Component *parent, int parentID, const char *name, Component *prevComponent);
70  void setWearChore(EMIChore *chore);
71 
72  friend class Chore;
73 };
74 
75 } // end of namespace Grim
76 
77 #endif
Definition: emiskel_component.h:33
Definition: str.h:59
Definition: modelemi.h:82
Definition: list.h:44
Definition: savegame.h:33
Definition: stream.h:745
Definition: actor.h:33
Definition: material.h:63
Definition: costumeemi.h:40
Definition: component.h:38
Actor represents a 3D character on screen.
Definition: actor.h:72
Definition: chore.h:45
Definition: costume.h:45
Definition: emichore.h:32