Texture/Remastered: Difference between revisions

m
no edit summary
(Conform to format documentation guidelines.)
mNo edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1:
= Structures =
At least partially derived from [https://docslearn.microsoft.com/en-us/windows/win32/direct3d11/d3dx11-image-info D3DX11_IMAGE_INFO] or a related structure.
 
== 32-bit ==
=== Header ===
==== 32-bit ====
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || [[#Texture interface | Texture interface]]* || ? || Texture interface || nullptr in file. The game sets this pointer in memory.<br/>The interface is chosen by the texture type.
|-
| 0x4 || 0x4 || ?[[#D3D11_USAGE|D3D11_USAGE]] || ? || Usage ||
|-
| 0x8 || 0x4 || ?int32_t || ? || Dimension || See [[#Dimension|dimension]]
|-
| 0xC || 0x4 || void* || ? || Pixel data || Offset in file. The game sets this pointer in memory.
Line 21:
| 0x18 || 0x4 || ? || ? || ||
|-
| 0x1C || 0x4 || [[#DXGI_FORMAT | DXGI_FORMAT]] || Format || A DXGI_FORMAT enumeration specifying the format the texture will be in after it is loaded. ||
|-
| 0x20 || 0x4 || uint32_t || ? || Flags || See [[#Flags|flags]]
|-
| 0x24 || 0x2 || uint16_t || Width || The target width of the texture. If the actual width of the texture is larger or smaller than this value then the texture will be scaled up or down to fit this target width. ||
Line 41:
| 0x30 || 0x4 || void* || ? || ||
|-
| 0x34 || 0x4 || ?uint32_t || ? || Array index || Must be less than 32
|-
| 0x38 || 0x4 || uint32_t || ? || Contents size || Size of the texture data. Used on PS4 and NX
Line 48:
|}
 
==== 64-bit ====
=== Header ===
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#Texture interface 2 | Texture interface]]* || ? || Texture interface || nullptr in file. The game sets this pointer in memory.<br/>The interface is chosen by the texture type.
|-
| 0x8 || 0x4 || ? || ? || ||
Line 67 ⟶ 66:
| 0x28 || 0x4 || ? || ? || ||
|-
| 0x2C || 0x4 || [[#DXGI_FORMAT | DXGI_FORMAT]] || Format || A DXGI_FORMAT enumeration specifying the format the texture will be in after it is loaded. ||
|-
| 0x30 || 0x4 || uint32_t || ? || Flags ||
Line 95 ⟶ 94:
 
= Unions =
== 32-bit ==
=== Texture interface ===
Anonymous union.
 
==== 32-bit ====
{| class="wikitable"
|-
! Length !! Type !! Name !! Description !! Comments
|-
Line 112 ⟶ 110:
|}
 
==== 64-bit ====
=== Texture interface ===
Anonymous union.
 
{| class="wikitable"
|-
! Length !! Type !! Name !! Description !! Comments
|-
Line 130 ⟶ 124:
 
= Enumerations =
=== D3D11_USAGE ===
From [https://learn.microsoft.com/en-us/windows/win32/api/d3d11/ne-d3d11-d3d11_usage D3D11_USAGE on Microsoft Learn].
 
{| class="wikitable"
! Name !! Value !! Comments
|-
| D3D11_USAGE_DEFAULT || 0 ||
|-
| D3D11_USAGE_IMMUTABLE || 1 ||
|-
| D3D11_USAGE_DYNAMIC || 2 ||
|-
| D3D11_USAGE_STAGING || 3 ||
|}
 
=== Dimension ===
{| class="wikitable"
! Name !! Value !! Comments
|-
| ? || 6 || 1D texture
|-
| ? || 7 || 2D texture
|-
| ? || 8 || 3D texture
|-
| ? || 9 || Cube texture
|}
 
=== DXGI_FORMAT ===
From [https://docslearn.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format DXGI_FORMAT on Microsoft DocsLearn].
 
{| class="wikitable"
! Name !! Value !! Comments
|-
| DXGI_FORMAT_UNKNOWN || 0 || The format is not known.
|-
Line 377 ⟶ 401:
|-
| DXGI_FORMAT_FORCE_UINT || 0xFFFFFFFF || Forces this enumeration to compile to 32 bits in size. This value is not used.
|}
 
=== HeaderFlags ===
{| class="wikitable"
! Name !! Value !! Comments
|-
| ? || 0x1 ||
|-
| ? || 0x2 ||
|-
| ? || 0x4 ||
|-
| ? || 0x8 ||
|-
| ? || 0x10 ||
|-
| ? || 0x20 ||
|-
| ? || 0x40 ||
|-
| ? || 0x80 ||
|-
| ? || 0x100 ||
|-
| ? || 0x200 ||
|}