コード例 #1
0
ファイル: random_func.cpp プロジェクト: Voxar/OpenTTD
uint DoRandomRange(uint max, int line, const char *file)
{
	return GB(DoRandom(line, file), 0, 16) * max >> 16;
}
コード例 #2
0
ファイル: random_func.cpp プロジェクト: hoangHEDSPI/openttd
uint32 DoRandomRange(uint32 limit, int line, const char *file)
{
	return ((uint64)DoRandom(line, file) * (uint64)limit) >> 32;
}
コード例 #3
0
ファイル: random_func.cpp プロジェクト: koreapyj/openttd-yapp
uint32 DoRandomRange(uint32 max, int line, const char *file)
{
	return ((uint64)DoRandom(line, file) * (uint64)max) >> 32;
}