static void intSetTransCapacityLabel(QString &text) { if (psCurrTransporter) { int capacity = calcRemainingCapacity(psCurrTransporter); //change round the way the remaining capacity is displayed - show 0/10 when empty now capacity = TRANSPORTER_CAPACITY - capacity; char tmp[40]; ssprintf(tmp, "%02d/10", capacity); text = QString::fromUtf8(tmp); } }
static void intSetTransCapacityLabel(char *Label) { UDWORD capacity = TRANSPORTER_CAPACITY; if (psCurrTransporter) { capacity = calcRemainingCapacity(psCurrTransporter); //change round the way the remaining capacity is displayed - show 0/10 when empty now capacity = TRANSPORTER_CAPACITY - capacity; Label[0] = (UBYTE)('0' + capacity / 10); Label[1] = (UBYTE)('0' + capacity % 10); } }