]> git.seodisparate.com - jumpartifact.com_demo_0/commitdiff
Fixes since raylib updated to version 5.5
authorStephen Seo <seo.disparate@gmail.com>
Sun, 13 Apr 2025 03:56:13 +0000 (12:56 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Sun, 13 Apr 2025 03:56:13 +0000 (12:56 +0900)
src/3d_helpers.cc
src/3d_helpers.h
src/test/test.cc

index 0108209eaaf4d09346f3018bb4ed33a9d107ac6c..dbdfde1dd4d140771385e282fad61ea1a40c1586 100644 (file)
@@ -125,9 +125,9 @@ Matrix scale_matrix_xyz(float x, float y, float z) {
                 0.0F, 0.0F, z,    0.0F, 0.0F, 0.0F, 0.0F, 1.0F};
 }
 
-Matrix operator*(const Matrix &a, const Matrix &b) {
-  return MatrixMultiply(a, b);
-}
+// Matrix operator*(const Matrix &a, const Matrix &b) {
+//   return MatrixMultiply(a, b);
+// }
 
 bool ray_to_xz_plane(const Ray &ray, float &x_out, float &z_out) {
   if (FloatEquals(ray.direction.y, 0.0F)) {
@@ -232,17 +232,17 @@ std::array<Vector3, 9> get_circle_facing_viewer(Vector3 pos, Vector3 normal,
   return vertices;
 }
 
-Vector3 operator+(Vector3 a, Vector3 b) {
-  return Vector3{a.x + b.x, a.y + b.y, a.z + b.z};
-}
+// Vector3 operator+(Vector3 a, Vector3 b) {
+//   return Vector3{a.x + b.x, a.y + b.y, a.z + b.z};
+// }
 
-Vector3 operator-(Vector3 a, Vector3 b) {
-  return Vector3{a.x - b.x, a.y - b.y, a.z - b.z};
-}
+// Vector3 operator-(Vector3 a, Vector3 b) {
+//   return Vector3{a.x - b.x, a.y - b.y, a.z - b.z};
+// }
 
-Vector3 operator*(Vector3 vec3, float factor) {
-  return Vector3Scale(vec3, factor);
-}
+// Vector3 operator*(Vector3 vec3, float factor) {
+//   return Vector3Scale(vec3, factor);
+// }
 
 Vector3 operator*(Matrix mat, Vector3 vec3) {
   return Vector3Transform(vec3, mat);
index 89bcbc5218977b6eaa8aff0c7e4e154cd0405b64..5adcda95d8212af079957ed2b0788042c1cd7ed7 100644 (file)
@@ -20,7 +20,7 @@ extern Matrix translate_matrix_xyz(float x, float y, float z);
 
 extern Matrix scale_matrix_xyz(float x, float y, float z);
 
-extern Matrix operator*(const Matrix &a, const Matrix &b);
+// extern Matrix operator*(const Matrix &a, const Matrix &b);
 
 /// Returns true if intersects with xz plane.
 extern bool ray_to_xz_plane(const Ray &ray, float &x_out, float &z_out);
@@ -58,10 +58,10 @@ extern std::array<Vector3, 9> get_circle_facing_viewer(Vector3 pos,
 // weirdness regarding column-major matrices.
 // extern Vector4 operator*(const Matrix &m, const Vector4 &v);
 
-extern Vector3 operator+(Vector3 a, Vector3 b);
-extern Vector3 operator-(Vector3 a, Vector3 b);
+// extern Vector3 operator+(Vector3 a, Vector3 b);
+// extern Vector3 operator-(Vector3 a, Vector3 b);
 
-extern Vector3 operator*(Vector3 vec3, float factor);
+// extern Vector3 operator*(Vector3 vec3, float factor);
 
 extern Vector3 operator*(Matrix mat, Vector3 vec3);
 
index bf5536b68f6e02b3a34e7d67103e21fde5616ed6..f76f53f7d77820be2a8274825b399648e49d6667 100644 (file)
@@ -15,7 +15,7 @@
   }
 
 #define ASSERT_FLOAT_EQUALS(f, v)                                    \
-  if ((f) < (v)-0.1F || (f) > (v) + 0.1F) {                          \
+  if ((f) < (v) - 0.1F || (f) > (v) + 0.1F) {                        \
     std::cerr << "ASSERT_FLOAT_EQUALS: " << (f)                      \
               << " is not (roughly) equal to " << (v) << " at line " \
               << __LINE__ << "!\n";                                  \