mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(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:
parent
a9fa6fd506
commit
ac2b6f39b1
@ -166,7 +166,7 @@ int AiNew_Build_RoutePart(Player *p, Ai_PathFinderInfo *PathFinderInfo, byte fla
|
|||||||
PathFinderInfo->position++;
|
PathFinderInfo->position++;
|
||||||
// TODO: problems!
|
// TODO: problems!
|
||||||
if (CmdFailed(cost)) {
|
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 0;
|
||||||
}
|
}
|
||||||
return cost;
|
return cost;
|
||||||
@ -177,7 +177,7 @@ int AiNew_Build_RoutePart(Player *p, Ai_PathFinderInfo *PathFinderInfo, byte fla
|
|||||||
PathFinderInfo->position++;
|
PathFinderInfo->position++;
|
||||||
// TODO: problems!
|
// TODO: problems!
|
||||||
if (CmdFailed(cost)) {
|
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 0;
|
||||||
}
|
}
|
||||||
return cost;
|
return cost;
|
||||||
@ -201,7 +201,7 @@ int AiNew_Build_RoutePart(Player *p, Ai_PathFinderInfo *PathFinderInfo, byte fla
|
|||||||
// Currently, we ignore CMD_ERRORs!
|
// Currently, we ignore CMD_ERRORs!
|
||||||
if (CmdFailed(res) && flag == DC_EXEC && !IsTileType(route[part], MP_STREET) && !EnsureNoVehicle(route[part])) {
|
if (CmdFailed(res) && flag == DC_EXEC && !IsTileType(route[part], MP_STREET) && !EnsureNoVehicle(route[part])) {
|
||||||
// Problem.. let's just abort it all!
|
// 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;
|
p->ainew.state = AI_STATE_NOTHING;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -993,7 +993,7 @@ static void AiNew_State_BuildStation(Player *p)
|
|||||||
p->ainew.state = AI_STATE_BUILD_PATH;
|
p->ainew.state = AI_STATE_BUILD_PATH;
|
||||||
}
|
}
|
||||||
if (CmdFailed(res)) {
|
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;
|
p->ainew.state = AI_STATE_NOTHING;
|
||||||
// If the first station _was_ build, destroy it
|
// If the first station _was_ build, destroy it
|
||||||
if (p->ainew.temp != 0)
|
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);
|
res = AiNew_Build_Depot(p, p->ainew.depot_tile, p->ainew.depot_direction, DC_EXEC);
|
||||||
if (CmdFailed(res)) {
|
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;
|
p->ainew.state = AI_STATE_NOTHING;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -641,7 +641,7 @@ static void StartScenario(void)
|
|||||||
|
|
||||||
// invalid type
|
// invalid type
|
||||||
if (_file_to_saveload.mode == SL_INVALID) {
|
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);
|
ShowErrorMessage(INVALID_STRING_ID, STR_4009_GAME_LOAD_FAILED, 0, 0);
|
||||||
_game_mode = GM_MENU;
|
_game_mode = GM_MENU;
|
||||||
return;
|
return;
|
||||||
|
@ -1655,7 +1655,7 @@ make_red:
|
|||||||
ssd->next_dir[ssd->cur_stack] = _dir_from_track[ssd->bit[i]];
|
ssd->next_dir[ssd->cur_stack] = _dir_from_track[ssd->bit[i]];
|
||||||
ssd->cur_stack++;
|
ssd->cur_stack++;
|
||||||
} else {
|
} else {
|
||||||
printf("NUM_SSD_STACK too small\n"); /// @todo WTF is this???
|
DEBUG(misc, 0) ("NUM_SSD_STACK too small"); /// @todo WTF is this???
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1629,7 +1629,7 @@ int GetSavegameType(char *file)
|
|||||||
|
|
||||||
f = fopen(file, "rb");
|
f = fopen(file, "rb");
|
||||||
if (fread(&hdr, sizeof(hdr), 1, f) != 1) {
|
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
|
mode = SL_LOAD; // don't try to get filename, just show name as it is written
|
||||||
} else {
|
} else {
|
||||||
// see if we have any loader for this type.
|
// see if we have any loader for this type.
|
||||||
|
@ -296,8 +296,8 @@ static uint32 ConvertSdlKeyIntoMy(SDL_keysym *sym)
|
|||||||
if (sym->mod & KMOD_ALT) key |= WKC_ALT;
|
if (sym->mod & KMOD_ALT) key |= WKC_ALT;
|
||||||
// these two lines really help porting hotkey combos. Uncomment to use -- Bjarni
|
// these two lines really help porting hotkey combos. Uncomment to use -- Bjarni
|
||||||
#if 0
|
#if 0
|
||||||
printf("scancode character pressed %d\n", sym->scancode);
|
DEBUG(driver, 0) ("scancode character pressed %d", sym->scancode);
|
||||||
printf("unicode character pressed %d\n", sym->unicode);
|
DEBUG(driver, 0) ("unicode character pressed %d", sym->unicode);
|
||||||
#endif
|
#endif
|
||||||
return (key << 16) + sym->unicode;
|
return (key << 16) + sym->unicode;
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ protected:
|
|||||||
// some statistics
|
// some statistics
|
||||||
if (last_date != _date) {
|
if (last_date != _date) {
|
||||||
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;
|
_total_pf_time_us = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user