/** * Display animated feeder income. * @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 feeder income. */ void ShowFeederIncomeAnimation(int x, int y, int z, Money cost) { Point pt = RemapCoords(x, y, z); SetDParam(0, cost); AddTextEffect(STR_FEEDER, pt.x, pt.y, DAY_TICKS, TE_RISING); }
/** * Display animated feeder income. * @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 transfer Estimated feeder income. * @param income Real income from goods being delivered to their final destination. */ void ShowFeederIncomeAnimation(int x, int y, int z, Money transfer, Money income) { Point pt = RemapCoords(x, y, z); SetDParam(0, transfer); if (income == 0) { AddTextEffect(STR_FEEDER, pt.x, pt.y, DAY_TICKS, TE_RISING); } else { StringID msg = STR_FEEDER_COST; if (income < 0) { income = -income; msg = STR_FEEDER_INCOME; } SetDParam(1, income); AddTextEffect(msg, pt.x, pt.y, DAY_TICKS, TE_RISING); } }
/** * Display vehicle loading indicators. * @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 percent Estimated feeder income. * @param string String which is drawn on the map. * @return TextEffectID to be used for future updates of the loading indicators. */ TextEffectID ShowFillingPercent(int x, int y, int z, uint8 percent, StringID string) { Point pt = RemapCoords(x, y, z); assert(string != STR_NULL); SetDParam(0, percent); return AddTextEffect(string, pt.x, pt.y, 0, TE_STATIC); }
/** * Display animated income or costs on the map. * @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). */ void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost) { Point pt = RemapCoords(x, y, z); StringID msg = STR_INCOME_FLOAT_COST; if (cost < 0) { cost = -cost; msg = STR_INCOME_FLOAT_INCOME; } SetDParam(0, cost); AddTextEffect(msg, pt.x, pt.y, DAY_TICKS, TE_RISING); }