Afforess
The White Wizard
Two Comments with Existing RevDCM code:
First, in CvInfos, Takbel caught an issue with one of your Loops in the copy non defaults. It doesn't cause apparent harm, but will cause havoc when you use Modules:
for ( int iCivic = 0; i < GC.getNumCivicInfos(); iCivic++)
The i < GC.getNumCivicInfos() should be iCivic. I don't know why the compiler even compiles it, but there you have it.
The second issue is a RoM Specific bug, due to WoC's larger gamefont's. Since Zappara doesn't want to make SDK changes, I'm sure he would appreciate this fix. Specifically, WoC's larger gamefonts go bad after you add a certain number of resources. Going past this arbitrary limit destroys the in game symbols. Since the Gamefonts for Revolutions and LoR are different, their specific fixes will be different. Therefore, I would love it if you added a new global defines "IS_RISE_OF_MANKIND" and then you could turn off this fix for your mods (or fix it yourself, if need be.)
Okay, the specific code is in CvGameTextMgr, right in the bolded spot:
First, in CvInfos, Takbel caught an issue with one of your Loops in the copy non defaults. It doesn't cause apparent harm, but will cause havoc when you use Modules:
for ( int iCivic = 0; i < GC.getNumCivicInfos(); iCivic++)
The i < GC.getNumCivicInfos() should be iCivic. I don't know why the compiler even compiles it, but there you have it.
The second issue is a RoM Specific bug, due to WoC's larger gamefont's. Since Zappara doesn't want to make SDK changes, I'm sure he would appreciate this fix. Specifically, WoC's larger gamefonts go bad after you add a certain number of resources. Going past this arbitrary limit destroys the in game symbols. Since the Gamefonts for Revolutions and LoR are different, their specific fixes will be different. Therefore, I would love it if you added a new global defines "IS_RISE_OF_MANKIND" and then you could turn off this fix for your mods (or fix it yourself, if need be.)
Okay, the specific code is in CvGameTextMgr, right in the bolded spot:
Code:
void CvGameTextMgr::assignFontIds(int iFirstSymbolCode, int iPadAmount)
{
int iCurSymbolID = iFirstSymbolCode;
// set yield symbols
for (int i = 0; i < NUM_YIELD_TYPES; i++)
{
GC.getYieldInfo((YieldTypes) i).setChar(iCurSymbolID);
++iCurSymbolID;
}
do
{
++iCurSymbolID;
} while (iCurSymbolID % iPadAmount != 0);
// set commerce symbols
for (i=0;i<GC.getNUM_COMMERCE_TYPES();i++)
{
GC.getCommerceInfo((CommerceTypes) i).setChar(iCurSymbolID);
++iCurSymbolID;
}
do
{
++iCurSymbolID;
} while (iCurSymbolID % iPadAmount != 0);
if (NUM_COMMERCE_TYPES < iPadAmount)
{
do
{
++iCurSymbolID;
} while (iCurSymbolID % iPadAmount != 0);
}
for (int i = 0; i < GC.getNumReligionInfos(); i++)
{
GC.getReligionInfo((ReligionTypes) i).setChar(iCurSymbolID);
++iCurSymbolID;
GC.getReligionInfo((ReligionTypes) i).setHolyCityChar(iCurSymbolID);
++iCurSymbolID;
}
for (i = 0; i < GC.getNumCorporationInfos(); i++)
{
GC.getCorporationInfo((CorporationTypes) i).setChar(iCurSymbolID);
++iCurSymbolID;
GC.getCorporationInfo((CorporationTypes) i).setHeadquarterChar(iCurSymbolID);
++iCurSymbolID;
}
do
{
++iCurSymbolID;
} while (iCurSymbolID % iPadAmount != 0);
if (2 * (GC.getNumReligionInfos() + GC.getNumCorporationInfos()) < iPadAmount)
{
do
{
++iCurSymbolID;
} while (iCurSymbolID % iPadAmount != 0);
}
// set bonus symbols
int bonusBaseID = iCurSymbolID;
++iCurSymbolID;
for (int i = 0; i < GC.getNumBonusInfos(); i++)
{
int bonusID = bonusBaseID + GC.getBonusInfo((BonusTypes) i).getArtInfo()->getFontButtonIndex();
GC.getBonusInfo((BonusTypes) i).setChar(bonusID);
++iCurSymbolID;
}
do
{
++iCurSymbolID;
} while (iCurSymbolID % iPadAmount != 0);
if(GC.getNumBonusInfos() < iPadAmount)
{
do
{
++iCurSymbolID;
} while (iCurSymbolID % iPadAmount != 0);
}
if(GC.getNumBonusInfos() < 2 * iPadAmount)
{
do
{
++iCurSymbolID;
} while (iCurSymbolID % iPadAmount != 0);
}
[COLOR="Navy"]//This hardcodes the last position of resources for RoM only. It will vary based on your gamefont.
// Thanks to Sephi for figuring it out.
if GC.getDefineINT("IS_RISE_OF_MANKIND");
iCurSymbolID=9200;
// TEMPFIX[/COLOR]
// set extra symbols
for (int i=0; i < MAX_NUM_SYMBOLS; i++)
{
gDLL->setSymbolID(i, iCurSymbolID);
++iCurSymbolID;
}
}