xienwolf
Deity
You can't do a Debug build with Codeblocks. At least I have not yet heard of anyone doing so successfully.
//Start -Tholish City Connection
Code fu
//End -Tholish City Connection
[B]/** phungus Shift Detail start **/[/B]
int iDetail = tmpDetail;
bool bShift; bShift = gDLL->shiftKey(); if (bShift) { iDetail = 3; }
bool bctrl; bctrl = gDLL->ctrlKey(); if (bctrl)
{
CvUnit* swap = pAttacker;
pAttacker = pDefender;
pDefender = swap;
}
[B]/** phungus Shift Detail end **/[/B]
public:
CvCity();
virtual ~CvCity();
...
//salaminizers airtrade mod
[B] void setCityConnected(bool bCityConnected);
bool isCityConnected() const;[/B]
//salaminizers airtrade mod.
protected:
...
//salaminizers air trade mod
[B]bool m_bCityConnected;[/B]
//salaminizers air trade mod
};
CvCity::CvCity()
{
...
//salaminizers air trade mod
[B] m_bCityConnected = NULL;[/B]
//salaminizers air trade mod
}
void CvCity::init(int iID, PlayerTypes eOwner, int iX, int iY, bool bBumpUnits, bool bUpdatePlotGroups)
{
...
//salaminizers air trade mod
[B] setCityConnected(false);[/B]
//salaminizers air trade mod
}
void CvCity::reset(int iID, PlayerTypes eOwner, int iX, int iY, bool bConstructorCall)
{
...
//salaminizers air trade mod
[B] m_bCityConnected = false;[/B]
//salaminizers air trade mod
}
void CvCity::processBuilding(BuildingTypes eBuilding, int iChange, bool bObsolete)
{
UnitTypes eGreatPeopleUnit;
int iI, iJ;
if (!(GET_TEAM(getTeam()).isObsoleteBuilding(eBuilding)) || bObsolete)
{
...
//salaminizers air trade mod
[B] if (GC.getBuildingInfo(eBuilding).isCityConnected())
{
setCityConnected(true);
GC.getGameINLINE().updatePlotGroups();
updateTradeRoutes();
}[/B]
//salaminizers air trade mod
//salaminizers air trade mod
[B]bool CvCity::isCityConnected() const
{
return m_bCityConnected;
}
void CvCity::setCityConnected(bool bCityConnected)
{
m_bCityConnected = bCityConnected;
}[/B]
//salaminizers air trade mod
//tholish wonders if having these in the opposite order from the recipe is a problem
//salaminizers air trade mod
[B]if (isCity(true,eTeam)) if (getPlotCity()->isCityConnected()) { return true; }
return isBonusNetwork(eTeam);
}[/B]
//salaminizers air trade mod
bool CvPlot::isTradeNetworkConnected(const CvPlot* pPlot, TeamTypes eTeam) const
{
...
//salaminizers air trade mod
[B] if (isCity(true,eTeam))
if (getPlotCity()->isCityConnected())
{ return true; }
if (pPlot->isCity(true,eTeam))
if (pPlot->getPlotCity()->isCityConnected())
{ return true; }[/B]
//salaminizers air trade mod
//This isn't indented properly, but being C++, this wol't make a difference
void CvPlot::updatePlotGroup(PlayerTypes ePlayer, bool bRecalculate)
{
...
//salaminizers air trade mod
[B] if (isCity())
if (getPlotCity()->isCityConnected())
{
PlayerTypes ePlayer = getOwner();
TeamTypes team = GET_PLAYER(ePlayer).getTeam();
CvCity* pLoopCity;
int iI;
int iLoop;
for (iI = 0; iI < MAX_PLAYERS; iI++)
{
if (GET_PLAYER((PlayerTypes)iI).isAlive())
{
for (pLoopCity = GET_PLAYER((PlayerTypes)iI).firstCity(&iLoop); pLoopCity != NULL; pLoopCity = GET_PLAYER((PlayerTypes)iI).nextCity(&iLoop))
{
pAdjacentPlotGroup = pLoopCity->plot()->getPlotGroup(ePlayer);
if ((pAdjacentPlotGroup != NULL) && (pAdjacentPlotGroup != pPlotGroup))
{
if ((pLoopCity->isCityConnected()) && (pLoopCity->isVisible(team, false)))
{
if (pPlotGroup == NULL)
{
pAdjacentPlotGroup->addPlot(this);
pPlotGroup = pAdjacentPlotGroup;
FAssertMsg(getPlotGroup(ePlayer) == pPlotGroup, "ePlayer's plot group is expected to equal pPlotGroup");
}
else
{
FAssertMsg(getPlotGroup(ePlayer) == pPlotGroup, "ePlayer's plot group is expected to equal pPlotGroup");
GC.getMapINLINE().combinePlotGroups(ePlayer, pPlotGroup, pAdjacentPlotGroup);
pPlotGroup = getPlotGroup(ePlayer);
FAssertMsg(pPlotGroup != NULL, "PlotGroup is not assigned a valid value");
}
}
}
}
}
}
if (pPlotGroup == NULL)
{
GET_PLAYER(ePlayer).initPlotGroup(this);
}
}[/B]
//salaminizers air trade mod
//Once again, not indented properly
if (isCity())
if (getPlotCity()->isCityConnected())