Hooks
static bool BeforeCvPreGame_cpp_CvPreGame_loadSlotsHelper(FDataStream& loadFrom, uint uiVersion, GameSpeedTypes& gameSpeed, WorldSizeTypes& worldSize, CvString& mapScriptName, std::vector<CivilizationTypes>& civilizations, std::vector<CvString>& nicknames, std::vector<SlotStatus>& slotStatus, std::vector<SlotClaim>& slotClaims, std::vector<TeamTypes>& teamTypes, std::vector<HandicapTypes>& handicapTypes, std::vector<CvString>& civilizationKeys, std::vector<CvString>& leaderKeys);static void AfterCvPreGame_cpp_CvPreGame_loadSlotsHelper(FDataStream& loadFrom, uint uiVersion, GameSpeedTypes& gameSpeed, WorldSizeTypes& worldSize, CvString& mapScriptName, std::vector<CivilizationTypes>& civilizations, std::vector<CvString>& nicknames, std::vector<SlotStatus>& slotStatus, std::vector<SlotClaim>& slotClaims, std::vector<TeamTypes>& teamTypes, std::vector<HandicapTypes>& handicapTypes, std::vector<CvString>& civilizationKeys, std::vector<CvString>& leaderKeys);static void ReplaceCvPreGame_cpp_CvPreGame_loadSlotsHelper(void (*original)(FDataStream&, uint, GameSpeedTypes&, WorldSizeTypes&, CvString&, std::vector<CivilizationTypes>&, std::vector<CvString>&, std::vector<SlotStatus>&, std::vector<SlotClaim>&, std::vector<TeamTypes>&, std::vector<HandicapTypes>&, std::vector<CvString>&, std::vector<CvString>&), FDataStream& loadFrom, uint uiVersion, GameSpeedTypes& gameSpeed, WorldSizeTypes& worldSize, CvString& mapScriptName, std::vector<CivilizationTypes>& civilizations, std::vector<CvString>& nicknames, std::vector<SlotStatus>& slotStatus, std::vector<SlotClaim>& slotClaims, std::vector<TeamTypes>& teamTypes, std::vector<HandicapTypes>& handicapTypes, std::vector<CvString>& civilizationKeys, std::vector<CvString>& leaderKeys);CivRegisterBefore<CivHooks::CvPreGame_cpp_CvPreGame_loadSlotsHelper>(host, &BeforeCvPreGame_cpp_CvPreGame_loadSlotsHelper);CivRegisterAfter<CivHooks::CvPreGame_cpp_CvPreGame_loadSlotsHelper>(host, &AfterCvPreGame_cpp_CvPreGame_loadSlotsHelper);CivRegisterReplace<CivHooks::CvPreGame_cpp_CvPreGame_loadSlotsHelper>(host, &ReplaceCvPreGame_cpp_CvPreGame_loadSlotsHelper);
Code
513static void loadSlotsHelper(514 FDataStream& loadFrom,515 uint uiVersion,516 GameSpeedTypes& gameSpeed,517 WorldSizeTypes& worldSize,518 CvString& mapScriptName,519 std::vector<CivilizationTypes>& civilizations,520 std::vector<CvString>& nicknames,521 std::vector<SlotStatus>& slotStatus,522 std::vector<SlotClaim>& slotClaims,523 std::vector<TeamTypes>& teamTypes,524 std::vector<HandicapTypes>& handicapTypes,525 std::vector<CvString>& civilizationKeys,526 std::vector<CvString>& leaderKeys)527{528 loadFrom >> gameSpeed;529 loadFrom >> worldSize;530 loadFrom >> mapScriptName;531532 loadFrom >> civilizations;533534 loadFrom >> nicknames;535536 loadFrom >> slotStatus;537 loadFrom >> slotClaims;538 loadFrom >> teamTypes;539 if(uiVersion >= 2)540 loadFrom >> handicapTypes;541 else542 handicapTypes.clear();543544 if(uiVersion >= 3)545 {546 loadFrom >> civilizationKeys;547 loadFrom >> leaderKeys;548 }549 else550 {551 civilizationKeys.clear();552 leaderKeys.clear();553 }554}