(svn r7048) -Cleanup: DEBUG doesn't need a newline character, use DEBUG instead of printf and the

verb is build/built/built not build/*/build or build/*/builded.
This commit is contained in:
Darkvater 2006-11-03 01:18:40 +00:00
parent a9fa6fd506
commit ac2b6f39b1
7 changed files with 11 additions and 11 deletions

View File

@ -166,7 +166,7 @@ int AiNew_Build_RoutePart(Player *p, Ai_PathFinderInfo *PathFinderInfo, byte fla
PathFinderInfo->position++;
// TODO: problems!
if (CmdFailed(cost)) {
DEBUG(ai,0)("[AiNew - BuildPath] We have a serious problem: tunnel could not be build!");
DEBUG(ai,0)("[AiNew - BuildPath] We have a serious problem: tunnel could not be built!");
return 0;
}
return cost;
@ -177,7 +177,7 @@ int AiNew_Build_RoutePart(Player *p, Ai_PathFinderInfo *PathFinderInfo, byte fla
PathFinderInfo->position++;
// TODO: problems!
if (CmdFailed(cost)) {
DEBUG(ai,0)("[AiNew - BuildPath] We have a serious problem: bridge could not be build!");
DEBUG(ai,0)("[AiNew - BuildPath] We have a serious problem: bridge could not be built!");
return 0;
}
return cost;
@ -201,7 +201,7 @@ int AiNew_Build_RoutePart(Player *p, Ai_PathFinderInfo *PathFinderInfo, byte fla
// Currently, we ignore CMD_ERRORs!
if (CmdFailed(res) && flag == DC_EXEC && !IsTileType(route[part], MP_STREET) && !EnsureNoVehicle(route[part])) {
// Problem.. let's just abort it all!
DEBUG(ai,0)("Darn, the route could not be builded.. aborting!");
DEBUG(ai,0)("Darn, the route could not be built.. aborting!");
p->ainew.state = AI_STATE_NOTHING;
return 0;
}

View File

@ -993,7 +993,7 @@ static void AiNew_State_BuildStation(Player *p)
p->ainew.state = AI_STATE_BUILD_PATH;
}
if (CmdFailed(res)) {
DEBUG(ai,0)("[AiNew - BuildStation] Strange but true... station can not be build!");
DEBUG(ai,0)("[AiNew - BuildStation] Strange but true... station can not be built!");
p->ainew.state = AI_STATE_NOTHING;
// If the first station _was_ build, destroy it
if (p->ainew.temp != 0)
@ -1122,7 +1122,7 @@ static void AiNew_State_BuildDepot(Player *p)
res = AiNew_Build_Depot(p, p->ainew.depot_tile, p->ainew.depot_direction, DC_EXEC);
if (CmdFailed(res)) {
DEBUG(ai,0)("[AiNew - BuildDepot] Strange but true... depot can not be build!");
DEBUG(ai,0)("[AiNew - BuildDepot] Strange but true... depot can not be built!");
p->ainew.state = AI_STATE_NOTHING;
return;
}

View File

@ -641,7 +641,7 @@ static void StartScenario(void)
// invalid type
if (_file_to_saveload.mode == SL_INVALID) {
printf("Savegame is obsolete or invalid format: %s\n", _file_to_saveload.name);
DEBUG(misc, 0) ("[Sl] Savegame is obsolete or invalid format: %s", _file_to_saveload.name);
ShowErrorMessage(INVALID_STRING_ID, STR_4009_GAME_LOAD_FAILED, 0, 0);
_game_mode = GM_MENU;
return;

View File

@ -1655,7 +1655,7 @@ make_red:
ssd->next_dir[ssd->cur_stack] = _dir_from_track[ssd->bit[i]];
ssd->cur_stack++;
} else {
printf("NUM_SSD_STACK too small\n"); /// @todo WTF is this???
DEBUG(misc, 0) ("NUM_SSD_STACK too small"); /// @todo WTF is this???
}
}

View File

@ -1629,7 +1629,7 @@ int GetSavegameType(char *file)
f = fopen(file, "rb");
if (fread(&hdr, sizeof(hdr), 1, f) != 1) {
printf("Savegame is obsolete or invalid format.\n");
DEBUG(misc, 0) ("[Sl] Savegame is obsolete or invalid format");
mode = SL_LOAD; // don't try to get filename, just show name as it is written
} else {
// see if we have any loader for this type.

View File

@ -296,8 +296,8 @@ static uint32 ConvertSdlKeyIntoMy(SDL_keysym *sym)
if (sym->mod & KMOD_ALT) key |= WKC_ALT;
// these two lines really help porting hotkey combos. Uncomment to use -- Bjarni
#if 0
printf("scancode character pressed %d\n", sym->scancode);
printf("unicode character pressed %d\n", sym->unicode);
DEBUG(driver, 0) ("scancode character pressed %d", sym->scancode);
DEBUG(driver, 0) ("unicode character pressed %d", sym->unicode);
#endif
return (key << 16) + sym->unicode;
}

View File

@ -153,7 +153,7 @@ protected:
// some statistics
if (last_date != _date) {
last_date = _date;
DEBUG(yapf, 1)("pf time today:%5d ms\n", _total_pf_time_us / 1000);
DEBUG(yapf, 1) ("pf time today:%5d ms", _total_pf_time_us / 1000);
_total_pf_time_us = 0;
}