From 8fbafa0f4b9ab9780e3bae15b272e5754b8300a6 Mon Sep 17 00:00:00 2001 From: Per Inge Mathisen Date: Wed, 28 Dec 2005 11:46:45 +0000 Subject: [PATCH] Add more descriptive error message for missing texture pages. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@378 4a71c877-e1ca-e34f-864e-861f7616d084 --- lib/ivis_opengl/tex.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/ivis_opengl/tex.c b/lib/ivis_opengl/tex.c index 661905a1b..00ae02b07 100644 --- a/lib/ivis_opengl/tex.c +++ b/lib/ivis_opengl/tex.c @@ -165,7 +165,15 @@ int iV_GetTexture(char *filename) } /* This should never happen - by now all textures should have been loaded. */ - debug(LOG_ERROR, "iV_TexLoad: texture %s not loaded!", filename); + debug(LOG_ERROR, "*** texture %s not loaded! ***", filename); + debug(LOG_ERROR, "Available texture pages in memory:"); + for (i = 0; i < _TEX_INDEX; i++) { + debug(LOG_ERROR, " %02d : %s", i, _TEX_PAGE[i].name); + } + debug(LOG_ERROR, "This error probably means you did not specify for this texture"); + debug(LOG_ERROR, "to be preloaded in the appropriate wrf files before referencing"); + debug(LOG_ERROR, "it in some pie file. Remember that patches override several"); + debug(LOG_ERROR, "standard wrf files as well."); assert(FALSE); return -1; }