mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(object): add ClntObjMgrInitializeStd
This commit is contained in:
parent
a28a0588fc
commit
eee2986220
@ -14,6 +14,7 @@
|
|||||||
#include "gx/Texture.hpp"
|
#include "gx/Texture.hpp"
|
||||||
#include "model/Model2.hpp"
|
#include "model/Model2.hpp"
|
||||||
#include "net/Poll.hpp"
|
#include "net/Poll.hpp"
|
||||||
|
#include "object/Client.hpp"
|
||||||
#include "sound/Interface.hpp"
|
#include "sound/Interface.hpp"
|
||||||
#include "ui/FrameScript.hpp"
|
#include "ui/FrameScript.hpp"
|
||||||
#include "ui/FrameXML.hpp"
|
#include "ui/FrameXML.hpp"
|
||||||
@ -79,6 +80,10 @@ int32_t ClientIdle(const void* data, void* param) {
|
|||||||
void ClientInitializeGame(uint32_t mapId, C3Vector position) {
|
void ClientInitializeGame(uint32_t mapId, C3Vector position) {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
|
ClntObjMgrInitializeStd(mapId);
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
|
||||||
EventRegister(EVENT_ID_IDLE, ClientIdle);
|
EventRegister(EVENT_ID_IDLE, ClientIdle);
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
#include "object/client/ObjMgr.hpp"
|
#include "object/client/ObjMgr.hpp"
|
||||||
|
#include "client/ClientServices.hpp"
|
||||||
|
#include "net/Connection.hpp"
|
||||||
|
#include <storm/Memory.hpp>
|
||||||
|
|
||||||
#if defined(WHOA_SYSTEM_WIN)
|
#if defined(WHOA_SYSTEM_WIN)
|
||||||
static thread_local ClntObjMgr* s_curMgr;
|
static thread_local ClntObjMgr* s_curMgr;
|
||||||
@ -16,6 +19,21 @@ uint32_t ClntObjMgrGetMapID() {
|
|||||||
return s_curMgr->m_mapID;
|
return s_curMgr->m_mapID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClntObjMgrInitializeStd(uint32_t mapID) {
|
||||||
|
// TODO last instance time
|
||||||
|
|
||||||
|
auto mgr = STORM_NEW(ClntObjMgr);
|
||||||
|
|
||||||
|
g_clientConnection->SetObjMgr(mgr);
|
||||||
|
mgr->m_net = g_clientConnection;
|
||||||
|
|
||||||
|
s_curMgr = mgr;
|
||||||
|
|
||||||
|
ClntObjMgrSetHandlers();
|
||||||
|
|
||||||
|
mgr->m_mapID = mapID;
|
||||||
|
}
|
||||||
|
|
||||||
void ClntObjMgrPop() {
|
void ClntObjMgrPop() {
|
||||||
if (!s_savMgr) {
|
if (!s_savMgr) {
|
||||||
return;
|
return;
|
||||||
@ -33,3 +51,7 @@ void ClntObjMgrPush(ClntObjMgr* mgr) {
|
|||||||
s_savMgr = s_curMgr;
|
s_savMgr = s_curMgr;
|
||||||
s_curMgr = mgr;
|
s_curMgr = mgr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClntObjMgrSetHandlers() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|||||||
@ -6,8 +6,12 @@
|
|||||||
|
|
||||||
uint32_t ClntObjMgrGetMapID();
|
uint32_t ClntObjMgrGetMapID();
|
||||||
|
|
||||||
|
void ClntObjMgrInitializeStd(uint32_t mapID);
|
||||||
|
|
||||||
void ClntObjMgrPop();
|
void ClntObjMgrPop();
|
||||||
|
|
||||||
void ClntObjMgrPush(ClntObjMgr* mgr);
|
void ClntObjMgrPush(ClntObjMgr* mgr);
|
||||||
|
|
||||||
|
void ClntObjMgrSetHandlers();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user