Isle
Loading...
Searching...
No Matches
legovertex.cpp
Go to the documentation of this file.
1#include "legovertex.h"
2
3#include "decomp.h"
4#include "misc/legostorage.h"
5
7
8// FUNCTION: LEGO1 0x100d37b0
10{
11 m_coordinates[0] = 0.0F;
12 m_coordinates[1] = 0.0F;
13 m_coordinates[2] = 0.0F;
14}
15
16// FUNCTION: LEGO1 0x100d37c0
18{
19 LegoResult result;
20 if ((result = p_storage->Read(&m_coordinates[0], sizeof(m_coordinates[0]))) != SUCCESS) {
21 return result;
22 }
23 if ((result = p_storage->Read(&m_coordinates[1], sizeof(m_coordinates[1]))) != SUCCESS) {
24 return result;
25 }
26 if ((result = p_storage->Read(&m_coordinates[2], sizeof(m_coordinates[2]))) != SUCCESS) {
27 return result;
28 }
29 return SUCCESS;
30}
Abstract base class providing an interface for file-like storage with binary and text read/write oper...
Definition: legostorage.h:16
virtual LegoResult Read(void *p_buffer, LegoU32 p_size)=0
Read bytes from storage into buffer.
[AI] Represents a 3D vertex with floating point coordinates.
Definition: legovertex.h:11
LegoFloat m_coordinates[3]
[AI] The x, y, and z coordinates of the vertex. [AI]
Definition: legovertex.h:70
LegoResult Read(LegoStorage *p_storage)
[AI] Reads the coordinates from a storage object (usually a file/buffer).
Definition: legovertex.cpp:17
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
LegoS32 LegoResult
[AI] Function result type (return code): typically SUCCESS (0) or FAILURE (-1).
Definition: legotypes.h:101
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
Definition: legotypes.h:30