ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

costumeemi.h

Go to the documentation of this file.
00001 /* ResidualVM - A 3D game interpreter
00002  *
00003  * ResidualVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the COPYRIGHT
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #ifndef GRIM_COSTUMEEMI_H
00024 #define GRIM_COSTUMEEMI_H
00025 
00026 #include "common/stream.h"
00027 
00028 #include "engines/grim/object.h"
00029 #include "engines/grim/costume.h"
00030 #include "engines/grim/emi/costume/emichore.h"
00031 
00032 namespace Grim {
00033 
00034 typedef uint32 tag32;
00035 
00036 class EMISkelComponent;
00037 class EMIMeshComponent;
00038 class Material;
00039 class EMIModel;
00040 
00041 class EMICostume : public Costume {
00042 public:
00043     EMICostume(const Common::String &filename, Actor *owner, Costume *prevCost);
00044 
00045     void load(Common::SeekableReadStream *data) override;
00046 
00047     void draw() override;
00048     int update(uint time) override;
00049 
00050     void playChore(int num, uint msecs = 0) override;
00051     void playChoreLooping(int num, uint msecs = 0) override;
00052 
00053     void saveState(SaveGame *state) const override;
00054     bool restoreState(SaveGame *state) override;
00055 
00056     Material *loadMaterial(const Common::String &name, bool clamp);
00057     Material *findMaterial(const Common::String &name);
00058 
00059     void setHead(const char *joint, const Math::Vector3d &offset);
00060     void setHeadLimits(float yawRange, float maxPitch, float minPitch);
00061 
00062     EMIModel *getEMIModel() const;
00063     EMIModel *getEMIModel(int num) const;
00064 public:
00065     EMIChore *_wearChore;
00066     EMISkelComponent *_emiSkel;
00067 private:
00068     Common::List<ObjectPtr<Material> > _materials;
00069     static bool compareChores(const Chore *c1, const Chore *c2);
00070     Component *loadEMIComponent(Component *parent, int parentID, const char *name, Component *prevComponent);
00071     void setWearChore(EMIChore *chore);
00072 
00073     friend class Chore;
00074 };
00075 
00076 } // end of namespace Grim
00077 
00078 #endif


Generated on Sat Mar 16 2019 05:01:23 for ResidualVM by doxygen 1.7.1
curved edge   curved edge