mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-21 05:29:11 +00:00
(svn r2504) Move Draw*EngineInfo to engine_gui.c to reduce dependencies
This commit is contained in:
12
ship_cmd.c
12
ship_cmd.c
@@ -7,7 +7,6 @@
|
||||
#include "command.h"
|
||||
#include "pathfind.h"
|
||||
#include "station.h"
|
||||
#include "gfx.h"
|
||||
#include "news.h"
|
||||
#include "engine.h"
|
||||
#include "gui.h"
|
||||
@@ -41,17 +40,6 @@ void DrawShipEngine(int x, int y, int engine, uint32 image_ormod)
|
||||
DrawSprite((6 + _ship_sprites[spritenum]) | image_ormod, x, y);
|
||||
}
|
||||
|
||||
void DrawShipEngineInfo(int engine, int x, int y, int maxw)
|
||||
{
|
||||
const ShipVehicleInfo *svi = ShipVehInfo(engine);
|
||||
SetDParam(0, svi->base_cost * (_price.ship_base>>3)>>5);
|
||||
SetDParam(1, svi->max_speed * 10 >> 5);
|
||||
SetDParam(2, _cargoc.names_long_p[svi->cargo_type]);
|
||||
SetDParam(3, svi->capacity);
|
||||
SetDParam(4, svi->running_cost * _price.ship_running >> 8);
|
||||
DrawStringMultiCenter(x, y, STR_982E_COST_MAX_SPEED_CAPACITY, maxw);
|
||||
}
|
||||
|
||||
int GetShipImage(const Vehicle *v, byte direction)
|
||||
{
|
||||
int spritenum = v->spritenum;
|
||||
|
Reference in New Issue
Block a user