From d7cdb7214382fd10ecba0890acdfa21151a32599 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Thu, 19 Jan 2017 23:44:30 +0100 Subject: [PATCH] Some more warning related stuff, but changed my mind about re-enabling the remaining ones :/ --- BBGE/Base.h | 6 +++--- BBGE/SkeletalSprite.cpp | 8 ++++---- BBGE/SkeletalSprite.h | 5 +++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/BBGE/Base.h b/BBGE/Base.h index 24a5ad0..55932ac 100644 --- a/BBGE/Base.h +++ b/BBGE/Base.h @@ -50,11 +50,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma warning(disable:4505) // unreferenced local function has been removed #pragma warning(disable:4702) // unreachable code #pragma warning(disable:4127) // conditional expression is constant -#pragma warning(disable:4706) // assignment within conditional expression +//#pragma warning(disable:4706) // assignment within conditional expression -#pragma warning(disable:4389) // signed/unsigned mismatch +//#pragma warning(disable:4389) // signed/unsigned mismatch -#pragma warning(disable:4189) // UqqqqSEFUL: local variable is initialized but not referenced +//#pragma warning(disable:4189) // UqqqqSEFUL: local variable is initialized but not referenced #endif #include diff --git a/BBGE/SkeletalSprite.cpp b/BBGE/SkeletalSprite.cpp index b148f2f..983080e 100644 --- a/BBGE/SkeletalSprite.cpp +++ b/BBGE/SkeletalSprite.cpp @@ -74,7 +74,7 @@ Bone::Bone() : Quad() animated = ANIM_ALL; originalScale = Vector(1,1); boneIdx = pidx = -1; - rbp = 0; + rbp = false; segmentChain = 0; minDist = maxDist = 128; @@ -904,7 +904,7 @@ bool SkeletalSprite::saveSkeletal(const std::string &fn) bone->SetAttribute("sel", this->bones[i]->selectable); } if (this->bones[i]->rbp) - bone->SetAttribute("rbp", this->bones[i]->rbp); + bone->SetAttribute("rbp", (int)this->bones[i]->rbp); if (this->bones[i]->originalRenderPass) bone->SetAttribute("pass", this->bones[i]->originalRenderPass); if (this->bones[i]->offset.x) @@ -1053,7 +1053,7 @@ Bone *SkeletalSprite::getBoneByIdx(size_t idx) return 0; } -Bone *SkeletalSprite::initBone(int idx, std::string gfx, int pidx, int rbp, std::string name, float cr, bool fh, bool fv) +Bone *SkeletalSprite::initBone(int idx, std::string gfx, int pidx, bool rbp, std::string name, float cr, bool fh, bool fv) { Bone *b = new Bone; b->boneIdx = idx; @@ -1162,7 +1162,7 @@ void SkeletalSprite::loadSkin(const std::string &fn) if (boneXml->Attribute("rq")) { int rq = atoi(boneXml->Attribute("rq")); - b->renderQuad = rq; + b->renderQuad = !!rq; } std::string gfx; diff --git a/BBGE/SkeletalSprite.h b/BBGE/SkeletalSprite.h index 869e1fb..18dc90a 100644 --- a/BBGE/SkeletalSprite.h +++ b/BBGE/SkeletalSprite.h @@ -61,7 +61,8 @@ public: std::string gfx; std::string name; size_t boneIdx; - int pidx, rbp; + int pidx; + bool rbp; std::string prt; std::vector changeStrip; @@ -282,7 +283,7 @@ protected: size_t selectedBone; friend class AnimationLayer; std::vector animLayers; - Bone* initBone(int idx, std::string gfx, int pidx, int rbp=0, std::string name="", float cr=0, bool fh=false, bool fv=false); + Bone* initBone(int idx, std::string gfx, int pidx, bool rbp=false, std::string name="", float cr=0, bool fh=false, bool fv=false); void deleteBones(); void onUpdate(float dt); };