Isle
Loading...
Searching...
No Matches
legotexture.cpp
Go to the documentation of this file.
1#include "legotexture.h"
2
3#include "decomp.h"
4#include "legoimage.h"
5#include "legostorage.h"
6
8
9// FUNCTION: LEGO1 0x10098fb0
11{
12 m_image = new LegoImage();
13}
14
15// FUNCTION: LEGO1 0x10099030
17{
18 delete m_image;
19}
20
21// FUNCTION: LEGO1 0x10099050
23{
24 return m_image->Read(p_storage, p_square);
25}
26
27// FUNCTION: LEGO1 0x10099070
29{
30 return m_image->Write(p_storage);
31}
[AI] Class representing an 8-bit palettized image with up to 256 palette entries and indexed pixel da...
Definition: legoimage.h:68
LegoResult Read(LegoStorage *p_storage, LegoU32 p_square)
[AI] Reads the full image from the storage source, including width, height, count,...
Definition: legoimage.cpp:77
LegoResult Write(LegoStorage *p_storage)
[AI] Writes the full image to the given storage: width, height, count, palette, pixel indices.
Definition: legoimage.cpp:153
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
Definition: legostorage.h:16
[AI] Represents a texture which wraps a LegoImage and provides loading/saving functionality.
Definition: legotexture.h:15
LegoResult Read(LegoStorage *p_storage, LegoU32 p_square)
[AI] Reads texture data from a LegoStorage.
Definition: legotexture.cpp:22
LegoTexture()
[AI] Constructs a LegoTexture object and allocates a new LegoImage.
Definition: legotexture.cpp:10
LegoImage * m_image
[AI] Pointer to the image data associated with this texture. Owned by the LegoTexture instance.
Definition: legotexture.h:45
LegoResult Write(LegoStorage *p_storage)
[AI] Writes texture data to a LegoStorage.
Definition: legotexture.cpp:28
~LegoTexture()
[AI] Destructor. Frees the owned LegoImage.
Definition: legotexture.cpp:16
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
unsigned long LegoU32
[AI] Unsigned 32-bit integer type for cross-platform compatibility.
Definition: legotypes.h:71
LegoS32 LegoResult
[AI] Function result type (return code): typically SUCCESS (0) or FAILURE (-1).
Definition: legotypes.h:101