Closed orderorder closed 10 years ago
Which Linux distribution are you using?
I'm using x86 gentoo. In my amd64 gentoo the code compiles without problem. In another past version it compiles without problem in my x86 version.
Maybe we should use %zu instead which is specifically for size_t. Does Windows support that?
With i686(32 bit) mint 16, I ran into 2 of these errors in Zip.cpp and 3 in File.cpp.
RBDOOM-3-BFG/neo/framework/Zip.cpp:507:74: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘size_t {aka unsigned int}’ [-Werror=format=]
After changing the %lu to %zu, it compiled perfectly.
http://stackoverflow.com/questions/2524611/how-to-print-size-t-variable-portably
Ok Windows does not support %zu ...
I ditched the previous commit and added a special case for the MSVC compiler:
http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx
After all I think -Werror=format is not really a good idea.
Now it works. Thank you :) great job.
Now i have another problem. I have installed ffmpeg 1.2.6 version, when i try to play a video disk (for example: MARS Mission Goals & Safety, in The Resurrection of Evil Expansion). The game shutdown with the following output.
------------- Warnings --------------- during game/phobos1... WARNING: Original Doom 3 RoQ Cinematic not found: 'sound/vo/video/deployment.roq'
WARNING: New filename: 'sound/vo/video/deployment.bik'
WARNING: idCinematic: Cannot open FFMPEG video file: 'sound/vo/video/deployment.bik', 0
WARNING: Original Doom 3 RoQ Cinematic not found: 'sound/vo/video/generator.roq'
WARNING: New filename: 'sound/vo/video/generator.bik'
WARNING: idCinematic: Cannot open FFMPEG video file: 'sound/vo/video/generator.bik', 0
WARNING: Original Doom 3 RoQ Cinematic not found: 'sound/vo/video/grabber.roq'
WARNING: New filename: 'sound/vo/video/grabber.bik'
WARNING: idCinematic: Cannot open FFMPEG video file: 'sound/vo/video/grabber.bik', 0
WARNING: Original Doom 3 RoQ Cinematic not found: 'sound/VO/video/video_marine_sops.roq'
WARNING: New filename: 'sound/VO/video/video_marine_sops.bik'
WARNING: Loaded FFMPEG file: 'sound/VO/video/video_marine_sops.bik', looping=0
WARNING: 256x256, 30.000000 FPS, 72.866669 sec
WARNING: file
Thank you.
Is it possible that your libavcodec does not support Bink videos?
However you can try to ignore Bink video support by compiling the engine with the cmake argument -DUSE_FFMPEG=OFF
Seems that "fullscreen videos" like Bethesda intro or the planet rotation work. The problem is only with de videodisk bink videos. I will try to update my ffmpeg version manually from the source code of the official site to the last version.
The same error with the last git version of ffmpeg. I can play de videos out of the game with the command ffplay video.bik.
It's quite obviously a problem with case sensitivity in the filesystem:
WARNING: idCinematic: Cannot open FFMPEG video file: 'sound/vo/video/deployment.bik', 0
...
WARNING: Loaded FFMPEG file: 'sound/VO/video/video_marine_sops.bik', looping=0
sounds/vo/ vs sounds/VO/ (the latter is the correct path).
On Windows that doesn't matter because it sucks is case insensitive.
Not sure how to best fix this particular issue, but "/vo/" is hardcoded in several places in the code, changing those to "/VO/" would be a start.
If however those video paths are set somewhere in the data files, we'd need something else.. I have code for a case-insensitive fopen() somewhere (and also a function that just takes a path and returns a version with correct case, if any), we could use that.
Yeah, :). I rename "VO" to "vo" and now the videos are working. Thanks, thanks, thanks...
But probably now other files don't load anymore
But in that directory there are only bink videos.
base/sound/vo/video
deployment.bik
hydrocon.bik
video_bfg.bik
video_ipn_news.bik
video_recycling.bik
epd.bik
mfs.bik
video_chaingun.bik
video_marine_sops.bik
video_soulcube.bik
generator.bik
video_alphalabs_intro.bik
video_demon_museum.bik
video_meyers_report.bik
video_tablets.bik
grabber.bik
video_ancient_civ.bik
video_ian_report.bik
video_plasmagun.bik
video_uac_welcome.bik
Do you think that rename VO/vo directory is a bad idea?
Well, from the output you posted above I gathered that the game uses the file 'sound/VO/video/video_marine_sops.bik' which uses the uppercase version.
As a workaround you could probably create a symlink, so you have both versions of the path
Good idea :)
The solution in e61eae4 is kind of verbose. See issue #94.
/RBDOOM-3-BFG/neo/framework/File.cpp: En la función miembro ‘virtual int idFileMemory::Write(const void, int)’: /RBDOOM-3-BFG/neo/framework/File.cpp:847:78: error: formato ‘%lu’ espera un argumento de tipo ‘long unsigned int’, pero el argumento 3 es de tipo ‘size_t {aka unsigned int}’ [-Werror=format] /RBDOOM-3-BFG/neo/framework/File.cpp: En la función miembro ‘void idFile_Memory::PreAllocate(size_t)’: /RBDOOM-3-BFG/neo/framework/File.cpp:933:81: error: formato ‘%lu’ espera un argumento de tipo ‘long unsigned int’, pero el argumento 2 es de tipo ‘size_t {aka unsigned int}’ [-Werror=format] /RBDOOM-3-BFG/neo/framework/File.cpp: En la función miembro ‘void idFile_Memory::TruncateData(size_t)’: /RBDOOM-3-BFG/neo/framework/File.cpp:1119:104: error: formato ‘%lu’ espera un argumento de tipo ‘long unsigned int’, pero el argumento 2 es de tipo ‘size_t {aka unsigned int}’ [-Werror=format] /RBDOOM-3-BFG/neo/framework/File.cpp:1119:104: error: formato ‘%lu’ espera un argumento de tipo ‘long unsigned int’, pero el argumento 3 es de tipo ‘sizet {aka unsigned int}’ [-Werror=format] cc1plus: algunos avisos se tratan como errores make[2]: ** [CMakeFiles/RBDoom3BFG.dir/framework/File.cpp.o] Error 1 make[1]: * [CMakeFiles/RBDoom3BFG.dir/all] Error 2 make: * [all] Error 2