#include "lcconfig.h"#include <stdio.h>#include <stdlib.h>#include <math.h>#include "lcstring.h"#include "common.h"#include "lctypes.h"#include "lin-city.h"#include "mps.h"#include "engglobs.h"#include "mouse.h"#include "screen.h"#include "power.h"#include "engine.h"#include "lclib.h"#include "lcintl.h"#include "stats.h"Go to the source code of this file.
Functions | |
| void | mps_global_setup (int) |
| void | mps_global (int) |
| void | mps_setup (int x, int y) |
| void | mps_res_setup (void) |
| void | mps_res (int, int) |
| void | mps_transport_setup (void) |
| void | mps_road (int, int) |
| void | mps_rail (int, int) |
| void | mps_track (int, int) |
| void | mps_farm_setup (void) |
| void | mps_farm (int, int) |
| void | mps_market_setup (void) |
| void | mps_market (int, int) |
| void | mps_indl_setup (void) |
| void | mps_indl (int, int) |
| void | mps_indh_setup (void) |
| void | mps_indh (int, int) |
| void | mps_coalmine_setup (void) |
| void | mps_coalmine (int, int) |
| void | mps_power_source_coal_setup (void) |
| void | mps_power_source_coal (int, int) |
| void | mps_power_source_setup (void) |
| void | mps_power_source (int, int) |
| void | mps_power_line_setup (void) |
| void | mps_power_line (int, int) |
| void | mps_university_setup (void) |
| void | mps_university (int, int) |
| void | mps_recycle_setup (void) |
| void | mps_recycle (int, int) |
| void | mps_oremine_setup (void) |
| void | mps_oremine (int, int) |
| void | mps_substation_setup (void) |
| void | mps_substation (int, int) |
| void | mps_rocket_setup (void) |
| void | mps_rocket (int, int) |
| void | mps_windmill_setup (int, int) |
| void | mps_windmill (int, int) |
| void | mps_monument_setup (void) |
| void | mps_monument (int, int) |
| void | mps_school_setup (void) |
| void | mps_school (int, int) |
| void | mps_blacksmith_setup (void) |
| void | mps_blacksmith (int, int) |
| void | mps_mill_setup (void) |
| void | mps_mill (int, int) |
| void | mps_pottery_setup (void) |
| void | mps_pottery (int, int) |
| void | mps_water (int, int) |
| void | mps_port_setup (int, int) |
| void | mps_port (int, int) |
| void | mps_tip_setup (void) |
| void | mps_tip (int, int) |
| void | mps_commune_setup (void) |
| void | mps_commune (int, int) |
| void | mps_right_setup (void) |
| void | mps_right (int, int) |
| void | mps_firestation_setup (void) |
| void | mps_firestation (int, int) |
| void | mps_cricket_setup (void) |
| void | mps_cricket (int, int) |
| void | mps_health_setup (void) |
| void | mps_health (int, int) |
| void | mps_full_refresh (void) |
| void | mappoint_stats (int x, int y, int button) |
| void | mps_global_finance_setup (void) |
| void | mps_global_other_costs_setup (void) |
| void | mps_global_pop_setup (void) |
| void | mps_global_housing_setup (void) |
| void | mps_global_tech_setup (void) |
| void | mps_global_food_setup (void) |
| void | mps_global_jobs_setup (void) |
| void | mps_global_housing (void) |
| void | mps_global_finance (void) |
| void | mps_global_other_costs (void) |
|
||||||||||||||||
|
Definition at line 109 of file mps.c. 00110 {
00111 static int xx = 0, yy = 0, oldbut = 0;
00112 Rect* mps = &scr.mappoint_stats;
00113 char s[100];
00114
00115 /* mappoint_stats (-3,-3,-3) means continue using old values
00116 for the map coordinates and button, but do a full refresh
00117 of setup strings */
00118 /* mappoint_stats (-2,-2,b) means mps should display "global
00119 statistics" rather than "map-point statistics".
00120 The "b" parameter identifies which kind of global statistics
00121 should be displayed (e.g. finance, population, etc.) */
00122 /* mappoint_stats (-1,-1,-1) means continue using old values */
00123 if (x == -3) {
00124 Fgl_fillbox (mps->x, mps->y,
00125 mps->w + 1, mps->h + 1, 14);
00126 Fgl_setfontcolors (14, TEXT_FG_COLOUR);
00127
00128 if (xx == -2)
00129 mps_global_setup (oldbut);
00130 else {
00131 /* this should be part of *_setup, but is needed by
00132 mps_right too */
00133 strcpy (s, _(main_groups[MP_GROUP(xx,yy)].name));
00134 Fgl_write (mps->x + (14 - strlen (s)) * 4,
00135 mps->y, s);
00136
00137 mps_setup (xx,yy);
00138 }
00139
00140 button = oldbut;
00141 x = xx;
00142 y = yy;
00143 Fgl_setfontcolors (TEXT_BG_COLOUR, TEXT_FG_COLOUR);
00144
00145
00146 } else if (x == -2) {
00147 /* Global statistics */
00148 if (button != oldbut) {
00149 xx = x;
00150 yy = y;
00151 oldbut = button;
00152 Fgl_fillbox (mps->x, mps->y,
00153 mps->w + 1, mps->h + 1, 14);
00154 Fgl_setfontcolors (14, TEXT_FG_COLOUR);
00155 mps_global_setup (button);
00156 Fgl_setfontcolors (TEXT_BG_COLOUR, TEXT_FG_COLOUR);
00157 }
00158 } else if (x == -1) {
00159 /* Use old values */
00160 x = xx;
00161 y = yy;
00162 button = oldbut;
00163 } else {
00164 if (mappoint_stats_flag == 1 && x == xx && y == yy
00165 && oldbut == LC_MOUSE_LEFTBUTTON
00166 && button == LC_MOUSE_LEFTBUTTON)
00167 {
00168 if (MP_GROUP(xx,yy) == GROUP_MARKET)
00169 {
00170 clicked_market_cb (xx, yy);
00171 return;
00172 }
00173 else if (MP_GROUP(xx,yy) == GROUP_PORT)
00174 {
00175 clicked_port_cb (xx, yy);
00176 return;
00177 }
00178 }
00179 xx = x;
00180 yy = y;
00181 oldbut = button;
00182 mappoint_stats_flag = 1;
00183 /* draw centre of box */
00184 Fgl_fillbox (mps->x, mps->y,
00185 mps->w + 1, mps->h + 1, 14);
00186 /* write static stuff */
00187
00188 Fgl_setfontcolors (14, TEXT_FG_COLOUR);
00189
00190 strcpy (s, _(main_groups[MP_GROUP(x,y)].name));
00191 Fgl_write (mps->x + (14 - strlen (s)) * 4,
00192 mps->y, s);
00193
00194 if (button == LC_MOUSE_RIGHTBUTTON)
00195 mps_right_setup ();
00196 else
00197 mps_setup(x,y);
00198 }
00199
00200 /* Now act on our decisions */
00201
00202 Fgl_setfontcolors (14, TEXT_FG_COLOUR);
00203
00204 if (x == -2 || x == -3) {
00205 mps_global (button);
00206 } else if (button == LC_MOUSE_RIGHTBUTTON) {
00207 mps_right (x, y);
00208 } else {
00209 switch (MP_GROUP(x,y))
00210 {
00211 case GROUP_POWER_LINE:
00212 mps_power_line (x,y);
00213 break;
00214 case GROUP_RESIDENCE_LL:
00215 case GROUP_RESIDENCE_ML:
00216 case GROUP_RESIDENCE_HL:
00217 case GROUP_RESIDENCE_LH:
00218 case GROUP_RESIDENCE_MH:
00219 case GROUP_RESIDENCE_HH:
00220 mps_res (x, y);
00221 break;
00222 case (GROUP_ROAD):
00223 mps_road (x, y);
00224 break;
00225 case (GROUP_RAIL):
00226 mps_rail (x, y);
00227 break;
00228 case (GROUP_TRACK):
00229 mps_track (x, y);
00230 break;
00231 case (GROUP_ORGANIC_FARM):
00232 mps_farm (x, y);
00233 break;
00234 case (GROUP_MARKET):
00235 mps_market (x, y);
00236 break;
00237 case (GROUP_INDUSTRY_L):
00238 mps_indl (x, y);
00239 break;
00240 case (GROUP_INDUSTRY_H):
00241 mps_indh (x, y);
00242 break;
00243 case (GROUP_COALMINE):
00244 mps_coalmine (x, y);
00245 break;
00246 case GROUP_COAL_POWER:
00247 mps_power_source_coal (x, y);
00248 break;
00249 case GROUP_SOLAR_POWER:
00250 mps_power_source (x, y);
00251 break;
00252 case (GROUP_UNIVERSITY):
00253 mps_university (x, y);
00254 break;
00255 case (GROUP_OREMINE):
00256 mps_oremine (x, y);
00257 break;
00258 case (GROUP_RECYCLE):
00259 mps_recycle (x, y);
00260 break;
00261 case (GROUP_SUBSTATION):
00262 mps_substation (x, y);
00263 break;
00264 case (GROUP_ROCKET):
00265 mps_rocket (x, y);
00266 break;
00267 case (GROUP_WINDMILL):
00268 mps_windmill (x, y);
00269 break;
00270 case (GROUP_MONUMENT):
00271 mps_monument (x, y);
00272 break;
00273 case (GROUP_SCHOOL):
00274 mps_school (x, y);
00275 break;
00276 case (GROUP_BLACKSMITH):
00277 mps_blacksmith (x, y);
00278 break;
00279 case (GROUP_MILL):
00280 mps_mill (x, y);
00281 break;
00282 case (GROUP_POTTERY):
00283 mps_pottery (x, y);
00284 break;
00285 case (GROUP_WATER):
00286 mps_water (x, y);
00287 break;
00288 case (GROUP_PORT):
00289 mps_port (x, y);
00290 break;
00291 case (GROUP_TIP):
00292 mps_tip (x, y);
00293 break;
00294 case (GROUP_COMMUNE):
00295 mps_commune (x, y);
00296 break;
00297 case (GROUP_FIRESTATION):
00298 mps_firestation (x, y);
00299 break;
00300 case (GROUP_CRICKET):
00301 mps_cricket (x, y);
00302 break;
00303 case (GROUP_HEALTH):
00304 mps_health (x, y);
00305 break;
00306 default:
00307 xx = -2;
00308 yy = -2;
00309 oldbut = 2;
00310 }
00311 }
00312
00313 Fgl_setfontcolors (TEXT_BG_COLOUR, TEXT_FG_COLOUR);
00314
00315 }
|
|
||||||||||||
|
Definition at line 1151 of file mps.c. 01152 {
01153 Rect* mps = &scr.mappoint_stats;
01154 char s[100];
01155 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100
01156 / MAX_GOODS_AT_BLACKSMITH);
01157 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
01158 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_3 * 100
01159 / MAX_COAL_AT_BLACKSMITH);
01160 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
01161 sprintf (s, "%5d%%", MP_INFO(x,y).int_6);
01162 Fgl_write (mps->x + 8 * 8, mps->y + 56, s);
01163 }
|
|
|
Definition at line 1142 of file mps.c. 01143 {
01144 Rect* mps = &scr.mappoint_stats;
01145 Fgl_write (mps->x, mps->y + 40, _("G store"));
01146 Fgl_write (mps->x, mps->y + 48, _("C store"));
01147 Fgl_write (mps->x, mps->y + 56, _("Capacity"));
01148 }
|
|
||||||||||||
|
Definition at line 771 of file mps.c. 00772 {
00773 Rect* mps = &scr.mappoint_stats;
00774 char s[100];
00775 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100
00776 / MAX_COAL_AT_MINE);
00777 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
00778 if (MP_INFO(x,y).int_2 > 0)
00779 sprintf (s, "%7d", MP_INFO(x,y).int_2);
00780 else
00781 sprintf (s, _(" EMPTY "));
00782 Fgl_write (mps->x + 7 * 8, mps->y + 48, s);
00783 }
|
|
|
Definition at line 763 of file mps.c. 00764 {
00765 Rect* mps = &scr.mappoint_stats;
00766 Fgl_write (mps->x, mps->y + 40, _("Stock"));
00767 Fgl_write (mps->x, mps->y + 48, _("Reserve"));
00768 }
|
|
||||||||||||
|
Definition at line 1310 of file mps.c. 01311 {
01312 Rect* mps = &scr.mappoint_stats;
01313 if ((MP_INFO(x,y).int_5 & 1) != 0)
01314 Fgl_write (mps->x + 7 * 8, mps->y + 36, _("YES"));
01315 else
01316 Fgl_write (mps->x + 7 * 8, mps->y + 36, _("NO "));
01317 if ((MP_INFO(x,y).int_5 & 2) != 0)
01318 Fgl_write (mps->x + 7 * 8, mps->y + 44, _("YES"));
01319 else
01320 Fgl_write (mps->x + 7 * 8, mps->y + 44, _("NO "));
01321 if ((MP_INFO(x,y).int_5 & 4) != 0)
01322 Fgl_write (mps->x + 7 * 8, mps->y + 52, _("YES"));
01323 else
01324 Fgl_write (mps->x + 7 * 8, mps->y + 52, _("NO "));
01325 if ((MP_INFO(x,y).int_5 & 8) != 0)
01326 Fgl_write (mps->x + 7 * 8, mps->y + 60, _("YES"));
01327 else
01328 Fgl_write (mps->x + 7 * 8, mps->y + 60, _("NO "));
01329 }
|
|
|
Definition at line 1298 of file mps.c. 01299 {
01300 Rect* mps = &scr.mappoint_stats;
01301 Fgl_write (mps->x, mps->y + 12, _(" Activity"));
01302 Fgl_write (mps->x, mps->y + 20, _(" last month"));
01303 Fgl_write (mps->x, mps->y + 36, _(" Coal"));
01304 Fgl_write (mps->x, mps->y + 44, _(" Ore"));
01305 Fgl_write (mps->x, mps->y + 52, _(" Steel"));
01306 Fgl_write (mps->x, mps->y + 60, _(" Waste"));
01307 }
|
|
||||||||||||
|
Definition at line 1423 of file mps.c. 01424 {
01425 Rect* mps = &scr.mappoint_stats;
01426 char s[100];
01427 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100
01428 / MAX_JOBS_AT_CRICKET);
01429 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
01430 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_2 * 100
01431 / MAX_GOODS_AT_CRICKET);
01432 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
01433
01434 }
|
|
|
Definition at line 1415 of file mps.c. 01416 {
01417 Rect* mps = &scr.mappoint_stats;
01418 Fgl_write (mps->x, mps->y + 40, _("Jobs"));
01419 Fgl_write (mps->x, mps->y + 48, _("Goods"));
01420 }
|
|
||||||||||||
|
Definition at line 650 of file mps.c. 00651 {
00652 Rect* mps = &scr.mappoint_stats;
00653 char s[100];
00654 if ((MP_INFO(x,y).flags & FLAG_POWERED) != 0)
00655 strcpy (s, _("YES"));
00656 else
00657 strcpy (s, _("NO "));
00658 Fgl_write (mps->x + 7 * 8, mps->y + 16, s);
00659 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100.0
00660 / MAX_TECH_LEVEL);
00661 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
00662 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_4 * 100.0
00663 / 1200.0);
00664 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
00665
00666 }
|
|
|
Definition at line 641 of file mps.c. 00642 {
00643 Rect* mps = &scr.mappoint_stats;
00644 Fgl_write (mps->x, mps->y + 16, _("Power"));
00645 Fgl_write (mps->x, mps->y + 40, _("Tech"));
00646 Fgl_write (mps->x, mps->y + 48, _("Prod"));
00647 }
|
|
||||||||||||
|
Definition at line 1401 of file mps.c. 01402 {
01403 Rect* mps = &scr.mappoint_stats;
01404 char s[100];
01405 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100
01406 / MAX_JOBS_AT_FIRESTATION);
01407 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
01408 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_2 * 100
01409 / MAX_GOODS_AT_FIRESTATION);
01410 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
01411
01412 }
|
|
|
Definition at line 1393 of file mps.c. 01394 {
01395 Rect* mps = &scr.mappoint_stats;
01396 Fgl_write (mps->x, mps->y + 40, _("Jobs"));
01397 Fgl_write (mps->x, mps->y + 48, _("Goods"));
01398 }
|
|
|
Definition at line 100 of file mps.c. 00101 {
00102 Rect* mps = &scr.mappoint_stats;
00103
00104 draw_small_bezel (mps->x, mps->y, mps->w, mps->h, yellow(0));
00105 mappoint_stats (-3, -3, -3);
00106 }
|
|
|
Definition at line 1688 of file mps.c. 01689 {
01690 switch (style) {
01691 case MPS_GLOBAL_FINANCE:
01692 mps_global_finance ();
01693 break;
01694 case MPS_GLOBAL_OTHER_COSTS:
01695 mps_global_other_costs ();
01696 break;
01697 case MPS_GLOBAL_HOUSING:
01698 mps_global_housing ();
01699 break;
01700 }
01701 }
|
|
|
Definition at line 1616 of file mps.c. 01617 {
01618 char s[12]; /* This number is important, as it's the size of the
01619 * money field in the mps box */
01620 Rect* mps = &scr.mappoint_stats;
01621 size_t count;
01622
01623 format_pos_number4 (s, ly_income_tax);
01624 Fgl_write (mps->x + 3*8, mps->y + 16, s);
01625 format_pos_number4 (s, ly_coal_tax);
01626 Fgl_write (mps->x + 3*8, mps->y + 24, s);
01627 format_pos_number4 (s, ly_goods_tax);
01628 Fgl_write (mps->x + 3*8, mps->y + 32, s);
01629 format_pos_number4 (s, ly_export_tax);
01630 Fgl_write (mps->x + 3*8, mps->y + 40, s);
01631 format_pos_number4 (s, ly_other_cost);
01632 Fgl_write (mps->x + 11*8, mps->y + 16, s);
01633 format_pos_number4 (s, ly_unemployment_cost);
01634 Fgl_write (mps->x + 11*8, mps->y + 24, s);
01635 format_pos_number4 (s, ly_transport_cost);
01636 Fgl_write (mps->x + 11*8, mps->y + 32, s);
01637 format_pos_number4 (s, ly_import_cost);
01638 Fgl_write (mps->x + 11*8, mps->y + 40, s);
01639
01640 count = commify(s, 12, total_money);
01641 pad_with_blanks(s, 12);
01642
01643 if (total_money < 0)
01644 Fgl_setfontcolors (14, red (30));
01645 //Fgl_write (mps->x + 3 * 8, mps->y + 80, s);
01646 Fgl_write (mps->x + 4 * 8, mps->y + 80, s);
01647 if (total_money < 0)
01648 Fgl_setfontcolors (14, TEXT_FG_COLOUR);
01649 }
|
|
|
Definition at line 1459 of file mps.c. 01460 {
01461 Rect* mps = &scr.mappoint_stats;
01462 Fgl_write (mps->x + 32, mps->y, _("FINANCE"));
01463
01464 /* TRANSLATORS: Expend should be Expenses, but Expenses didn't fit
01465 IT=Income tax, CT=Coal tax, GT=Goods tax, XP=Exports
01466 OC=Other costs, UC=Unemployment costs,
01467 TC=Transportation costs, IP=Imports */
01468 Fgl_write (mps->x, mps->y + 8, _("Income Expend"));
01469 Fgl_write (mps->x, mps->y + 16, _("IT"));
01470 Fgl_write (mps->x, mps->y + 24, _("CT"));
01471 Fgl_write (mps->x, mps->y + 32, _("GT"));
01472 Fgl_write (mps->x, mps->y + 40, _("XP"));
01473 Fgl_write (mps->x + 8*8, mps->y + 16, _("OC"));
01474 Fgl_write (mps->x + 8*8, mps->y + 24, _("UC"));
01475 Fgl_write (mps->x + 8*8, mps->y + 32, _("TC"));
01476 Fgl_write (mps->x + 8*8, mps->y + 40, _("IP"));
01477 Fgl_write (mps->x, mps->y + 80, _("Tot"));
01478 }
|
|
|
Definition at line 1546 of file mps.c. 01547 {
01548 Rect* mps = &scr.mappoint_stats;
01549 Fgl_write (mps->x + 32, mps->y + 2, "FOOD");
01550 Fgl_write (mps->x + 4, mps->y + 14, "Foodstore");
01551 Fgl_write (mps->x + 4, mps->y + 22, "Farms");
01552 Fgl_write (mps->x + 4, mps->y + 30, "Starv %");
01553 }
|
|
|
Definition at line 1581 of file mps.c. 01582 {
01583 int hp = housed_population;
01584 int tp = housed_population + people_pool;
01585 int i;
01586 char s[100];
01587 int offset = 70;
01588 Rect* mps = &scr.mappoint_stats;
01589
01590 sprintf (s, "%6d", tp);
01591 Fgl_write (mps->x + offset, mps->y + 1*8+6, s);
01592 sprintf (s, "%6d", hp);
01593 Fgl_write (mps->x + offset, mps->y + 2*8+6, s);
01594 if (tp != 0) {
01595 sprintf (s, " %3d.%1d", (hp * 100) / tp, ((hp * 1000) / tp) % 10);
01596 } else {
01597 sprintf (s, " %3d.%1d", 0, 0);
01598 }
01599 Fgl_write (mps->x + offset, mps->y + 3*8+6, s);
01600 sprintf (s, " %5d", numof_shanties);
01601 Fgl_write (mps->x + offset, mps->y + 4*8+6, s);
01602
01603 sprintf (s, " %5d", unnat_deaths);
01604 Fgl_write (mps->x + offset, mps->y + 6*8+6, s);
01605 i = ((tunemployed_population / NUMOF_DAYS_IN_MONTH) * 1000)
01606 / ((tpopulation / NUMOF_DAYS_IN_MONTH) + 1);
01607 sprintf (s, " %3d.%1d", i / 10, i % 10);
01608 Fgl_write (mps->x + offset, mps->y + 7*8+6, s);
01609 i = ((tstarving_population / NUMOF_DAYS_IN_MONTH) * 1000)
01610 / ((tpopulation / NUMOF_DAYS_IN_MONTH) + 1);
01611 sprintf (s, " %3d.%1d", i / 10, i % 10);
01612 Fgl_write (mps->x + offset, mps->y + 8*8+6, s);
01613 }
|
|
|
Definition at line 1520 of file mps.c. 01521 {
01522 Rect* mps = &scr.mappoint_stats;
01523 Fgl_write (mps->x + 32, mps->y + 2, _("PEOPLE"));
01524 Fgl_write (mps->x + 4, mps->y + 1*8+6, _("Pop"));
01525 Fgl_write (mps->x + 4, mps->y + 2*8+6, _("Housed"));
01526 Fgl_write (mps->x + 4, mps->y + 3*8+6, _("Housed %"));
01527 Fgl_write (mps->x + 4, mps->y + 4*8+6, _("Shanties"));
01528
01529 Fgl_write (mps->x + 4, mps->y + 6*8+6, _("Unn Dths"));
01530 Fgl_write (mps->x + 4, mps->y + 7*8+6, _("Unemp %"));
01531 Fgl_write (mps->x + 4, mps->y + 8*8+6, _("Starv %"));
01532 }
|
|
|
Definition at line 1556 of file mps.c. 01557 {
01558 Rect* mps = &scr.mappoint_stats;
01559 Fgl_write (mps->x + 32, mps->y + 2, "JOBS");
01560 Fgl_write (mps->x + 4, mps->y + 14, "Jobs");
01561 Fgl_write (mps->x + 4, mps->y + 22, "% Unemp");
01562 }
|
|
|
Definition at line 1653 of file mps.c. 01654 {
01655 char s[100];
01656 int yr;
01657 Rect* mps = &scr.mappoint_stats;
01658
01659 /* Don't write year if its negative. */
01660 yr = (total_time / NUMOF_DAYS_IN_YEAR) - 1;
01661 if (yr >= 0) {
01662 sprintf (s, _("For year %04d"), yr);
01663 Fgl_write (mps->x + 12, mps->y + 8, s);
01664 }
01665 format_pos_number4 (s, ly_interest);
01666 Fgl_write (mps->x + 3 * 8, mps->y + 4*8, s);
01667 format_pos_number4 (s, ly_school_cost);
01668 Fgl_write (mps->x + 3 * 8, mps->y + 5*8, s);
01669 format_pos_number4 (s, ly_university_cost);
01670 Fgl_write (mps->x + 3 * 8, mps->y + 6*8, s);
01671 format_pos_number4 (s, ly_deaths_cost);
01672 Fgl_write (mps->x + 3 * 8, mps->y + 7*8, s);
01673 format_pos_number4 (s, ly_windmill_cost);
01674 Fgl_write (mps->x + 3 * 8, mps->y + 8*8, s);
01675 format_pos_number4 (s, ly_health_cost);
01676 Fgl_write (mps->x + 11 * 8, mps->y + 4*8, s);
01677 format_pos_number4 (s, ly_rocket_pad_cost);
01678 Fgl_write (mps->x + 11 * 8, mps->y + 5*8, s);
01679 format_pos_number4 (s, ly_fire_cost);
01680 Fgl_write (mps->x + 11 * 8, mps->y + 6*8, s);
01681 format_pos_number4 (s, ly_cricket_cost);
01682 Fgl_write (mps->x + 11 * 8, mps->y + 7*8, s);
01683 format_pos_number4 (s, ly_recycle_cost);
01684 Fgl_write (mps->x + 11 * 8, mps->y + 8*8, s);
01685 }
|
|
|
Definition at line 1481 of file mps.c. 01482 {
01483 Rect* mps = &scr.mappoint_stats;
01484 Fgl_write (mps->x + 20, mps->y, _("OTHER COSTS"));
01485
01486 /* TRANSLATORS:
01487 It=Interest costs.
01488 Sc=School costs.
01489 Un=University costs.
01490 Dt=Unnatural deaths costs.
01491 Wn=Windmill costs.
01492 Hl=Health costs.
01493 Rk=Rocket costs.
01494 Fr=Fire station costs.
01495 Ck=Cricket costs.
01496 Rc=Recycling costs.
01497 */
01498 Fgl_write (mps->x, mps->y + 4*8, _("It"));
01499 Fgl_write (mps->x, mps->y + 5*8, _("Sc"));
01500 Fgl_write (mps->x, mps->y + 6*8, _("Un"));
01501 Fgl_write (mps->x, mps->y + 7*8, _("Dt"));
01502 Fgl_write (mps->x, mps->y + 8*8, _("Wn"));
01503 Fgl_write (mps->x + 8*8, mps->y + 4*8, _("Hl"));
01504 Fgl_write (mps->x + 8*8, mps->y + 5*8, _("Rk"));
01505 Fgl_write (mps->x + 8*8, mps->y + 6*8, _("Fr"));
01506 Fgl_write (mps->x + 8*8, mps->y + 7*8, _("Ck"));
01507 Fgl_write (mps->x + 8*8, mps->y + 8*8, _("Rc"));
01508 }
|
|
|
Definition at line 1511 of file mps.c. 01512 {
01513 Rect* mps = &scr.mappoint_stats;
01514 Fgl_write (mps->x + 32, mps->y + 2, _("PEOPLE"));
01515 Fgl_write (mps->x + 4, mps->y + 14, _("Pop"));
01516 Fgl_write (mps->x + 4, mps->y + 30, _("Unnat death"));
01517 }
|
|
|
Definition at line 1565 of file mps.c. 01566 {
01567 switch (style) {
01568 case MPS_GLOBAL_FINANCE:
01569 mps_global_finance_setup ();
01570 break;
01571 case MPS_GLOBAL_OTHER_COSTS:
01572 mps_global_other_costs_setup ();
01573 break;
01574 case MPS_GLOBAL_HOUSING:
01575 mps_global_housing_setup ();
01576 break;
01577 }
01578 }
|
|
|
Definition at line 1535 of file mps.c. 01536 {
01537 Rect* mps = &scr.mappoint_stats;
01538 Fgl_write (mps->x + 32, mps->y + 2, "TECH");
01539 Fgl_write (mps->x + 4, mps->y + 14, "Tech lvl");
01540 Fgl_write (mps->x + 4, mps->y + 22, "Schools");
01541 Fgl_write (mps->x + 4, mps->y + 30, "Univers");
01542 Fgl_write (mps->x + 4, mps->y + 38, "Rockets");
01543 }
|
|
||||||||||||
|
Definition at line 1445 of file mps.c. 01446 {
01447 Rect* mps = &scr.mappoint_stats;
01448 char s[100];
01449 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100
01450 / MAX_JOBS_AT_HEALTH_CENTRE);
01451 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
01452 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_2 * 100
01453 / MAX_GOODS_AT_HEALTH_CENTRE);
01454 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
01455
01456 }
|
|
|
Definition at line 1437 of file mps.c. 01438 {
01439 Rect* mps = &scr.mappoint_stats;
01440 Fgl_write (mps->x, mps->y + 40, _("Jobs"));
01441 Fgl_write (mps->x, mps->y + 48, _("Goods"));
01442 }
|
|
||||||||||||
|
Definition at line 726 of file mps.c. 00727 {
00728 Rect* mps = &scr.mappoint_stats;
00729 char s[100];
00730 float f;
00731 if ((MP_INFO(x,y).flags & FLAG_POWERED) != 0)
00732 if (MP_INFO(x,y).int_7 == 1)
00733 /* TRANSLATORS: "COAL", "YES ", and "NO " must be same length */
00734 strcpy(s, _("COAL"));
00735 else
00736 strcpy (s, _("YES "));
00737 else
00738 strcpy (s, _("NO "));
00739
00740 Fgl_write (mps->x + 7 * 8, mps->y + 16, s);
00741 sprintf (s, "%7d", MP_INFO(x,y).int_1);
00742 Fgl_write (mps->x + 7 * 8, mps->y + 40, s);
00743 f = (float) MP_INFO(x,y).int_2 * 100.0 / MAX_STEEL_AT_INDUSTRY_H;
00744 if (f > 100.0)
00745 f = 100.0;
00746 sprintf (s, "%5.1f%%", f);
00747 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
00748 f = (float) MP_INFO(x,y).int_3 * 100.0 / MAX_ORE_AT_INDUSTRY_H;
00749 if (f > 100.0)
00750 f = 100.0;
00751 sprintf (s, "%5.1f%%", f);
00752 Fgl_write (mps->x + 8 * 8, mps->y + 56, s);
00753 f = (float) MP_INFO(x,y).int_4 * 100.0 / MAX_COAL_AT_INDUSTRY_H;
00754 if (f > 100.0)
00755 f = 100.0;
00756 sprintf (s, "%5.1f%%", f);
00757 Fgl_write (mps->x + 8 * 8, mps->y + 64, s);
00758 sprintf (s, "%4d%%", MP_INFO(x,y).int_5);
00759 Fgl_write (mps->x + 8 * 8, mps->y + 80, s);
00760 }
|
|
|
Definition at line 714 of file mps.c. 00715 {
00716 Rect* mps = &scr.mappoint_stats;
00717 Fgl_write (mps->x, mps->y + 16, _("Power"));
00718 Fgl_write (mps->x, mps->y + 40, _("Output"));
00719 Fgl_write (mps->x, mps->y + 48, _("Store"));
00720 Fgl_write (mps->x, mps->y + 56, _("Ore"));
00721 Fgl_write (mps->x, mps->y + 64, _("Coal"));
00722 Fgl_write (mps->x, mps->y + 80, _("Capacity"));
00723 }
|
|
||||||||||||
|
Definition at line 681 of file mps.c. 00682 {
00683 Rect* mps = &scr.mappoint_stats;
00684 char s[100];
00685 float f;
00686 if ((MP_INFO(x,y).flags & FLAG_POWERED) != 0)
00687 strcpy (s, _("YES"));
00688 else
00689 strcpy (s, _("NO "));
00690 Fgl_write (mps->x + 7 * 8, mps->y + 16, s);
00691 sprintf (s, "%7d", MP_INFO(x,y).int_1);
00692 Fgl_write (mps->x + 7 * 8, mps->y + 40, s);
00693 f = (float) MP_INFO(x,y).int_2 * 100.0 / MAX_GOODS_AT_INDUSTRY_L;
00694 if (f > 100.0)
00695 f = 100.0;
00696 sprintf (s, "%3.1f%%", f);
00697 Fgl_write (mps->x + 9 * 8, mps->y + 48, s);
00698 f = (float) MP_INFO(x,y).int_3 * 100.0 / MAX_ORE_AT_INDUSTRY_L;
00699 if (f > 100.0)
00700 f = 100.0;
00701 sprintf (s, "%3.1f%%", f);
00702 Fgl_write (mps->x + 9 * 8, mps->y + 56, s);
00703 f = (float) MP_INFO(x,y).int_4 * 100.0 / MAX_STEEL_AT_INDUSTRY_L;
00704 if (f > 100.0)
00705 f = 100.0;
00706 sprintf (s, "%3.1f%%", f);
00707 Fgl_write (mps->x + 9 * 8, mps->y + 64, s);
00708 sprintf (s, "%4d%%", MP_INFO(x,y).int_6);
00709 Fgl_write (mps->x + 9 * 8, mps->y + 80, s);
00710
00711 }
|
|
|
Definition at line 669 of file mps.c. 00670 {
00671 Rect* mps = &scr.mappoint_stats;
00672 Fgl_write (mps->x, mps->y + 16, _("Power"));
00673 Fgl_write (mps->x, mps->y + 40, _("Output"));
00674 Fgl_write (mps->x, mps->y + 48, _("Store"));
00675 Fgl_write (mps->x, mps->y + 56, _("Ore"));
00676 Fgl_write (mps->x, mps->y + 64, _("Steel"));
00677 Fgl_write (mps->x, mps->y + 80, _("Capacity"));
00678 }
|
|
||||||||||||
|
Definition at line 597 of file mps.c. 00598 {
00599 Rect* mps = &scr.mappoint_stats;
00600 char s[100];
00601 float f;
00602 f = (float) MP_INFO(x,y).int_1 * 100.0 / MAX_FOOD_IN_MARKET;
00603 if (f > 100.0)
00604 f = 100.0;
00605 sprintf (s, "%5.1f%%", f);
00606 Fgl_write (mps->x + 8 * 8, mps->y + 32, s);
00607 f = (float) MP_INFO(x,y).int_2 * 100.0 / MAX_JOBS_IN_MARKET;
00608 if (f > 100.0)
00609 f = 100.0;
00610 sprintf (s, "%5.1f%%", f);
00611 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
00612 f = (float) MP_INFO(x,y).int_3 * 100.0 / MAX_COAL_IN_MARKET;
00613 if (f > 100.0)
00614 f = 100.0;
00615 sprintf (s, "%5.1f%%", f);
00616 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
00617 f = (float) MP_INFO(x,y).int_4 * 100.0 / MAX_GOODS_IN_MARKET;
00618 if (f > 100.0)
00619 f = 100.0;
00620 sprintf (s, "%5.1f%%", f);
00621 Fgl_write (mps->x + 8 * 8, mps->y + 56, s);
00622 f = (float) MP_INFO(x,y).int_5 * 100.0 / MAX_ORE_IN_MARKET;
00623 if (f > 100.0)
00624 f = 100.0;
00625 sprintf (s, "%5.1f%%", f);
00626 Fgl_write (mps->x + 8 * 8, mps->y + 64, s);
00627 f = (float) MP_INFO(x,y).int_6 * 100 / MAX_STEEL_IN_MARKET;
00628 if (f > 100.0)
00629 f = 100.0;
00630 sprintf (s, "%5.1f%%", f);
00631 Fgl_write (mps->x + 8 * 8, mps->y + 72, s);
00632 f = (float) MP_INFO(x,y).int_7 * 100 / MAX_WASTE_IN_MARKET;
00633 if (f > 100.0)
00634 f = 100.0;
00635 sprintf (s, "%5.1f%%", f);
00636 Fgl_write (mps->x + 8 * 8, mps->y + 80, s);
00637
00638 }
|
|
|
Definition at line 590 of file mps.c. 00591 {
00592 mps_transport_setup ();
00593 /* put flags in */
00594 }
|
|
||||||||||||
|
Definition at line 1176 of file mps.c. 01177 {
01178 Rect* mps = &scr.mappoint_stats;
01179 char s[100];
01180 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100
01181 / MAX_GOODS_AT_MILL);
01182 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
01183 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_2 * 100
01184 / MAX_FOOD_AT_MILL);
01185 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
01186 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_3 * 100
01187 / MAX_COAL_AT_MILL);
01188 Fgl_write (mps->x + 8 * 8, mps->y + 56, s);
01189 sprintf (s, "%5d%%", MP_INFO(x,y).int_6);
01190 Fgl_write (mps->x + 8 * 8, mps->y + 64, s);
01191 }
|
|
|
Definition at line 1166 of file mps.c. 01167 {
01168 Rect* mps = &scr.mappoint_stats;
01169 Fgl_write (mps->x, mps->y + 40, _("G store"));
01170 Fgl_write (mps->x, mps->y + 48, _("F store"));
01171 Fgl_write (mps->x, mps->y + 56, _("C store"));
01172 Fgl_write (mps->x, mps->y + 64, _("Capacity"));
01173 }
|
|
||||||||||||
|
Definition at line 1100 of file mps.c. 01101 {
01102 Rect* mps = &scr.mappoint_stats;
01103 char s[100];
01104 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100
01105 / BUILD_MONUMENT_JOBS);
01106 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
01107 sprintf (s, "%5.1f", (float) MP_INFO(x,y).int_2 * 100
01108 / MAX_TECH_LEVEL);
01109 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
01110 }
|
|
|
Definition at line 1091 of file mps.c. 01092 {
01093 Rect* mps = &scr.mappoint_stats;
01094 Fgl_write (mps->x, mps->y + 40, _("Built"));
01095 Fgl_write (mps->x, mps->y + 48, _("T made"));
01096 }
|
|
||||||||||||
|
Definition at line 956 of file mps.c. 00957 {
00958 Rect* mps = &scr.mappoint_stats;
00959 char s[100];
00960 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100
00961 / DIG_MORE_ORE_TRIGGER);
00962 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
00963 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_2 * 100
00964 / (ORE_RESERVE * 16));
00965 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
00966 }
|
|
|
Definition at line 948 of file mps.c. 00949 {
00950 Rect* mps = &scr.mappoint_stats;
00951 Fgl_write (mps->x, mps->y + 40, _("Stock"));
00952 Fgl_write (mps->x, mps->y + 48, _("Reserve"));
00953 }
|
|
||||||||||||
|
Definition at line 1248 of file mps.c. 01249 {
01250 Rect* mps = &scr.mappoint_stats;
01251 int i, l;
01252 int *p1, *p2;
01253 char buy[256], sell[256], s[256];
01254
01255 p1 = &(MP_INFO(x,y + 1).int_3);
01256 p2 = &(MP_INFO(x,y + 2).int_3);
01257 for (i = 0; i < 5; i++)
01258 {
01259 l = *(p1++) / 100;
01260 format_number5 (buy, l);
01261 l = *(p2++) / 100;
01262 format_number5 (sell, l);
01263 sprintf (s, " %s %s", buy, sell);
01264 Fgl_write (mps->x + 20, mps->y + (3+i)*8, s);
01265 }
01266
01267 /* Totals */
01268 l = MP_INFO(x,y).int_5 / 100;
01269 format_number5 (buy, l);
01270 l = MP_INFO(x,y).int_2 / 100;
01271 format_number5 (sell, l);
01272 sprintf (s, " %s %s", buy, sell);
01273 Fgl_write (mps->x + 20, mps->y + (3+i)*8 + 4, s);
01274 }
|
|
||||||||||||
|
Definition at line 1235 of file mps.c. 01236 {
01237 Rect* mps = &scr.mappoint_stats;
01238 /* TRANSLATORS F=food, C=coal, O=ore, G=goods, S=steel */
01239 Fgl_write (mps->x + 4, mps->y + 1*8+4, _(" Buy Sell"));
01240 Fgl_write (mps->x + 4, mps->y + 3*8, _("F"));
01241 Fgl_write (mps->x + 4, mps->y + 4*8, _("C"));
01242 Fgl_write (mps->x + 4, mps->y + 5*8, _("O"));
01243 Fgl_write (mps->x + 4, mps->y + 6*8, _("G"));
01244 Fgl_write (mps->x + 4, mps->y + 7*8, _("S"));
01245 }
|
|
||||||||||||
|
Definition at line 1204 of file mps.c. 01205 {
01206 Rect* mps = &scr.mappoint_stats;
01207 char s[100];
01208 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100
01209 / MAX_GOODS_AT_POTTERY);
01210 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
01211 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_2 * 100
01212 / MAX_ORE_AT_POTTERY);
01213 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
01214 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_3 * 100
01215 / MAX_COAL_AT_POTTERY);
01216 Fgl_write (mps->x + 8 * 8, mps->y + 56, s);
01217 sprintf (s, "%5d%%", MP_INFO(x,y).int_6);
01218 Fgl_write (mps->x + 8 * 8, mps->y + 64, s);
01219 }
|
|
|
Definition at line 1194 of file mps.c. 01195 {
01196 Rect* mps = &scr.mappoint_stats;
01197 Fgl_write (mps->x, mps->y + 40, _("G store"));
01198 Fgl_write (mps->x, mps->y + 48, _("O store"));
01199 Fgl_write (mps->x, mps->y + 56, _("C store"));
01200 Fgl_write (mps->x, mps->y + 64, _("Capacity"));
01201 }
|
|
||||||||||||
|
Definition at line 839 of file mps.c. 00840 {
00841 Rect* mps = &scr.mappoint_stats;
00842 char s[100];
00843
00844 sprintf (s, "%d",MP_INFO(x,y).int_5);
00845 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
00846 sprintf (s, "%d",MP_INFO(x,y).int_6);
00847 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
00848 sprintf (s, "%d",MP_INFO(x,y).int_7);
00849 Fgl_write (mps->x + 8 * 8, mps->y + 58, s);
00850 }
|
|
|
Definition at line 830 of file mps.c. 00831 {
00832 Rect* mps = &scr.mappoint_stats;
00833 Fgl_write (mps->x, mps->y + 40, _("Anim"));
00834 Fgl_write (mps->x, mps->y + 48, _("Grid"));
00835 Fgl_write (mps->x, mps->y + 56, _("Debug"));
00836 }
|
|
||||||||||||
|
Definition at line 863 of file mps.c. 00864 {
00865 Rect* mps = &scr.mappoint_stats;
00866 char s[100];
00867 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100
00868 / POWER_LINE_CAPACITY);
00869 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
00870 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_2 * 100
00871 / MAX_TECH_LEVEL);
00872 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
00873
00874 /* Capacity is int_3 */
00875 format_power (s, sizeof(s), MP_INFO(x,y).int_3);
00876 Fgl_write (mps->x + 8 * 8, mps ->y + 56, s);
00877
00878 /* Grid number is int_6 */
00879 sprintf (s, "%d", MP_INFO(x,y).int_6);
00880 Fgl_write (mps->x + 8 * 8, mps ->y + 72, s);
00881 }
|
|
||||||||||||
|
Definition at line 798 of file mps.c. 00799 {
00800 Rect* mps = &scr.mappoint_stats;
00801 char s[100];
00802 float f;
00803 f = (float) MP_INFO(x,y).int_1 * 100 / POWER_LINE_CAPACITY;
00804 if (f > 100.0)
00805 f = 100.0;
00806 sprintf (s, "%5.1f%%", f);
00807 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
00808 f = (float) MP_INFO(x,y).int_2 * 100 / MAX_COAL_AT_POWER_STATION;
00809 if (f > 100.0)
00810 f = 100.0;
00811 sprintf (s, "%5.1f%%", f);
00812 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
00813 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_3 * 100
00814 / MAX_JOBS_AT_COALPS);
00815 Fgl_write (mps->x + 8 * 8, mps->y + 56, s);
00816 /* tech level is int_4 */
00817 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_4 * 100
00818 / MAX_TECH_LEVEL);
00819 Fgl_write (mps->x + 8 * 8, mps->y + 64, s);
00820 /* Grid number is int_6 */
00821 sprintf (s, "%d", MP_INFO(x,y).int_6);
00822 Fgl_write (mps->x + 8 * 8, mps ->y + 72, s);
00823
00824 /* Capacity is int_1 */
00825 format_power (s, sizeof(s), MP_INFO(x,y).int_1);
00826 Fgl_write (mps->x + 8 * 8, mps ->y + 80, s);
00827 }
|
|
|
Definition at line 786 of file mps.c. 00787 {
00788 Rect* mps = &scr.mappoint_stats;
00789 Fgl_write (mps->x, mps->y + 40, _("Cycle"));
00790 Fgl_write (mps->x, mps->y + 48, _("Coal"));
00791 Fgl_write (mps->x, mps->y + 56, _("Jobs"));
00792 Fgl_write (mps->x, mps->y + 64, _("Tech"));
00793 Fgl_write (mps->x, mps->y + 72, _("Grid"));
00794 Fgl_write (mps->x, mps->y + 80, _("Capacity"));
00795 }
|
|
|
Definition at line 853 of file mps.c. 00854 {
00855 Rect* mps = &scr.mappoint_stats;
00856 Fgl_write (mps->x, mps->y + 40, _("Cycle"));
00857 Fgl_write (mps->x, mps->y + 48, _("Tech"));
00858 Fgl_write (mps->x, mps->y + 56, _("Capacity"));
00859 Fgl_write (mps->x, mps->y + 72, _("Grid"));
00860 }
|
|
||||||||||||
|
Definition at line 532 of file mps.c. 00533 {
00534 Rect* mps = &scr.mappoint_stats;
00535 char s[100];
00536 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100.0
00537 / MAX_FOOD_ON_RAIL);
00538 Fgl_write (mps->x + 8 * 8, mps->y + 32, s);
00539 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_2 * 100.0
00540 / MAX_JOBS_ON_RAIL);
00541 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
00542 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_3 * 100.0
00543 / MAX_COAL_ON_RAIL);
00544 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
00545 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_4 * 100.0
00546 / MAX_GOODS_ON_RAIL);
00547 Fgl_write (mps->x + 8 * 8, mps->y + 56, s);
00548 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_5 * 100.0
00549 / MAX_ORE_ON_RAIL);
00550 Fgl_write (mps->x + 8 * 8, mps->y + 64, s);
00551 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_6 * 100
00552 / MAX_STEEL_ON_RAIL);
00553 Fgl_write (mps->x + 8 * 8, mps->y + 72, s);
00554 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_7 * 100
00555 / MAX_WASTE_ON_RAIL);
00556 Fgl_write (mps->x + 8 * 8, mps->y + 80, s);
00557
00558 }
|
|
||||||||||||
|
Definition at line 924 of file mps.c. 00925 {
00926 Rect* mps = &scr.mappoint_stats;
00927 char s[100];
00928 if ((MP_INFO(x,y).flags & FLAG_POWERED) != 0)
00929 strcpy (s, _("YES"));
00930 else
00931 strcpy (s, _("NO "));
00932 Fgl_write (mps->x + 7 * 8, mps->y + 16, s);
00933 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100
00934 / MAX_ORE_AT_RECYCLE);
00935 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
00936 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_2 * 100
00937 / MAX_WASTE_AT_RECYCLE);
00938 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
00939 Fgl_write (mps->x + 9 * 8, mps->y + 56, "-");
00940 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_4 * 100
00941 / MAX_TECH_LEVEL);
00942 Fgl_write (mps->x + 8 * 8, mps->y + 64, s);
00943 sprintf (s, "%4d%%", MP_INFO(x,y).int_6);
00944 Fgl_write (mps->x + 8 * 8, mps->y + 80, s);
00945 }
|
|
|
Definition at line 912 of file mps.c. 00913 {
00914 Rect* mps = &scr.mappoint_stats;
00915 Fgl_write (mps->x, mps->y + 16, _("Power"));
00916 Fgl_write (mps->x, mps->y + 40, _("O stock"));
00917 Fgl_write (mps->x, mps->y + 48, _("W store"));
00918 Fgl_write (mps->x, mps->y + 56, _("S store"));
00919 Fgl_write (mps->x, mps->y + 64, _("Tech"));
00920 Fgl_write (mps->x, mps->y + 80, _("Capacity"));
00921 }
|
|
||||||||||||
|
Definition at line 434 of file mps.c. 00435 {
00436 Rect* mps = &scr.mappoint_stats;
00437 char s[100];
00438 sprintf (s, "%d ", MP_INFO(x,y).population);
00439 Fgl_write (mps->x + 7 * 8, mps->y + 8, s);
00440 if ((MP_INFO(x,y).flags & FLAG_POWERED) != 0)
00441 /* TRANSLATORS: YES and NO must be same lengths */
00442 strcpy (s, _("YES"));
00443 else
00444 strcpy (s, _("NO "));
00445 Fgl_write (mps->x + 7 * 8, mps->y + 16, s);
00446
00447 if ((MP_INFO(x,y).flags & FLAG_FED) != 0)
00448 strcpy (s, _("YES"));
00449 else
00450 strcpy (s, _("NO "));
00451 Fgl_write (mps->x + 7 * 8, mps->y + 24, s);
00452
00453 if ((MP_INFO(x,y).flags & FLAG_EMPLOYED) != 0)
00454 strcpy (s, _("YES"));
00455 else
00456 strcpy (s, _("NO "));
00457 Fgl_write (mps->x + 7 * 8, mps->y + 32, s);
00458
00459 if ((MP_INFO(x,y).flags & FLAG_HEALTH_COVER) != 0)
00460 strcpy (s, _("YES"));
00461 else
00462 strcpy (s, _("NO "));
00463 Fgl_write (mps->x + 7 * 8, mps->y + 40, s);
00464
00465 if ((MP_INFO(x,y).flags & FLAG_FIRE_COVER) != 0)
00466 strcpy (s, _("YES"));
00467 else
00468 strcpy (s, _("NO "));
00469 Fgl_write (mps->x + 7 * 8, mps->y + 48, s);
00470
00471 if ((MP_INFO(x,y).flags & FLAG_CRICKET_COVER) != 0)
00472 strcpy (s, _("YES"));
00473 else
00474 strcpy (s, _("NO "));
00475 Fgl_write (mps->x + 7 * 8, mps->y + 56, s);
00476
00477 /* pollution */
00478 sprintf (s, "%7d", MP_POL(x,y));
00479 Fgl_write (mps->x + 7 * 8, mps->y + 64, s);
00480
00481 /* job prospects */
00482 if (MP_INFO(x,y).int_1 >= 10)
00483 sprintf (s, _(" good"));
00484 else
00485 sprintf (s, "%7d", MP_INFO(x,y).int_1);
00486 Fgl_write (mps->x + 7 * 8, mps->y + 80, s);
00487 }
|
|
|
Definition at line 419 of file mps.c. 00420 {
00421 Rect* mps = &scr.mappoint_stats;
00422 Fgl_write (mps->x, mps->y + 8, _("People"));
00423 Fgl_write (mps->x, mps->y + 16, _("Power"));
00424 Fgl_write (mps->x, mps->y + 24, _("Fed"));
00425 Fgl_write (mps->x, mps->y + 32, _("Empld"));
00426 Fgl_write (mps->x, mps->y + 40, _("H cov"));
00427 Fgl_write (mps->x, mps->y + 48, _("F cov"));
00428 Fgl_write (mps->x, mps->y + 56, _("C cov"));
00429 Fgl_write (mps->x, mps->y + 64, _("Poll'n"));
00430 Fgl_write (mps->x, mps->y + 80, _("Job pro"));
00431 }
|
|
||||||||||||
|
Definition at line 1346 of file mps.c. 01347 {
01348 Rect* mps = &scr.mappoint_stats;
01349 char s[100];
01350 int g;
01351 snprintf(s,100,"%d,%d",x,y);
01352 Fgl_write (mps->x + 8 * 8, mps->y + 8, s);
01353 Fgl_write (mps->x + 8 * 12, mps->y + 24,
01354 (MP_INFO(x,y).flags & FLAG_FIRE_COVER) ? _("YES") : _("NO "));
01355 Fgl_write (mps->x + 8 * 12, mps->y + 32,
01356 (MP_INFO(x,y).flags & FLAG_HEALTH_COVER) ? _("YES") : _("NO "));
01357 Fgl_write (mps->x + 8 * 12, mps->y + 40,
01358 (MP_INFO(x,y).flags & FLAG_CRICKET_COVER) ? _("YES") : _("NO "));
01359
01360 sprintf (s, "%5d ", MP_POL(x,y));
01361 if (MP_POL(x,y) < 10)
01362 strcat (s, _("(clear) "));
01363 else if (MP_POL(x,y) < 25)
01364 strcat (s, _("(good) "));
01365 else if (MP_POL(x,y) < 70)
01366 strcat (s, _("(fair) "));
01367 else if (MP_POL(x,y) < 190)
01368 strcat (s, _("(smelly)"));
01369 else if (MP_POL(x,y) < 450)
01370 strcat (s, _("(smokey)"));
01371 else if (MP_POL(x,y) < 1000)
01372 strcat (s, _("(smoggy)"));
01373 else if (MP_POL(x,y) < 1700)
01374 strcat (s, _("(bad) "));
01375 else if (MP_POL(x,y) < 3000)
01376 strcat (s, _("(v bad) "));
01377 else
01378 strcat (s, _("(death!)"));
01379 Fgl_write (mps->x + 8, mps->y + 56, s);
01380
01381 g = MP_GROUP(x,y);
01382 if (g == 0) {
01383 sprintf (s, _(" (N/A)")); /* Can't bulldoze grass. */
01384 } else {
01385 if (g < 7)
01386 g--; /* translate into button type */
01387 sprintf (s, "%7d", main_groups[g].bul_cost);
01388 }
01389 Fgl_write (mps->x + 48, mps->y + 76, s);
01390 }
|
|
|
Definition at line 1333 of file mps.c. 01334 {
01335 Rect* mps = &scr.mappoint_stats;
01336 Fgl_write (mps->x + 16, mps->y + 8, _("Grid:"));
01337 Fgl_write (mps->x + 16, mps->y + 16, _("Coverages:"));
01338 Fgl_write (mps->x + 16, mps->y + 24, _("Fire "));
01339 Fgl_write (mps->x + 16, mps->y + 32, _("Health "));
01340 Fgl_write (mps->x + 16, mps->y + 40, _("Cricket "));
01341 Fgl_write (mps->x + 16, mps->y + 48, _("Pollution"));
01342 Fgl_write (mps->x + 16, mps->y + 76, _(" Bull"));
01343 }
|
|
||||||||||||
|
Definition at line 503 of file mps.c. 00504 {
00505 Rect* mps = &scr.mappoint_stats;
00506 char s[100];
00507 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100.0
00508 / MAX_FOOD_ON_ROAD);
00509 Fgl_write (mps->x + 8 * 8, mps->y + 32, s);
00510 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_2 * 100.0
00511 / MAX_JOBS_ON_ROAD);
00512 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
00513 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_3 * 100.0
00514 / MAX_COAL_ON_ROAD);
00515 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
00516 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_4 * 100.0
00517 / MAX_GOODS_ON_ROAD);
00518 Fgl_write (mps->x + 8 * 8, mps->y + 56, s);
00519 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_5 * 100.0
00520 / MAX_ORE_ON_ROAD);
00521 Fgl_write (mps->x + 8 * 8, mps->y + 64, s);
00522 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_6 * 100
00523 / MAX_STEEL_ON_ROAD);
00524 Fgl_write (mps->x + 8 * 8, mps->y + 72, s);
00525 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_7 * 100
00526 / MAX_WASTE_ON_ROAD);
00527 Fgl_write (mps->x + 8 * 8, mps->y + 80, s);
00528
00529 }
|
|
||||||||||||
|
Definition at line 1012 of file mps.c. 01013 {
01014 Rect* mps = &scr.mappoint_stats;
01015 char s[100];
01016 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100
01017 / ROCKET_PAD_JOBS_STORE);
01018 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
01019 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_2 * 100
01020 / ROCKET_PAD_GOODS_STORE);
01021 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
01022 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_3 * 100
01023 / ROCKET_PAD_STEEL_STORE);
01024 Fgl_write (mps->x + 8 * 8, mps->y + 56, s);
01025 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_4 * 100
01026 / ROCKET_PAD_LAUNCH);
01027 Fgl_write (mps->x + 8 * 8, mps->y + 64, s);
01028
01029 /* GCS: Moved to mouse handler */
01030 #if defined (commentout)
01031 if (MP_TYPE(x,y) == CST_ROCKET_5) {
01032 if (yn_dial_box (_("ROCKET LAUNCH"),
01033 _("You can launch the rocket now or wait until later."),
01034 _("If you wait, it costs you *only* money to keep the"),
01035 _("rocket ready. Launch?")) != 0)
01036 launch_rocket (x, y);
01037 }
01038 #endif
01039 }
|
|
|
Definition at line 1002 of file mps.c. 01003 {
01004 Rect* mps = &scr.mappoint_stats;
01005 Fgl_write (mps->x, mps->y + 40, _("Jobs"));
01006 Fgl_write (mps->x, mps->y + 48, _("Goods"));
01007 Fgl_write (mps->x, mps->y + 56, _("Steel"));
01008 Fgl_write (mps->x, mps->y + 64, _("Launch"));
01009 }
|
|
||||||||||||
|
Definition at line 1123 of file mps.c. 01124 {
01125 Rect* mps = &scr.mappoint_stats;
01126 char s[100];
01127 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100
01128 / MAX_JOBS_AT_SCHOOL);
01129 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
01130 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_2 * 100
01131 / MAX_GOODS_AT_SCHOOL);
01132 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
01133 sprintf (s, "%6.1f", (float) MP_INFO(x,y).int_3 * 100
01134 / MAX_TECH_LEVEL);
01135 Fgl_write (mps->x + 8 * 8, mps->y + 56, s);
01136 sprintf (s, "%5d%%", MP_INFO(x,y).int_5 * 4);
01137 Fgl_write (mps->x + 8 * 8, mps->y + 64, s);
01138
01139 }
|
|
|
Definition at line 1113 of file mps.c. 01114 {
01115 Rect* mps = &scr.mappoint_stats;
01116 Fgl_write (mps->x, mps->y + 40, _("Jobs"));
01117 Fgl_write (mps->x, mps->y + 48, _("Goods"));
01118 Fgl_write (mps->x, mps->y + 56, _("T made"));
01119 Fgl_write (mps->x, mps->y + 64, _("Capacity"));
01120 }
|
|
||||||||||||
|
Definition at line 318 of file mps.c. 00319 {
00320 switch (MP_GROUP(x,y))
00321 {
00322
00323 case GROUP_POWER_LINE:
00324 mps_power_line_setup ();
00325 break;
00326 case GROUP_RESIDENCE_LL:
00327 case GROUP_RESIDENCE_ML:
00328 case GROUP_RESIDENCE_HL:
00329 case GROUP_RESIDENCE_LH:
00330 case GROUP_RESIDENCE_MH:
00331 case GROUP_RESIDENCE_HH:
00332 mps_res_setup ();
00333 break;
00334 case (GROUP_ROAD):
00335 mps_transport_setup ();
00336 break;
00337 case (GROUP_RAIL):
00338 mps_transport_setup ();
00339 break;
00340 case (GROUP_TRACK):
00341 mps_transport_setup ();
00342 break;
00343 case (GROUP_ORGANIC_FARM):
00344 mps_farm_setup ();
00345 break;
00346 case (GROUP_MARKET):
00347 mps_market_setup ();
00348 break;
00349 case (GROUP_INDUSTRY_L):
00350 mps_indl_setup ();
00351 break;
00352 case (GROUP_INDUSTRY_H):
00353 mps_indh_setup ();
00354 break;
00355 case (GROUP_COALMINE):
00356 mps_coalmine_setup ();
00357 break;
00358 case GROUP_COAL_POWER:
00359 mps_power_source_coal_setup ();
00360 break;
00361 case GROUP_SOLAR_POWER:
00362 mps_power_source_setup ();
00363 break;
00364 case (GROUP_UNIVERSITY):
00365 mps_university_setup ();
00366 break;
00367 case (GROUP_OREMINE):
00368 mps_oremine_setup ();
00369 break;
00370 case (GROUP_RECYCLE):
00371 mps_recycle_setup ();
00372 break;
00373 case (GROUP_SUBSTATION):
00374 mps_substation_setup ();
00375 break;
00376 case (GROUP_ROCKET):
00377 mps_rocket_setup ();
00378 break;
00379 case (GROUP_WINDMILL):
00380 mps_windmill_setup (x, y);
00381 break;
00382 case (GROUP_MONUMENT):
00383 mps_monument_setup ();
00384 break;
00385 case (GROUP_SCHOOL):
00386 mps_school_setup ();
00387 break;
00388 case (GROUP_BLACKSMITH):
00389 mps_blacksmith_setup ();
00390 break;
00391 case (GROUP_MILL):
00392 mps_mill_setup ();
00393 break;
00394 case (GROUP_POTTERY):
00395 mps_pottery_setup ();
00396 break;
00397 case (GROUP_PORT):
00398 mps_port_setup (x, y);
00399 break;
00400 case (GROUP_TIP):
00401 mps_tip_setup ();
00402 break;
00403 case (GROUP_COMMUNE):
00404 mps_commune_setup ();
00405 break;
00406 case (GROUP_FIRESTATION):
00407 mps_firestation_setup ();
00408 break;
00409 case (GROUP_CRICKET):
00410 mps_cricket_setup ();
00411 break;
00412 case (GROUP_HEALTH):
00413 mps_health_setup ();
00414 break;
00415 }
00416 }
|
|
||||||||||||
|
Definition at line 980 of file mps.c. 00981 {
00982 Rect* mps = &scr.mappoint_stats;
00983 char s[100];
00984 /* Grid number is int_6 */
00985 sprintf (s, "%d", MP_INFO(x,y).int_6);
00986 Fgl_write (mps->x + 8 * 8, mps ->y + 40, s);
00987
00988 format_power (s, 100, grid[MP_INFO(x,y).int_6]->max_power);
00989 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
00990
00991 format_power (s, 100, grid[MP_INFO(x,y).int_6]->avail_power);
00992 Fgl_write (mps->x + 8 * 8, mps->y + 56, s);
00993
00994 format_power (s, 100, grid[MP_INFO(x,y).int_6]->demand);
00995 Fgl_write (mps->x + 8 * 8, mps->y + 64, s);
00996
00997 format_power (s, 100, MP_INFO(x,y).int_5);
00998 Fgl_write (mps->x + 8 * 8, mps->y + 72, s);
00999 }
|
|
|
Definition at line 969 of file mps.c. 00970 {
00971 Rect* mps = &scr.mappoint_stats;
00972 Fgl_write (mps->x, mps->y + 40, _("Grid"));
00973 Fgl_write (mps->x, mps->y + 48, _("Max"));
00974 Fgl_write (mps->x, mps->y + 56, _("Avail"));
00975 Fgl_write (mps->x, mps->y + 64, _("Demand"));
00976 Fgl_write (mps->x, mps->y + 72, _("Here"));
00977 }
|
|
||||||||||||
|
Definition at line 1286 of file mps.c. 01287 {
01288 Rect* mps = &scr.mappoint_stats;
01289 char s[100];
01290 sprintf (s, "%7d", MP_INFO(x,y).int_3);
01291 Fgl_write (mps->x + 3 * 8, mps->y + 52, s);
01292 sprintf (s, "%4.1f", (float) (MP_INFO(x,y).int_1 * 100)
01293 / (float) MAX_WASTE_AT_TIP);
01294 Fgl_write (mps->x + 3 * 8, mps->y + 64, s);
01295 }
|
|
|
Definition at line 1277 of file mps.c. 01278 {
01279 Rect* mps = &scr.mappoint_stats;
01280 Fgl_write (mps->x, mps->y + 32, _(" Waste stored"));
01281 Fgl_write (mps->x, mps->y + 40, _(" last month"));
01282 Fgl_write (mps->x, mps->y + 64, _(" % full"));
01283 }
|
|
||||||||||||
|
Definition at line 561 of file mps.c. 00562 {
00563 Rect* mps = &scr.mappoint_stats;
00564 char s[100];
00565 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100.0
00566 / MAX_FOOD_ON_TRACK);
00567 Fgl_write (mps->x + 8 * 8, mps->y + 32, s);
00568 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_2 * 100.0
00569 / MAX_JOBS_ON_TRACK);
00570 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
00571 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_3 * 100.0
00572 / MAX_COAL_ON_TRACK);
00573 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
00574 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_4 * 100.0
00575 / MAX_GOODS_ON_TRACK);
00576 Fgl_write (mps->x + 8 * 8, mps->y + 56, s);
00577 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_5 * 100.0
00578 / MAX_ORE_ON_TRACK);
00579 Fgl_write (mps->x + 8 * 8, mps->y + 64, s);
00580 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_6 * 100
00581 / MAX_STEEL_ON_TRACK);
00582 Fgl_write (mps->x + 8 * 8, mps->y + 72, s);
00583 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_7 * 100
00584 / MAX_WASTE_ON_TRACK);
00585 Fgl_write (mps->x + 8 * 8, mps->y + 80, s);
00586
00587 }
|
|
|
Definition at line 490 of file mps.c. 00491 {
00492 Rect* mps = &scr.mappoint_stats;
00493 Fgl_write (mps->x, mps->y + 32, _("Food"));
00494 Fgl_write (mps->x, mps->y + 40, _("Jobs"));
00495 Fgl_write (mps->x, mps->y + 48, _("Coal"));
00496 Fgl_write (mps->x, mps->y + 56, _("Goods"));
00497 Fgl_write (mps->x, mps->y + 64, _("Ore"));
00498 Fgl_write (mps->x, mps->y + 72, _("Steel"));
00499 Fgl_write (mps->x, mps->y + 80, _("Waste"));
00500 }
|
|
||||||||||||
|
Definition at line 894 of file mps.c. 00895 {
00896 Rect* mps = &scr.mappoint_stats;
00897 char s[100];
00898 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_1 * 100
00899 / UNIVERSITY_JOBS_STORE);
00900 Fgl_write (mps->x + 8 * 8, mps->y + 40, s);
00901 sprintf (s, "%5.1f%%", (float) MP_INFO(x,y).int_2 * 100
00902 / UNIVERSITY_GOODS_STORE);
00903 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
00904 sprintf (s, "%6.1f", (float) MP_INFO(x,y).int_3 * 100.0
00905 / MAX_TECH_LEVEL);
00906 Fgl_write (mps->x + 8 * 8, mps->y + 56, s);
00907 sprintf (s, "%4d%%", MP_INFO(x,y).int_5);
00908 Fgl_write (mps->x + 9 * 8, mps->y + 64, s);
00909 }
|
|
|
Definition at line 884 of file mps.c. 00885 {
00886 Rect* mps = &scr.mappoint_stats;
00887 Fgl_write (mps->x, mps->y + 40, _("Jobs"));
00888 Fgl_write (mps->x, mps->y + 48, _("Goods"));
00889 Fgl_write (mps->x, mps->y + 56, _("T made"));
00890 Fgl_write (mps->x, mps->y + 64, _("Capacity"));
00891 }
|
|
||||||||||||
|
Definition at line 1222 of file mps.c. 01223 {
01224 Rect* mps = &scr.mappoint_stats;
01225 if (MP_INFO(x,y).flags & FLAG_IS_RIVER)
01226 Fgl_write (mps->x + 1 * 8, mps->y + 40,
01227 _(" CONNECTED "));
01228 else
01229 Fgl_write (mps->x + 1 * 8, mps->y + 40,
01230 _("NOT CONNECTED"));
01231 Fgl_write (mps->x, mps->y + 48, _("to river sytem"));
01232 }
|
|
||||||||||||
|
Definition at line 1058 of file mps.c. 01059 {
01060 Rect* mps = &scr.mappoint_stats;
01061 char s[10];
01062
01063 snprintf (s, 10, "%5.1f%%", (float) MP_INFO(x,y).int_2 * 100
01064 / MAX_TECH_LEVEL);
01065 Fgl_write (mps->x + 8 * 8, mps->y + 24, s);
01066
01067 if (MP_INFO(x,y).int_2 >= MODERN_WINDMILL_TECH)
01068 { /* power level */
01069 format_power(s, 10, MP_INFO(x,y).int_1);
01070 Fgl_write (mps->x + 8 * 8, mps->y + 32, s);
01071
01072 snprintf (s, 10, "%d", MP_INFO(x,y).int_6);
01073 Fgl_write (mps->x + 8 * 8, mps ->y + 40, s);
01074
01075 format_power (s, 10, grid[MP_INFO(x,y).int_6]->max_power);
01076 Fgl_write (mps->x + 8 * 8, mps->y + 48, s);
01077
01078 format_power (s, 10, grid[MP_INFO(x,y).int_6]->avail_power);
01079 Fgl_write (mps->x + 8 * 8, mps->y + 56, s);
01080
01081 format_power (s, 10, grid[MP_INFO(x,y).int_6]->demand);
01082 Fgl_write (mps->x + 8 * 8, mps->y + 64, s);
01083
01084 format_power (s, 10, MP_INFO(x,y).int_5);
01085 Fgl_write (mps->x + 8 * 8, mps->y + 72, s);
01086
01087 }
01088 }
|
|
||||||||||||
|
Definition at line 1042 of file mps.c. 01043 {
01044 Rect* mps = &scr.mappoint_stats;
01045 Fgl_write (mps->x, mps->y + 24, _("Tech"));
01046
01047 if (MP_INFO(x,y).int_2 >= MODERN_WINDMILL_TECH) {
01048 Fgl_write (mps->x, mps->y + 32, _("Power"));
01049 Fgl_write (mps->x, mps->y + 40, _("Grid"));
01050 Fgl_write (mps->x, mps->y + 48, _("Max"));
01051 Fgl_write (mps->x, mps->y + 56, _("Avail"));
01052 Fgl_write (mps->x, mps->y + 64, _("Demand"));
01053 Fgl_write (mps->x, mps->y + 72, _("Here"));
01054 }
01055 }
|
1.3.9.1