From: Alexander Monakov Date: Mon, 3 Jan 2011 19:54:45 +0000 (+0300) Subject: Migrate some definitions from Constants.h X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;ds=sidebyside;h=7a0b90b30144f63105f6efd8f0d969862934b046;hp=1aef858f5ecb3dc8fd816e0155635371ed3632f2;p=lugaru.git Migrate some definitions from Constants.h --- 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: