city processing
This commit is contained in:
1 parent
b9cfa2393f
commit
18bf340dee
5 files changed
+2524
-14
No files matched your search
@@ -33,14 +33,17 @@
|
||||
namespace Cevo {
|
||||
namespace CityProcessing {
|
||||
|
||||
// Equivalent of CityProcessing.pas (~1743 lines). PORTED INCREMENTALLY: this
|
||||
// is only its "Reporting" section's two simplest functions so far - every
|
||||
// other function in the original (GetCityReport/GetCityReportNew and
|
||||
// everything in "Internal Tile Picking"/"Turn Processing") additionally
|
||||
// needs GetTileInfo/GetUnitReport/Strongest (Database.pas functions not
|
||||
// ported yet) plus several more Database.pas globals (GWonder, Difficulty,
|
||||
// ServerVersion, ...) and gameplay data tables (Imp[], CorrLevel[],
|
||||
// SupportFree[], ...). Add more here only once those are ported too.
|
||||
// Equivalent of CityProcessing.pas (~1743 lines). FULLY PORTED. Its
|
||||
// private implementation-section helpers (DetermineCityProdProcessing/
|
||||
// DetermineCityTradeProcessing/BoostProd/SplitTrade/GetProjectCost/
|
||||
// GetSmallCityReport/NextBest/NextWorst/NextPoll, plus the ProdProcessing/
|
||||
// TradeProcessing/CityReportEx support structs) live in an anonymous
|
||||
// namespace in CityProcessing.cpp, matching the original's own visibility
|
||||
// (not part of its interface section either).
|
||||
// CityTurn() needed a large prerequisite chain in Database.pas (Map
|
||||
// Processing, most of Map Revealing, Tech Related Functions, a slice of
|
||||
// Diplomacy, plus the SpecialModel[]/SpecialModelPreq[] tables) - see repo
|
||||
// memory for the full list of what got ported to unblock it.
|
||||
|
||||
// Equivalent of CityProcessing.pas's GetCityAreaInfo().
|
||||
void getCityAreaInfo(int p, int loc, TCityAreaInfo &cityAreaInfo);
|
||||
@@ -48,5 +51,38 @@ void getCityAreaInfo(int p, int loc, TCityAreaInfo &cityAreaInfo);
|
||||
// Equivalent of CityProcessing.pas's CanCityGrow().
|
||||
bool canCityGrow(int p, int cix);
|
||||
|
||||
// Equivalent of CityProcessing.pas's GetCityReport()/GetCityReportNew().
|
||||
int getCityReport(int p, int cix, TCityReport &cityReport);
|
||||
int getCityReportNew(int p, int cix, TCityReportNew &cityReportNew);
|
||||
|
||||
// Equivalent of CityProcessing.pas's AddBestCityTile().
|
||||
bool addBestCityTile(int p, int cix);
|
||||
|
||||
// Equivalent of CityProcessing.pas's CityGrowth()/CityShrink()/Pollute().
|
||||
void cityGrowth(int p, int cix);
|
||||
void cityShrink(int p, int cix);
|
||||
void pollute(int p, int cix);
|
||||
|
||||
// Equivalent of CityProcessing.pas's PayCityMaintenance()/CollectCityResources().
|
||||
void payCityMaintenance(int p, int cix);
|
||||
void collectCityResources(int p, int cix);
|
||||
|
||||
// Equivalent of CityProcessing.pas's CityTurn(). Return value: whether the
|
||||
// city keeps existing.
|
||||
bool cityTurn(int p, int cix);
|
||||
|
||||
// Equivalent of CityProcessing.pas's SetCityTiles().
|
||||
int setCityTiles(int p, int cix, int newTiles, bool testOnly = false);
|
||||
|
||||
// Equivalent of CityProcessing.pas's GetCityTileAdvice(): brute-force search
|
||||
// over all "take N best tiles from each resource hierarchy" combinations to
|
||||
// recommend the tile selection maximizing a weighted food/prod/tax/science
|
||||
// value formula (weights packed into advice.ResourceWeights on input).
|
||||
void getCityTileAdvice(int p, int cix, TCityTileAdviceData &advice);
|
||||
|
||||
// Equivalent of CityProcessing.pas's InitGame()/ReleaseGame().
|
||||
void initGame();
|
||||
void releaseGame();
|
||||
|
||||
} // namespace CityProcessing
|
||||
} // namespace Cevo
|
||||
Reference in new issue
Block a user