mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 02:32:18 +00:00
Removed flipVertical option from R_WritePNG
This commit is contained in:
parent
2262599707
commit
ab2ee0612b
9 changed files with 11 additions and 11 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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<byte*>( pic ), 4, width, height, true, "fs_basepath" );
|
||||
R_WritePNG( mergedName, static_cast<byte*>( 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<byte*>( roughPic ), 4, roughWidth, roughHeight, true, "fs_basepath" );
|
||||
R_WritePNG( mergedName, static_cast<byte*>( roughPic ), 4, roughWidth, roughHeight, "fs_basepath" );
|
||||
|
||||
mtrBuffer += va( "\trmaomap %s\n", mergedName.c_str() );
|
||||
}
|
||||
|
|
|
@ -849,7 +849,7 @@ bool R_ReadPixelsRGB8( nvrhi::IDevice* device, CommonRenderPasses* pPasses, nvrh
|
|||
#if defined(__APPLE__)
|
||||
R_WritePNG( fullname, static_cast<byte*>( pData ), 4, desc.width, desc.height, true, "fs_savepath" );
|
||||
#else
|
||||
R_WritePNG( fullname, static_cast<byte*>( pData ), 4, desc.width, desc.height, true, "fs_basepath" );
|
||||
R_WritePNG( fullname, static_cast<byte*>( pData ), 4, desc.width, desc.height, "fs_basepath" );
|
||||
#endif
|
||||
|
||||
if( newData )
|
||||
|
|
|
@ -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" );
|
||||
|
||||
|
||||
|
|
|
@ -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" );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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<byte> compressedData( width * height * 4 * 1.02 + 12 );
|
||||
|
|
|
@ -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() )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue