Remove core.h, SDL2->SDL3, Makefile cleanup, ansi C, 80 char.

This commit is contained in:
2026-08-04 04:52:46 -07:00
parent a829ac8647
commit 14d87eac10
162 changed files with 57434 additions and 31335 deletions
+37 -37
View File
@@ -3,79 +3,79 @@
/* TODO: Make these static. */
struct v2 {
float X, Y;
float E[2];
float x, y;
float e[2];
};
struct v2 V2(float X, float Y)
struct v2 V2(float x, float y)
{
struct v2 Result;
struct v2 result;
Result.X = X;
Result.Y = Y;
result.x = x;
result.y = y;
return Result;
return result;
}
struct v2 V2Multiply(float A, struct v2 B)
struct v2 V2Multiply(float a, struct v2 b)
{
struct v2 Result;
struct v2 result;
Result.X = A * B.X;
Result.Y = A * B.Y;
result.x = a * b.x;
result.y = a * b.y;
return Result;
return result;
}
struct v2 V2Unary(struct v2 A)
struct v2 V2Unary(struct v2 a)
{
struct v2 Result;
struct v2 result;
Result.X = -A.X;
Result.Y = -A.Y;
result.x = -a.x;
result.y = -a.y;
return Result;
return result;
}
struct v2 V2Add(struct v2 A, struct v2 B)
struct v2 V2Add(struct v2 a, struct v2 b)
{
struct v2 Result;
struct v2 result;
Result.X = A.X + B.X;
Result.Y = A.Y + B.Y;
result.x = a.x + b.x;
result.y = a.y + b.y;
return Result;
return result;
}
struct v2 V2Subtract(struct v2 A, struct v2 B)
struct v2 V2Subtract(struct v2 a, struct v2 b)
{
struct v2 Result;
struct v2 result;
Result.X = A.X - B.X;
Result.Y = A.Y - B.Y;
result.x = a.x - b.x;
result.y = a.y - b.y;
return Result;
return result;
}
float Square(float A)
float Square(float a)
{
float Result;
float result;
Result = A * A;
result = a * a;
return Result;
return result;
}
float InnerProduct(struct v2 A, struct v2 B)
float InnerProduct(struct v2 a, struct v2 b)
{
float Result = A.X*B.X + A.Y*B.Y;
return Result;
float result = a.x*b.x + a.y*b.y;
return result;
}
float LengthSq(struct v2 A)
float LengthSq(struct v2 a)
{
float Result = InnerProduct(A, A);
return Result;
float result = InnerProduct(a, a);
return result;
}
#endif