Isle
Loading...
Searching...
No Matches
legomesh.h
Go to the documentation of this file.
1#ifndef __LEGOMESH_H
2#define __LEGOMESH_H
3
4#include "decomp.h"
5#include "legocolor.h"
6#include "misc/legotypes.h"
7
8class LegoStorage;
9
10// SIZE 0x1c
18 {
19 if (m_unk0x08) {
20 delete m_unk0x08;
21 }
22 if (m_unk0x0c) {
23 delete m_unk0x0c;
24 }
25 if (m_unk0x10) {
26 delete m_unk0x10;
27 }
28 if (m_unk0x14) {
29 delete m_unk0x14;
30 }
31 if (m_unk0x18) {
32 delete m_unk0x18;
33 }
34 }
35
42};
43
44// VTABLE: LEGO1 0x100dd228
45// SIZE 0x24
51class LegoMesh {
52public:
57 enum {
61 };
62
63 LegoMesh();
64 virtual ~LegoMesh();
65
70
75 void SetColor(LegoColor p_color) { m_color = p_color; }
76
82
88
93 void SetShading(LegoU8 p_shading) { m_shading = p_shading; }
94
100
106
112
118
124 LegoResult Read(LegoStorage* p_storage);
125
126 // SYNTHETIC: LEGO1 0x100d3840
127 // LegoMesh::`scalar deleting destructor'
128
129protected:
140};
141
142#endif // __LEGOMESH_H
LEGO color representation with 8-bit RGB channels.
Definition: legocolor.h:10
[AI] Represents the rendering attributes and state of a LEGO mesh, including color,...
Definition: legomesh.h:51
LegoFloat m_alpha
[AI] Mesh transparency (0=transparent, 1=opaque).
Definition: legomesh.h:131
LegoFloat GetAlpha()
[AI] Gets the mesh's transparency alpha value.
Definition: legomesh.h:81
@ e_flat
[AI] Use flat shading (per-polygon color).
Definition: legomesh.h:58
@ e_wireframe
[AI] Use wireframe rendering.
Definition: legomesh.h:60
@ e_gouraud
[AI] Use gouraud shading (interpolated vertex colors).
Definition: legomesh.h:59
LegoResult Read(LegoStorage *p_storage)
[AI] Reads mesh properties (color, alpha, shading, flags, names) from the given storage stream.
Definition: legomesh.cpp:39
LegoU8 GetUnknown0x0d()
[AI] Returns the value of an unknown flag or property at offset 0x0d.
Definition: legomesh.h:99
LegoColor GetColor()
[AI] Returns the mesh's primary color.
Definition: legomesh.h:69
LegoChar * m_materialName
[AI] Name of material resource, null if none; string is lowercase.
Definition: legomesh.h:137
LegoBool m_unk0x21
[AI] Unknown boolean property; function unknown.
Definition: legomesh.h:139
virtual ~LegoMesh()
Definition: legomesh.cpp:23
LegoChar * m_textureName
[AI] Name of texture resource, null if none; string is lowercase.
Definition: legomesh.h:136
LegoMeshUnkComponent * m_unk0x10
[AI] Unknown pointer; owned; deleted in destructor. [AI]
Definition: legomesh.h:134
undefined m_unk0x20
[AI] Single unused/padding byte.
Definition: legomesh.h:138
LegoU8 GetShading()
[AI] Gets the shading mode of the mesh.
Definition: legomesh.h:87
undefined4 m_unk0x14
[AI] Unknown 4-byte field; unused. [AI]
Definition: legomesh.h:135
LegoColor m_color
[AI] The main (diffuse) color of the mesh.
Definition: legomesh.h:130
LegoU8 m_shading
[AI] Shading mode (see enum above).
Definition: legomesh.h:132
LegoU8 m_unk0x0d
[AI] Unknown property/flag at offset 0x0d.
Definition: legomesh.h:133
void SetShading(LegoU8 p_shading)
[AI] Sets the shading mode.
Definition: legomesh.h:93
void SetColor(LegoColor p_color)
[AI] Sets the mesh's primary color.
Definition: legomesh.h:75
LegoMesh()
Definition: legomesh.cpp:9
LegoBool GetUnknown0x21()
[AI] Returns the value of an unknown boolean at offset 0x21.
Definition: legomesh.h:117
const LegoChar * GetTextureName()
[AI] Returns the texture resource name associated with the mesh.
Definition: legomesh.h:105
const LegoChar * GetMaterialName()
[AI] Returns the material resource name for the mesh.
Definition: legomesh.h:111
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
Definition: legostorage.h:16
unsigned int undefined4
Definition: decomp.h:28
unsigned char undefined
Definition: decomp.h:26
[AI] Defines basic fixed-width data types and platform-neutral constants for LEGO Island codebase.
char LegoChar
[AI] Alias for char, for use in character/byte data and string handling.
Definition: legotypes.h:83
unsigned char LegoU8
[AI] Unsigned 8-bit integer type used throughout LEGO Island.
Definition: legotypes.h:47
LegoS32 LegoResult
[AI] Function result type (return code): typically SUCCESS (0) or FAILURE (-1).
Definition: legotypes.h:101
float LegoFloat
[AI] Floating point type used throughout LEGO Island.
Definition: legotypes.h:77
LegoU8 LegoBool
[AI] Boolean value used throughout the codebase.
Definition: legotypes.h:89
[AI] Unknown mesh sub-component structure possibly used for materials or textures.
Definition: legomesh.h:16
undefined m_unk0x00[8]
[AI] Padding/unknown bytes, function unknown. [AI]
Definition: legomesh.h:36
undefined * m_unk0x08
[AI] Unknown dynamically allocated pointer, deleted in destructor. [AI]
Definition: legomesh.h:37
undefined * m_unk0x0c
[AI] Unknown dynamically allocated pointer, deleted in destructor. [AI]
Definition: legomesh.h:38
undefined * m_unk0x18
[AI] Unknown dynamically allocated pointer, deleted in destructor. [AI]
Definition: legomesh.h:41
undefined * m_unk0x14
[AI] Unknown dynamically allocated pointer, deleted in destructor. [AI]
Definition: legomesh.h:40
undefined * m_unk0x10
[AI] Unknown dynamically allocated pointer, deleted in destructor. [AI]
Definition: legomesh.h:39