]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - image.c
changed most Sys_Error calls to Con_Printf with appropriate error returns
[xonotic/darkplaces.git] / image.c
diff --git a/image.c b/image.c
index ebed474304d363f9e75d7af9a7d5169247d0dea2..4e372a85aea5dbf3e2dd04a918ebb61ef0fd1b1e 100644 (file)
--- a/image.c
+++ b/image.c
@@ -1303,7 +1303,10 @@ Image_Resample
 void Image_Resample (const void *indata, int inwidth, int inheight, int indepth, void *outdata, int outwidth, int outheight, int outdepth, int bytesperpixel, int quality)
 {
        if (indepth != 1 || outdepth != 1)
 void Image_Resample (const void *indata, int inwidth, int inheight, int indepth, void *outdata, int outwidth, int outheight, int outdepth, int bytesperpixel, int quality)
 {
        if (indepth != 1 || outdepth != 1)
-               Sys_Error("Image_Resample: 3D resampling not supported\n");
+       {
+               Con_Printf ("Image_Resample: 3D resampling not supported\n");
+               return;
+       }
        if (bytesperpixel == 4)
        {
                if (quality)
        if (bytesperpixel == 4)
        {
                if (quality)
@@ -1319,7 +1322,7 @@ void Image_Resample (const void *indata, int inwidth, int inheight, int indepth,
                        Image_Resample24Nolerp(indata, inwidth, inheight, outdata, outwidth, outheight);
        }
        else
                        Image_Resample24Nolerp(indata, inwidth, inheight, outdata, outwidth, outheight);
        }
        else
-               Sys_Error("Image_Resample: unsupported bytesperpixel %i\n", bytesperpixel);
+               Con_Printf ("Image_Resample: unsupported bytesperpixel %i\n", bytesperpixel);
 }
 
 // in can be the same as out
 }
 
 // in can be the same as out
@@ -1327,7 +1330,10 @@ void Image_MipReduce(const qbyte *in, qbyte *out, int *width, int *height, int *
 {
        int x, y, nextrow;
        if (*depth != 1 || destdepth != 1)
 {
        int x, y, nextrow;
        if (*depth != 1 || destdepth != 1)
-               Sys_Error("Image_Resample: 3D resampling not supported\n");
+       {
+               Con_Printf ("Image_Resample: 3D resampling not supported\n");
+               return;
+       }
        nextrow = *width * bytesperpixel;
        if (*width > destwidth)
        {
        nextrow = *width * bytesperpixel;
        if (*width > destwidth)
        {
@@ -1368,7 +1374,7 @@ void Image_MipReduce(const qbyte *in, qbyte *out, int *width, int *height, int *
                                }
                        }
                        else
                                }
                        }
                        else
-                               Sys_Error("Image_MipReduce: unsupported bytesperpixel %i\n", bytesperpixel);
+                               Con_Printf ("Image_MipReduce: unsupported bytesperpixel %i\n", bytesperpixel);
                }
                else
                {
                }
                else
                {
@@ -1403,7 +1409,7 @@ void Image_MipReduce(const qbyte *in, qbyte *out, int *width, int *height, int *
                                }
                        }
                        else
                                }
                        }
                        else
-                               Sys_Error("Image_MipReduce: unsupported bytesperpixel %i\n", bytesperpixel);
+                               Con_Printf ("Image_MipReduce: unsupported bytesperpixel %i\n", bytesperpixel);
                }
        }
        else
                }
        }
        else
@@ -1444,10 +1450,10 @@ void Image_MipReduce(const qbyte *in, qbyte *out, int *width, int *height, int *
                                }
                        }
                        else
                                }
                        }
                        else
-                               Sys_Error("Image_MipReduce: unsupported bytesperpixel %i\n", bytesperpixel);
+                               Con_Printf ("Image_MipReduce: unsupported bytesperpixel %i\n", bytesperpixel);
                }
                else
                }
                else
-                       Sys_Error("Image_MipReduce: desired size already achieved\n");
+                       Con_Printf ("Image_MipReduce: desired size already achieved\n");
        }
 }
 
        }
 }