diff options
| author | bushing <bushing@gmail.com> | 2008-12-08 04:46:09 +0000 |
|---|---|---|
| committer | bushing <bushing@gmail.com> | 2008-12-08 04:46:09 +0000 |
| commit | 30c883bcfc65761dc9fb61fea16a25fb61a7e220 (patch) | |
| tree | f0e77927cfb598e860faf386c7c8089c38a9b726 /Source/Core/VideoCommon/Src/TextureDecoder.h | |
| parent | e6fe5ec42f025a710918c1aaf8643da36a13bb3e (diff) | |
set svn:eol-style=native for **.h
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1438 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureDecoder.h')
| -rw-r--r-- | Source/Core/VideoCommon/Src/TextureDecoder.h | 170 |
1 files changed, 85 insertions, 85 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.h b/Source/Core/VideoCommon/Src/TextureDecoder.h index b981f3384c..9fdfd36850 100644 --- a/Source/Core/VideoCommon/Src/TextureDecoder.h +++ b/Source/Core/VideoCommon/Src/TextureDecoder.h @@ -1,85 +1,85 @@ -// Copyright (C) 2003-2008 Dolphin Project.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, version 2.0.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License 2.0 for more details.
-
-// A copy of the GPL 2.0 should have been included with the program.
-// If not, see http://www.gnu.org/licenses/
-
-// Official SVN repository and contact information can be found at
-// http://code.google.com/p/dolphin-emu/
-
-#ifndef _TEXTUREDECODER_H
-#define _TEXTUREDECODER_H
-
-enum
-{
- TMEM_SIZE = 1024*1024,
- HALFTMEM_SIZE = 512*1024
-};
-extern u8 texMem[TMEM_SIZE];
-
-enum TextureFormat
-{
- GX_TF_I4 = 0x0,
- GX_TF_I8 = 0x1,
- GX_TF_IA4 = 0x2,
- GX_TF_IA8 = 0x3,
- GX_TF_RGB565 = 0x4,
- GX_TF_RGB5A3 = 0x5,
- GX_TF_RGBA8 = 0x6,
- GX_TF_C4 = 0x8,
- GX_TF_C8 = 0x9,
- GX_TF_C14X2 = 0xA,
- GX_TF_CMPR = 0xE,
-
- _GX_TF_CTF = 0x20, // copy-texture-format only (simply means linear?)
- _GX_TF_ZTF = 0x10, // Z-texture-format
-
- // these formats are also valid when copying targets
- GX_CTF_R4 = 0x0 | _GX_TF_CTF,
- GX_CTF_RA4 = 0x2 | _GX_TF_CTF,
- GX_CTF_RA8 = 0x3 | _GX_TF_CTF,
- GX_CTF_YUVA8 = 0x6 | _GX_TF_CTF,
- GX_CTF_A8 = 0x7 | _GX_TF_CTF,
- GX_CTF_R8 = 0x8 | _GX_TF_CTF,
- GX_CTF_G8 = 0x9 | _GX_TF_CTF,
- GX_CTF_B8 = 0xA | _GX_TF_CTF,
- GX_CTF_RG8 = 0xB | _GX_TF_CTF,
- GX_CTF_GB8 = 0xC | _GX_TF_CTF,
-
- GX_TF_Z8 = 0x1 | _GX_TF_ZTF,
- GX_TF_Z16 = 0x3 | _GX_TF_ZTF,
- GX_TF_Z24X8 = 0x6 | _GX_TF_ZTF,
-
- GX_CTF_Z4 = 0x0 | _GX_TF_ZTF | _GX_TF_CTF,
- GX_CTF_Z8M = 0x9 | _GX_TF_ZTF | _GX_TF_CTF,
- GX_CTF_Z8L = 0xA | _GX_TF_ZTF | _GX_TF_CTF,
- GX_CTF_Z16L = 0xC | _GX_TF_ZTF | _GX_TF_CTF,
-};
-
-int TexDecoder_GetTexelSizeInNibbles(int format);
-int TexDecoder_GetTextureSizeInBytes(int width, int height, int format);
-int TexDecoder_GetBlockWidthInTexels(int format);
-int TexDecoder_GetPaletteSize(int fmt);
-
-enum PC_TexFormat
-{
- PC_TEX_FMT_NONE = 0,
- PC_TEX_FMT_BGRA32 = 1,
-};
-
-PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, int texformat, int tlutaddr, int tlutfmt);
-
-u32 TexDecoder_GetSafeTextureHash(const u8 *src, int width, int height, int texformat, u32 seed=0);
-u32 TexDecoder_GetTlutHash(const u16 *src, int len);
-
-void TexDecoder_SetTexFmtOverlayOptions(bool enable, bool center);
-
-#endif
+// Copyright (C) 2003-2008 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + +#ifndef _TEXTUREDECODER_H +#define _TEXTUREDECODER_H + +enum +{ + TMEM_SIZE = 1024*1024, + HALFTMEM_SIZE = 512*1024 +}; +extern u8 texMem[TMEM_SIZE]; + +enum TextureFormat +{ + GX_TF_I4 = 0x0, + GX_TF_I8 = 0x1, + GX_TF_IA4 = 0x2, + GX_TF_IA8 = 0x3, + GX_TF_RGB565 = 0x4, + GX_TF_RGB5A3 = 0x5, + GX_TF_RGBA8 = 0x6, + GX_TF_C4 = 0x8, + GX_TF_C8 = 0x9, + GX_TF_C14X2 = 0xA, + GX_TF_CMPR = 0xE, + + _GX_TF_CTF = 0x20, // copy-texture-format only (simply means linear?) + _GX_TF_ZTF = 0x10, // Z-texture-format + + // these formats are also valid when copying targets + GX_CTF_R4 = 0x0 | _GX_TF_CTF, + GX_CTF_RA4 = 0x2 | _GX_TF_CTF, + GX_CTF_RA8 = 0x3 | _GX_TF_CTF, + GX_CTF_YUVA8 = 0x6 | _GX_TF_CTF, + GX_CTF_A8 = 0x7 | _GX_TF_CTF, + GX_CTF_R8 = 0x8 | _GX_TF_CTF, + GX_CTF_G8 = 0x9 | _GX_TF_CTF, + GX_CTF_B8 = 0xA | _GX_TF_CTF, + GX_CTF_RG8 = 0xB | _GX_TF_CTF, + GX_CTF_GB8 = 0xC | _GX_TF_CTF, + + GX_TF_Z8 = 0x1 | _GX_TF_ZTF, + GX_TF_Z16 = 0x3 | _GX_TF_ZTF, + GX_TF_Z24X8 = 0x6 | _GX_TF_ZTF, + + GX_CTF_Z4 = 0x0 | _GX_TF_ZTF | _GX_TF_CTF, + GX_CTF_Z8M = 0x9 | _GX_TF_ZTF | _GX_TF_CTF, + GX_CTF_Z8L = 0xA | _GX_TF_ZTF | _GX_TF_CTF, + GX_CTF_Z16L = 0xC | _GX_TF_ZTF | _GX_TF_CTF, +}; + +int TexDecoder_GetTexelSizeInNibbles(int format); +int TexDecoder_GetTextureSizeInBytes(int width, int height, int format); +int TexDecoder_GetBlockWidthInTexels(int format); +int TexDecoder_GetPaletteSize(int fmt); + +enum PC_TexFormat +{ + PC_TEX_FMT_NONE = 0, + PC_TEX_FMT_BGRA32 = 1, +}; + +PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, int texformat, int tlutaddr, int tlutfmt); + +u32 TexDecoder_GetSafeTextureHash(const u8 *src, int width, int height, int texformat, u32 seed=0); +u32 TexDecoder_GetTlutHash(const u16 *src, int len); + +void TexDecoder_SetTexFmtOverlayOptions(bool enable, bool center); + +#endif |
