1 /* ---------------------------------------------------------------------- *
2 * track.c
3 * This file is part of lincity.
4 * Lincity is copyright (c) I J Peters 1995-1997, (c) Greg Sharp 1997-2001.
5 * (c) Corey Keasling, 2004
6 * ---------------------------------------------------------------------- */
7
8 #include "modules.h"
9 #include "../transport.h"
10 #include "track.h"
11
12 /* ---------------------------------------------------------------------
13 For track, road and rail:
14
15 int_1 contains the amount of food
16 int_2 contains the amount of jobs
17 int_3 contains the amount of coal
18 int_4 contains the amount of goods
19 int_5 contains the amount of ore
20 int_6 contains the amount of steel
21 int_7 contains the amount of waste
22 --------------------------------------------------------------------- */
23
do_track(int x,int y)24 void do_track(int x, int y)
25 {
26 general_transport(x, y, MAX_WASTE_ON_TRACK);
27 }
28
mps_track(int x,int y)29 void mps_track(int x, int y)
30 {
31 int i = 0;
32
33 mps_store_title(i++, _(main_groups[MP_GROUP(x, y)].name));
34 i++;
35
36 mps_store_sfp(i++, _("Food"), MP_INFO(x, y).int_1 * 100.0 / MAX_FOOD_ON_TRACK);
37 mps_store_sfp(i++, _("Jobs"), MP_INFO(x, y).int_2 * 100.0 / MAX_JOBS_ON_TRACK);
38 mps_store_sfp(i++, _("Coal"), MP_INFO(x, y).int_3 * 100.0 / MAX_COAL_ON_TRACK);
39 mps_store_sfp(i++, _("Goods"), MP_INFO(x, y).int_4 * 100.0 / MAX_GOODS_ON_TRACK);
40 mps_store_sfp(i++, _("Ore"), MP_INFO(x, y).int_5 * 100.0 / MAX_ORE_ON_TRACK);
41 mps_store_sfp(i++, _("Steel"), MP_INFO(x, y).int_6 * 100.0 / MAX_STEEL_ON_TRACK);
42 mps_store_sfp(i++, _("Waste"), MP_INFO(x, y).int_7 * 100.0 / MAX_WASTE_ON_TRACK);
43
44 }
45