r688 - trunk

lordhavoc at icculus.org lordhavoc at icculus.org
Fri Apr 7 20:42:44 EDT 2006


Author: lordhavoc
Date: 2006-04-07 20:42:44 -0400 (Fri, 07 Apr 2006)
New Revision: 688

Modified:
   trunk/texture.c
Log:
less error messages when failing to load textures


Modified: trunk/texture.c
===================================================================
--- trunk/texture.c	2006-03-30 10:29:44 UTC (rev 687)
+++ trunk/texture.c	2006-04-08 00:42:44 UTC (rev 688)
@@ -365,7 +365,13 @@
 		if (!side)
 			cubemapsize = pixels_width;
 		if (!cubemappixels[side])
-			Console_Printf("Texture_Load: failed to load cubemap \"%s\" because of missing side \"%s\"\n", r->name, cubemapname);
+		{
+			// if we can't even find the first side, don't complain about a
+			// missing side, instead let the resource manager complain about
+			// the resource failing to load
+			if (side)
+				Console_Printf("Texture_Load: failed to load cubemap \"%s\" because of missing side \"%s\"\n", r->name, cubemapname);
+		}
 		else if (pixels_width != pixels_height)
 			Console_Printf("Texture_Load: failed to load cubemap \"%s\" because side \"%s\" is not square\n", r->name, cubemapname);
 		else if (pixels_width != cubemapsize)
@@ -494,7 +500,8 @@
 	pixels = Texture_LoadTargaFile(r->name, &pixels_width, &pixels_height);
 	if (!pixels)
 	{
-		Console_Printf("Texture_Load: failed to load \"%s\"\n", r->name);
+		// the resource manager will complain for us
+		//Console_Printf("Texture_Load: failed to load \"%s\"\n", r->name);
 		return;
 	}
 




More information about the neither-commits mailing list