Hello, Graf! I think I found a bug. I was trying to get a custom skyboxes to work. They work in NBlood, but don't work in Raze. I was digging through the NBlood/Raze source code and found this (I don't have a C/C++ compiler installed, so I just looked with my eyes).
In the NBlood source code there is a "check_file_exist" function in the "NBlood-master\source\build\src\common.cpp" file. You replaced the calls to this function with the calls to the "FileSystem.FileExists" function from the "Raze-master\source\common\filesystem\filesystem.h" file. In particular, such a place is found in the code for processing skyboxes in the "source\build\src\defs.cpp" file.
It was (NBlood-master\source\build\src\defs.cpp):
Code: Select all
if (EDUKE32_PREDICT_FALSE(!fn[i])) initprintf("Error: skybox: missing '%s filename' near line %s:%d\n", skyfaces[i], script->filename, scriptfile_getlinum(script,skyboxtokptr)), happy = 0;
// FIXME?
if (check_file_exist(fn[i]))
happy = 0;
Became (Raze-master\source\build\src\defs.cpp):
Code: Select all
if (EDUKE32_PREDICT_FALSE(!fn[i])) Printf("Error: skybox: missing '%s filename' near line %s:%d\n", skyfaces[i], script->filename, scriptfile_getlinum(script,skyboxtokptr)), happy = 0;
// FIXME?
if (fileSystem.FileExists(fn[i]))
happy = 0;
But the point is that the "check_file_exist" function returns
TRUE when it does
NOT find a file!
Code: Select all
// checks from path and in ZIPs, returns 1 if NOT found
int32_t check_file_exist(const char *fn)
While the "FileSystem.FileExists" function, on the contrary, returns FALSE. I believe that all the places where this replacement was made contain inverted logic.
Not sure if skyboxes are not loading just because of this error, but it definitely needs fixing.
English is not my first language, so I apologize for any mistakes.

Hello, Graf! I think I found a bug. I was trying to get a custom skyboxes to work. They work in NBlood, but don't work in Raze. I was digging through the NBlood/Raze source code and found this (I don't have a C/C++ compiler installed, so I just looked with my eyes).
In the NBlood source code there is a "check_file_exist" function in the "NBlood-master\source\build\src\common.cpp" file. You replaced the calls to this function with the calls to the "FileSystem.FileExists" function from the "Raze-master\source\common\filesystem\filesystem.h" file. In particular, such a place is found in the code for processing skyboxes in the "source\build\src\defs.cpp" file.
It was (NBlood-master\source\build\src\defs.cpp):
[code]
if (EDUKE32_PREDICT_FALSE(!fn[i])) initprintf("Error: skybox: missing '%s filename' near line %s:%d\n", skyfaces[i], script->filename, scriptfile_getlinum(script,skyboxtokptr)), happy = 0;
// FIXME?
if (check_file_exist(fn[i]))
happy = 0;
[/code]
Became (Raze-master\source\build\src\defs.cpp):
[code]
if (EDUKE32_PREDICT_FALSE(!fn[i])) Printf("Error: skybox: missing '%s filename' near line %s:%d\n", skyfaces[i], script->filename, scriptfile_getlinum(script,skyboxtokptr)), happy = 0;
// FIXME?
if (fileSystem.FileExists(fn[i]))
happy = 0;
[/code]
But the point is that the "check_file_exist" function returns [b]TRUE[/b] when it does [b]NOT[/b] find a file!
[code]
// checks from path and in ZIPs, returns 1 if NOT found
int32_t check_file_exist(const char *fn)
[/code]
While the "FileSystem.FileExists" function, on the contrary, returns FALSE. I believe that all the places where this replacement was made contain inverted logic.
Not sure if skyboxes are not loading just because of this error, but it definitely needs fixing.
English is not my first language, so I apologize for any mistakes. :)