From 7a0b90b30144f63105f6efd8f0d969862934b046 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Mon, 3 Jan 2011 22:54:45 +0300 Subject: [PATCH] Migrate some definitions from Constants.h --- Source/Constants.h | 8 -------- Source/Skeleton.cpp | 3 +++ Source/Skeleton.h | 2 ++ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Source/Constants.h b/Source/Constants.h index 985e378..2858cdf 100644 --- a/Source/Constants.h +++ b/Source/Constants.h @@ -42,10 +42,6 @@ static const char *editortypenames[] = { "dead1", "dead2", "dead3", "dead4" }; -const int boneconnect = 0; -const int constraint = 1; -const int muscle = 2; - const int head = 0; // DO NOT CONFLICT WITH ZLIB's variable head const int neck = 1; const int leftshoulder = 2; @@ -67,10 +63,6 @@ const int rightknee = 17; const int rightankle = 18; const int rightfoot = 19; -const int max_joints = 50; -const int max_frames = 50; -const int max_muscles = 100; - const int max_dialogues = 20; const int max_dialoguelength = 20; diff --git a/Source/Skeleton.cpp b/Source/Skeleton.cpp index ff19538..8d4247b 100644 --- a/Source/Skeleton.cpp +++ b/Source/Skeleton.cpp @@ -52,6 +52,8 @@ void dealloc2(void* param){ param=0; } +enum {boneconnect, constraint, muscle}; + void Muscle::DoConstraint(bool spinny) { static XYZ vel; @@ -712,6 +714,7 @@ void Skeleton::SetJoint(float x, float y, float z, int which, int whichjoint) void Skeleton::AddMuscle(int attach1,int attach2,float minlength,float maxlength,int type) { + const int max_muscles = 100; // FIXME: Probably can be dropped if(num_muscles=0&&attach2=0&&attach1!=attach2){ muscles[num_muscles].parent1=&joints[attach1]; muscles[num_muscles].parent2=&joints[attach2]; diff --git a/Source/Skeleton.h b/Source/Skeleton.h index 8186b18..fa57c9a 100644 --- a/Source/Skeleton.h +++ b/Source/Skeleton.h @@ -142,6 +142,8 @@ protected: }; +const int max_joints = 50; + class Skeleton { public: -- 2.39.2