mirror of
https://github.com/k4zmu2a/SpaceCadetPinball.git
synced 2024-11-22 17:00:18 +01:00
Compare commits
No commits in common. "d27740bd38801f61b8c0ebb8607034bba8eee9ab" and "3ec96b84add67921a2a2ca552b0bbd400d14d70a" have entirely different histories.
d27740bd38
...
3ec96b84ad
5 changed files with 6 additions and 18 deletions
|
@ -43,17 +43,6 @@
|
||||||
"buildCommandArgs": "",
|
"buildCommandArgs": "",
|
||||||
"ctestCommandArgs": "",
|
"ctestCommandArgs": "",
|
||||||
"inheritEnvironments": [ "msvc_x64_x64" ]
|
"inheritEnvironments": [ "msvc_x64_x64" ]
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "x86-Release-WinXP",
|
|
||||||
"generator": "Visual Studio 16 2019",
|
|
||||||
"configurationType": "Release",
|
|
||||||
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
|
||||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
|
||||||
"cmakeCommandArgs": "-DCMAKE_WIN32_EXECUTABLE:BOOL=1 -T v141_xp",
|
|
||||||
"buildCommandArgs": "",
|
|
||||||
"ctestCommandArgs": "",
|
|
||||||
"inheritEnvironments": [ "msvc_x86" ]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -45,7 +45,7 @@ int TComponentGroup::Message(int code, float value)
|
||||||
if (value > 0.0f)
|
if (value > 0.0f)
|
||||||
this->Timer = timer::set(value, this, NotifyTimerExpired);
|
this->Timer = timer::set(value, this, NotifyTimerExpired);
|
||||||
}
|
}
|
||||||
else if (code <= 1007 || (code > 1011 && code != 1020 && code != 1022))
|
else if (code <= 1007 || code > 1011 && code != 1020 && code != 1022)
|
||||||
{
|
{
|
||||||
for (auto component : List)
|
for (auto component : List)
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,8 +93,8 @@ TEdgeSegment* TEdgeSegment::install_wall(float* floatArr, TCollisionComponent* c
|
||||||
vec2.X = centerX2 - centerX1;
|
vec2.X = centerX2 - centerX1;
|
||||||
vec2.Y = centerY2 - center.Y;
|
vec2.Y = centerY2 - center.Y;
|
||||||
maths::cross(&vec1, &vec2, &dstVec);
|
maths::cross(&vec1, &vec2, &dstVec);
|
||||||
if ((dstVec.Z > 0.0f && offset > 0.0f) ||
|
if (dstVec.Z > 0.0f && offset > 0.0f ||
|
||||||
(dstVec.Z < 0.0f && offset < 0.0f))
|
dstVec.Z < 0.0f && offset < 0.0f)
|
||||||
{
|
{
|
||||||
float radius = offset * 1.001f;
|
float radius = offset * 1.001f;
|
||||||
auto circle = new TCircle(collComp, activeFlagPtr, collisionGroup, ¢er, radius);
|
auto circle = new TCircle(collComp, activeFlagPtr, collisionGroup, ¢er, radius);
|
||||||
|
|
|
@ -438,10 +438,10 @@ int TFlipperEdge::is_ball_inside(float x, float y)
|
||||||
vector_type testPoint{};
|
vector_type testPoint{};
|
||||||
float dx = RotOrigin.X - x;
|
float dx = RotOrigin.X - x;
|
||||||
float dy = RotOrigin.Y - y;
|
float dy = RotOrigin.Y - y;
|
||||||
if (((A2.X - A1.X) * (y - A1.Y) - (A2.Y - A1.Y) * (x - A1.X) >= 0.0f &&
|
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 &&
|
(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 &&
|
(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) ||
|
(A1.X - B2.X) * (y - B2.Y) - (A1.Y - B2.Y) * (x - B2.X) >= 0.0f ||
|
||||||
dy * dy + dx * dx <= CirclebaseRadiusSq ||
|
dy * dy + dx * dx <= CirclebaseRadiusSq ||
|
||||||
(T1.Y - y) * (T1.Y - y) + (T1.X - x) * (T1.X - x) < CircleT1RadiusSq)
|
(T1.Y - y) * (T1.Y - y) + (T1.X - x) * (T1.X - x) < CircleT1RadiusSq)
|
||||||
{
|
{
|
||||||
|
|
|
@ -52,8 +52,7 @@ int winmain::WinMain(LPCSTR lpCmdLine)
|
||||||
|
|
||||||
// SDL init
|
// SDL init
|
||||||
SDL_SetMainReady();
|
SDL_SetMainReady();
|
||||||
if (SDL_Init(SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO |
|
if (SDL_Init(SDL_INIT_EVERYTHING) < 0)
|
||||||
SDL_INIT_EVENTS | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER) < 0)
|
|
||||||
{
|
{
|
||||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Could not initialize SDL2", SDL_GetError(), nullptr);
|
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Could not initialize SDL2", SDL_GetError(), nullptr);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue