Bazaar developer reference

CvDllRandom::Get(unsigned short, const char *)

Defined in
CvDllRandom.cpp, line 100
Class
CvDllRandom
Hook name
CivHooks::CvDllRandom_Get

Hooks

static bool BeforeCvDllRandom_Get(CvDllRandom* self, unsigned short usNum, const char* pszLog, unsigned short& result);static void AfterCvDllRandom_Get(CvDllRandom* self, unsigned short usNum, const char* pszLog, unsigned short& result);static unsigned short ReplaceCvDllRandom_Get(unsigned short (*original)(CvDllRandom*, unsigned short, const char*), CvDllRandom* self, unsigned short usNum, const char* pszLog);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllRandom_Get::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllRandom_Get);host->RegisterHook(host->pluginIndex, CivHooks::CvDllRandom_Get::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllRandom_Get);host->RegisterHook(host->pluginIndex, CivHooks::CvDllRandom_Get::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllRandom_Get);

Code

100unsigned short CvDllRandom::Get(unsigned short usNum, const char* pszLog)101{102#if defined(MOD_BUGFIX_RANDOM)103	return m_pRandom->get(usNum, pszLog) & USHRT_MAX;104#else105	return m_pRandom->get(usNum, pszLog);106#endif107}

Calls