From 43ad9fc8a65f1735cd6f4e14a5e8dc5ade48882d Mon Sep 17 00:00:00 2001 From: fallenoak Date: Mon, 12 Jan 2026 21:42:13 -0600 Subject: [PATCH] feat(object): add ctors to base object classes --- src/object/client/CGContainer_C.cpp | 4 ++++ src/object/client/CGContainer_C.hpp | 2 ++ src/object/client/CGCorpse_C.cpp | 4 ++++ src/object/client/CGCorpse_C.hpp | 2 ++ src/object/client/CGDynamicObject_C.cpp | 4 ++++ src/object/client/CGDynamicObject_C.hpp | 2 ++ src/object/client/CGGameObject_C.cpp | 4 ++++ src/object/client/CGGameObject_C.hpp | 2 ++ src/object/client/CGItem_C.cpp | 4 ++++ src/object/client/CGItem_C.hpp | 2 ++ src/object/client/CGObject_C.cpp | 8 ++++++++ src/object/client/CGObject_C.hpp | 3 +++ src/object/client/CGPlayer_C.cpp | 4 ++++ src/object/client/CGPlayer_C.hpp | 2 ++ src/object/client/CGUnit_C.cpp | 4 ++++ src/object/client/CGUnit_C.hpp | 2 ++ 16 files changed, 53 insertions(+) diff --git a/src/object/client/CGContainer_C.cpp b/src/object/client/CGContainer_C.cpp index 48b36cc..b6e5fcf 100644 --- a/src/object/client/CGContainer_C.cpp +++ b/src/object/client/CGContainer_C.cpp @@ -1,5 +1,9 @@ #include "object/client/CGContainer_C.hpp" +CGContainer_C::CGContainer_C(uint32_t time, CClientObjCreate& objCreate) : CGItem_C(time, objCreate) { + // TODO +} + void CGContainer_C::SetStorage(uint32_t* storage, uint32_t* saved) { this->CGItem_C::SetStorage(storage, saved); diff --git a/src/object/client/CGContainer_C.hpp b/src/object/client/CGContainer_C.hpp index 2b06c97..7ca1cd1 100644 --- a/src/object/client/CGContainer_C.hpp +++ b/src/object/client/CGContainer_C.hpp @@ -1,12 +1,14 @@ #ifndef OBJECT_CLIENT_CG_CONTAINER_C_HPP #define OBJECT_CLIENT_CG_CONTAINER_C_HPP +#include "object/client/CClientObjCreate.hpp" #include "object/client/CGContainer.hpp" #include "object/client/CGItem_C.hpp" class CGContainer_C : public CGItem_C, public CGContainer { public: // Public member functions + CGContainer_C(uint32_t time, CClientObjCreate& objCreate); void SetStorage(uint32_t* storage, uint32_t* saved); }; diff --git a/src/object/client/CGCorpse_C.cpp b/src/object/client/CGCorpse_C.cpp index 1cab4e4..e62e4fb 100644 --- a/src/object/client/CGCorpse_C.cpp +++ b/src/object/client/CGCorpse_C.cpp @@ -1,5 +1,9 @@ #include "object/client/CGCorpse_C.hpp" +CGCorpse_C::CGCorpse_C(uint32_t time, CClientObjCreate& objCreate) : CGObject_C(time, objCreate) { + // TODO +} + void CGCorpse_C::SetStorage(uint32_t* storage, uint32_t* saved) { this->CGObject_C::SetStorage(storage, saved); diff --git a/src/object/client/CGCorpse_C.hpp b/src/object/client/CGCorpse_C.hpp index ab5c856..b5d0914 100644 --- a/src/object/client/CGCorpse_C.hpp +++ b/src/object/client/CGCorpse_C.hpp @@ -1,12 +1,14 @@ #ifndef OBJECT_CLIENT_CG_CORPSE_C_HPP #define OBJECT_CLIENT_CG_CORPSE_C_HPP +#include "object/client/CClientObjCreate.hpp" #include "object/client/CGCorpse.hpp" #include "object/client/CGObject_C.hpp" class CGCorpse_C : public CGObject_C, public CGCorpse { public: // Public member functions + CGCorpse_C(uint32_t time, CClientObjCreate& objCreate); void SetStorage(uint32_t* storage, uint32_t* saved); }; diff --git a/src/object/client/CGDynamicObject_C.cpp b/src/object/client/CGDynamicObject_C.cpp index 4d3f5cf..b3787f3 100644 --- a/src/object/client/CGDynamicObject_C.cpp +++ b/src/object/client/CGDynamicObject_C.cpp @@ -1,5 +1,9 @@ #include "object/client/CGDynamicObject_C.hpp" +CGDynamicObject_C::CGDynamicObject_C(uint32_t time, CClientObjCreate& objCreate) : CGObject_C(time, objCreate) { + // TODO +} + void CGDynamicObject_C::SetStorage(uint32_t* storage, uint32_t* saved) { this->CGObject_C::SetStorage(storage, saved); diff --git a/src/object/client/CGDynamicObject_C.hpp b/src/object/client/CGDynamicObject_C.hpp index 59fd38e..6905e28 100644 --- a/src/object/client/CGDynamicObject_C.hpp +++ b/src/object/client/CGDynamicObject_C.hpp @@ -1,12 +1,14 @@ #ifndef OBJECT_CLIENT_CG_DYNAMIC_OBJECT_C_HPP #define OBJECT_CLIENT_CG_DYNAMIC_OBJECT_C_HPP +#include "object/client/CClientObjCreate.hpp" #include "object/client/CGDynamicObject.hpp" #include "object/client/CGObject_C.hpp" class CGDynamicObject_C : public CGObject_C, public CGDynamicObject { public: // Public member functions + CGDynamicObject_C(uint32_t time, CClientObjCreate& objCreate); void SetStorage(uint32_t* storage, uint32_t* saved); }; diff --git a/src/object/client/CGGameObject_C.cpp b/src/object/client/CGGameObject_C.cpp index 82bd71b..c97445c 100644 --- a/src/object/client/CGGameObject_C.cpp +++ b/src/object/client/CGGameObject_C.cpp @@ -1,5 +1,9 @@ #include "object/client/CGGameObject_C.hpp" +CGGameObject_C::CGGameObject_C(uint32_t time, CClientObjCreate& objCreate) : CGObject_C(time, objCreate) { + // TODO +} + void CGGameObject_C::SetStorage(uint32_t* storage, uint32_t* saved) { this->CGObject_C::SetStorage(storage, saved); diff --git a/src/object/client/CGGameObject_C.hpp b/src/object/client/CGGameObject_C.hpp index d57e89f..36b3dce 100644 --- a/src/object/client/CGGameObject_C.hpp +++ b/src/object/client/CGGameObject_C.hpp @@ -1,12 +1,14 @@ #ifndef OBJECT_CLIENT_CG_GAME_OBJECT_C_HPP #define OBJECT_CLIENT_CG_GAME_OBJECT_C_HPP +#include "object/client/CClientObjCreate.hpp" #include "object/client/CGGameObject.hpp" #include "object/client/CGObject_C.hpp" class CGGameObject_C : public CGObject_C, public CGGameObject { public: // Public member functions + CGGameObject_C(uint32_t time, CClientObjCreate& objCreate); void SetStorage(uint32_t* storage, uint32_t* saved); }; diff --git a/src/object/client/CGItem_C.cpp b/src/object/client/CGItem_C.cpp index 7756f76..ba092ec 100644 --- a/src/object/client/CGItem_C.cpp +++ b/src/object/client/CGItem_C.cpp @@ -1,5 +1,9 @@ #include "object/client/CGItem_C.hpp" +CGItem_C::CGItem_C(uint32_t time, CClientObjCreate& objCreate) : CGObject_C(time, objCreate) { + // TODO +} + void CGItem_C::SetStorage(uint32_t* storage, uint32_t* saved) { this->CGObject_C::SetStorage(storage, saved); diff --git a/src/object/client/CGItem_C.hpp b/src/object/client/CGItem_C.hpp index 0656562..079d0bd 100644 --- a/src/object/client/CGItem_C.hpp +++ b/src/object/client/CGItem_C.hpp @@ -1,12 +1,14 @@ #ifndef OBJECT_CLIENT_CG_ITEM_C_HPP #define OBJECT_CLIENT_CG_ITEM_C_HPP +#include "object/client/CClientObjCreate.hpp" #include "object/client/CGObject_C.hpp" #include "object/client/CGItem.hpp" class CGItem_C : public CGObject_C, public CGItem { public: // Public member functions + CGItem_C(uint32_t time, CClientObjCreate& objCreate); void SetStorage(uint32_t* storage, uint32_t* saved); }; diff --git a/src/object/client/CGObject_C.cpp b/src/object/client/CGObject_C.cpp index 2533e35..f9be5e9 100644 --- a/src/object/client/CGObject_C.cpp +++ b/src/object/client/CGObject_C.cpp @@ -1,5 +1,13 @@ #include "object/client/CGObject_C.hpp" +CGObject_C::CGObject_C(uint32_t time, CClientObjCreate& objCreate) { + // TODO +} + +void CGObject_C::AddWorldObject() { + // TODO +} + void CGObject_C::SetBlock(uint32_t block, uint32_t value) { auto storage = reinterpret_cast(this->m_obj); storage[block] = value; diff --git a/src/object/client/CGObject_C.hpp b/src/object/client/CGObject_C.hpp index 8526a5e..b63cc38 100644 --- a/src/object/client/CGObject_C.hpp +++ b/src/object/client/CGObject_C.hpp @@ -2,6 +2,7 @@ #define OBJECT_CLIENT_CG_OBJECT_C_HPP #include "object/Types.hpp" +#include "object/client/CClientObjCreate.hpp" #include "object/client/CGObject.hpp" #include "util/GUID.hpp" #include @@ -9,6 +10,8 @@ class CGObject_C : public CGObject, public TSHashObject { public: // Public member functions + CGObject_C(uint32_t time, CClientObjCreate& objCreate); + void AddWorldObject(); void SetBlock(uint32_t block, uint32_t value); void SetStorage(uint32_t* storage, uint32_t* saved); void SetTypeID(OBJECT_TYPE_ID typeID); diff --git a/src/object/client/CGPlayer_C.cpp b/src/object/client/CGPlayer_C.cpp index a838567..5ac5eaa 100644 --- a/src/object/client/CGPlayer_C.cpp +++ b/src/object/client/CGPlayer_C.cpp @@ -3,6 +3,10 @@ #include "object/Types.hpp" #include +CGPlayer_C::CGPlayer_C(uint32_t time, CClientObjCreate& objCreate) : CGUnit_C(time, objCreate) { + // TODO +} + void CGPlayer_C::SetStorage(uint32_t* storage, uint32_t* saved) { this->CGUnit_C::SetStorage(storage, saved); diff --git a/src/object/client/CGPlayer_C.hpp b/src/object/client/CGPlayer_C.hpp index 88fa230..d94b8e8 100644 --- a/src/object/client/CGPlayer_C.hpp +++ b/src/object/client/CGPlayer_C.hpp @@ -1,6 +1,7 @@ #ifndef OBJECT_CLIENT_CG_PLAYER_C_HPP #define OBJECT_CLIENT_CG_PLAYER_C_HPP +#include "object/client/CClientObjCreate.hpp" #include "object/client/CGPlayer.hpp" #include "object/client/CGUnit_C.hpp" #include @@ -10,6 +11,7 @@ class CreatureModelDataRec; class CGPlayer_C : public CGUnit_C, public CGPlayer { public: // Public member functions + CGPlayer_C(uint32_t time, CClientObjCreate& objCreate); void SetStorage(uint32_t* storage, uint32_t* saved); }; diff --git a/src/object/client/CGUnit_C.cpp b/src/object/client/CGUnit_C.cpp index 8bff572..5a6ead7 100644 --- a/src/object/client/CGUnit_C.cpp +++ b/src/object/client/CGUnit_C.cpp @@ -89,6 +89,10 @@ const char* CGUnit_C::GetDisplayRaceNameFromRecord(const ChrRacesRec* raceRec, U return raceRec->m_name; } +CGUnit_C::CGUnit_C(uint32_t time, CClientObjCreate& objCreate) : CGObject_C(time, objCreate) { + // TODO +} + void CGUnit_C::SetStorage(uint32_t* storage, uint32_t* saved) { this->CGObject_C::SetStorage(storage, saved); diff --git a/src/object/client/CGUnit_C.hpp b/src/object/client/CGUnit_C.hpp index f025b5b..5b651ff 100644 --- a/src/object/client/CGUnit_C.hpp +++ b/src/object/client/CGUnit_C.hpp @@ -1,6 +1,7 @@ #ifndef OBJECT_CLIENT_CG_UNIT_C_HPP #define OBJECT_CLIENT_CG_UNIT_C_HPP +#include "object/client/CClientObjCreate.hpp" #include "object/client/CGObject_C.hpp" #include "object/client/CGUnit.hpp" #include "object/Types.hpp" @@ -15,6 +16,7 @@ class CGUnit_C : public CGObject_C, public CGUnit { static const char* GetDisplayRaceNameFromRecord(const ChrRacesRec* raceRec, UNIT_SEX sex, UNIT_SEX* displaySex); // Public member functions + CGUnit_C(uint32_t time, CClientObjCreate& objCreate); void SetStorage(uint32_t* storage, uint32_t* saved); };