coastline 0.0.4
Loading...
Searching...
No Matches
textureentry.h File Reference
Include dependency graph for textureentry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TextureImageData
 Image metadata shared by texture entries and temporary texture conversions. More...
struct  TextureEntry
 A loaded texture, its image metadata and texture-coordinate scales. More...

Enumerations

enum  RenderStateDirtyBit {
  RENDER_STATE_DIRTY_Z_WRITE_ENABLE = 0x1 , RENDER_STATE_DIRTY_ALPHA_TEST_ENABLE = 0x2 , RENDER_STATE_DIRTY_SRC_BLEND = 0x4 , RENDER_STATE_DIRTY_DEST_BLEND = 0x8 ,
  RENDER_STATE_DIRTY_CULL_MODE = 0x10 , RENDER_STATE_DIRTY_Z_FUNC = 0x20 , RENDER_STATE_DIRTY_ALPHA_REF = 0x40 , RENDER_STATE_DIRTY_ALPHA_FUNC = 0x80 ,
  RENDER_STATE_DIRTY_ADDRESS_U = 0x100 , RENDER_STATE_DIRTY_ADDRESS_V = 0x200 , RENDER_STATE_DIRTY_ALPHA_BLEND_ENABLE = 0x400
}
 The bits of g_dwDirtyRenderStateMask, one for each render state the game caches. More...

Functions

void GetTextureEntryDimensions (int *pWidth, int *pHeight, int nEntry)
 Get the size of a texture the game loaded.
void AliasTextureEntrySurface (int nEntry, int nSourceEntry)
 Make a texture the game loaded draw with the texture of another.
unsigned AllocateTextureEntry (void)
 Append an uninitialised texture entry, expanding storage in blocks of 256 entries as needed.

Variables

unsigned g_dwTextureEntryCount
 The number of entries of g_pTextureEntries.
TextureEntry * g_pTextureEntries
 The textures the game loaded.

Enumeration Type Documentation

◆ RenderStateDirtyBit

The bits of g_dwDirtyRenderStateMask, one for each render state the game caches.

Enumerator
RENDER_STATE_DIRTY_Z_WRITE_ENABLE 

g_dwPendingRS_ZWriteEnable.

RENDER_STATE_DIRTY_ALPHA_TEST_ENABLE 

g_dwPendingRS_AlphaTestEnable.

RENDER_STATE_DIRTY_SRC_BLEND 

g_dwPendingRS_SrcBlend.

RENDER_STATE_DIRTY_DEST_BLEND 

g_dwPendingRS_DestBlend.

RENDER_STATE_DIRTY_CULL_MODE 

g_dwPendingRS_CullMode.

RENDER_STATE_DIRTY_Z_FUNC 

g_dwPendingRS_ZFunc.

RENDER_STATE_DIRTY_ALPHA_REF 

g_dwPendingRS_AlphaRef.

RENDER_STATE_DIRTY_ALPHA_FUNC 

g_dwPendingRS_AlphaFunc.

RENDER_STATE_DIRTY_ADDRESS_U 

g_dwPendingRS_AddressU.

RENDER_STATE_DIRTY_ADDRESS_V 

g_dwPendingRS_AddressV.

RENDER_STATE_DIRTY_ALPHA_BLEND_ENABLE 

g_dwPendingRS_AlphaBlendEnable.

Function Documentation

◆ GetTextureEntryDimensions()

void GetTextureEntryDimensions ( int * pWidth,
int * pHeight,
int nEntry )

Get the size of a texture the game loaded.

Parameters
pWidthReceives the width.
pHeightReceives the height.
nEntryThe entry of g_pTextureEntries.
Ghidra address:
BRD3D: 0x100290a0

◆ AliasTextureEntrySurface()

void AliasTextureEntrySurface ( int nEntry,
int nSourceEntry )

Make a texture the game loaded draw with the texture of another.

Parameters
nEntryThe entry of g_pTextureEntries that takes the texture.
nSourceEntryThe entry whose texture it takes.
Ghidra address:
BRD3D: 0x10024ab0
Ghidra address:
BRGlide: 0x10023d20

◆ AllocateTextureEntry()

unsigned AllocateTextureEntry ( void )

Append an uninitialised texture entry, expanding storage in blocks of 256 entries as needed.

Returns
The new zero-based entry index. Existing entry pointers can be invalidated by growth.
Ghidra address:
BRD3D: 0x10024b60
Ghidra address:
BRGlide: 0x10027a10

Variable Documentation

◆ g_dwTextureEntryCount

unsigned g_dwTextureEntryCount
extern

The number of entries of g_pTextureEntries.

Ghidra address:
BRD3D: 0x105553f0
Ghidra address:
BRGlide: 0x10697a58

◆ g_pTextureEntries

TextureEntry* g_pTextureEntries
extern

The textures the game loaded.

Ghidra address:
BRD3D: 0x1057543c
Ghidra address:
BRGlide: 0x106b7aa0