Changes done during tetris development

This commit is contained in:
2020-08-23 01:08:10 +02:00
parent 27274c7242
commit 6acfff3e8f
3 changed files with 102 additions and 64 deletions
+4 -4
View File
@@ -58,10 +58,10 @@ bool infinityIntersection(const SDLPP::CollisionPolygon &infinite, const SDLPP::
int iright = infinite.rightmost();
int itop = infinite.topmost();
int ibottom = infinite.bottommost();
bool ret = ileft != -1 && ileft <= other.rightmost();
ret |= iright != -1 && iright >= other.leftmost();
ret |= itop != -1 && itop <= other.bottommost();
ret |= ibottom != -1 && ibottom >= other.topmost();
bool ret = ileft != -1 && ileft <= other.rightmost() && ileft >= other.leftmost();
ret |= iright != -1 && iright >= other.leftmost() && iright <= other.rightmost();
ret |= itop != -1 && itop <= other.bottommost() && itop >= other.topmost();
ret |= ibottom != -1 && ibottom >= other.topmost() && ibottom <= other.bottommost();
ret |= ileft == -1 && iright == -1 && itop == -1 && ibottom == -1;
return ret;
}