1
0
Fork 0

(svn r4529) - Codechange: Use proper naming for hex numbers in debug prints eg. 0xF3A6. Use fixed lengths where applicable (newgrf). Unfortunately '%#X' is unusable since it gives 0XFF3 and '%#x' gives 0xff3 while we want 0xFF3 :P

release/0.5
Darkvater 2006-04-22 13:56:16 +00:00
parent db377b9738
commit 5a8d992eaa
7 changed files with 41 additions and 42 deletions

View File

@ -1210,7 +1210,7 @@ static void VehicleChangeInfo(byte *buf, int len)
} }
if (ignoring) if (ignoring)
grfmsg(GMS_NOTICE, "VehicleChangeInfo: Ignoring property %x (not implemented).", prop); grfmsg(GMS_NOTICE, "VehicleChangeInfo: Ignoring property 0x%02X (not implemented).", prop);
} }
} }
@ -1388,7 +1388,7 @@ static void NewSpriteGroup(byte *buf, int len)
if (HASBIT(groupid, 15)) { if (HASBIT(groupid, 15)) {
dg->ranges[i].group = NewCallBackResultSpriteGroup(groupid); dg->ranges[i].group = NewCallBackResultSpriteGroup(groupid);
} else if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) { } else if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) {
grfmsg(GMS_WARN, "NewSpriteGroup(%02x:0x%x): Groupid %04x does not exist, leaving empty.", setid, numloaded, groupid); grfmsg(GMS_WARN, "NewSpriteGroup(0x%02X:0x%02X): Groupid 0x%04X does not exist, leaving empty.", setid, numloaded, groupid);
dg->ranges[i].group = NULL; dg->ranges[i].group = NULL;
} else { } else {
dg->ranges[i].group = _cur_grffile->spritegroups[groupid]; dg->ranges[i].group = _cur_grffile->spritegroups[groupid];
@ -1402,7 +1402,7 @@ static void NewSpriteGroup(byte *buf, int len)
if (HASBIT(groupid, 15)) { if (HASBIT(groupid, 15)) {
dg->default_group = NewCallBackResultSpriteGroup(groupid); dg->default_group = NewCallBackResultSpriteGroup(groupid);
} else if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) { } else if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) {
grfmsg(GMS_WARN, "NewSpriteGroup(%02x:0x%x): Groupid %04x does not exist, leaving empty.", setid, numloaded, groupid); grfmsg(GMS_WARN, "NewSpriteGroup(0x%02X:0x%02X): Groupid 0x%04X does not exist, leaving empty.", setid, numloaded, groupid);
dg->default_group = NULL; dg->default_group = NULL;
} else { } else {
dg->default_group = _cur_grffile->spritegroups[groupid]; dg->default_group = _cur_grffile->spritegroups[groupid];
@ -1446,7 +1446,7 @@ static void NewSpriteGroup(byte *buf, int len)
if (HASBIT(groupid, 15)) { if (HASBIT(groupid, 15)) {
rg->groups[i] = NewCallBackResultSpriteGroup(groupid); rg->groups[i] = NewCallBackResultSpriteGroup(groupid);
} else if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) { } else if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) {
grfmsg(GMS_WARN, "NewSpriteGroup(%02x:0x%x): Groupid %04x does not exist, leaving empty.", setid, numloaded, groupid); grfmsg(GMS_WARN, "NewSpriteGroup(0x%02X:0x%02X): Groupid 0x%04X does not exist, leaving empty.", setid, numloaded, groupid);
rg->groups[i] = NULL; rg->groups[i] = NULL;
} else { } else {
rg->groups[i] = _cur_grffile->spritegroups[groupid]; rg->groups[i] = _cur_grffile->spritegroups[groupid];
@ -1463,7 +1463,7 @@ static void NewSpriteGroup(byte *buf, int len)
} }
if (_cur_grffile->spriteset_feature != feature) { if (_cur_grffile->spriteset_feature != feature) {
grfmsg(GMS_ERROR, "NewSpriteGroup: Group feature %x doesn't match set feature %x! Playing it risky and trying to use it anyway.", feature, _cur_grffile->spriteset_feature); grfmsg(GMS_ERROR, "NewSpriteGroup: Group feature 0x%02X doesn't match set feature 0x%X! Playing it risky and trying to use it anyway.", feature, _cur_grffile->spriteset_feature);
// return; // XXX: we can't because of MB's newstats.grf --pasky // return; // XXX: we can't because of MB's newstats.grf --pasky
} }
@ -1573,7 +1573,7 @@ static void NewVehicle_SpriteGroupMapping(byte *buf, int len)
uint16 groupid = grf_load_word(&bp); uint16 groupid = grf_load_word(&bp);
if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) { if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) {
grfmsg(GMS_WARN, "VehicleMapSpriteGroup: Spriteset %x out of range %x or empty, skipping.", grfmsg(GMS_WARN, "VehicleMapSpriteGroup: Spriteset 0x%04X out of range 0x%X or empty, skipping.",
groupid, _cur_grffile->spritegroups_count); groupid, _cur_grffile->spritegroups_count);
return; return;
} }
@ -1592,7 +1592,7 @@ static void NewVehicle_SpriteGroupMapping(byte *buf, int len)
uint16 groupid = grf_load_word(&bp); uint16 groupid = grf_load_word(&bp);
if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) { if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) {
grfmsg(GMS_WARN, "VehicleMapSpriteGroup: Spriteset %x out of range %x or empty, skipping.", grfmsg(GMS_WARN, "VehicleMapSpriteGroup: Spriteset 0x%04X out of range 0x%X or empty, skipping.",
groupid, _cur_grffile->spritegroups_count); groupid, _cur_grffile->spritegroups_count);
return; return;
} }
@ -1649,8 +1649,7 @@ static void NewVehicle_SpriteGroupMapping(byte *buf, int len)
byte *bp = &buf[4 + idcount]; byte *bp = &buf[4 + idcount];
if (engine_id > _vehcounts[feature]) { if (engine_id > _vehcounts[feature]) {
grfmsg(GMS_ERROR, "Id %u for feature %x is out of bounds.", grfmsg(GMS_ERROR, "Id %u for feature 0x%02X is out of bounds.", engine_id, feature);
engine_id, feature);
return; return;
} }
@ -1660,10 +1659,10 @@ static void NewVehicle_SpriteGroupMapping(byte *buf, int len)
uint8 ctype = grf_load_byte(&bp); uint8 ctype = grf_load_byte(&bp);
uint16 groupid = grf_load_word(&bp); uint16 groupid = grf_load_word(&bp);
DEBUG(grf, 8) ("VehicleMapSpriteGroup: * [%d] Cargo type %x, group id %x", c, ctype, groupid); DEBUG(grf, 8) ("VehicleMapSpriteGroup: * [%d] Cargo type 0x%X, group id 0x%02X", c, ctype, groupid);
if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) { if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) {
grfmsg(GMS_WARN, "VehicleMapSpriteGroup: Spriteset %x out of range %x or empty, skipping.", groupid, _cur_grffile->spritegroups_count); grfmsg(GMS_WARN, "VehicleMapSpriteGroup: Spriteset 0x%04X out of range 0x%X or empty, skipping.", groupid, _cur_grffile->spritegroups_count);
return; return;
} }
@ -1683,14 +1682,14 @@ static void NewVehicle_SpriteGroupMapping(byte *buf, int len)
byte *bp = buf + 4 + idcount + cidcount * 3; byte *bp = buf + 4 + idcount + cidcount * 3;
uint16 groupid = grf_load_word(&bp); uint16 groupid = grf_load_word(&bp);
DEBUG(grf, 8) ("-- Default group id %x", groupid); DEBUG(grf, 8) ("-- Default group id 0x%04X", groupid);
for (i = 0; i < idcount; i++) { for (i = 0; i < idcount; i++) {
uint8 engine = buf[3 + i] + _vehshifts[feature]; uint8 engine = buf[3 + i] + _vehshifts[feature];
// Don't tell me you don't love duplicated code! // Don't tell me you don't love duplicated code!
if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) { if (groupid >= _cur_grffile->spritegroups_count || _cur_grffile->spritegroups[groupid] == NULL) {
grfmsg(GMS_WARN, "VehicleMapSpriteGroup: Spriteset %x out of range %x or empty, skipping.", groupid, _cur_grffile->spritegroups_count); grfmsg(GMS_WARN, "VehicleMapSpriteGroup: Spriteset 0x%04X out of range 0x%X or empty, skipping.", groupid, _cur_grffile->spritegroups_count);
return; return;
} }
@ -1750,7 +1749,7 @@ static void VehicleNewName(byte *buf, int len)
} }
endid = id + num; endid = id + num;
DEBUG(grf, 6) ("VehicleNewName: About to rename engines %d..%d (feature %d) in language 0x%x.", DEBUG(grf, 6) ("VehicleNewName: About to rename engines %d..%d (feature %d) in language 0x%02X.",
id, endid, feature, lang); id, endid, feature, lang);
name = (const char*)buf; /*transfer read value*/ name = (const char*)buf; /*transfer read value*/
@ -1785,7 +1784,7 @@ static void VehicleNewName(byte *buf, int len)
break; break;
default: default:
DEBUG(grf, 7) ("VehicleNewName: Unsupported ID (%x)", id); DEBUG(grf, 7) ("VehicleNewName: Unsupported ID (0x%04X)", id);
break; break;
} }
break; break;
@ -1797,7 +1796,7 @@ static void VehicleNewName(byte *buf, int len)
switch (GB(id, 8,8)) { switch (GB(id, 8,8)) {
case 0xC9: /* House name */ case 0xC9: /* House name */
default: default:
DEBUG(grf, 7) ("VehicleNewName: Unsupported ID (%x)", id); DEBUG(grf, 7) ("VehicleNewName: Unsupported ID (0x%04X)", id);
} }
break; break;
@ -1806,7 +1805,7 @@ static void VehicleNewName(byte *buf, int len)
AddGRFString(_cur_spriteid, id, lang, name); AddGRFString(_cur_spriteid, id, lang, name);
break; break;
default : default :
DEBUG(grf,7) ("VehicleNewName: Unsupported feature (%x)", feature); DEBUG(grf,7) ("VehicleNewName: Unsupported feature (0x%02X)", feature);
break; break;
#endif #endif
} }
@ -1836,7 +1835,7 @@ static void GraphicsNew(byte *buf, int len)
type = grf_load_byte(&buf); type = grf_load_byte(&buf);
num = grf_load_extended(&buf); num = grf_load_extended(&buf);
grfmsg(GMS_NOTICE, "GraphicsNew: Custom graphics (type %x) sprite block of length %d (unimplemented, ignoring).\n", grfmsg(GMS_NOTICE, "GraphicsNew: Custom graphics (type 0x%02X) sprite block of length %d (unimplemented, ignoring).\n",
type, num); type, num);
} }
@ -1946,7 +1945,7 @@ static void SkipIf(byte *buf, int len)
} }
} }
DEBUG(grf, 7) ("Test condtype %d, param %x, condval %x", condtype, param_val, cond_val); DEBUG(grf, 7) ("Test condtype %d, param 0x%08X, condval 0x%08X", condtype, param_val, cond_val);
switch (condtype) { switch (condtype) {
case 0: result = !!(param_val & (1 << cond_val)); case 0: result = !!(param_val & (1 << cond_val));
break; break;
@ -2367,7 +2366,7 @@ static void DefineGotoLabel(byte *buf, int len)
l->next = label; l->next = label;
} }
grfmsg(GMS_NOTICE, "DefineGotoLabel: GOTO target with label 0x%X", label->label); grfmsg(GMS_NOTICE, "DefineGotoLabel: GOTO target with label 0x%02X", label->label);
} }
static void InitializeGRFSpecial(void) static void InitializeGRFSpecial(void)

