41 if (storage.
Read(&numTextures,
sizeof(numTextures)) !=
SUCCESS) {
45 for (i = 0; i < numTextures; i++) {
50 if (storage.
Read(&textureNameLength,
sizeof(textureNameLength)) !=
SUCCESS) {
54 textureName =
new LegoChar[textureNameLength + 1];
55 if (storage.
Read(textureName, textureNameLength) !=
SUCCESS) {
59 textureName[textureNameLength] =
'\0';
63 if (texture->
Read(&storage, hardwareMode) !=
SUCCESS) {
68 m_textures->
Append(namedTexture);
77 if (textureName !=
NULL) {
95 while (cursor.
Next(namedTexture)) {
99 if (textureInfo ==
NULL) {
102 if (textureInfo !=
NULL) {
111 if (m_textures !=
NULL) {
T * Get(const char *p_name)
Retrieve the element mapped to the given name, or nullptr if missing.
void Add(const char *p_name, T *p_value)
Add an element mapped to the given name, replacing existing item if present.
LegoU8 * GetBits()
[AI] Returns pointer to the buffer containing indexed pixel data.
Implementation of LegoStorage for memory-backed buffers.
LegoResult Read(void *p_buffer, LegoU32 p_size) override
Reads bytes from memory buffer at current position.
[AI] Cursor/iterator for traversing a LegoNamedTextureList.
[AI] A list class that manages a collection of pointers to LegoNamedTexture objects.
[AI] Associates a named string with a LegoTexture instance, allowing textures to be referenced symbol...
LegoTexture * GetTexture()
[AI] Returns a pointer to the owned LegoTexture instance.
const MxString * GetName() const
[AI] Returns a pointer to the name string associated with this texture.
[AI] Contains DirectDraw and Direct3DRM handles and metadata for a texture used in the LEGO Island re...
LegoResult FUN_10066010(const LegoU8 *p_bits)
[AI] Updates the pixel bits for the current surface/texture with the provided bitmap data.
static LegoTextureInfo * Create(const char *p_name, LegoTexture *p_texture)
[AI] Creates a new LegoTextureInfo for a given logical name and loaded LegoTexture.
[AI] Manages the loading, storage, and management of named textures for the LEGO Island engine.
MxResult Read(MxDSChunk &p_chunk)
[AI] Loads and parses one or more texture objects from a provided serialized data chunk.
MxResult Store()
[AI] Transfers all loaded textures to the global texture container and initializes their info structu...
void DoneTickle() override
[AI] Updates this presenter when the tickle state reaches "Done".
MxResult PutData() override
[AI] Loads texture data from the current data chunk, registers these textures with the global texture...
MxResult AddToManager() override
[AI] Registers this presenter with the VideoManager, making it available for video/texture updates an...
[AI] Represents a texture which wraps a LegoImage and provides loading/saving functionality.
LegoResult Read(LegoStorage *p_storage, LegoU32 p_square)
[AI] Reads texture data from a LegoStorage.
LegoImage * GetImage()
[AI] Returns the associated image used by this texture.
MxDirect3D * GetDirect3D()
[AI] Returns the active Direct3D wrapper (engine/utility) object.
BOOL GetHardwareMode()
[AI] Checks if the device is operating in hardware mode.
virtual MxBool VTable0x64(undefined4 p_undefined)
[AI] Delegated state/mode checking.
[AI] Represents a chunk of data extracted from a stream (typically from a Mindscape/Mx SI file or str...
MxU8 * GetData()
[AI] Returns a pointer to the start of the data payload. [AI]
void FreeDataChunk(MxStreamChunk *p_chunk)
[AI] Frees (deletes) a data chunk if it's found in the consumed data list; also forcibly deletes sing...
MxAssignedDevice * AssignedDevice()
[AI] Returns the currently selected/active rendering device information for 3D output.
virtual void SetTickleState(TickleState p_tickleState)
[AI] Forces the tickle state, advancing to the requested lifecycle stage.
MxBool IsEnabled()
[AI] Returns whether this presenter is logically enabled (based on the associated action's flags).
TickleState m_currentTickleState
[AI] Current state in the tickle lifecycle.
@ e_idle
[AI] Not processing an action.
@ e_streaming
[AI] Streaming or rendering actively.
MxCompositePresenter * m_compositePresenter
[AI] Owner composite presenter, if any.
char * GetData() const
Returns a pointer to the internal character buffer.
#define DECOMP_SIZE_ASSERT(T, S)
#define NULL
[AI] Null pointer value (C/C++ semantics).
unsigned long LegoU32
[AI] Unsigned 32-bit integer type for cross-platform compatibility.
char LegoChar
[AI] Alias for char, for use in character/byte data and string handling.
#define FAILURE
[AI] Used to indicate a failed operation in result codes.
long LegoS32
[AI] Signed 32-bit integer type for cross-platform compatibility.
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
LegoVideoManager * VideoManager()
[AI] Accessor for the game's LegoVideoManager subsystem. Used for managing 3D/video hardware....
LegoTextureContainer * TextureContainer()
[AI] Accessor for the texture container used for global texture management. [AI]