Converted memory to direct pointers.
Fixed memory leaks in uninit. Fixed some of the code analysis warnings. Enabled /MP build. Cleaned up the code.
This commit is contained in:
1 parent
49f6132d23
commit
d594f5fdb7
26 files changed
+264
-341
No files matched your search
@@ -439,10 +439,10 @@ int TFlipperEdge::is_ball_inside(float x, float y)
|
||||
vector_type testPoint{};
|
||||
float dx = RotOrigin.X - x;
|
||||
float dy = RotOrigin.Y - y;
|
||||
if ((A2.X - A1.X) * (y - A1.Y) - (A2.Y - A1.Y) * (x - A1.X) >= 0.0 &&
|
||||
(B1.X - A2.X) * (y - A2.Y) - (B1.Y - A2.Y) * (x - A2.X) >= 0.0 &&
|
||||
(B2.X - B1.X) * (y - B1.Y) - (B2.Y - B1.Y) * (x - B1.X) >= 0.0 &&
|
||||
(A1.X - B2.X) * (y - B2.Y) - (A1.Y - B2.Y) * (x - B2.X) >= 0.0 ||
|
||||
if ((A2.X - A1.X) * (y - A1.Y) - (A2.Y - A1.Y) * (x - A1.X) >= 0.0f &&
|
||||
(B1.X - A2.X) * (y - A2.Y) - (B1.Y - A2.Y) * (x - A2.X) >= 0.0f &&
|
||||
(B2.X - B1.X) * (y - B1.Y) - (B2.Y - B1.Y) * (x - B1.X) >= 0.0f &&
|
||||
(A1.X - B2.X) * (y - B2.Y) - (A1.Y - B2.Y) * (x - B2.X) >= 0.0f ||
|
||||
dy * dy + dx * dx <= CirclebaseRadiusSq ||
|
||||
(T1.Y - y) * (T1.Y - y) + (T1.X - x) * (T1.X - x) < CircleT1RadiusSq)
|
||||
{
|
||||
@@ -455,7 +455,7 @@ int TFlipperEdge::is_ball_inside(float x, float y)
|
||||
testPoint = T1;
|
||||
|
||||
if (((y - testPoint.Y) * (RotOrigin.X - testPoint.X) -
|
||||
(x - testPoint.X) * (RotOrigin.Y - testPoint.Y)) * flipperLR < 0.0)
|
||||
(x - testPoint.X) * (RotOrigin.Y - testPoint.Y)) * flipperLR < 0.0f)
|
||||
return 4;
|
||||
return 5;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user