Bazaar developer reference

CvPreGame::readActiveSlotCountFromSaveGame(FDataStream &, bool)

Defined in
CvPreGame.cpp, line 556
Hook name
CivHooks::CvPreGame_readActiveSlotCountFromSaveGame

Hooks

static bool BeforeCvPreGame_readActiveSlotCountFromSaveGame(FDataStream& loadFrom, bool bReadVersion, int& result);static void AfterCvPreGame_readActiveSlotCountFromSaveGame(FDataStream& loadFrom, bool bReadVersion, int& result);static int ReplaceCvPreGame_readActiveSlotCountFromSaveGame(int (*original)(FDataStream&, bool), FDataStream& loadFrom, bool bReadVersion);CivRegisterBefore<CivHooks::CvPreGame_readActiveSlotCountFromSaveGame>(host, &BeforeCvPreGame_readActiveSlotCountFromSaveGame);CivRegisterAfter<CivHooks::CvPreGame_readActiveSlotCountFromSaveGame>(host, &AfterCvPreGame_readActiveSlotCountFromSaveGame);CivRegisterReplace<CivHooks::CvPreGame_readActiveSlotCountFromSaveGame>(host, &ReplaceCvPreGame_readActiveSlotCountFromSaveGame);

Code

556int readActiveSlotCountFromSaveGame(FDataStream& loadFrom, bool bReadVersion)557{558	uint uiVersion = 0;559	if(bReadVersion)560		loadFrom >> uiVersion;561562	GameSpeedTypes	dummyGameSpeed;563	WorldSizeTypes	dummyWorldSize;564	CvString		dummyMapScriptName;565	std::vector<CivilizationTypes>	dummyCivilizations;566	std::vector<CvString> dummyNicknames;567	std::vector<TeamTypes> dummyTeamTypes;568	std::vector<SlotStatus> slotStatus;569	std::vector<SlotClaim> slotClaims;570	std::vector<HandicapTypes> dummyHandicapTypes;571	std::vector<CvString> civilizationKeys;572	std::vector<CvString> leaderKeys;573574	loadSlotsHelper(loadFrom, uiVersion, dummyGameSpeed, dummyWorldSize, dummyMapScriptName, dummyCivilizations, dummyNicknames, slotStatus, slotClaims, dummyTeamTypes, dummyHandicapTypes, civilizationKeys, leaderKeys);575576	return calcActiveSlotCount(slotStatus, slotClaims);577}

Calls

Called by