* Display animated income or costs on the map. Does nothing if cost is zero. * @param x World X position of the animation location. * @param y World Y position of the animation location. * @param z World Z position of the animation location. * @param cost Estimated cost (or income if negative). */
| 511 | * @param cost Estimated cost (or income if negative). |
| 512 | */ |
| 513 | void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost) |
| 514 | { |
| 515 | if (cost == 0) { |
| 516 | return; |
| 517 | } |
| 518 | Point pt = RemapCoords(x, y, z); |
| 519 | StringID msg = STR_INCOME_FLOAT_COST; |
| 520 | |
| 521 | if (cost < 0) { |
| 522 | cost = -cost; |
| 523 | msg = STR_INCOME_FLOAT_INCOME; |
| 524 | } |
| 525 | AddTextEffect(GetEncodedString(msg, cost), pt.x, pt.y, Ticks::DAY_TICKS, TE_RISING); |
| 526 | } |
| 527 | |
| 528 | /** |
| 529 | * Display animated feeder income. |
no test coverage detected