diff --git a/neo/framework/DeclManager.cpp b/neo/framework/DeclManager.cpp index fbcc84e9..17a31cec 100644 --- a/neo/framework/DeclManager.cpp +++ b/neo/framework/DeclManager.cpp @@ -3052,7 +3052,7 @@ void idDeclManagerLocal::ExportImagesToTrenchBroom_f( const idCmdArgs& args ) if( img.width > 16 && img.height > 16 ) { - R_WritePNG( exportName, scaled, 4, img.width, img.height, true, "fs_basepath" ); + R_WritePNG( exportName, scaled, 4, img.width, img.height, "fs_basepath" ); } else { @@ -3066,7 +3066,7 @@ void idDeclManagerLocal::ExportImagesToTrenchBroom_f( const idCmdArgs& args ) { if( img.width > 16 && img.height > 16 ) { - R_WritePNG( exportName, rgba.Ptr(), 4, img.width, img.height, true, "fs_basepath" ); + R_WritePNG( exportName, rgba.Ptr(), 4, img.width, img.height, "fs_basepath" ); } else { diff --git a/neo/renderer/Image.h b/neo/renderer/Image.h index c48b8021..67159682 100644 --- a/neo/renderer/Image.h +++ b/neo/renderer/Image.h @@ -533,7 +533,7 @@ void R_WriteTGA( const char* filename, const byte* data, int width, int height, // data is in top-to-bottom raster order unless flipVertical is set // RB begin -void R_WritePNG( const char* filename, const byte* data, int bytesPerPixel, int width, int height, bool flipVertical = false, const char* basePath = "fs_savepath" ); +void R_WritePNG( const char* filename, const byte* data, int bytesPerPixel, int width, int height, const char* basePath = "fs_savepath" ); void R_WriteEXR( const char* filename, const void* data, int channelsPerPixel, int width, int height, const char* basePath = "fs_savepath" ); // RB end diff --git a/neo/renderer/Image_files.cpp b/neo/renderer/Image_files.cpp index 5bff6807..4eefac4d 100644 --- a/neo/renderer/Image_files.cpp +++ b/neo/renderer/Image_files.cpp @@ -515,7 +515,7 @@ static void WriteScreenshotForSTBIW( void* context, void* data, int size ) R_WritePNG ================ */ -void R_WritePNG( const char* filename, const byte* data, int bytesPerPixel, int width, int height, bool flipVertical, const char* basePath ) +void R_WritePNG( const char* filename, const byte* data, int bytesPerPixel, int width, int height, const char* basePath ) { if( bytesPerPixel != 4 && bytesPerPixel != 3 ) { diff --git a/neo/renderer/Material.cpp b/neo/renderer/Material.cpp index 5b3c31ad..09503040 100644 --- a/neo/renderer/Material.cpp +++ b/neo/renderer/Material.cpp @@ -4030,7 +4030,7 @@ CONSOLE_COMMAND_SHIP( makeMaterials, "Make .mtr file from a models or textures f // don't destroy the original image and save it as new one idStr mergedName = baseName + "_rgba.png"; - R_WritePNG( mergedName, static_cast( pic ), 4, width, height, true, "fs_basepath" ); + R_WritePNG( mergedName, static_cast( pic ), 4, width, height, "fs_basepath" ); mtrBuffer += "\t{\n"; mtrBuffer += "\t\tblend basecolormap\n"; @@ -4184,7 +4184,7 @@ CONSOLE_COMMAND_SHIP( makeMaterials, "Make .mtr file from a models or textures f // don't destroy the original image and save it as new one idStr mergedName = baseName + "_rmao.png"; - R_WritePNG( mergedName, static_cast( roughPic ), 4, roughWidth, roughHeight, true, "fs_basepath" ); + R_WritePNG( mergedName, static_cast( roughPic ), 4, roughWidth, roughHeight, "fs_basepath" ); mtrBuffer += va( "\trmaomap %s\n", mergedName.c_str() ); } diff --git a/neo/renderer/RenderSystem_init.cpp b/neo/renderer/RenderSystem_init.cpp index 3c18d6c1..7e253e6e 100644 --- a/neo/renderer/RenderSystem_init.cpp +++ b/neo/renderer/RenderSystem_init.cpp @@ -849,7 +849,7 @@ bool R_ReadPixelsRGB8( nvrhi::IDevice* device, CommonRenderPasses* pPasses, nvrh #if defined(__APPLE__) R_WritePNG( fullname, static_cast( pData ), 4, desc.width, desc.height, true, "fs_savepath" ); #else - R_WritePNG( fullname, static_cast( pData ), 4, desc.width, desc.height, true, "fs_basepath" ); + R_WritePNG( fullname, static_cast( pData ), 4, desc.width, desc.height, "fs_basepath" ); #endif if( newData ) diff --git a/neo/renderer/RenderWorld_envprobes.cpp b/neo/renderer/RenderWorld_envprobes.cpp index c49b4733..2dcf1d45 100644 --- a/neo/renderer/RenderWorld_envprobes.cpp +++ b/neo/renderer/RenderWorld_envprobes.cpp @@ -1213,7 +1213,7 @@ CONSOLE_COMMAND( makeBrdfLUT, "make a GGX BRDF lookup table", NULL ) idStr fullname = "env/_brdfLut.png"; idLib::Printf( "writing %s\n", fullname.c_str() ); - R_WritePNG( fullname, ldrBuffer, 4, outSize, outSize, true, "fs_basepath" ); + R_WritePNG( fullname, ldrBuffer, 4, outSize, outSize, "fs_basepath" ); //R_WriteEXR( "env/_brdfLut.exr", hdrBuffer, 4, outSize, outSize, "fs_basepath" ); diff --git a/neo/swf/SWF_Image.cpp b/neo/swf/SWF_Image.cpp index 2f2d8db2..a153f7e0 100644 --- a/neo/swf/SWF_Image.cpp +++ b/neo/swf/SWF_Image.cpp @@ -391,7 +391,7 @@ void idSWF::WriteSwfImageAtlas( const char* filename ) // the TGA is only for examination during development //R_WriteTGA( filename, swfAtlas.Ptr(), atlasWidth, atlasHeight, false, "fs_basepath" ); - R_WritePNG( filename, swfAtlas.Ptr(), 4, atlasWidth, atlasHeight, true, "fs_basepath" ); + R_WritePNG( filename, swfAtlas.Ptr(), 4, atlasWidth, atlasHeight, "fs_basepath" ); } /* diff --git a/neo/swf/SWF_Load.cpp b/neo/swf/SWF_Load.cpp index 8149a7dc..c58cee72 100644 --- a/neo/swf/SWF_Load.cpp +++ b/neo/swf/SWF_Load.cpp @@ -236,7 +236,7 @@ void idSWF::WriteSWF( const char* swfFilename, const byte* atlasImageRGBA, int a filenameWithoutExt.StripFileExtension(); sprintf( imageExportFileName, "exported/%s/image_characterid_%i.png", filenameWithoutExt.c_str(), i ); - R_WritePNG( imageExportFileName.c_str(), pngData.Ptr(), 4, width, height, true, "fs_basepath" ); + R_WritePNG( imageExportFileName.c_str(), pngData.Ptr(), 4, width, height, "fs_basepath" ); // RB: add some extra space for zlib idTempArray compressedData( width * height * 4 * 1.02 + 12 ); diff --git a/neo/swf/SWF_Main.cpp b/neo/swf/SWF_Main.cpp index d59ac9bf..2bf9a358 100644 --- a/neo/swf/SWF_Main.cpp +++ b/neo/swf/SWF_Main.cpp @@ -303,7 +303,7 @@ idSWF::idSWF( const char* filename_, idSoundWorld* soundWorld_ ) atlasFileNameExport.Replace( "generated/", "exported/" ); atlasFileNameExport.SetFileExtension( ".png" ); - R_WritePNG( atlasFileNameExport, rgba.Ptr(), 4, img.width, img.height, true, "fs_basepath" ); + R_WritePNG( atlasFileNameExport, rgba.Ptr(), 4, img.width, img.height, "fs_basepath" ); if( postLoadExportFlashToSWF.GetBool() ) {