View File

@ -169,7 +169,7 @@ static int VehicleSpecificProperty(const Vehicle *v, byte var) {
break; break;
} }
DEBUG(grf, 1)("Unhandled vehicle property 0x%x (var 0x%x), type 0x%x", var, var + 0x80, v->type); DEBUG(grf, 1)("Unhandled vehicle property 0x%02X (var 0x%02X), type 0x%02X", var, var + 0x80, v->type);
return -1; return -1;
} }

View File

@ -174,7 +174,7 @@ StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid_to_add, const c
textptr->next = newtext; textptr->next = newtext;
} }
DEBUG(grf, 2)("Added %x: grfid %x string %x lang %x string %s", id, grfid, stringid, newtext->langid, newtext->text); DEBUG(grf, 2)("Added 0x%X: grfid 0x%X string 0x%X lang 0x%X string %s", id, grfid, stringid, newtext->langid, newtext->text);
return (GRFTAB << TABSIZE) + id; return (GRFTAB << TABSIZE) + id;
} }

14
npf.c
View File

@ -152,7 +152,7 @@ static void NPFFillTrackdirChoice(AyStarNode* current, OpenListNode* parent)
/* This is a first order decision, so we'd better save the /* This is a first order decision, so we'd better save the
* direction we chose */ * direction we chose */
current->user_data[NPF_TRACKDIR_CHOICE] = trackdir; current->user_data[NPF_TRACKDIR_CHOICE] = trackdir;
DEBUG(npf, 6)("Saving trackdir: %#x", trackdir); DEBUG(npf, 6)("Saving trackdir: 0x%X", trackdir);
} else { } else {
/* We've already made the decision, so just save our parent's decision */ /* We've already made the decision, so just save our parent's decision */
current->user_data[NPF_TRACKDIR_CHOICE] = parent->path.node.user_data[NPF_TRACKDIR_CHOICE]; current->user_data[NPF_TRACKDIR_CHOICE] = parent->path.node.user_data[NPF_TRACKDIR_CHOICE];
@ -608,13 +608,13 @@ static void NPFFollowTrack(AyStar* aystar, OpenListNode* current)
} }
trackdirbits = ts & TRACKDIR_BIT_MASK; /* Filter out signal status and the unused bits */ trackdirbits = ts & TRACKDIR_BIT_MASK; /* Filter out signal status and the unused bits */
DEBUG(npf, 4)("Next node: (%d, %d) [%d], possible trackdirs: %#x", TileX(dst_tile), TileY(dst_tile), dst_tile, trackdirbits); DEBUG(npf, 4)("Next node: (%d, %d) [%d], possible trackdirs: 0x%X", TileX(dst_tile), TileY(dst_tile), dst_tile, trackdirbits);
/* Select only trackdirs we can reach from our current trackdir */ /* Select only trackdirs we can reach from our current trackdir */
trackdirbits &= TrackdirReachesTrackdirs(src_trackdir); trackdirbits &= TrackdirReachesTrackdirs(src_trackdir);
if (_patches.forbid_90_deg && (type == TRANSPORT_RAIL || type == TRANSPORT_WATER)) /* Filter out trackdirs that would make 90 deg turns for trains */ if (_patches.forbid_90_deg && (type == TRANSPORT_RAIL || type == TRANSPORT_WATER)) /* Filter out trackdirs that would make 90 deg turns for trains */
trackdirbits &= ~TrackdirCrossesTrackdirs(src_trackdir); trackdirbits &= ~TrackdirCrossesTrackdirs(src_trackdir);
DEBUG(npf,6)("After filtering: (%d, %d), possible trackdirs: %#x", TileX(dst_tile), TileY(dst_tile), trackdirbits); DEBUG(npf,6)("After filtering: (%d, %d), possible trackdirs: 0x%X", TileX(dst_tile), TileY(dst_tile), trackdirbits);
i = 0; i = 0;
/* Enumerate possible track */ /* Enumerate possible track */
@ -622,7 +622,7 @@ static void NPFFollowTrack(AyStar* aystar, OpenListNode* current)
Trackdir dst_trackdir; Trackdir dst_trackdir;
dst_trackdir = FindFirstBit2x64(trackdirbits); dst_trackdir = FindFirstBit2x64(trackdirbits);
trackdirbits = KillFirstBit2x64(trackdirbits); trackdirbits = KillFirstBit2x64(trackdirbits);
DEBUG(npf, 5)("Expanded into trackdir: %d, remaining trackdirs: %#x", dst_trackdir, trackdirbits); DEBUG(npf, 5)("Expanded into trackdir: %d, remaining trackdirs: 0x%X", dst_trackdir, trackdirbits);
/* Check for oneway signal against us */ /* Check for oneway signal against us */
if (IsTileType(dst_tile, MP_RAILWAY) && GetRailTileType(dst_tile) == RAIL_TYPE_SIGNALS) { if (IsTileType(dst_tile, MP_RAILWAY) && GetRailTileType(dst_tile) == RAIL_TYPE_SIGNALS) {
@ -704,10 +704,10 @@ static NPFFoundTargetData NPFRouteInternal(AyStarNode* start1, AyStarNode* start
if (result.best_bird_dist != 0) { if (result.best_bird_dist != 0) {
if (target != NULL) { if (target != NULL) {
DEBUG(npf, 1) ("Could not find route to tile 0x%x from 0x%x.", target->dest_coords, start1->tile); DEBUG(npf, 1) ("Could not find route to tile 0x%X from 0x%X.", target->dest_coords, start1->tile);
} else { } else {
/* Assumption: target == NULL, so we are looking for a depot */ /* Assumption: target == NULL, so we are looking for a depot */
DEBUG(npf, 1) ("Could not find route to a depot from tile 0x%x.", start1->tile); DEBUG(npf, 1) ("Could not find route to a depot from tile 0x%X.", start1->tile);
} }
} }
@ -855,7 +855,7 @@ NPFFoundTargetData NPFRouteToDepotTrialError(TileIndex tile, Trackdir trackdir,
best_result = result; best_result = result;
} }
if (result.best_bird_dist != 0) { if (result.best_bird_dist != 0) {
DEBUG(npf, 1) ("Could not find route to any depot from tile 0x%x.", tile); DEBUG(npf, 1) ("Could not find route to any depot from tile 0x%X.", tile);
} }
return best_result; return best_result;
} }

