cleanup repo

This commit is contained in:
2026-04-16 11:39:41 +02:00
parent 5f11dfcdc5
commit c79d5c8f0a
11 changed files with 122 additions and 24669 deletions

View File

@@ -57,7 +57,7 @@ Add regression tests for every gameplay bug fix when practical. If scene-level a
- Before beginning with the edit phase, always present a plan first. Only begin editing after the user approves the plan. - Before beginning with the edit phase, always present a plan first. Only begin editing after the user approves the plan.
- Don't make assumptions in the plan. If necessary, ask all clarifying questions before presenting the final plan. - Don't make assumptions in the plan. If necessary, ask all clarifying questions before presenting the final plan.
- After every iteration, evaluate if the test coverage would fall below 100%, and write tests if necessary. - After every iteration, evaluate if the test coverage would fall below 100%, and write tests if necessary.
- After every iteration, run `jb cleanupcode --build=False $file1;$file2;...` for every file you touched. - After every iteration, before committing, run `jb cleanupcode --build=False $file1;$file2;...` for every file you touched.
- After every iteration, if there's a relevant documentation for the current task, update it according to the change. - After every iteration, if there's a relevant documentation for the current task, update it according to the change.
- Update the wording of touched concerns instead of introducing incremental change reports - Update the wording of touched concerns instead of introducing incremental change reports
- The documentation should always represent the current state in its entirety and not derail into a historical development log. - The documentation should always represent the current state in its entirety and not derail into a historical development log.

View File

File diff suppressed because one or more lines are too long

View File

