Changeset - r13307:6ce1a03fe245
[Not reviewed]
master
0 2 0
frosch - 15 years ago 2009-10-20 19:55:09
frosch@openttd.org
(svn r17826) -Codechange: GetRoadVehLength() is only used in one file, make it static.
2 files changed with 2 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/roadveh.h
Show inline comments
 
@@ -79,14 +79,12 @@ enum RoadVehicleSubType {
 
	RVST_ARTIC_PART,
 
};
 

	
 

	
 
void CcBuildRoadVeh(bool success, TileIndex tile, uint32 p1, uint32 p2);
 

	
 
byte GetRoadVehLength(const RoadVehicle *v);
 

	
 
void RoadVehUpdateCache(RoadVehicle *v);
 

	
 
/** Cached oftenly queried (NewGRF) values */
 
struct RoadVehicleCache {
 
	byte cached_veh_length;
 
	EngineID first_engine;   ///< cached EngineID of the front vehicle. INVALID_ENGINE for the front vehicle itself.
src/roadveh_cmd.cpp
Show inline comments
 
@@ -141,15 +141,15 @@ SpriteID RoadVehicle::GetImage(Direction
 

	
 
void DrawRoadVehEngine(int x, int y, EngineID engine, SpriteID pal)
 
{
 
	DrawSprite(GetRoadVehIcon(engine), pal, x, y);
 
}
 

	
 
byte GetRoadVehLength(const RoadVehicle *v)
 
static uint GetRoadVehLength(const RoadVehicle *v)
 
{
 
	byte length = 8;
 
	uint length = 8;
 

	
 
	uint16 veh_len = GetVehicleCallback(CBID_VEHICLE_LENGTH, 0, 0, v->engine_type, v);
 
	if (veh_len != CALLBACK_FAILED) {
 
		length -= Clamp(veh_len, 0, 7);
 
	}
 

	
0 comments (0 inline, 0 general)