DebugLevelX to DebugPrint

This commit is contained in:
nehalmistry 2004-05-16 20:49:52 +00:00
parent fc59ef007d
commit af4d716708
7 changed files with 7 additions and 18 deletions

View file

@ -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;

View file

@ -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

View file

@ -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
}

View file

@ -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
}

View file

@ -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
}

View file

@ -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;
}

View file

@ -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())) {