mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 05:31:07 +03:00
feat(client): add ClientGameTimeTickHandler
This commit is contained in:
parent
721ee527eb
commit
efd3f8e8f4
@ -20,6 +20,7 @@
|
|||||||
#include "ui/FrameXML.hpp"
|
#include "ui/FrameXML.hpp"
|
||||||
#include "ui/Game.hpp"
|
#include "ui/Game.hpp"
|
||||||
#include "util/Random.hpp"
|
#include "util/Random.hpp"
|
||||||
|
#include "util/Time.hpp"
|
||||||
#include "world/World.hpp"
|
#include "world/World.hpp"
|
||||||
#include <bc/Debug.hpp>
|
#include <bc/Debug.hpp>
|
||||||
#include <common/Prop.hpp>
|
#include <common/Prop.hpp>
|
||||||
@ -30,6 +31,8 @@ CVar* Client::g_accountNameVar;
|
|||||||
CVar* Client::g_accountListVar;
|
CVar* Client::g_accountListVar;
|
||||||
HEVENTCONTEXT Client::g_clientEventContext;
|
HEVENTCONTEXT Client::g_clientEventContext;
|
||||||
|
|
||||||
|
CGameTime g_clientGameTime;
|
||||||
|
|
||||||
static CVar* s_desktopGammaCvar;
|
static CVar* s_desktopGammaCvar;
|
||||||
static CVar* s_gammaCvar;
|
static CVar* s_gammaCvar;
|
||||||
static CVar* s_textureCacheSizeCvar;
|
static CVar* s_textureCacheSizeCvar;
|
||||||
@ -70,10 +73,18 @@ void BaseInitializeGlobal() {
|
|||||||
PropInitialize();
|
PropInitialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t ClientGameTimeTickHandler(const void* data, void* param) {
|
||||||
|
STORM_ASSERT(data);
|
||||||
|
|
||||||
|
g_clientGameTime.GameTimeUpdate(static_cast<const EVENT_DATA_IDLE*>(data)->elapsedSec);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int32_t ClientIdle(const void* data, void* param) {
|
int32_t ClientIdle(const void* data, void* param) {
|
||||||
// TODO
|
ClientGameTimeTickHandler(data, nullptr);
|
||||||
// ClientGameTimeTickHandler(data, param);
|
|
||||||
// Player_C_ZoneUpdateHandler(data, param);
|
// TODO Player_C_ZoneUpdateHandler(data, nullptr);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
#include <tempest/Vector.hpp>
|
#include <tempest/Vector.hpp>
|
||||||
|
|
||||||
class CVar;
|
class CVar;
|
||||||
|
class CGameTime;
|
||||||
|
|
||||||
namespace Client {
|
namespace Client {
|
||||||
extern CVar* g_accountNameVar;
|
extern CVar* g_accountNameVar;
|
||||||
@ -12,6 +13,8 @@ namespace Client {
|
|||||||
extern HEVENTCONTEXT g_clientEventContext;
|
extern HEVENTCONTEXT g_clientEventContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern CGameTime g_clientGameTime;
|
||||||
|
|
||||||
void ClientInitializeGame(uint32_t mapId, C3Vector position);
|
void ClientInitializeGame(uint32_t mapId, C3Vector position);
|
||||||
|
|
||||||
void ClientPostClose(int32_t a1);
|
void ClientPostClose(int32_t a1);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user