plotCity

Thedrin

Deity
Joined
Jan 24, 2002
Messages
2,652
I first saw this function in the CvGameCoreDLL under CvGame.cpp and have, since then, seen it many other files under that directory. It's found in the following form:

plot = plotCity(X, Y, I)

where X and Y are tile coordinates and I is an integer referencing one of the tiles on which a civ will start a game.

Thing is, despite the fact that this function is called in multiple cpp files in the CvGameCoreDLL, I cannot find the function itself and have no idea what it is supposed to do.

Does anyone know;
1) if it be called from Python (though I doubt it can)?
2) and what, precisely, does it do?

Thanks
 
It's in CvGameCoreUtils.cpp. It will return plot (X+aiCityPlotX,Y+aiCityPlotX). aiCityPlotX/Y is in CvGlobals.cpp. It appears to be a reference to the city fat cross with the city considered to be (0,0).

I'm not sure if the function can be called from python. It is in CyGameCoreUtils.cpp & CyGameCoreUtilsInterface.cpp but it's not in the API and I don't think I've ever seen any of those functions used. The file is also different from others: there's no python class. If you can call it it should be possible to call directly(?)
 
Damn, I did search for it in there but I must have over looked that result. Thanks for pointing it out.

It doesn't really matter if it can't be called from Python. So long as I know what it does I can try to recreate it.
 
Top Bottom