From 2d3ffb454411d958b94e766692228a401a62108b Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Fri, 2 Feb 2024 19:46:07 -0500 Subject: [PATCH] Fix WriteVector3 --- LEGO1/lego/sources/misc/legostorage.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/LEGO1/lego/sources/misc/legostorage.h b/LEGO1/lego/sources/misc/legostorage.h index 69724f88..e975c347 100644 --- a/LEGO1/lego/sources/misc/legostorage.h +++ b/LEGO1/lego/sources/misc/legostorage.h @@ -73,6 +73,20 @@ class LegoFile : public LegoStorage { LegoResult SetPosition(LegoU32 p_position) override; LegoResult Open(const char* p_name, LegoU32 p_mode); + // FUNCTION: LEGO1 0x100343d0 + LegoStorage* WriteVector3(Mx3DPointFloat p_vec3) + { + float data = p_vec3[0]; + Write(&data, sizeof(float)); + + data = p_vec3[1]; + Write(&data, sizeof(float)); + + data = p_vec3[2]; + Write(&data, sizeof(float)); + return this; + } + // FUNCTION: LEGO1 0x10034430 LegoStorage* ReadVector3(Mx3DPointFloat& p_vec3) { @@ -82,15 +96,6 @@ class LegoFile : public LegoStorage { return this; } - // FUNCTION: LEGO1 0x100343d0 - LegoStorage* WriteVector3(Mx3DPointFloat p_vec3) - { - Write(&p_vec3[0], sizeof(float)); - Write(&p_vec3[1], sizeof(float)); - Write(&p_vec3[2], sizeof(float)); - return this; - } - // FUNCTION: LEGO1 0x10034470 LegoStorage* ReadString(MxString& p_str) {