void writeTechInfo() { std::ofstream of("techtypes.dox"); for (auto t : TechTypes::allTechTypes()) { if (t == TechTypes::Unknown || t == TechTypes::None) continue; of << docEnum(t); of << docBegin(t); of << icon(t) << " " << docIntro(t) << "\n"; of << "<table border='0'>"; of << row("Race", tref(t.getRace())); if (t.mineralPrice() != 0 || t.gasPrice() != 0) { std::string oreCost = imgOre() + std::to_string(t.mineralPrice()); std::string gasCost = imgGas(t.getRace()) + std::to_string(t.gasPrice()); of << row("Cost", oreCost + " " + gasCost); } if (t.researchTime() != 0) of << row("Research Time", std::to_string(t.researchTime()) + " frames"); if (t.energyCost() != 0) of << row("Energy Cost", imgEnergy() + std::to_string(t.energyCost())); if (t.whatResearches() != UnitTypes::None) of << row("Researched at", iconref(t.whatResearches())); if (t.requiredUnit() != UnitTypes::None) of << row("Requires", iconref(t.requiredUnit())); std::set<std::string> targets; if (t.targetsPosition()) targets.insert("Positions"); if (t.targetsUnit()) targets.insert("Units"); if (!targets.empty()) of << row("Targets", makelist(targets)); if (t.getWeapon() != WeaponTypes::None) of << row("Weapon", iconref(t.getWeapon())); if (t.getOrder() != Orders::None) of << row("Order", iconref(t.getOrder())); if (!t.whatUses().empty()) of << row("Used by", makeiconlist(t.whatUses())); of << "</table>\n"; // References std::string const & name = t.getName(); of << "@tl" << name << " @scc" << name << " @wik" << name; of << docEnd(); } }
void writeUpgradeInfo() { std::ofstream of("upgradetypes.dox"); for (auto t : UpgradeTypes::allUpgradeTypes()) { if (t == UpgradeTypes::Unknown || t == UpgradeTypes::None) continue; of << docEnum(t); of << docBegin(t); of << icon(t) << " " << docIntro(t) << "\n"; of << "<table border='0'>"; of << row("Race", tref(t.getRace())); std::string oreCost = imgOre() + std::to_string(t.mineralPrice()); if (t.maxRepeats() > 1) oreCost += " + lvl*" + std::to_string(t.mineralPriceFactor()); std::string gasCost = imgGas(t.getRace()) + std::to_string(t.gasPrice()); if (t.maxRepeats() > 1) gasCost += " + lvl*" + std::to_string(t.gasPriceFactor()); of << row("Cost", oreCost + " " + gasCost); std::string timeCost = std::to_string(t.upgradeTime()); if (t.maxRepeats() > 1) timeCost += " + lvl*" + std::to_string(t.upgradeTimeFactor()); timeCost += " frames"; of << row("Upgrade Time", timeCost); if (t.maxRepeats() != 1) of << row("Maximum Level", t.maxRepeats()); if (t.whatUpgrades() != UnitTypes::None) of << row("Upgraded at", iconref(t.whatUpgrades())); if (!t.whatUses().empty()) of << row("Used by", makeiconlist(t.whatUses())); if (t.whatsRequired(1) != UnitTypes::None) of << row("Level 1 Requires", iconref(t.whatsRequired(1))); if (t.whatsRequired(2) != UnitTypes::None) of << row("Level 2 Requires", iconref(t.whatsRequired(2))); if (t.whatsRequired(3) != UnitTypes::None) of << row("Level 3 Requires", iconref(t.whatsRequired(3))); of << "</table>\n"; of << docEnd(); } }
IconLibrary::IconLibrary() { image_=QPixmap("Resources/images.png"); imagex2_=QPixmap("Resources/[email protected]"); iconRef_["start"] = iconref(13, 34); iconRef_["start all"] = iconref(15, 34); iconRef_["debug"] = iconref(0, 35); iconRef_["step into"] = iconref(3, 35); iconRef_["step over"] = iconref(2,35); iconRef_["step return"] = iconref(4, 35); iconRef_["resume"] = iconref(1, 35); iconRef_["stop"] = iconref(14, 34); iconRef_["profiler"] = iconref(10, 35); iconRef_["gamepad"] = iconref(12, 34); iconRef_["picture"] = iconref(0, 21); iconRef_["lua"] = iconref(14, 18); iconRef_["file"] = iconref(14, 32); iconRef_["folder"] = iconref(11, 12); iconRef_["folder plugins"] = iconref(13, 12); iconRef_["folder files"] = iconref(6, 13); iconRef_["plugin"] = iconref(2, 6); iconRef_["sound"] = iconref(14, 16); iconRef_["new"] = iconref(3, 272 / 16); iconRef_["open"] = iconref(6, 208 / 16); iconRef_["save"] = iconref(0, 34); iconRef_["save all"] = iconref(1, 34); iconRef_["undo"] = iconref(3, 34); iconRef_["redo"] = iconref(4, 34); iconRef_["cut"] = iconref(5, 34); iconRef_["copy"] = iconref(6, 34); iconRef_["paste"] = iconref(7, 34); iconRef_["toggle bookmark"] = iconref(8, 34); iconRef_["next bookmark"] = iconref(9, 34); iconRef_["previous bookmark"] = iconref(10, 34); iconRef_["clear bookmarks"] = iconref(11, 34); iconRef_["dot list"] = iconref(12, 27); iconRef_["num list"] = iconref(13, 27); iconRef_["blue dot"] = iconref(3, 0); iconRef_["green dot"] = iconref(11, 0); iconRef_["red dot"] = iconref(7, 1); iconRef_["purple dot"] = iconref(5, 1); iconRef_["yellow dot"] = iconref(15, 1); iconRef_["orange dot"] = iconref(1, 1); iconRef_["project"] = iconref(2, 17); iconRef_["export"] = iconref(2, 34); iconRef_["sort cat"] = iconref(6, 35); iconRef_["sort alpha"] = iconref(5, 35); //Autocompletion list iconRef_["method"] = iconref(9,0); iconRef_["constant"] = iconref(4,0); iconRef_["event"] = iconref(7,0); iconRef_["class"] = iconref(11,32); iconMap_["picture with magnifier"] = icon(0, 21, 0, 1, 3, 3); iconMap_["lua with stop"] = icon(14, 18, 4, 0, 4, 4); tagMap_["stop"]=icontag(4,0,4,4); tagMap_["link"]=icontag(15,0,2,-3); tagMap_["magnifier"]=icontag(0,1,3,3); /* danish_["advanced"] = QIcon("Resources/danish/advanced.png"); danish_["iPhone"] = QIcon("Resources/danish/iPhone.png"); danish_["start"] = QIcon("Resources/danish/play.png"); danish_["stop"] = QIcon("Resources/danish/stop_alt.png");*/ }