| 43 | /// @brief MPQ Hash�㷨 |
| 44 | template <uint32_t dwHashType> |
| 45 | uint32_t MPQHash(const char* key) |
| 46 | { |
| 47 | uint32_t seed1 = 0x7FED7FED, seed2 = 0xEEEEEEEE; |
| 48 | uint32_t ch; |
| 49 | while (*key != 0) |
| 50 | { |
| 51 | ch = static_cast<unsigned char>(*key++); |
| 52 | seed1 = MPQHashCryptTable::GetInstance()[(dwHashType << 8) + ch] ^ (seed1 + seed2); |
| 53 | seed2 = ch + seed1 + seed2 + (seed2 << 5) + 3; |
| 54 | } |
| 55 | return seed1; |
| 56 | } |
| 57 | |
| 58 | /// @brief �ֵ�� |
| 59 | struct DictionaryKey |
nothing calls this directly
no outgoing calls
no test coverage detected