I've created a new class in the DLL - "CvInvestments". An investment is an agreement between a CvPlayer and a CvMinorCivAI which performs certain logic (increasing your per-turn expenses, for example, and giving the Minor Civ bonuses each turn, and increasing your influence every turn). There's a small amount of data - 8 or 9 variables - which can be completely initialized from four pieces of data - PlayerTypes eMajorCiv, PlayerTypes eMinorCiv, int iSize, int iType. CvPlayer instances initialize Investments (they form when a CvPlayer decides to create one).
I don't know a ton about this and I'm muddling my way through. I'm sure I can figure it out on my own... eventually, but if someone with some experience doing this can point me in the right direction, I would be grateful.
I assume the Read() and Write() functions in CvPlayer are the functions that do the work of actually saving out and reading back in the data. Would it be reasonable to save out that CvPlayer's investments and reading them back in through the CvPlayer Read/Write functions? Will I need to define stuff for my CvInvestments class (Read/Write functions? This "namespace FSerialization {}" stuff I see in a lot of the files?)? Will I need to worry about overloading an operator (">>" and/or "<<")?
Any help appreciated!
I don't know a ton about this and I'm muddling my way through. I'm sure I can figure it out on my own... eventually, but if someone with some experience doing this can point me in the right direction, I would be grateful.
I assume the Read() and Write() functions in CvPlayer are the functions that do the work of actually saving out and reading back in the data. Would it be reasonable to save out that CvPlayer's investments and reading them back in through the CvPlayer Read/Write functions? Will I need to define stuff for my CvInvestments class (Read/Write functions? This "namespace FSerialization {}" stuff I see in a lot of the files?)? Will I need to worry about overloading an operator (">>" and/or "<<")?
Any help appreciated!