From 472ccf7ad8e62ae06cc53342a5beae35b99e5555 Mon Sep 17 00:00:00 2001 From: avolkov Date: Thu, 23 Feb 2006 23:47:55 +0000 Subject: [PATCH] Added some basic but needed verbose warnings git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2256 8092fc87-c524-0410-9efc-e669fe64eaf9 --- tools/map/mapgen.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/map/mapgen.c b/tools/map/mapgen.c index 09c87eb2a..3a2ada63d 100755 --- a/tools/map/mapgen.c +++ b/tools/map/mapgen.c @@ -446,6 +446,9 @@ static int parseFont(mg_font_t* fnt, const char* key) size = scr_GetFloatDef(buf, 10) / 64.0; *fnt = drv->loadFont(name, size, name); + + if (!*fnt) + mg_verbose(1, "Warning: cannot load font '%s'\n", name); return *fnt != NULL; } @@ -581,6 +584,10 @@ static star_image_t* loadStarImages(const char* key, const char* colors, int siz img->hot.x = r.w / 2; img->hot.y = r.h / 2; } + else + { + mg_verbose(1, "Warning: cannot load image '%s'\n", name); + } } sprintf(buf, "%s.color", starkey); @@ -974,6 +981,8 @@ static soi_t* loadSois(const char* key, int count, script_t* scr) sprintf(buf, "%s.%d.%s", key, i, "font.size"); fntsize = scr_GetFloatDef(buf, scr->soifontsize) / 64.0; soi->font = drv->loadFont(scr->soifont, fntsize, scr->soifont); + if (!soi->font) + mg_verbose(1, "Warning: cannot load font '%s'\n", scr->soifont); } return tab;