(svn r1737) Add DEBUG category "map" and use it to print the map size when allocating the map
authortron
Sun, 30 Jan 2005 18:12:37 +0000
changeset 1233 2ee427ec9014
parent 1232 c52bd2905b7d
child 1234 be967571deb7
(svn r1737) Add DEBUG category "map" and use it to print the map size when allocating the map
map.c
ttd.c
variables.h
--- a/map.c	Sun Jan 30 17:53:44 2005 +0000
+++ b/map.c	Sun Jan 30 18:12:37 2005 +0000
@@ -21,6 +21,8 @@
 
 	assert(log_x <= 15 && log_y <= 15);
 
+	DEBUG(map, 1)("Allocating map of size %dx%d", log_x, log_y);
+
 	_map_log_x = log_x;
 	_map_log_y = log_y;
 
--- a/ttd.c	Sun Jan 30 17:53:44 2005 +0000
+++ b/ttd.c	Sun Jan 30 18:12:37 2005 +0000
@@ -448,6 +448,7 @@
 		_debug_grf_level = v;
 		_debug_ai_level = v;
 		_debug_net_level = v;
+		_debug_map_level = v;
 	}
 
 	// individual levels
@@ -466,6 +467,7 @@
 		else if IS_LVL("grf") p = &_debug_grf_level;
 		else if IS_LVL("ai") p = &_debug_ai_level;
 		else if IS_LVL("net") p = &_debug_net_level;
+		else if IS_LVL("map") p = &_debug_map_level;
 		else {
 			ShowInfoF("Unknown debug level '%.*s'", s-t, t);
 			return;
--- a/variables.h	Sun Jan 30 17:53:44 2005 +0000
+++ b/variables.h	Sun Jan 30 18:12:37 2005 +0000
@@ -445,6 +445,7 @@
 VARDEF int _debug_grf_level;
 VARDEF int _debug_ai_level;
 VARDEF int _debug_net_level;
+VARDEF int _debug_map_level;
 
 /* Forking stuff */
 VARDEF bool _dedicated_forks;