From 073e0eb3c9148d6dd8b2c9ce788843b8180351cb Mon Sep 17 00:00:00 2001 From: Darkvater Date: Tue, 26 Dec 2006 17:36:18 +0000 Subject: (svn r7565) -Codechange: Rework DEBUG functionality. Look for appropiate debugging levels to use in debug.h. grfmsg() is now used as a specific debug-function for grf. --- aircraft_cmd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'aircraft_cmd.c') diff --git a/aircraft_cmd.c b/aircraft_cmd.c index 016014c8a..e0613e3e7 100644 --- a/aircraft_cmd.c +++ b/aircraft_cmd.c @@ -1546,8 +1546,7 @@ static void AircraftEventHandler_AtTerminal(Vehicle *v, const AirportFTAClass *a static void AircraftEventHandler_General(Vehicle *v, const AirportFTAClass *apc) { - DEBUG(misc, 0) ("OK, you shouldn't be here, check your Airport Scheme!"); - assert(0); + assert("OK, you shouldn't be here, check your Airport Scheme!" && 0); } static void AircraftEventHandler_TakeOff(Vehicle *v, const AirportFTAClass *apc) { @@ -1748,7 +1747,7 @@ static bool AirportMove(Vehicle *v, const AirportFTAClass *apc) // error handling if (v->u.air.pos >= apc->nofelements) { - DEBUG(misc, 0) ("position %d is not valid for current airport. Max position is %d", v->u.air.pos, apc->nofelements-1); + DEBUG(misc, 0, "[Ap] position %d is not valid for current airport. Max position is %d", v->u.air.pos, apc->nofelements-1); assert(v->u.air.pos < apc->nofelements); } @@ -1783,8 +1782,8 @@ static bool AirportMove(Vehicle *v, const AirportFTAClass *apc) current = current->next; } while (current != NULL); - DEBUG(misc, 0) ("Cannot move further on Airport...! pos:%d state:%d", v->u.air.pos, v->u.air.state); - DEBUG(misc, 0) ("Airport entry point: %d, Vehicle: %d", apc->entry_point, v->index); + DEBUG(misc, 0, "[Ap] cannot move further on Airport! (pos %d state %d)", v->u.air.pos, v->u.air.state); + DEBUG(misc, 0, "[Ap] airport entry point: %d, Vehicle: %d", apc->entry_point, v->index); assert(0); return false; } -- cgit v1.2.3-70-g09d2