(svn r11312) -Codechange: implement a overflow safe integer and use that for money and don't misuses CommandCost to have a overflow safe integer. Based on a patch by Noldo.

This commit is contained in:
rubidium
2007-10-20 14:51:09 +00:00
parent 54369cba0f
commit 8212088c03
12 changed files with 164 additions and 39 deletions

View File

@@ -120,7 +120,7 @@ void ShowEnginePreviewWindow(EngineID engine)
static void DrawTrainEngineInfo(EngineID engine, int x, int y, int maxw)
{
const RailVehicleInfo *rvi = RailVehInfo(engine);
uint multihead = (rvi->railveh_type == RAILVEH_MULTIHEAD) ? 1 : 0;
int multihead = (rvi->railveh_type == RAILVEH_MULTIHEAD) ? 1 : 0;
SetDParam(0, (_price.build_railvehicle >> 3) * rvi->base_cost >> 5);
SetDParam(2, rvi->max_speed * 10 / 16);