Bazaar developer reference

CvGame::getJonRandNum(int, const char *)

Defined in
CvGame.cpp, line 9259
Class
CvGame
Hook name
CivHooks::CvGame_getJonRandNum

Hooks

static bool BeforeCvGame_getJonRandNum(CvGame* self, int iNum, const char* pszLog, int& result);static void AfterCvGame_getJonRandNum(CvGame* self, int iNum, const char* pszLog, int& result);static int ReplaceCvGame_getJonRandNum(int (*original)(CvGame*, int, const char*), CvGame* self, int iNum, const char* pszLog);CivRegisterBefore<CivHooks::CvGame_getJonRandNum>(host, &BeforeCvGame_getJonRandNum);CivRegisterAfter<CivHooks::CvGame_getJonRandNum>(host, &AfterCvGame_getJonRandNum);CivRegisterReplace<CivHooks::CvGame_getJonRandNum>(host, &ReplaceCvGame_getJonRandNum);

Code

9257/// Get a synchronous random number in the range of 0...iNum-19258/// Allows for logging.9259int CvGame::getJonRandNum(int iNum, const char* pszLog)9260{9261#if defined(MOD_BUGFIX_RANDOM)9262	if (iNum > 0)9263		return m_jonRand.get(iNum, pszLog);92649265	return -(int)m_jonRand.get(-iNum, pszLog);9266#else9267	return m_jonRand.get(iNum, pszLog);9268#endif9269}

Calls

Called by

147 functions in 32 files