diff options
author | dominik <dominik@openttd.org> | 2004-08-14 10:32:56 +0000 |
---|---|---|
committer | dominik <dominik@openttd.org> | 2004-08-14 10:32:56 +0000 |
commit | 47f517d6f2bc27c46f8f763ba0f4ff2fd3276056 (patch) | |
tree | 3a6f0c8196ac856546817a320df74927cfada82f | |
parent | b3cdae2af1c6c8e33d0a506d33694e4c6b8f679f (diff) | |
download | openttd-47f517d6f2bc27c46f8f763ba0f4ff2fd3276056.tar.xz |
(svn r52) grf messages are only displayed with debug level above 0. (use -d1 parameter)
-rw-r--r-- | grfspecial.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/grfspecial.c b/grfspecial.c index 7c8cf1b73..69a905be0 100644 --- a/grfspecial.c +++ b/grfspecial.c @@ -41,6 +41,7 @@ static void CDECL grfmsg(enum grfmsg_severity severity, const char *str, ...) static const char * const severitystr[4] = { "Notice", "Warning", "Error", "Fatal" }; va_list va; + if(_debug_misc_level==0) return; va_start(va, str); fprintf(stderr, "[%s][%s] ", _cur_grffile, severitystr[severity]); vfprintf(stderr, str, va); @@ -928,7 +929,8 @@ static void GRFInfo(byte *buf, int len) uint8 version = buf[1]; // this is de facto big endian - grf_load_dword() unsuitable uint32 grfid = buf[2] << 24 | buf[3] << 16 | buf[4] << 8 | buf[5]; - printf("[%s] Loaded GRFv%d set %08lx - %s:\n%s\n", _cur_grffile, version, grfid, buf+6, buf+6+strlen(buf+6)+1); + if(_debug_misc_level!=0) + printf("[%s] Loaded GRFv%d set %08lx - %s:\n%s\n", _cur_grffile, version, grfid, buf+6, buf+6+strlen(buf+6)+1); } } |