feat(object): implement ClntObjMgrSetHandlers

This commit is contained in:
fallenoak committed 2026-01-08 16:39:06 -06:00
1 parent a93d9a7964
commit be97e9ace8
3 files changed
+34 -1

No files matched your search

+15
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);
}
+15
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
+4 -1
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);
}