View File

@ -211,7 +211,7 @@ static bool LoadChunk(LoadgameState *ls, void *base, const OldChunks *chunks)
break; break;
case OC_ASSERT: case OC_ASSERT:
DEBUG(oldloader, 4)("[OldLoader] Assert point: %x / %x", ls->total_read, chunk->offset + _bump_assert_value); DEBUG(oldloader, 4)("[OldLoader] Assert point: 0x%X / 0x%X", ls->total_read, chunk->offset + _bump_assert_value);
if (ls->total_read != chunk->offset + _bump_assert_value) ls->failed = true; if (ls->total_read != chunk->offset + _bump_assert_value) ls->failed = true;
default: break; default: break;
} }

View File

@ -240,7 +240,7 @@ void ClearSlot(Vehicle *v)
assert(rs->num_vehicles != 0); assert(rs->num_vehicles != 0);
rs->num_vehicles--; rs->num_vehicles--;
DEBUG(ms, 3) ("Multistop: Clearing slot at 0x%x", rs->xy); DEBUG(ms, 3) ("Multistop: Clearing slot at 0x%X", rs->xy);
} }
/** Sell a road vehicle. /** Sell a road vehicle.
@ -1459,10 +1459,10 @@ again:
//but I guess we need to clear the slot //but I guess we need to clear the slot
DEBUG(ms, 0) ("Multistop: Vehicle %d (index %d) arrived at wrong stop.", v->unitnumber, v->index); DEBUG(ms, 0) ("Multistop: Vehicle %d (index %d) arrived at wrong stop.", v->unitnumber, v->index);
if (v->tile != v->dest_tile) { if (v->tile != v->dest_tile) {
DEBUG(ms, 0) ("Multistop: -- Current tile 0x%x is not destination tile 0x%x. Route problem", v->tile, v->dest_tile); DEBUG(ms, 0) ("Multistop: -- Current tile 0x%X is not destination tile 0x%X. Route problem", v->tile, v->dest_tile);
} }
if (v->dest_tile != v->u.road.slot->xy) { if (v->dest_tile != v->u.road.slot->xy) {
DEBUG(ms, 0) ("Multistop: -- Stop tile 0x%x is not destination tile 0x%x. Multistop desync", v->u.road.slot->xy, v->dest_tile); DEBUG(ms, 0) ("Multistop: -- Stop tile 0x%X is not destination tile 0x%X. Multistop desync", v->u.road.slot->xy, v->dest_tile);
} }
if (v->current_order.type != OT_GOTO_STATION) { if (v->current_order.type != OT_GOTO_STATION) {
DEBUG(ms, 0) ("Multistop: -- Current order type (%d) is not OT_GOTO_STATION.", v->current_order.type); DEBUG(ms, 0) ("Multistop: -- Current order type (%d) is not OT_GOTO_STATION.", v->current_order.type);
@ -1604,7 +1604,7 @@ void OnNewDay_RoadVeh(Vehicle *v)
//Current slot has expired //Current slot has expired
if (v->current_order.type == OT_GOTO_STATION && v->u.road.slot != NULL && v->u.road.slot_age-- == 0) { if (v->current_order.type == OT_GOTO_STATION && v->u.road.slot != NULL && v->u.road.slot_age-- == 0) {
DEBUG(ms, 2) ("Multistop: Slot expired for vehicle %d (index %d) at stop 0x%x", DEBUG(ms, 2) ("Multistop: Slot expired for vehicle %d (index %d) at stop 0x%X",
v->unitnumber, v->index, v->u.road.slot->xy); v->unitnumber, v->index, v->u.road.slot->xy);
ClearSlot(v); ClearSlot(v);
} }
@ -1624,18 +1624,18 @@ void OnNewDay_RoadVeh(Vehicle *v)
uint dist, badness; uint dist, badness;
uint minbadness = UINT_MAX; uint minbadness = UINT_MAX;
DEBUG(ms, 2) ("Multistop: Attempting to obtain a slot for vehicle %d (index %d) at station %d (0x%x)", v->unitnumber, DEBUG(ms, 2) ("Multistop: Attempting to obtain a slot for vehicle %d (index %d) at station %d (0x%X)", v->unitnumber,
v->index, st->index, st->xy); v->index, st->index, st->xy);
/* Now we find the nearest road stop that has a free slot */ /* Now we find the nearest road stop that has a free slot */
for (; rs != NULL; rs = rs->next) { for (; rs != NULL; rs = rs->next) {
dist = RoadFindPathToStop(v, rs->xy); dist = RoadFindPathToStop(v, rs->xy);
if (dist == UINT_MAX) { if (dist == UINT_MAX) {
DEBUG(ms, 4) (" ---- stop 0x%x is not reachable, not treating further", rs->xy); DEBUG(ms, 4) (" ---- stop 0x%X is not reachable, not treating further", rs->xy);
continue; continue;
} }
badness = (rs->num_vehicles + 1) * (rs->num_vehicles + 1) + dist / NPF_TILE_LENGTH; badness = (rs->num_vehicles + 1) * (rs->num_vehicles + 1) + dist / NPF_TILE_LENGTH;
DEBUG(ms, 4) (" ---- stop 0x%x has %d vehicle%s waiting", rs->xy, rs->num_vehicles, rs->num_vehicles == 1 ? "":"s"); DEBUG(ms, 4) (" ---- stop 0x%X has %d vehicle%s waiting", rs->xy, rs->num_vehicles, rs->num_vehicles == 1 ? "":"s");
DEBUG(ms, 4) (" ---- Distance is %u", dist); DEBUG(ms, 4) (" ---- Distance is %u", dist);
DEBUG(ms, 4) (" -- Badness %u", badness); DEBUG(ms, 4) (" -- Badness %u", badness);
@ -1647,7 +1647,7 @@ void OnNewDay_RoadVeh(Vehicle *v)
if (best != NULL) { if (best != NULL) {
best->num_vehicles++; best->num_vehicles++;
DEBUG(ms, 3) (" -- Assigned to stop 0x%x", best->xy); DEBUG(ms, 3) (" -- Assigned to stop 0x%X", best->xy);
v->u.road.slot = best; v->u.road.slot = best;
v->dest_tile = best->xy; v->dest_tile = best->xy;
@ -1656,11 +1656,11 @@ void OnNewDay_RoadVeh(Vehicle *v)
DEBUG(ms, 3) (" -- Could not find a suitable stop"); DEBUG(ms, 3) (" -- Could not find a suitable stop");
} }
} else { } else {
DEBUG(ms, 5) ("Multistop: --- Distance from station too far. Postponing slotting for vehicle %d (index %d) at station %d, (0x%x)", DEBUG(ms, 5) ("Multistop: --- Distance from station too far. Postponing slotting for vehicle %d (index %d) at station %d, (0x%X)",
v->unitnumber, v->index, st->index, st->xy); v->unitnumber, v->index, st->index, st->xy);
} }
} else { } else {
DEBUG(ms, 4) ("Multistop: No road stop for vehicle %d (index %d) at station %d (0x%x)", DEBUG(ms, 4) ("Multistop: No road stop for vehicle %d (index %d) at station %d (0x%X)",
v->unitnumber, v->index, st->index, st->xy); v->unitnumber, v->index, st->index, st->xy);
} }
} }

View File

@ -2643,11 +2643,11 @@ void BuildOilRig(TileIndex tile)
Station *st = AllocateStation(); Station *st = AllocateStation();
if (st == NULL) { if (st == NULL) {
DEBUG(misc, 0) ("Couldn't allocate station for oilrig at %#X, reverting to oilrig only...", tile); DEBUG(misc, 0) ("Couldn't allocate station for oilrig at 0x%X, reverting to oilrig only...", tile);
return; return;
} }
if (!GenerateStationName(st, tile, 2)) { if (!GenerateStationName(st, tile, 2)) {
DEBUG(misc, 0) ("Couldn't allocate station-name for oilrig at %#X, reverting to oilrig only...", tile); DEBUG(misc, 0) ("Couldn't allocate station-name for oilrig at 0x%X, reverting to oilrig only...", tile);
return; return;
} }