From af4d716708547d800d5478a417e4a0bd7fc7cb17 Mon Sep 17 00:00:00 2001
From: nehalmistry <>
Date: Sun, 16 May 2004 20:49:52 +0000
Subject: [PATCH] DebugLevelX to DebugPrint

---
 src/action/action_research.cpp |  2 +-
 src/action/action_resource.cpp |  2 +-
 src/ai/ai.cpp                  |  2 +-
 src/map/map_draw.cpp           |  2 +-
 src/map/map_fog.cpp            |  2 +-
 src/pathfinder/pathfinder.cpp  |  2 +-
 src/sound/flac.cpp             | 13 +------------
 7 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/src/action/action_research.cpp b/src/action/action_research.cpp
index 5a40bfc8e..e2801f8a2 100644
--- a/src/action/action_research.cpp
+++ b/src/action/action_research.cpp
@@ -73,7 +73,7 @@ global void HandleActionResearch(Unit* unit)
 		// Check if an other building has already started?
 		//
 		if (unit->Player->UpgradeTimers.Upgrades[upgrade-Upgrades]) {
-			DebugLevel0Fn("Two researches running\n");
+			DebugPrint("Two researches running\n");
 			PlayerAddCosts(unit->Player, upgrade->Costs);
 
 			unit->Reset = unit->Wait = 1;
diff --git a/src/action/action_resource.cpp b/src/action/action_resource.cpp
index 2666f0451..a8ece88f3 100644
--- a/src/action/action_resource.cpp
+++ b/src/action/action_resource.cpp
@@ -155,7 +155,7 @@ local int StartGathering(Unit* unit)
 		// This shouldn't happend?
 #if 0
 		if (!ForestOnMap(unit->Orders->X, unit->Orders->Y)) {
-			DebugLevel0Fn("Wood gone, just like that?\n");
+			DebugPrint("Wood gone, just like that?\n");
 			return 0;
 		}
 #endif
diff --git a/src/ai/ai.cpp b/src/ai/ai.cpp
index 8d21317eb..17d9a5174 100644
--- a/src/ai/ai.cpp
+++ b/src/ai/ai.cpp
@@ -1865,7 +1865,7 @@ global void AiEachSecond(Player* player)
 	ev = rdtsc();
 	sx = (ev - sv);
 	mv = (mv + sx) / 2;
-	DebugLevel1Fn("%ld %ld\n" _C_ sx / 1000 _C_ mv / 1000);
+	DebugPrint("%ld %ld\n" _C_ sx / 1000 _C_ mv / 1000);
 #endif
 }
 
diff --git a/src/map/map_draw.cpp b/src/map/map_draw.cpp
index a8119d000..ce5477cf4 100644
--- a/src/map/map_draw.cpp
+++ b/src/map/map_draw.cpp
@@ -314,7 +314,7 @@ global void DrawMapBackgroundInViewport(const Viewport* vp, int x, int y)
 		mv = sx;
 	}
 
-	DebugLevel1("%ld %ld %3ld\n" _C_ (long)sx _C_ mv _C_ (sx * 100) / mv);
+	DebugPrint("%ld %ld %3ld\n" _C_ (long)sx _C_ mv _C_ (sx * 100) / mv);
 #endif
 }
 
diff --git a/src/map/map_fog.cpp b/src/map/map_fog.cpp
index 2bce6e60f..6cac10f03 100644
--- a/src/map/map_fog.cpp
+++ b/src/map/map_fog.cpp
@@ -918,7 +918,7 @@ global void DrawMapFogOfWar(Viewport* vp, int x, int y)
 		mv = sx;
 	}
 
-	DebugLevel1("%ld %ld %3ld\n" _C_ (long)sx _C_ mv _C_ (sx * 100) / mv);
+	DebugPrint("%ld %ld %3ld\n" _C_ (long)sx _C_ mv _C_ (sx * 100) / mv);
 #endif
 }
 
diff --git a/src/pathfinder/pathfinder.cpp b/src/pathfinder/pathfinder.cpp
index e3b41f3b7..b02f45430 100644
--- a/src/pathfinder/pathfinder.cpp
+++ b/src/pathfinder/pathfinder.cpp
@@ -402,7 +402,7 @@ global int PlaceReachable(Unit* src, int x, int y, int w, int h, int minrange __
 	//  Find a path to the place.
 	//
 	if ((depth=CheckPlaceInMatrix(x, y, w, h, range, LocalMatrix)) < 0) {
-		DebugLevel1("Can't move to destination, not route to goal\n");
+		DebugPrint("Can't move to destination, not route to goal\n");
 		return 0;
 	}
 
diff --git a/src/sound/flac.cpp b/src/sound/flac.cpp
index 9ec396593..9c4b041ca 100644
--- a/src/sound/flac.cpp
+++ b/src/sound/flac.cpp
@@ -73,7 +73,7 @@ typedef struct _flac_data_ {
 static void FLAC_error_callback(const FLAC__StreamDecoder *stream,
 	FLAC__StreamDecoderErrorStatus status, void *user)
 {
-	DebugLevel0Fn(" %s\n" _C_ FLAC__StreamDecoderErrorStatusString[status]);
+	DebugPrint(" %s\n" _C_ FLAC__StreamDecoderErrorStatusString[status]);
 }
 
 /**
@@ -94,8 +94,6 @@ static FLAC__StreamDecoderReadStatus FLAC_read_callback(
 	FlacData *data;
 	unsigned int i;
 
-	DebugLevel3Fn("Read callback %d\n" _C_ *bytes);
-
 	sample = user;
 	data = sample->User;
 
@@ -131,9 +129,6 @@ static void FLAC_metadata_callback(const FLAC__StreamDecoder *stream,
 			Assert(metadata->data.stream_info.total_samples);
 			sample->Buffer = malloc(metadata->data.stream_info.total_samples * 4);
 		}
-
-		DebugLevel3Fn("Stream %d Channels, %d frequency, %d bits\n" _C_
-			sample->Channels _C_ sample->Frequency _C_ sample->SampleSize);
 	}
 }
 
@@ -159,10 +154,6 @@ static FLAC__StreamDecoderWriteStatus FLAC_write_callback(
 	char *buf;
 	int ssize;
 
-	DebugLevel3Fn("Write callback %d bits, %d channel, %d bytes\n" _C_
-		frame->header.bits_per_sample _C_ frame->header.channels _C_
-		frame->header.blocksize);
-
 	sample = user;
 	data = sample->User;
 
@@ -331,8 +322,6 @@ global Sample* LoadFlac(const char *name, int flags)
 		return NULL;
 	}
 
-	DebugLevel2Fn("Loading flac file: %s\n" _C_ name);
-
 	CLseek(f, 0, SEEK_SET);
 
 	if (!(stream = FLAC__stream_decoder_new())) {