whitespace, small opt in pcx.c

This commit is contained in:
Jeff Teunissen 2001-02-05 23:17:48 +00:00
parent eb8c267925
commit 6bae2b3010
2 changed files with 11 additions and 17 deletions

View file

@ -154,14 +154,13 @@ LoadPCX (QFile *f, int convert)
*/
void
WritePCXfile (char *filename, byte * data, int width, int height,
int rowbytes, byte * palette, qboolean upload, qboolean flip)
int rowbytes, byte * palette, qboolean upload, qboolean flip)
{
int i, j, length;
pcx_t *pcx;
byte *pack;
int i, j, length;
pcx_t *pcx;
byte *pack;
pcx = Hunk_TempAlloc (width * height * 2 + 1000);
if (pcx == NULL) {
if (!(pcx = Hunk_TempAlloc (width * height * 2 + 1000))) {
Con_Printf ("WritePCXfile: not enough memory\n");
return;
}

View file

@ -660,26 +660,21 @@ SCR_ScreenShot_f (void)
{
char pcxname[MAX_OSPATH];
//
// find a file name to save it to
//
if (!COM_NextFilename (pcxname, "qf", ".pcx")) {
Con_Printf ("SCR_ScreenShot_f: Couldn't create a PCX");
return;
}
//
// save the pcx file
//
D_EnableBackBufferAccess (); // enable direct drawing of console
// to back
// buffer
// enable direct drawing of console to back buffer
D_EnableBackBufferAccess ();
// save the pcx file
WritePCXfile (pcxname, vid.buffer, vid.width, vid.height, vid.rowbytes,
host_basepal, false, false);
D_DisableBackBufferAccess (); // for adapters that can't stay
// mapped in
// for linear writes all the time
// for adapters that can't stay mapped in for linear writes all the time
D_DisableBackBufferAccess ();
Con_Printf ("Wrote %s\n", pcxname);
}