From: Côme Chilliet Date: Fri, 9 Dec 2016 17:32:46 +0000 (+0700) Subject: Removed empty destructors. Joint::label is a bodypart X-Git-Url: https://git.jsancho.org/?p=lugaru.git;a=commitdiff_plain;h=bb10d5d29efb774db509c87063f1294980b127c8 Removed empty destructors. Joint::label is a bodypart --- diff --git a/Source/Animation/Animation.cpp b/Source/Animation/Animation.cpp index f28861c..83e2c0e 100644 --- a/Source/Animation/Animation.cpp +++ b/Source/Animation/Animation.cpp @@ -149,7 +149,3 @@ Animation::Animation(const std::string& filename, anim_height_type aheight, anim offset = endoffset; offset.y = 0; } - -Animation::~Animation() -{ -} diff --git a/Source/Animation/Animation.h b/Source/Animation/Animation.h index 91bdd4c..4a74c5c 100644 --- a/Source/Animation/Animation.h +++ b/Source/Animation/Animation.h @@ -94,6 +94,5 @@ public: Animation(); Animation(const std::string& fileName, anim_height_type aheight, anim_attack_type aattack); - ~Animation(); }; #endif diff --git a/Source/Animation/Joint.cpp b/Source/Animation/Joint.cpp index 96f94c9..4d3dd7c 100644 --- a/Source/Animation/Joint.cpp +++ b/Source/Animation/Joint.cpp @@ -32,7 +32,7 @@ Joint::Joint() : visible(false), parent(nullptr), sametwist(false), - label(0), + label(head), hasgun(0), delay(0) { diff --git a/Source/Animation/Joint.h b/Source/Animation/Joint.h index 764b095..c4c8e3b 100644 --- a/Source/Animation/Joint.h +++ b/Source/Animation/Joint.h @@ -24,6 +24,15 @@ along with Lugaru. If not, see . #include "Quaternions.h" #include +enum bodypart { + head, neck, + leftshoulder, leftelbow, leftwrist, lefthand, + rightshoulder, rightelbow, rightwrist, righthand, + abdomen, lefthip, righthip, groin, + leftknee, leftankle, leftfoot, + rightknee, rightankle, rightfoot +}; + class Joint { public: @@ -43,7 +52,7 @@ public: bool visible; Joint* parent; bool sametwist; - int label; + bodypart label; int hasgun; float delay; XYZ velchange; diff --git a/Source/Animation/Muscle.cpp b/Source/Animation/Muscle.cpp index 627b8e0..94ed5b1 100644 --- a/Source/Animation/Muscle.cpp +++ b/Source/Animation/Muscle.cpp @@ -42,10 +42,6 @@ Muscle::Muscle() strength = 0; } -Muscle::~Muscle() -{ -} - void Muscle::load(FILE* tfile, int vertexNum, std::vector& joints) { int numvertices, vertice, parentID; diff --git a/Source/Animation/Muscle.h b/Source/Animation/Muscle.h index 3a080ba..a286928 100644 --- a/Source/Animation/Muscle.h +++ b/Source/Animation/Muscle.h @@ -48,7 +48,6 @@ public: float strength; Muscle(); - ~Muscle(); void load(FILE* tfile, int vertexNum, std::vector& joints); void loadVerticesLow(FILE* tfile, int vertexNum); void loadVerticesClothes(FILE* tfile, int vertexNum); diff --git a/Source/Animation/Skeleton.cpp b/Source/Animation/Skeleton.cpp index 607be81..ee247c5 100644 --- a/Source/Animation/Skeleton.cpp +++ b/Source/Animation/Skeleton.cpp @@ -40,39 +40,25 @@ extern int whichjointendarray[26]; extern bool visibleloading; -Skeleton::Skeleton() +Skeleton::Skeleton() : + selected(0), + id(0), + num_models(0), + clothes(false), + spinny(false), + skinsize(0), + checkdelay(0), + longdead(0), + broken(false), + free(0), + oldfree(0), + freetime(0), + freefall(false) { - selected = 0; - memset(forwardjoints, 0, sizeof(forwardjoints)); - - id = 0; - memset(lowforwardjoints, 0, sizeof(lowforwardjoints)); - memset(jointlabels, 0, sizeof(jointlabels)); - - num_models = 0; - - clothes = 0; - spinny = 0; - memset(skinText, 0, sizeof(skinText)); - skinsize = 0; - - checkdelay = 0; - - longdead = 0; - broken = 0; - - free = 0; - oldfree = 0; - freetime = 0; - freefall = 0; -} - -Skeleton::~Skeleton() -{ } /* EFFECT diff --git a/Source/Animation/Skeleton.h b/Source/Animation/Skeleton.h index 2882188..db03e75 100644 --- a/Source/Animation/Skeleton.h +++ b/Source/Animation/Skeleton.h @@ -33,15 +33,6 @@ along with Lugaru. If not, see . #include "Animation/Joint.h" #include "Animation/Muscle.h" -enum bodyparts { - head, neck, - leftshoulder, leftelbow, leftwrist, lefthand, - rightshoulder, rightelbow, rightwrist, righthand, - abdomen, lefthip, righthip, groin, - leftknee, leftankle, leftfoot, - rightknee, rightankle, rightfoot -}; - const int max_joints = 50; class Skeleton @@ -98,7 +89,6 @@ public: void Load(const std::string& fileName, const std::string& lowfileName, const std::string& clothesfileName, const std::string& modelfileName, const std::string& model2fileName, const std::string& model3fileName, const std::string& model4fileName, const std::string& model5fileNamee, const std::string& model6fileName, const std::string& model7fileName, const std::string& modellowfileName, const std::string& modelclothesfileName, bool aclothes); Skeleton(); - ~Skeleton(); private: // convenience functions diff --git a/Source/Person.cpp b/Source/Person.cpp index f0b0019..a9b5983 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -1839,7 +1839,7 @@ void Person::RagDoll(bool checkcollision) /* EFFECT */ -void Person::FootLand(bodyparts whichfoot, float opacity) +void Person::FootLand(bodypart whichfoot, float opacity) { if ((whichfoot != leftfoot) && (whichfoot != rightfoot)) { cerr << "FootLand called on wrong bodypart" << endl; diff --git a/Source/Person.h b/Source/Person.h index fbb62eb..ebdde32 100644 --- a/Source/Person.h +++ b/Source/Person.h @@ -386,7 +386,7 @@ public: int SphereCheck(XYZ *p1, float radius, XYZ *p, XYZ *move, float *rotate, Model *model); int DrawSkeleton(); void Puff(int whichlabel); - void FootLand(bodyparts whichfoot, float opacity); + void FootLand(bodypart whichfoot, float opacity); void DoStuff(); void setAnimation(int); void DoAnimations();