EmperorFool
Deity
These arrays are being scanned when drawing the build icons? WTH!
These arrays are being scanned when drawing the build icons? WTH!
That's very odd given that the descriptions aren't cached for use in the popups. Is the code that loads the descriptions in the SDK or the EXE? I suspect the latter or you'd have disabled that already.
AND Revisions 145 and 146, right? A reduction 800ms to 200 should be enough to make it worth including in the Unofficial Patch I'd think.
If you'd like an extremely hacky solution, check this out.
- From Python before you start the loop to draw the icons, call a new function in the SDK: setIgnoreBuildingDescriptions(True) which sets a global variable in CvInitCore or wherever to the value passed in (true).
- In CvGameTextMgr, check this value and at the start of the setBuildingHelp() function and return immediately if it is true.
- At the end of the loop call setIgnoreBuildingDescriptions(False).
for (iI = 0; iI < GC.getNumSpecialistInfos(); ++iI)
{
szFirstBuffer = gDLL->getText("TXT_KEY_BUILDING_FROM_IN_ALL_CITIES", GC.getSpecialistInfo((SpecialistTypes) iI).getTextKeyWide());
setYieldChangeHelp(szBuffer, L"", L"", szFirstBuffer, kBuilding.getSpecialistYieldChangeArray(iI));
}
for (iI = 0; iI < GC.getNumBonusInfos(); ++iI)
{
szFirstBuffer = gDLL->getText("TXT_KEY_BUILDING_WITH_BONUS", GC.getBonusInfo((BonusTypes) iI).getTextKeyWide());
setYieldChangeHelp(szBuffer, L"", L"", szFirstBuffer, kBuilding.getBonusYieldModifierArray(iI), true);
}
if (gDLL->getXMLIFace()->SetToChildByTagName(pXML->GetXML(),"YieldChanges"))
{
// call the function that sets the yield change variable
pXML->SetYields(&m_ppaiSpecialistYieldChange[k]);
gDLL->getXMLIFace()->SetToParent(pXML->GetXML());
[COLOR="Red"] m_bAnySpecialistYieldChanges = true;[/COLOR]
}