Duke176
Warlord
Hi it's me again, sorry if I stress you guys guys but if I tell you that I've tested 25 different "versions" of codifications for my uses I'm not trying to joke you.
I'll try to ask a question in a different way, maybe I haven't been so clear as I would.
CvPlayer.cpp
In order to modify GOLD, you have 3 different functions: int GETGold / void SETGold(int iNewValue) / void CHANGEGold(int iChange).
In order to create and OIL counter I did the same int GETOil / void SETOil(int iNewValue) / void CHANGEOil(int iChange) - and this works.
In order to know how much was the production each turn, I've created different functions that returns numbers, one that make a calculation of ammount and again something really similar to GOLD and OIL: int GETOilProdPerTurn / void SETOilProdPerTurn(int iNewValue) / void CHANGEOilProdPerTurn(int iChange)
All right my problem is to pass a certain int Value to CHANGEOilProdPerTurn(int iChange), so that the iChange assume a value and modify everything else that works. All the functions works just passing this value doesn't work.
So questions:
1- is there some rules to pass values from and INT function to a VOID one? (int CalculateOilProdPerTurn() - void ChangeOilProdPerTurn(int iChange)).
2- where should I check to see which functions are called on every turn for each player?
I ask the second one becuase I start thinking this could be a prb of code missing in order to update each turn this value (OILRESERVE). I thoght in CvPlayer.cpp there were all the functions the game have to calculate each turn, but I'm starting thinking is something else (like python recall on update maininterface each turn).
Thx, pls help me if you can. It's 3 month I'm on this little mod.
I'll try to ask a question in a different way, maybe I haven't been so clear as I would.
CvPlayer.cpp
In order to modify GOLD, you have 3 different functions: int GETGold / void SETGold(int iNewValue) / void CHANGEGold(int iChange).
In order to create and OIL counter I did the same int GETOil / void SETOil(int iNewValue) / void CHANGEOil(int iChange) - and this works.
In order to know how much was the production each turn, I've created different functions that returns numbers, one that make a calculation of ammount and again something really similar to GOLD and OIL: int GETOilProdPerTurn / void SETOilProdPerTurn(int iNewValue) / void CHANGEOilProdPerTurn(int iChange)
All right my problem is to pass a certain int Value to CHANGEOilProdPerTurn(int iChange), so that the iChange assume a value and modify everything else that works. All the functions works just passing this value doesn't work.
So questions:
1- is there some rules to pass values from and INT function to a VOID one? (int CalculateOilProdPerTurn() - void ChangeOilProdPerTurn(int iChange)).
2- where should I check to see which functions are called on every turn for each player?
I ask the second one becuase I start thinking this could be a prb of code missing in order to update each turn this value (OILRESERVE). I thoght in CvPlayer.cpp there were all the functions the game have to calculate each turn, but I'm starting thinking is something else (like python recall on update maininterface each turn).
Thx, pls help me if you can. It's 3 month I'm on this little mod.