1 /* ResidualVM - A 3D game interpreter
2  *
3  * ResidualVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the AUTHORS
5  * file distributed with this source distribution.
6  *
7  * Additional copyright for this file:
8  * Copyright (C) 1999-2000 Revolution Software Ltd.
9  * This code is based on source code created by Revolution Software,
10  * used with permission.
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25  *
26  */
27 
28 #ifndef ICB_PX_BONES_H
29 #define ICB_PX_BONES_H
30 
31 #include "engines/icb/common/px_common.h"
32 
33 namespace ICB {
34 
35 // maximum number of deformations
36 #define MAX_DEFORMABLE_BONES 4
37 
38 // the deformations being used (so standard across tools/engine...
39 #define JAW_DEFORMATION 0
40 #define NECK_DEFORMATION 1
41 #define LOOK_DEFORMATION 2
42 #define SPARE_DEFORMATION 3
43 
44 class BoneDeformation {
45 public:
BoneDeformation()46 	BoneDeformation() {
47 		boneTarget.vx = boneTarget.vy = boneTarget.vz = boneValue.vx = boneValue.vy = boneValue.vz = 0;
48 		boneNumber = -1;
49 	}
50 
51 	int16 boneNumber;
52 	int16 boneSpeed;
53 	SVECTOR boneValue;
54 	SVECTOR boneTarget;
55 
56 	void UpdateBoneValue(int16 &v, int16 t);
57 	void Target0();
58 	void Update();
59 };
60 
61 } // End of namespace ICB
62 
63 #endif // _PX_BONES_H
64