LadyEebs / OpenJKDF2

A cross-platform reimplementation of JKDF2 in C
Other
5 stars 0 forks source link

Compilation error (gcc 14.2.1 20240805) #2

Open orderorder opened 3 days ago

orderorder commented 3 days ago
OpenJKDF2/src/Engine/rdLight.c: En la función ‘rdLight_CalcVertexIntensities’:
OpenJKDF2/src/Engine/rdLight.c:280:57: error: se pasa el argumento 2 de ‘rdAmbient_CalculateVertexColor’ desde un tipo de puntero incompatible [-Wincompatible-pointer-types]
  280 |                 rdAmbient_CalculateVertexColor(ambient, &vertexNormals, &ambientColor);
      |                                                         ^~~~~~~~~~~~~~
      |                                                         |
      |                                                         rdVector3 **
En el fichero incluido desde OpenJKDF2/src/Engine/rdLight.c:1:
OpenJKDF2/src/Engine/rdLight.h:50:68: nota: se esperaba ‘rdVector3 *’ pero el argumento es de tipo ‘rdVector3 **’
   50 | void rdAmbient_CalculateVertexColor(rdAmbient* ambient, rdVector3* normal, rdVector3* outColor);
      |                                                         ~~~~~~~~~~~^~~~~~
OpenJKDF2/src/Engine/rdLight.c: En la función ‘rdAmbient_Lerp’:
OpenJKDF2/src/Engine/rdLight.c:450:24: error: se pasa el argumento 1 de ‘rdVector_Lerp3’ desde un tipo de puntero incompatible [-Wincompatible-pointer-types]
  450 |         rdVector_Lerp3(&out->r.y, &ambient0->r.y, &ambient1->r.y, amount);
      |                        ^~~~~~~~~
      |                        |
      |                        float *
En el fichero incluido desde OpenJKDF2/src/Engine/rdLight.h:6:
OpenJKDF2/src/Primitives/rdVector.h:139:32: nota: se esperaba ‘rdVector3 *’ pero el argumento es de tipo ‘float *’
  139 | void rdVector_Lerp3(rdVector3* out, rdVector3* a, rdVector3* b, float f);
      |                     ~~~~~~~~~~~^~~
OpenJKDF2/src/Engine/rdLight.c:450:35: error: se pasa el argumento 2 de ‘rdVector_Lerp3’ desde un tipo de puntero incompatible [-Wincompatible-pointer-types]
  450 |         rdVector_Lerp3(&out->r.y, &ambient0->r.y, &ambient1->r.y, amount);
      |                                   ^~~~~~~~~~~~~~
      |                                   |
      |                                   const float *
OpenJKDF2/src/Primitives/rdVector.h:139:48: nota: se esperaba ‘rdVector3 *’ pero el argumento es de tipo ‘const float *’
  139 | void rdVector_Lerp3(rdVector3* out, rdVector3* a, rdVector3* b, float f);
      |                                     ~~~~~~~~~~~^
OpenJKDF2/src/Engine/rdLight.c:450:51: error: se pasa el argumento 3 de ‘rdVector_Lerp3’ desde un tipo de puntero incompatible [-Wincompatible-pointer-types]
  450 |         rdVector_Lerp3(&out->r.y, &ambient0->r.y, &ambient1->r.y, amount);
      |                                                   ^~~~~~~~~~~~~~
      |                                                   |
      |                                                   const float *
OpenJKDF2/src/Primitives/rdVector.h:139:62: nota: se esperaba ‘rdVector3 *’ pero el argumento es de tipo ‘const float *’
  139 | void rdVector_Lerp3(rdVector3* out, rdVector3* a, rdVector3* b, float f);
      |                                                   ~~~~~~~~~~~^
OpenJKDF2/src/Engine/rdLight.c:451:24: error: se pasa el argumento 1 de ‘rdVector_Lerp3’ desde un tipo de puntero incompatible [-Wincompatible-pointer-types]
  451 |         rdVector_Lerp3(&out->g.y, &ambient0->g.y, &ambient1->g.y, amount);
      |                        ^~~~~~~~~
      |                        |
      |                        float *
OpenJKDF2/src/Primitives/rdVector.h:139:32: nota: se esperaba ‘rdVector3 *’ pero el argumento es de tipo ‘float *’
  139 | void rdVector_Lerp3(rdVector3* out, rdVector3* a, rdVector3* b, float f);
      |                     ~~~~~~~~~~~^~~
OpenJKDF2/src/Engine/rdLight.c:451:35: error: se pasa el argumento 2 de ‘rdVector_Lerp3’ desde un tipo de puntero incompatible [-Wincompatible-pointer-types]
  451 |         rdVector_Lerp3(&out->g.y, &ambient0->g.y, &ambient1->g.y, amount);
      |                                   ^~~~~~~~~~~~~~
      |                                   |
      |                                   const float *
OpenJKDF2/src/Primitives/rdVector.h:139:48: nota: se esperaba ‘rdVector3 *’ pero el argumento es de tipo ‘const float *’
  139 | void rdVector_Lerp3(rdVector3* out, rdVector3* a, rdVector3* b, float f);
      |                                     ~~~~~~~~~~~^
