From afea782db68d0729cf061515e6c5de778a7145a7 Mon Sep 17 00:00:00 2001 From: Jonny007-MKD <1-23-4-5@web.de> Date: Mon, 6 Jan 2014 14:55:05 +0100 Subject: [PATCH] Moved files --- GDE_3_2008/GDE_3.vcxproj | 6 +++-- GDE_3_2008/GDE_3.vcxproj.filters | 8 ++++++- {GDE_3_2008 => Hazard/Hazard}/KV_PiGroup.cpp | 24 ++++++++++---------- {GDE_3_2008 => Hazard/Hazard}/KV_PiGroup.h | 2 +- 4 files changed, 24 insertions(+), 16 deletions(-) rename {GDE_3_2008 => Hazard/Hazard}/KV_PiGroup.cpp (56%) rename {GDE_3_2008 => Hazard/Hazard}/KV_PiGroup.h (83%) diff --git a/GDE_3_2008/GDE_3.vcxproj b/GDE_3_2008/GDE_3.vcxproj index 8fabc6f..0d87dd4 100644 --- a/GDE_3_2008/GDE_3.vcxproj +++ b/GDE_3_2008/GDE_3.vcxproj @@ -28,7 +28,7 @@ Application Static MultiByte - v120 + v100 @@ -119,6 +119,7 @@ + @@ -140,8 +141,9 @@ - + + diff --git a/GDE_3_2008/GDE_3.vcxproj.filters b/GDE_3_2008/GDE_3.vcxproj.filters index 256dff7..cbc3105 100644 --- a/GDE_3_2008/GDE_3.vcxproj.filters +++ b/GDE_3_2008/GDE_3.vcxproj.filters @@ -75,6 +75,9 @@ Quelldateien + + Quelldateien + @@ -140,7 +143,10 @@ Headerdateien - + + Headerdateien + + Headerdateien diff --git a/GDE_3_2008/KV_PiGroup.cpp b/Hazard/Hazard/KV_PiGroup.cpp similarity index 56% rename from GDE_3_2008/KV_PiGroup.cpp rename to Hazard/Hazard/KV_PiGroup.cpp index 4e29297..1e715fe 100644 --- a/GDE_3_2008/KV_PiGroup.cpp +++ b/Hazard/Hazard/KV_PiGroup.cpp @@ -10,8 +10,8 @@ bool KV_PiGroup::LiesNextTo(KV_PiEleLoc* &el) for (uint i = 0; i < this->elements.size(); i++) { KV_PiEleLoc* elG = this->elements[i]; - if (elG->h - el->h == 0 && abs(elG->w - el->w) == 1 || - elG->w - el->w == 0 && abs(elG->h - el->h) == 1) + if (elG->h - el->h == 0 && abs((int)elG->w - (int)el->w) == 1 || + elG->w - el->w == 0 && abs((int)elG->h - (int)el->h) == 1) return true; } return false; @@ -22,23 +22,23 @@ void KV_PiGroup::Add(KV_PiEleLoc* &el) this->elements.push_back(el); } -void KV_PiGroup::MakeCoords() +void KV_PiGroup::MakeCoords(uint edgeLength, uint VarX_Length, uint VarY_Length) { uint x1, x2, y1, y2; uint X1 = -1, X2 = 0, Y1 = -1, Y2 = 0; KV_PiEleLoc* loc; - for (uint i = 0; i < this->elements->size(); i++) + for (uint i = 0; i < this->elements.size(); i++) { loc = this->elements[i]; - x1 = loc->w * (this->edgeLength + 1) + this->VarY_Length; // Upper coord - x2 = x1 + this->edgeLength; // Lower coord - y1 = loc->h * (this->edgeLength + 1) + this->VarX_Length; // Left coord - y2 = y1 + this->edgeLength; // Right coord + x1 = loc->w * (edgeLength + 1) + VarY_Length; // Upper coord + x2 = x1 + edgeLength; // Lower coord + y1 = loc->h * (edgeLength + 1) + VarX_Length; // Left coord + y2 = y1 + edgeLength; // Right coord - this->X1 = min(this->X1, x1); - this->X2 = max(this->X2, x2); - this->Y1 = min(this->Y1, y1); - this->Y2 = max(this->Y2, y2); + X1 = min(X1, x1); + X2 = max(X2, x2); + Y1 = min(Y1, y1); + Y2 = max(Y2, y2); } this->X1 = X1; diff --git a/GDE_3_2008/KV_PiGroup.h b/Hazard/Hazard/KV_PiGroup.h similarity index 83% rename from GDE_3_2008/KV_PiGroup.h rename to Hazard/Hazard/KV_PiGroup.h index 9290ed9..22613c8 100644 --- a/GDE_3_2008/KV_PiGroup.h +++ b/Hazard/Hazard/KV_PiGroup.h @@ -15,7 +15,7 @@ private: public: bool LiesNextTo(KV_PiEleLoc* &el); void Add(KV_PiEleLoc* &el); - void MakeCoords(); + void MakeCoords(uint edgeLength, uint VarX_Length, uint VarY_Length); KV_PiEleLoc* operator[](uint &index); KV_PiEleLoc* at(uint &index);