xienwolf
Deity
I'd say don't bother. Still not 100% certain what they are used for, but relatively certain it is just for checking a savegame which uses lock modified assets to ensure nothing was changed.
uint uiFlag=0;
stream->Read(&uiFlag); // flags for expansion
uint uiFlag=0;
stream->Write(uiFlag); // flag for expansion
if (uiFlag < 1)
{
int iEndTurnMessagesSent;
pStream->Read(&iEndTurnMessagesSent);
}
.
.
.
.
if (uiFlag < 1)
{
std::vector<int> aiEndTurnMessagesReceived(MAX_PLAYERS);
pStream->Read(MAX_PLAYERS, &aiEndTurnMessagesReceived[0]);
}
if (uiFlag < 2)
{
int iCombatDamage;
pStream->Read(&iCombatDamage);
}
if (uiFlag > 0)
{
pStream->Read(&m_bAirCombat);
}
::write(stream)
{
int uiFlag=0;
->write(uiFlag);
->write(m_eDataType);
->write(2);
->write(4);
->write(6);
->write(8);
->write(10);
->write(12);
->write(14);
}
::read(stream)
{
int uiFlag=0;
->read(uiFlag);
->read(m_eDataType);
->read(2);
->read(4);
->read(6);
->read(8);
->read(10);
->read(12);
->read(14);
}
::write(stream)
{
int uiFlag=[COLOR="Lime"]1[/COLOR];
->write(uiFlag);
->write(m_eDataType);
[COLOR="Lime"] ->write(1);[/COLOR]
->write(2);
[COLOR="Lime"] ->write(3);[/COLOR]
->write(4);
[COLOR="Lime"] ->write(5);[/COLOR]
->write(6);
[COLOR="Lime"] ->write(7);[/COLOR]
->write(8);
[COLOR="Lime"] ->write(9);[/COLOR]
->write(10);
[COLOR="Lime"] ->write(11);[/COLOR]
->write(12);
[COLOR="Lime"] ->write(13);[/COLOR]
->write(14);
}
::read(stream)
{
int uiFlag=0;
->read(uiFlag);
->read(m_eDataType);
[COLOR="Lime"] if (uiFlag>0)
{
->read(1);
}[/COLOR]
->read(2);
[COLOR="Lime"] if (uiFlag>0)
{
->read(3);
}[/COLOR]
->read(4);
[COLOR="Lime"] if (uiFlag>0)
{
->read(5);
}[/COLOR]
->read(6);
[COLOR="Lime"] if (uiFlag>0)
{
->read(7);
}[/COLOR]
->read(8);
[COLOR="Lime"] if (uiFlag>0)
{
->read(9);
}[/COLOR]
->read(10);
[COLOR="Lime"] if (uiFlag>0)
{
->read(11);
}[/COLOR]
->read(12);
[COLOR="Lime"] if (uiFlag>0)
{
->read(13);
}[/COLOR]
->read(14);
}
::read(stream)
{
int uiFlag=0;
->read(uiFlag);
->read(m_eDataType);
[COLOR="Lime"] if (uiFlag>0)
{
->read(1);
}
else
{
1 = m_eDataType.get1();
}[/COLOR]
->read(2);
[COLOR="Lime"] if (uiFlag>0)
{
->read(3);
else
{
3 = m_eDataType.get3();
}[/COLOR]
->read(4);
[COLOR="Lime"] if (uiFlag>0)
{
->read(5);
else
{
5 = m_eDataType.get5();
}[/COLOR]
->read(6);
[COLOR="Lime"] if (uiFlag>0)
{
->read(7);
else
{
7 = m_eDataType.get7();
}[/COLOR]
->read(8);
[COLOR="Lime"] if (uiFlag>0)
{
->read(9);
else
{
9 = m_eDataType.get9();
}[/COLOR]
->read(10);
[COLOR="Lime"] if (uiFlag>0)
{
->read(11);
else
{
11 = m_eDataType.get11();
}[/COLOR]
->read(12);
[COLOR="Lime"] if (uiFlag>0)
{
->read(13);
else
{
13 = m_eDataType.get13();
}[/COLOR]
->read(14);
}
::write(stream)
{
int uiFlag=[COLOR="Lime"]2[/COLOR];
->write(uiFlag);
->write(m_eDataType);
->write(1);
->write(2);
->write(4);
->write(5);
->write(7);
->write(8);
->write(10);
->write(11);
->write(13);
->write(14);
}
::read(stream)
{
int uiFlag=0;
->read(uiFlag);
->read(m_eDataType);
if (uiFlag>0)
{
->read(1);
}
->read(2);
if (uiFlag>0)
{
[COLOR="Lime"] if (uiFlag<2)
{
int trash=0;
->read(trash);
}[/COLOR]
}
->read(4);
if (uiFlag>0)
{
->read(5);
}
[COLOR="Lime"] if (uiFlag<2)
{
int trash=0;
->read(trash);
}[/COLOR]
if (uiFlag>0)
{
->read(7);
}
->read(8);
if (uiFlag>0)
{
[COLOR="Lime"] if (uiFlag<2)
{
int trash=0;
->read(trash);
}[/COLOR]
}
->read(10);
if (uiFlag>0)
{
->read(11);
}
[COLOR="Lime"] if (uiFlag<2)
{
int trash=0;
->read(trash);
}[/COLOR]
if (uiFlag>0)
{
->read(13);
}
->read(14);
}
<TechYieldChanges>
<TechYieldChange>
<PrereqTech>TECH_AQUACULTURE</PrereqTech>
<TechYields>
<iYield>0</iYield>
<iYield>0</iYield>
<iYield>1</iYield>
</TechYields>
</TechYieldChange>
</TechYieldChanges>
<PrereqBuildingClasses>
<PrereqBuildingClass>
<BuildingClassType>NONE</BuildingClassType>
<bPrereq>1</bPrereq>
<TechOverride>NONE</TechOverride>
</PrereqBuildingClass>
</PrereqBuildingClasses>
// initialize the boolean list to the correct size and all the booleans to false
FAssertMsg((GC.getNumTechInfos() > 0) && (NUM_YIELD_TYPES) > 0,"either the number of tech infos is zero or less or the number of yield types is zero or less");
pXML->Init2DIntList(&m_ppiTechYieldChanges, GC.getNumTechInfos(), NUM_YIELD_TYPES);
if (gDLL->getXMLIFace()->SetToChildByTagName(pXML->GetXML(),"TechYieldChanges"))
{
if (pXML->SkipToNextVal())
{
iNumSibs = gDLL->getXMLIFace()->GetNumChildren(pXML->GetXML());
if (gDLL->getXMLIFace()->SetToChild(pXML->GetXML()))
{
if (0 < iNumSibs)
{
for (j=0;j<iNumSibs;j++)
{
pXML->GetChildXmlValByName(szTextVal, "PrereqTech");
iIndex = pXML->FindInInfoClass(szTextVal);
if (iIndex > -1)
{
// delete the array since it will be reallocated
SAFE_DELETE_ARRAY(m_ppiTechYieldChanges[iIndex]);
// if we can set the current xml node to it's next sibling
if (gDLL->getXMLIFace()->SetToChildByTagName(pXML->GetXML(),"TechYields"))
{
// call the function that sets the yield change variable
pXML->SetYields(&m_ppiTechYieldChanges[iIndex]);
gDLL->getXMLIFace()->SetToParent(pXML->GetXML());
}
else
{
pXML->InitList(&m_ppiTechYieldChanges[iIndex], NUM_YIELD_TYPES);
}
}
if (!gDLL->getXMLIFace()->NextSibling(pXML->GetXML()))
{
break;
}
}
}
gDLL->getXMLIFace()->SetToParent(pXML->GetXML());
}
}
gDLL->getXMLIFace()->SetToParent(pXML->GetXML());
}
Due to the release of 3.19, and the updating of Codeblocks and Visual Studios since each of these guides were written, you can look in the Wiki for better updated information, primarily the 3.19 version of the Makefile for Visual Studio
This toolkit contains several tools and files which are needed to compile the source code. Specifically it contains the compiler and linker utilities.
In addition it contains header files (e.g. the STL header files) and libraries (e.g. the basic C++ runtime libraries) which match the version in which the game was originally compiled, and that is to make the DLL compatible with the game's executable (that's why we use an old version of this toolkit).