Bazaar developer reference

GetHexDigitValue(char, uint &)

Defined in
CvGameCoreUtils.cpp, line 1457
Hook name
CivHooks::CvGameCoreUtils_cpp_GetHexDigitValue

Hooks

static bool BeforeCvGameCoreUtils_cpp_GetHexDigitValue(char ch, uint& uiValue, bool& result);static void AfterCvGameCoreUtils_cpp_GetHexDigitValue(char ch, uint& uiValue, bool& result);static bool ReplaceCvGameCoreUtils_cpp_GetHexDigitValue(bool (*original)(char, uint&), char ch, uint& uiValue);CivRegisterBefore<CivHooks::CvGameCoreUtils_cpp_GetHexDigitValue>(host, &BeforeCvGameCoreUtils_cpp_GetHexDigitValue);CivRegisterAfter<CivHooks::CvGameCoreUtils_cpp_GetHexDigitValue>(host, &AfterCvGameCoreUtils_cpp_GetHexDigitValue);CivRegisterReplace<CivHooks::CvGameCoreUtils_cpp_GetHexDigitValue>(host, &ReplaceCvGameCoreUtils_cpp_GetHexDigitValue);

Code

1457static bool GetHexDigitValue(char ch, uint& uiValue)1458{1459	if(ch >= '0' && ch <= '9')1460		uiValue = (uint)(ch - '0');1461	else if(ch >= 'a' && ch <= 'f')1462		uiValue = (uint)((ch - 'a') + 10);1463	else if(ch >= 'A' && ch <= 'F')1464		uiValue = (uint)((ch - 'A') + 10);1465	else1466		return false;14671468	return true;1469}

Called by