diff --git a/Source/Contents/Actors/RenderObject.cpp b/Source/Contents/Actors/RenderObject.cpp index 19eb8ea8..b8e89ab1 100644 --- a/Source/Contents/Actors/RenderObject.cpp +++ b/Source/Contents/Actors/RenderObject.cpp @@ -226,6 +226,8 @@ void CRenderObject::SetColor(int alpha, int red, int green, int blue) { } } +// OFFSET: 0x00CAF050 + // OFFSET: 0x00CC1C20 // FUNCTION: fn_21125 void CGameActor::SetUnknown0305(unsigned char value, int extra) { diff --git a/Source/Contents/Actors/RenderObject.h b/Source/Contents/Actors/RenderObject.h index ad64205e..ee30932a 100644 --- a/Source/Contents/Actors/RenderObject.h +++ b/Source/Contents/Actors/RenderObject.h @@ -52,6 +52,7 @@ public: void SetActionName(ResourceMgr& resources, const char* name); void SetSpriteName(ResourceMgr& resources, const char* name); void SetColor(int alpha, int red, int green, int blue); + void ModifyArgb(int alpha, int red, int green, int blue); void SetSequenceDeadline(std::uint32_t duration); void SetSequenceInterval(unsigned char interval); void SetAnimationSequence( diff --git a/Source/Contents/MapPropertyMgr.cpp b/Source/Contents/MapPropertyMgr.cpp new file mode 100644 index 00000000..3b55ed9b --- /dev/null +++ b/Source/Contents/MapPropertyMgr.cpp @@ -0,0 +1,28 @@ +#include "Contents/MapPropertyMgr.h" + +#include + +// GLOBAL: gl_24816 +CMapPropertyMgr* g_mapPropertyMgr; + +// OFFSET: 0x00CA7640 + +// OFFSET: 0x00CA76C0 + +// OFFSET: 0x00CA7790 + +// OFFSET: 0x00CA7880 + +// OFFSET: 0x00CA7E70 +// FUNCTION: fn_20979 +void CMapPropertyMgr::Clear() { + if (this != nullptr) { + this->m_properties.clear(); + } +} + +// OFFSET: 0x00CA7EA0 + +// OFFSET: 0x00CA7F90 + +// OFFSET: 0x00CA7FB0 diff --git a/Source/Contents/MapPropertyMgr.h b/Source/Contents/MapPropertyMgr.h new file mode 100644 index 00000000..565aadb4 --- /dev/null +++ b/Source/Contents/MapPropertyMgr.h @@ -0,0 +1,45 @@ +#ifndef RAGNAROK_SOURCE_CONTENTS_MAPPROPERTYMGR_H +#define RAGNAROK_SOURCE_CONTENTS_MAPPROPERTYMGR_H + +#include +#include + +class CMapProperty { +public: + CMapProperty(); + virtual ~CMapProperty(); + + void SetValue(int key, int value); + int GetValue(int key); + + /* 0004 */ std::map m_values; +}; + +class CMapPropertyMgr { +public: + // INLINED + CMapPropertyMgr() : m_valid(true) { + } + + // INLINED + virtual ~CMapPropertyMgr() { + } + + static bool Create(); + static void Destroy(); + void Clear(); + int GetValue(int mapId, int key); + + /* 0004 */ bool m_valid; + /* 0008 */ std::map m_properties; +}; + +extern CMapPropertyMgr* g_mapPropertyMgr; + +#if defined(_WIN32) && !defined(_WIN64) +static_assert(sizeof(CMapProperty) == 0xC); +static_assert(sizeof(CMapPropertyMgr) == 0x10); +static_assert(offsetof(CMapPropertyMgr, m_properties) == 0x8); +#endif + +#endif diff --git a/data/compile.json b/data/compile.json index 900c7e3f..87a42a25 100644 --- a/data/compile.json +++ b/data/compile.json @@ -378,6 +378,7 @@ "Source/Contents/Jobs/JobInheritance.cpp": 4, "Source/Contents/Jobs/JobNameInitialization.cpp": 4, "Source/Contents/Jobs/JobNames.cpp": 4, + "Source/Contents/MapPropertyMgr.cpp": 4, "Source/Contents/MapSkyMgr.cpp": 4, "Source/Contents/MessageTable.cpp": 4, "Source/Contents/Messenger/ClientMessenger.cpp": 4,