diff options
author | Fabian Greffrath | 2014-03-17 17:22:37 +0100 |
---|---|---|
committer | Fabian Greffrath | 2014-03-17 17:22:37 +0100 |
commit | a22e4a163bb2cbf0939b4b73f4f889012c0fb414 (patch) | |
tree | 9b5ad74b00e576f18507ee787f250dad1c43f893 | |
parent | 002822dfa2bd78f946b7e4730004220919d4ddb9 (diff) | |
download | chocolate-doom-a22e4a163bb2cbf0939b4b73f4f889012c0fb414.tar.gz chocolate-doom-a22e4a163bb2cbf0939b4b73f4f889012c0fb414.tar.bz2 chocolate-doom-a22e4a163bb2cbf0939b4b73f4f889012c0fb414.zip |
Add some strictly unnecessary curly braces.
-rw-r--r-- | src/v_video.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/v_video.c b/src/v_video.c index 60817086..4f38c5c3 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -738,12 +738,16 @@ void WritePNGfile(char *filename, byte *data, handle = fopen(filename, "wb"); if (!handle) + { return; + } ppng = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, error_fn, warning_fn); if (!ppng) + { return; + } pinfo = png_create_info_struct(ppng); if (!pinfo) @@ -778,7 +782,9 @@ void WritePNGfile(char *filename, byte *data, png_write_info(ppng, pinfo); for (i = 0; i < SCREENHEIGHT; i++) + { png_write_row(ppng, data + i*SCREENWIDTH); + } png_write_end(ppng, pinfo); png_destroy_write_struct(&ppng, &pinfo); @@ -801,10 +807,14 @@ void V_ScreenShot(char *format) #ifdef HAVE_LIBPNG if (png_screenshots) + { ext = "png"; + } else #endif + { ext = "pcx"; + } for (i=0; i<=99; i++) { @@ -823,15 +833,19 @@ void V_ScreenShot(char *format) #ifdef HAVE_LIBPNG if (png_screenshots) + { WritePNGfile(lbmname, I_VideoBuffer, SCREENWIDTH, SCREENHEIGHT, W_CacheLumpName (DEH_String("PLAYPAL"), PU_CACHE)); + } else #endif + { // save the pcx file WritePCXfile(lbmname, I_VideoBuffer, SCREENWIDTH, SCREENHEIGHT, W_CacheLumpName (DEH_String("PLAYPAL"), PU_CACHE)); + } } #define MOUSE_SPEED_BOX_WIDTH 120 |