Use already defined function in LoadWaterTextures with the same code.
Fixes the TODO from rP16388 / rP16389
Check replaced code is identical to one inside function and it works
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/556/display/redirect
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1070/display/redirect
Only disadvantage that I see, you don't reuse pathname. But it shouldn't touch performance.
Could you also replace (int)i+1 by static_cast<int>(i) + 1 or replace format %02d by %02zu?
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/558/display/redirect
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1072/display/redirect
Anyway we can test it actually works on GLES ?
Any reason not to use int here ?
Can't we replace ARRAY_SIZE(pathname) by PATH_MAX so we don't call a macro to do whatever each time ?
It will be done in another patch as it is case in more places and kind of unrelated to reason of this patch.
Sure, maybe it's just an optimization. I don't know if that macro call is cached...