OpenJKDF2/src/Engine/rdLight.c:451:51: error: se pasa el argumento 3 de ‘rdVector_Lerp3’ desde un tipo de puntero incompatible [-Wincompatible-pointer-types]
  451 |         rdVector_Lerp3(&out->g.y, &ambient0->g.y, &ambient1->g.y, amount);
      |                                                   ^~~~~~~~~~~~~~
      |                                                   |
      |                                                   const float *
OpenJKDF2/src/Primitives/rdVector.h:139:62: nota: se esperaba ‘rdVector3 *’ pero el argumento es de tipo ‘const float *’
  139 | void rdVector_Lerp3(rdVector3* out, rdVector3* a, rdVector3* b, float f);
      |                                                   ~~~~~~~~~~~^
OpenJKDF2/src/Engine/rdLight.c:452:24: error: se pasa el argumento 1 de ‘rdVector_Lerp3’ desde un tipo de puntero incompatible [-Wincompatible-pointer-types]
  452 |         rdVector_Lerp3(&out->b.y, &ambient0->b.y, &ambient1->b.y, amount);
      |                        ^~~~~~~~~
      |                        |
      |                        float *
OpenJKDF2/src/Primitives/rdVector.h:139:32: nota: se esperaba ‘rdVector3 *’ pero el argumento es de tipo ‘float *’
  139 | void rdVector_Lerp3(rdVector3* out, rdVector3* a, rdVector3* b, float f);
      |                     ~~~~~~~~~~~^~~
OpenJKDF2/src/Engine/rdLight.c:452:35: error: se pasa el argumento 2 de ‘rdVector_Lerp3’ desde un tipo de puntero incompatible [-Wincompatible-pointer-types]
  452 |         rdVector_Lerp3(&out->b.y, &ambient0->b.y, &ambient1->b.y, amount);
      |                                   ^~~~~~~~~~~~~~
      |                                   |
      |                                   const float *
OpenJKDF2/src/Primitives/rdVector.h:139:48: nota: se esperaba ‘rdVector3 *’ pero el argumento es de tipo ‘const float *’
  139 | void rdVector_Lerp3(rdVector3* out, rdVector3* a, rdVector3* b, float f);
      |                                     ~~~~~~~~~~~^
OpenJKDF2/src/Engine/rdLight.c:452:51: error: se pasa el argumento 3 de ‘rdVector_Lerp3’ desde un tipo de puntero incompatible [-Wincompatible-pointer-types]
  452 |         rdVector_Lerp3(&out->b.y, &ambient0->b.y, &ambient1->b.y, amount);
      |                                                   ^~~~~~~~~~~~~~
      |                                                   |
      |                                                   const float *
OpenJKDF2/src/Primitives/rdVector.h:139:62: nota: se esperaba ‘rdVector3 *’ pero el argumento es de tipo ‘const float *’
  139 | void rdVector_Lerp3(rdVector3* out, rdVector3* a, rdVector3* b, float f);
      |                                                   ~~~~~~~~~~~^
OpenJKDF2/src/Engine/rdLight.c: En la función ‘rdAmbient_CalculateVertexColor’:
OpenJKDF2/src/Engine/rdLight.c:480:23: error: declaración implícita de la función ‘max’; ¿quiso decir ‘fmax’? [-Wimplicit-function-declaration]
  480 |         outColor->x = max(0.0f, rdVector_Dot4(&shN, &ambient->r)) / M_PI;
      |                       ^~~
      |                       fmax
make[3]: *** [CMakeFiles/sith_engine.dir/build.make:586: CMakeFiles/sith_engine.dir/src/Engine/rdLight.c.o] Error 1
make[3]: *** Se espera a que terminen otras tareas....
OpenJKDF2/src/Engine/rdThing.c: En la función ‘rdThing_Draw’:
OpenJKDF2/src/Engine/rdThing.c:212:32: error: declaración implícita de la función ‘rdDecal_Draw’ [-Wimplicit-function-declaration]
  212 |                         return rdDecal_Draw(thing, m);
      |                                ^~~~~~~~~~~~
make[3]: *** [CMakeFiles/sith_engine.dir/build.make:628: CMakeFiles/sith_engine.dir/src/Engine/rdThing.c.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:360: CMakeFiles/sith_engine.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:401: CMakeFiles/openjkdf2.dir/rule] Error 2
make: *** [Makefile:254: openjkdf2] Error 2
orderorder commented 3 days ago

First of all, thanks for continuing the work of "shinyquagsire23" I would like to help test the game. If the code compiles with another version of gcc I would like to know which one it is.

I would like to mention another bug I had detected both on windows and linux with the latest code from "shinyquagsire23", the items dont disappear when you pick them up in Mysteries of the Sith

LadyEebs commented 2 days ago

Thanks for bothering to try this out and help identify issues!

Submitted some fixes: https://github.com/LadyEebs/OpenJKDF2/commit/77d74376b0e85ee6ad54b16359e15cb8915bf1ee

I don't currently have a setup to test GCC or Archlinux myself, so ty for sharing the compilation log!

Currently almost all major features require new content (such as the ragdolls, decals, etc). This is being developed along side a sort of "JK redux" mod. If you'd like to try that out (it's not currently in a repo), send me a message.

orderorder commented 2 days ago

Yes, I'm interested in trying out these new improvements. Thanks Would you like me to continue reporting compilation errors on Linux anyway?

LadyEebs commented 2 days ago

Definitely, it's good to have someone looking at those :)