@@ -182,9 +182,12 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
{ {
switch (i) switch (i)
{ {
case 0: return m_X; case 0:
case 1: return m_Y; return m_X;
default: throw new ArgumentOutOfRangeException(nameof(i)); case 1:
return m_Y;
default:
throw new ArgumentOutOfRangeException(nameof(i));
} }
} }
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -198,7 +201,8 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
case 1: case 1:
m_Y = value; m_Y = value;
break; break;
default: throw new ArgumentOutOfRangeException(nameof(i)); default:
throw new ArgumentOutOfRangeException(nameof(i));
} }
} }
} }
@@ -279,8 +283,7 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
{ {
unchecked unchecked
{ {
return ((m_X.m_Value * (long)m_X.m_Value) + (m_Y.m_Value * (long)m_Y.m_Value)).CompareTo( return ((m_X.m_Value * (long)m_X.m_Value) + (m_Y.m_Value * (long)m_Y.m_Value)).CompareTo((other.m_X.m_Value * (long)other.m_X.m_Value) + (other.m_Y.m_Value * (long)other.m_Y.m_Value));
(other.m_X.m_Value * (long)other.m_X.m_Value) + (other.m_Y.m_Value * (long)other.m_Y.m_Value));
} }
} }
@@ -489,6 +492,7 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
xStart = i; xStart = i;
state = EParseState.ParseX; state = EParseState.ParseX;
} }
break; break;
} }
case EParseState.ParseX: case EParseState.ParseX:
@@ -533,6 +537,7 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
{ {
throw new FormatException($"Unexpected character '{character}' after the vector."); throw new FormatException($"Unexpected character '{character}' after the vector.");
} }
break; break;
} }
} }
@@ -570,8 +575,7 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
{ {
unchecked unchecked
{ {
return ((value1.m_X.m_Value * (long)value1.m_X.m_Value) + (value1.m_Y.m_Value * (long)value1.m_Y.m_Value)).CompareTo( return ((value1.m_X.m_Value * (long)value1.m_X.m_Value) + (value1.m_Y.m_Value * (long)value1.m_Y.m_Value)).CompareTo((value2.m_X.m_Value * (long)value2.m_X.m_Value) + (value2.m_Y.m_Value * (long)value2.m_Y.m_Value));
(value2.m_X.m_Value * (long)value2.m_X.m_Value) + (value2.m_Y.m_Value * (long)value2.m_Y.m_Value));
} }
} }
@@ -1198,7 +1202,8 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public static FixPointVector2 operator *(FixPointVector2 left, FixPoint16 right) public static FixPointVector2 operator *(FixPointVector2 left, FixPoint16 right)
{ {
return new() { return new()
{
m_X = left.m_X * right, m_X = left.m_X * right,
m_Y = left.m_Y * right m_Y = left.m_Y * right
}; };
@@ -1219,7 +1224,8 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public static FixPointVector2 operator /(FixPointVector2 left, FixPoint16 right) public static FixPointVector2 operator /(FixPointVector2 left, FixPoint16 right)
{ {
return new() { return new()
{
m_X = left.m_X / right, m_X = left.m_X / right,
m_Y = left.m_Y / right m_Y = left.m_Y / right
}; };

View File

@@ -127,10 +127,14 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
{ {
switch (i) switch (i)
{ {
case 0: return m_X; case 0:
case 1: return m_Y; return m_X;
case 2: return m_Z; case 1:
default: throw new ArgumentOutOfRangeException(nameof(i)); return m_Y;
case 2:
return m_Z;
default:
throw new ArgumentOutOfRangeException(nameof(i));
} }
} }
set set
@@ -146,7 +150,8 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
case 2: case 2:
m_Z = value; m_Z = value;
break; break;
default: throw new ArgumentOutOfRangeException(nameof(i)); default:
throw new ArgumentOutOfRangeException(nameof(i));
} }
} }
} }
@@ -227,8 +232,7 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
{ {
unchecked unchecked
{ {
return ((m_X.m_Value * (long)m_X.m_Value) + (m_Y.m_Value * (long)m_Y.m_Value) + (m_Z.m_Value * (long)m_Z.m_Value)).CompareTo( return ((m_X.m_Value * (long)m_X.m_Value) + (m_Y.m_Value * (long)m_Y.m_Value) + (m_Z.m_Value * (long)m_Z.m_Value)).CompareTo((other.m_X.m_Value * (long)other.m_X.m_Value) + (other.m_Y.m_Value * (long)other.m_Y.m_Value) + (other.m_Z.m_Value * (long)other.m_Z.m_Value));
(other.m_X.m_Value * (long)other.m_X.m_Value) + (other.m_Y.m_Value * (long)other.m_Y.m_Value) + (other.m_Z.m_Value * (long)other.m_Z.m_Value));
} }
} }
@@ -430,8 +434,7 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
var yz2 = rotation.m_Y * z2; var yz2 = rotation.m_Y * z2;
var zz2 = rotation.m_Z * z2; var zz2 = rotation.m_Z * z2;
return new((value.m_X * (1 - yy2 - zz2)) + (value.m_Y * (xy2 - wz2)) + (value.m_Z * (xz2 + wy2)), (value.m_X * (xy2 + wz2)) + (value.m_Y * (1 - xx2 - zz2)) + (value.m_Z * (yz2 - wx2)), return new((value.m_X * (1 - yy2 - zz2)) + (value.m_Y * (xy2 - wz2)) + (value.m_Z * (xz2 + wy2)), (value.m_X * (xy2 + wz2)) + (value.m_Y * (1 - xx2 - zz2)) + (value.m_Z * (yz2 - wx2)), (value.m_X * (xz2 - wy2)) + (value.m_Y * (yz2 + wx2)) + (value.m_Z * (1 - xx2 - yy2)));
(value.m_X * (xz2 - wy2)) + (value.m_Y * (yz2 + wx2)) + (value.m_Z * (1 - xx2 - yy2)));
} }
#endregion #endregion
@@ -453,8 +456,7 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
{ {
unchecked unchecked
{ {
return ((value.m_X.m_Value * (long)value.m_X.m_Value) + (value.m_Y.m_Value * (long)value.m_Y.m_Value) + (value.m_Z.m_Value * (long)value.m_Z.m_Value)).CompareTo( return ((value.m_X.m_Value * (long)value.m_X.m_Value) + (value.m_Y.m_Value * (long)value.m_Y.m_Value) + (value.m_Z.m_Value * (long)value.m_Z.m_Value)).CompareTo(fLength.m_Value * (long)fLength.m_Value);
fLength.m_Value * (long)fLength.m_Value);
} }
} }
@@ -463,8 +465,7 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
{ {
unchecked unchecked
{ {
return ((value1.m_X.m_Value * (long)value1.m_X.m_Value) + (value1.m_Y.m_Value * (long)value1.m_Y.m_Value) + (value1.m_Z.m_Value * (long)value1.m_Z.m_Value)).CompareTo( return ((value1.m_X.m_Value * (long)value1.m_X.m_Value) + (value1.m_Y.m_Value * (long)value1.m_Y.m_Value) + (value1.m_Z.m_Value * (long)value1.m_Z.m_Value)).CompareTo((value2.m_X.m_Value * (long)value2.m_X.m_Value) + (value2.m_Y.m_Value * (long)value2.m_Y.m_Value) + (value2.m_Z.m_Value * (long)value2.m_Z.m_Value));
(value2.m_X.m_Value * (long)value2.m_X.m_Value) + (value2.m_Y.m_Value * (long)value2.m_Y.m_Value) + (value2.m_Z.m_Value * (long)value2.m_Z.m_Value));
} }
} }
@@ -477,8 +478,7 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public static SFixPointVector3 Cross(SFixPointVector3 vector1, SFixPointVector3 vector2) public static SFixPointVector3 Cross(SFixPointVector3 vector1, SFixPointVector3 vector2)
{ {
return new((vector1.m_Y * vector2.m_Z) - (vector1.m_Z * vector2.m_Y), (vector1.m_Z * vector2.m_X) - (vector1.m_X * vector2.m_Z), return new((vector1.m_Y * vector2.m_Z) - (vector1.m_Z * vector2.m_Y), (vector1.m_Z * vector2.m_X) - (vector1.m_X * vector2.m_Z), (vector1.m_X * vector2.m_Y) - (vector1.m_Y * vector2.m_X));
(vector1.m_X * vector2.m_Y) - (vector1.m_Y * vector2.m_X));
} }
/// <summary> /// <summary>
@@ -939,7 +939,8 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public static SFixPointVector3 operator *(SFixPointVector3 left, FixPoint16 right) public static SFixPointVector3 operator *(SFixPointVector3 left, FixPoint16 right)
{ {
return new() { return new()
{
m_X = left.m_X * right, m_X = left.m_X * right,
m_Y = left.m_Y * right, m_Y = left.m_Y * right,
m_Z = left.m_Z * right m_Z = left.m_Z * right
@@ -961,7 +962,8 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public static SFixPointVector3 operator /(SFixPointVector3 left, FixPoint16 right) public static SFixPointVector3 operator /(SFixPointVector3 left, FixPoint16 right)
{ {
return new() { return new()
{
m_X = left.m_X / right, m_X = left.m_X / right,
m_Y = left.m_Y / right, m_Y = left.m_Y / right,
m_Z = left.m_Z / right m_Z = left.m_Z / right