feat(object): implement ClntObjMgrSetHandlers

This commit is contained in:
fallenoak 2026-01-08 16:39:06 -06:00
parent a93d9a7964
commit be97e9ace8
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
3 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,15 @@
#include "object/client/MessageHandlers.hpp"
#include "util/Unimplemented.hpp"
#include <common/DataStore.hpp>
int32_t ObjectCompressedUpdateHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
WHOA_UNIMPLEMENTED(0);
}
int32_t ObjectUpdateHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
WHOA_UNIMPLEMENTED(0);
}
int32_t OnObjectDestroy(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
WHOA_UNIMPLEMENTED(0);
}

View File

@ -0,0 +1,15 @@
#ifndef OBJECT_CLIENT_MESSAGE_HANDLERS_HPP
#define OBJECT_CLIENT_MESSAGE_HANDLERS_HPP
#include "net/Types.hpp"
#include <cstdint>
class CDataStore;
int32_t ObjectCompressedUpdateHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
int32_t ObjectUpdateHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
int32_t OnObjectDestroy(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
#endif

View File

@ -10,6 +10,7 @@
#include "object/client/CGObject_C.hpp"
#include "object/client/CGPlayer_C.hpp"
#include "object/client/CGUnit_C.hpp"
#include "object/client/MessageHandlers.hpp"
#include "util/Unimplemented.hpp"
#include <common/ObjectAlloc.hpp>
#include <storm/Memory.hpp>
@ -133,5 +134,7 @@ void ClntObjMgrPush(ClntObjMgr* mgr) {
}
void ClntObjMgrSetHandlers() {
// TODO
s_curMgr->m_net->SetMessageHandler(SMSG_UPDATE_OBJECT, &ObjectUpdateHandler, nullptr);
s_curMgr->m_net->SetMessageHandler(SMSG_COMPRESSED_UPDATE_OBJECT, &ObjectCompressedUpdateHandler, nullptr);
s_curMgr->m_net->SetMessageHandler(SMSG_DESTROY_OBJECT, &OnObjectDestroy, nullptr);
}