Texture/Remastered: Difference between revisions

Conform to format documentation guidelines.
(Add texture data field)
(Conform to format documentation guidelines.)
Line 1:
= LayoutStructures =
At least partially derived from [https://docs.microsoft.com/en-us/windows/win32/direct3d11/d3dx11-image-info D3DX11_IMAGE_INFO] or a related structure.
 
== 32-bit ==
=== Header ===
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || InterfaceUnion[[#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.<br/>See [[#InterfaceUnion | InterfaceUnion]]
|-
| 0x4 || 0x4 || ? || ? || ||
Line 20 ⟶ 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. || See [[#DXGI_FORMAT | DXGI_FORMAT]]
|-
| 0x20 || 0x4 || uint32_t || ? || Flags ||
Line 45 ⟶ 46:
|-
| 0x3C || 0x4 || void* || ? || Texture data || nullptr in file. Set in memory. Used on PS4
|}
 
=== InterfaceUnion ===
Real name is unknown.
 
{| class="wikitable"
|-
! Type !! Name !! Description !! Comments
|-
| ID3D11Texture1D* || ? || 1D texture interface ||
|-
| ID3D11Texture2D* || ? || 2D texture interface ||
|-
| ID3D11Texture3D* || ? || 3D texture interface ||
|}
 
== 64-bit ==
=== Header ===
'''Note:''' This is guessed based on differences from the 32-bit structure. There is an extra line of data after the end; one or more fields after the mip levels may be pointers.
 
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || InterfaceUnion[[#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.<br/>See [[#InterfaceUnion | InterfaceUnion]]
|-
| 0x8 || 0x4 || ? || ? || ||
Line 81 ⟶ 67:
| 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. || See [[#DXGI_FORMAT | DXGI_FORMAT]]
|-
| 0x30 || 0x4 || uint32_t || ? || Flags ||
Line 106 ⟶ 92:
|-
| 0x50 || 0x8 || void* || ? || Texture data || nullptr in file. Set in memory. Used on PS4
|}
 
= Unions =
== 32-bit ==
=== Texture interface ===
Anonymous union.
 
{| class="wikitable"
|-
! Length !! Type !! Name !! Description !! Comments
|-
| 0x4 || ID3D11Resource* || m_resource || Resource interface ||
|-
| 0x4 || ID3D11Texture1D* || ?m_texture1d || 1D texture interface ||
|-
| 0x4 || ID3D11Texture2D* || ?m_texture2d || 2D texture interface ||
|-
| 0x4 || ID3D11Texture3D* || ?m_texture3d || 3D texture interface ||
|}
 
== 64-bit ==
=== Texture interface ===
Anonymous union.
 
{| class="wikitable"
|-
! Length !! Type !! Name !! Description !! Comments
|-
| 0x8 || ID3D11Resource* || m_resource || Resource interface ||
|-
| 0x8 || ID3D11Texture1D* || m_texture1d || 1D texture interface ||
|-
| 0x8 || ID3D11Texture2D* || m_texture2d || 2D texture interface ||
|-
| 0x8 || ID3D11Texture3D* || m_texture3d || 3D texture interface ||
|}