From 0ce6fab3d085b2e2e68c95bdff59557c483486fe Mon Sep 17 00:00:00 2001 From: Misha Date: Sat, 24 Jun 2023 20:38:10 +0300 Subject: [PATCH] constructor is almost matching --- LEGO1/legobackgroundcolor.cpp | 18 ++++++++++++++++++ LEGO1/legobackgroundcolor.h | 7 +++++-- LEGO1/mxbackgroundcolor.cpp | 15 +++++++++++++++ LEGO1/mxbackgroundcolor.h | 20 ++++++++++++++++++++ 4 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 LEGO1/legobackgroundcolor.cpp create mode 100644 LEGO1/mxbackgroundcolor.cpp create mode 100644 LEGO1/mxbackgroundcolor.h diff --git a/LEGO1/legobackgroundcolor.cpp b/LEGO1/legobackgroundcolor.cpp new file mode 100644 index 00000000..1667592e --- /dev/null +++ b/LEGO1/legobackgroundcolor.cpp @@ -0,0 +1,18 @@ +#include "legobackgroundcolor.h" +#include "legoomni.h" +#include "legoutil.h" + +// OFFSET: LEGO1 0x1003bfb0 +LegoBackgroundColor::LegoBackgroundColor(const char* name, const char* colorString) +{ + this->m_name.operator=(name); + this->m_name.ToUpperCase(); + SetColorString(colorString); +} + + + +void LegoBackgroundColor::SetColorString(const char* colorString) +{ + +} \ No newline at end of file diff --git a/LEGO1/legobackgroundcolor.h b/LEGO1/legobackgroundcolor.h index c660c0bf..fb53ece2 100644 --- a/LEGO1/legobackgroundcolor.h +++ b/LEGO1/legobackgroundcolor.h @@ -1,10 +1,13 @@ #ifndef LEGOBACKGROUNDCOLOR_H #define LEGOBACKGROUNDCOLOR_H - -class LegoBackgroundColor +#include "mxstring.h" +#include "mxcore.h" +#include "mxbackgroundcolor.h" +class LegoBackgroundColor : public MxBackgroundColor { public: __declspec(dllexport) LegoBackgroundColor(const char *, const char *); + void SetColorString(const char* colorString); }; #endif // LEGOBACKGROUNDCOLOR_H diff --git a/LEGO1/mxbackgroundcolor.cpp b/LEGO1/mxbackgroundcolor.cpp new file mode 100644 index 00000000..da55ccff --- /dev/null +++ b/LEGO1/mxbackgroundcolor.cpp @@ -0,0 +1,15 @@ +#include "mxbackgroundcolor.h" +#include "mxstring.h" + + +// OFFSET: LEGO1 0x1003bea0 +MxString* MxBackgroundColor::GetColorString() +{ + return &m_colorString; +} + +// OFFSET: LEGO1 0x1003beb0 +void MxBackgroundColor::SetColorString(const char* colorString) +{ + this->m_colorString.operator=(colorString); +} diff --git a/LEGO1/mxbackgroundcolor.h b/LEGO1/mxbackgroundcolor.h new file mode 100644 index 00000000..f7786dd9 --- /dev/null +++ b/LEGO1/mxbackgroundcolor.h @@ -0,0 +1,20 @@ +#ifndef MXBACKGROUNDCOLOR_H +#define MXACKGROUNDCOLOR_H +#include "mxstring.h" +#include "mxcore.h" +class MxBackgroundColor +{ +public: + __declspec(dllexport) MxBackgroundColor(const char *, const char *); + MxBackgroundColor(){} + virtual MxString* GetColorString(); + virtual void SetColorString(const char* colorString); +protected: + MxString m_name; + short m_unknown; + MxString m_colorString; + short m_unknown2; + +}; + +#endif // MXBACKGROUNDCOLOR_H