mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-31 04:01:16 +00:00
Add Mx3DPointFloat copy ctor, match some functions
This commit is contained in:
parent
fe26a7e518
commit
1b817512ac
@ -65,10 +65,10 @@ class Act1State : public LegoState {
|
|||||||
p_file->WriteVector3(m_point3);
|
p_file->WriteVector3(m_point3);
|
||||||
}
|
}
|
||||||
else if (p_file->IsReadMode()) {
|
else if (p_file->IsReadMode()) {
|
||||||
p_file->ReadString(&m_name);
|
p_file->ReadString(m_name);
|
||||||
p_file->ReadVector3(&m_point1);
|
p_file->ReadVector3(m_point1);
|
||||||
p_file->ReadVector3(&m_point2);
|
p_file->ReadVector3(m_point2);
|
||||||
p_file->ReadVector3(&m_point3);
|
p_file->ReadVector3(m_point3);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -74,11 +74,11 @@ class LegoFile : public LegoStorage {
|
|||||||
LegoResult Open(const char* p_name, LegoU32 p_mode);
|
LegoResult Open(const char* p_name, LegoU32 p_mode);
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10034430
|
// FUNCTION: LEGO1 0x10034430
|
||||||
LegoStorage* ReadVector3(Mx3DPointFloat* p_vec3)
|
LegoStorage* ReadVector3(Mx3DPointFloat& p_vec3)
|
||||||
{
|
{
|
||||||
Read(&(*p_vec3)[0], sizeof(float));
|
Read(&p_vec3[0], sizeof(float));
|
||||||
Read(&(*p_vec3)[1], sizeof(float));
|
Read(&p_vec3[1], sizeof(float));
|
||||||
Read(&(*p_vec3)[2], sizeof(float));
|
Read(&p_vec3[2], sizeof(float));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,15 +92,18 @@ class LegoFile : public LegoStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x10034470
|
// FUNCTION: LEGO1 0x10034470
|
||||||
LegoStorage* ReadString(MxString* p_str)
|
LegoStorage* ReadString(MxString& p_str)
|
||||||
{
|
{
|
||||||
MxU16 len;
|
MxS16 len;
|
||||||
Read(&len, sizeof(MxU16));
|
Read(&len, sizeof(MxS16));
|
||||||
|
|
||||||
char* text = new char[len + 1];
|
char* text = new char[len + 1];
|
||||||
Read(text, len);
|
Read(text, len);
|
||||||
|
|
||||||
text[len] = '\0';
|
text[len] = '\0';
|
||||||
*p_str = text;
|
p_str = text;
|
||||||
delete[] text;
|
delete[] text;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,9 @@ class Mx3DPointFloat : public Vector3 {
|
|||||||
m_elements[2] = p_z;
|
m_elements[2] = p_z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x100343a0
|
||||||
|
inline Mx3DPointFloat(const Mx3DPointFloat& p_other) : Vector3(m_elements) { EqualsImpl(p_other.m_data); }
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1001d170
|
// SYNTHETIC: LEGO1 0x1001d170
|
||||||
// Mx3DPointFloat::Mx3DPointFloat
|
// Mx3DPointFloat::Mx3DPointFloat
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user