diff options
| author | memberTwo.mb2 <memberTwo.mb2@gmail.com> | 2008-12-04 20:21:32 +0000 |
|---|---|---|
| committer | memberTwo.mb2 <memberTwo.mb2@gmail.com> | 2008-12-04 20:21:32 +0000 |
| commit | 83e4bd2e5f8546817c23037dd12d9a1dfd0b4ff8 (patch) | |
| tree | 9458e9bde8b3c4bd57026a0db42f10bed4a4ad8f /Source/Core/VideoCommon/Src/TextureDecoder.cpp | |
| parent | 42e485ba0bb660615ef7892b3cb428afc09ac064 (diff) | |
Fix MP1 & MP2 texture font issue. Not very robust but the general idea is there :p
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1401 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureDecoder.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/TextureDecoder.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/TextureDecoder.cpp index df46fabeb7..a1654a72ca 100644 --- a/Source/Core/VideoCommon/Src/TextureDecoder.cpp +++ b/Source/Core/VideoCommon/Src/TextureDecoder.cpp @@ -62,10 +62,12 @@ int TexDecoder_GetTextureSizeInBytes(int width, int height, int format) return (width * height * TexDecoder_GetTexelSizeInNibbles(format)) / 2;
}
-u32 TexDecoder_GetSafeTextureHash(const u8 *src, int width, int height, int texformat)
+u32 TexDecoder_GetSafeTextureHash(const u8 *src, int width, int height, int texformat, u32 seed)
{
int sz = TexDecoder_GetTextureSizeInBytes(width, height, texformat);
- u32 hash = 0x1337c0de;
+
+ u32 hash = seed ? seed : 0x1337c0de;
+
if (sz < 2048) {
for (int i = 0; i < sz / 4; i += 13) {
hash = _rotl(hash, 17) ^ ((u32 *)src)[i];
|
