Isle
|
[AI] Contains DirectDraw and Direct3DRM handles and metadata for a texture used in the LEGO Island rendering system. More...
#include <legotextureinfo.h>
Public Member Functions | |
LegoTextureInfo () | |
[AI] Constructor. More... | |
~LegoTextureInfo () | |
[AI] Destructor. More... | |
LegoResult | FUN_10066010 (const LegoU8 *p_bits) |
[AI] Updates the pixel bits for the current surface/texture with the provided bitmap data. More... | |
Static Public Member Functions | |
static LegoTextureInfo * | Create (const char *p_name, LegoTexture *p_texture) |
[AI] Creates a new LegoTextureInfo for a given logical name and loaded LegoTexture. More... | |
static BOOL | SetGroupTexture (Tgl::Mesh *pMesh, LegoTextureInfo *p_textureInfo) |
[AI] Assigns a Direct3DRM texture group from a LegoTextureInfo to a mesh group via the Tgl/Microsoft retained mode API. More... | |
static BOOL | GetGroupTexture (Tgl::Mesh *pMesh, LegoTextureInfo *&p_textureInfo) |
[AI] Retrieves the LegoTextureInfo currently attached to the supplied mesh group. More... | |
Public Attributes | |
char * | m_name |
[AI] Pointer to the logical name string for this texture (allocated; e.g., "BROWN_ROOF"). More... | |
LPDIRECTDRAWSURFACE | m_surface |
[AI] DirectDraw surface holding the 8-bit indexed image for the texture. More... | |
LPDIRECTDRAWPALETTE | m_palette |
[AI] DirectDraw palette object (8-bit) assigned to the m_surface. More... | |
LPDIRECT3DRMTEXTURE2 | m_texture |
[AI] Direct3DRM texture object used by retained-mode rendering. More... | |
[AI] Contains DirectDraw and Direct3DRM handles and metadata for a texture used in the LEGO Island rendering system.
[AI] This structure manages a DirectDrawSurface, a DirectDrawPalette, and a Direct3DRMTexture2 representing a loaded texture, as well as the C string name corresponding to the LEGO logical texture name. It also provides utility methods for creating, applying, and retrieving textures on Tgl/Microsoft Direct3D meshes.
Definition at line 19 of file legotextureinfo.h.
LegoTextureInfo::LegoTextureInfo | ( | ) |
[AI] Constructor.
Initializes all pointer fields to null.
Definition at line 13 of file legotextureinfo.cpp.
LegoTextureInfo::~LegoTextureInfo | ( | ) |
[AI] Destructor.
Releases all associated DirectDraw and Direct3DRM resources, and frees the name string.
Definition at line 22 of file legotextureinfo.cpp.
|
static |
[AI] Creates a new LegoTextureInfo for a given logical name and loaded LegoTexture.
p_name | [AI] Name of the texture (usually the LEGO logical name, e.g., "BROWN_ROOF"). |
p_texture | [AI] Pointer to a LegoTexture holding image/bitmap and palette data. |
[AI] Allocates a new LegoTextureInfo, creates DirectDrawSurface/Palette from the image, assigns the name, and stores the resulting D3DRM Texture. The returned object owns its resources. Appends textureInfo into D3DRMAppData.
Definition at line 46 of file legotextureinfo.cpp.
LegoResult LegoTextureInfo::FUN_10066010 | ( | const LegoU8 * | p_bits | ) |
[AI] Updates the pixel bits for the current surface/texture with the provided bitmap data.
p_bits | [AI] Pointer to the updated 8-bit indexed image pixel data to load into the DirectDrawSurface (same format as originally loaded). |
[AI] This is used for dynamic texture updates—locks the surface, copies over p_bits for the correct pitch/stride, and triggers the Direct3DRMTexture2 refresh.
Definition at line 189 of file legotextureinfo.cpp.
|
static |
[AI] Retrieves the LegoTextureInfo currently attached to the supplied mesh group.
pMesh | [AI] Mesh to query for texture information. |
p_textureInfo | [AI] Reference to pointer; on success, points to the associated LegoTextureInfo or NULL. |
[AI] Uses Direct3DRM APIs to query for an attached group texture and extract the LegoTextureInfo from its application data.
Definition at line 165 of file legotextureinfo.cpp.
|
static |
[AI] Assigns a Direct3DRM texture group from a LegoTextureInfo to a mesh group via the Tgl/Microsoft retained mode API.
pMesh | [AI] Tgl::Mesh pointer representing the mesh group. |
p_textureInfo | [AI] Texture info instance providing the D3DRMTexture to set. |
[AI] Associates the Direct3DRMTexture2 in p_textureInfo with the specified mesh group using the Tgl layer, so it will be rendered textured.
Definition at line 157 of file legotextureinfo.cpp.
char* LegoTextureInfo::m_name |
[AI] Pointer to the logical name string for this texture (allocated; e.g., "BROWN_ROOF").
Definition at line 73 of file legotextureinfo.h.
LPDIRECTDRAWPALETTE LegoTextureInfo::m_palette |
[AI] DirectDraw palette object (8-bit) assigned to the m_surface.
Definition at line 83 of file legotextureinfo.h.
LPDIRECTDRAWSURFACE LegoTextureInfo::m_surface |
[AI] DirectDraw surface holding the 8-bit indexed image for the texture.
Definition at line 78 of file legotextureinfo.h.
LPDIRECT3DRMTEXTURE2 LegoTextureInfo::m_texture |
[AI] Direct3DRM texture object used by retained-mode rendering.
Receives updates from m_surface.
Definition at line 88 of file legotextureinfo.h.